View unanswered posts | View active topics It is currently Mon Dec 18, 2017 7:47 am



Reply to topic  [ 4 posts ] 
 Assembly for GBA 
Author Message

Joined: Sun Jun 18, 2017 4:48 am
Posts: 2
I'm having issue with a program from the GBA ASM tutorial on patater.com I don't know if it's the code not working on the newer version of the assembler, if I'm using the wrong assembler or what's going on any help would be appreciated.

Code:
.arm
.text
.global main
main:
  mov r0, #0x4000000
  mov r1, #0x400
  add r1, r1, #3
  str r1, [r0]

  mov r0, #0x6000000
  mov r1, #0xFF
  mov r2, #0x9600
loop1:
  strh r1, [r0], #2
  subs r2, r2, #1
  bne loop1

infin:
  b infin



Sun Jun 18, 2017 5:03 am
Profile
Site Admin

Joined: Tue Aug 09, 2005 3:21 am
Posts: 1210
Location: UK
What's the issue?

It's hard to help without knowing what you're actually doing. Please tell us what you're trying to do, what steps you've taken to achieve that goal and what errors/problems you encountered along the way.

_________________
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog


Sun Jun 25, 2017 3:21 pm
Profile ICQ WWW

Joined: Sun Jun 18, 2017 4:48 am
Posts: 2
There's not much to say honestly when I run the bin made from the assembly code through arm-none-eabi-gcc and arm-none-eabi-objcopy. It does nothing VBA gives me moving values in the disassembler but no$ won't even load the file. I can't see many things that could be an issue. I've double checked the memory locations multiple times but they're fine.


Sat Jul 01, 2017 9:40 am
Profile
Site Admin

Joined: Tue Aug 09, 2005 3:21 am
Posts: 1210
Location: UK
I've just tried this and it produces a red screen on hardware, no$gba and mGBA. I haven't used VBA in a very long time.

Code:
arm-none-eabi-gcc -o test.elf -specs=gba.specs test.S
arm-none-eabi-objcopy -O binary test.elf test.gba
gbafix test.gba


The last step, using gbafix may help with no$gba although it worked fine in my current setup without that. I think no$gba may default to complaining about checksums though.

_________________
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog


Thu Jul 06, 2017 10:14 pm
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads