gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > nesDS source

#114336 - chuckstudios - Sat Jan 06, 2007 8:21 pm

If anybody has this, try and get it to Moonlight (Infantile Paralysiser) His blog says that he was trying to make a MSE (MoonShell Executable) to launch .nes files! But he couldn't find the nesDS source...

#114379 - Dwedit - Sun Jan 07, 2007 10:55 am

NesDS is based on pocketnes, and shares a lot of code. PocketNES doesn't compile on a GCC toolchain because the GNU assembler doesn't support register-relative equates, or the associated MAP directive. The MAP directive allows a bunch of equates to be defined relative to a base address, or relative to a register. When the equates are relative to a register, you can do LDR, STR, LDRB, STRB, ADR, or ADRL instructions on them.
From what I've seen, GCC's arm assembler only supports ADR when used with pc-relative equates.

Here's a snippet of code from nesds which makes use of the map directive to define a bunch of symbols ("globalptr" was defined as register r10 using the RN directive)
Code:

 MAP 0,globalptr   ;6502.s
opz # 256*4
readmem_tbl # 8*4
writemem_tbl # 8*4
memmap_tbl # 8*4
cpuregs # 7*4
m6502_s # 4
lastbank # 4
...


So either someone needs to make a code preprocessor to turn ARM SDT asm code into GNU Assembler compatible code, or the gnu assembler needs to add support for register-reletive equates.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#114398 - Dark Knight ez - Sun Jan 07, 2007 1:59 pm

Besides of course loopy, also someone named emu_kidid (who hangs around on Maxconsole forums apparently) has the source to NesDS. Hope that helps.
_________________
AmplituDS website

#114402 - Dwedit - Sun Jan 07, 2007 3:59 pm

Actually I also have it. Still haven't tried to compile it though, since it needs codewarrior and arm sdt.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."