Assembly for GBA
Page 1 of 1

Author:  WorldInThe [ Sun Jun 18, 2017 5:03 am ]
Post subject:  Assembly for GBA

I'm having issue with a program from the GBA ASM tutorial on 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.

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

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

  b infin

Author:  WinterMute [ Sun Jun 25, 2017 3:21 pm ]
Post subject:  Re: Assembly for GBA

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.

Author:  WorldInThe [ Sat Jul 01, 2017 9:40 am ]
Post subject:  Re: Assembly for GBA

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.

Author:  WinterMute [ Thu Jul 06, 2017 10:14 pm ]
Post subject:  Re: Assembly for GBA

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.

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.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB® Forum Software © phpBB Group