Romless NES program format intro, along with specification and example code for ca65, asm6, nesasm, and wla-dx.
The main benefit is that they can also be uploaded from PC to NES via a serial cable. In the NES can be a PowerPak, or any other cartridge running a bootloader. This allows a quick edit-debug cycle when testing code on hardware. Since the cartridge in the NES doesn't need a reprogrammable ROM, cheaper cartridges can be used, allowing more people to run programs on hardware.
There are other uses too, for example compilations of romless programs are easy because they don't care how they're loaded. So you could compress several into a ROM, and have a menu to select which to run. The programs themselves wouldn't need to be modified at all to support this. This would be great for a game compo.
One interesting use is previewing graphics on a NES. There is a small include file that makes displaying yy-chr data files really easy. This allows editing the image, then a quick send from PC to NES to display it.
All four major NES assemblers are supported: ca65, asm6, nesasm, and wla-dx. An include file handles most of the file setup, so programs are short and minimal. Here's one that displays a message on screen:
Code: Select all
NO_INTERRUPTS = 1 .include "romless.inc" reset: ; The loader has already done the following for us: ; ; * Load palette, CHR RAM, nametables ; * Clear PPU registers ; * Wait for VBL ; Enable background lda #$08 sta $2001 forever: jmp forever BEGIN_CHARS .byte 0,0,0,0,0,0,0,0, $00,$00,$00,$00,$00,$00,$00,$00 ; ' ' .byte 0,0,0,0,0,0,0,0, $C6,$C6,$C6,$FE,$C6,$C6,$C6,$00 ; 'H' .byte 0,0,0,0,0,0,0,0, $FE,$C0,$C0,$FC,$C0,$C0,$FE,$00 ; 'E' .byte 0,0,0,0,0,0,0,0, $60,$60,$60,$60,$60,$60,$7E,$00 ; 'L' .byte 0,0,0,0,0,0,0,0, $7C,$C6,$C6,$C6,$C6,$C6,$7C,$00 ; 'O' BEGIN_SCREENS dsb 10*$20 + 14 ; center on screen .byte 1,2,3,3,4 ; "HELLO" BEGIN_PALETTE .byte $0F,$30,$30,$30 ; Black backgroud, white foreground END_ROMLESS
I'm still working some bugs out of the PC loading, and haven't finished the documentation. At this point, the file format isn't finalized. I'm posting to get more feedback on it. It's been through a couple of weeks of work, so it's pretty close to what it'll be.