I found it fascinating several games actually have uncompiled code in their unused secitons of ROM !!
http://tcrf.net/Category:Games_with_leftover_code
How can programmers make such a leak ?
Anyways, on the interesting things (for us) :
1) Air Forteress (J)
It's interesting apparently they call $2006 "vrad" and $2007 "vrdt", I guess for VRAM address and VRAM data.
You also see some pre-processor directives, like .ifn and .ife
A bit later you see that, very likely, $2000 is called CTLR0, and the variable where they store what they write to $2000 (which I usually call M2000 in my code) is called CR0.
Finally I must say the labels and comments are very weird. It almost looks like disassembled code sometimes. I sure doesn't wish to program like this, it would make the code extremely non-maintainable.
2) Dragon's Lair (J) and (E)
Has probably the biggest piece of leftover code ever ! It's well known for being a pretty horrible NES game too, so we can have a good counter example about how NOT to code a game.
We can see how the split their pointer tables into low and high componant, as we all (should) know it's more efficient this way. Apparently the assembler they used uses DL for what would be .db <xxx and DH for .db >xxxx
Apparently they use '!' for local labels.
They use hardwired addresses like $200 to setup their sprites, apparently they use a sprite zero hit. Shame on them
They use the word "attribute" so apparently attribute tables were actually called like this.
Their temporary variables are called ZPAGE_BYTE[n] Doesn't sounds very friendly to code this way.
Apparently they use macros for several kind of stuff, like ADD16
Their banks were apparently programmed in reverse order as we can see here :
Apparently they were using MS-DOS, and the same PDS environment that was used for Ian Bell's tank demo as I can conclude from this :
3) Robin Hood
Apprently they used .chr files
They used structure-like syntax with dots in their labels. This is really elegant in fact !
4) Secret of Evermore
Okay it's not NES it's Super NES and there is nothing much interesting other than the game was written in C instead of assembly !
5) Zig Zag Cat
Also Super NES, this time it's in assembly. Also it looks more like 6502 assembly than 65816 to me. They also use the ! for local labels, which means it's probably PDS too.
http://tcrf.net/Category:Games_with_leftover_code
How can programmers make such a leak ?
Anyways, on the interesting things (for us) :
1) Air Forteress (J)
It's interesting apparently they call $2006 "vrad" and $2007 "vrdt", I guess for VRAM address and VRAM data.
You also see some pre-processor directives, like .ifn and .ife
A bit later you see that, very likely, $2000 is called CTLR0, and the variable where they store what they write to $2000 (which I usually call M2000 in my code) is called CR0.
Finally I must say the labels and comments are very weird. It almost looks like disassembled code sometimes. I sure doesn't wish to program like this, it would make the code extremely non-maintainable.
2) Dragon's Lair (J) and (E)
Has probably the biggest piece of leftover code ever ! It's well known for being a pretty horrible NES game too, so we can have a good counter example about how NOT to code a game.
We can see how the split their pointer tables into low and high componant, as we all (should) know it's more efficient this way. Apparently the assembler they used uses DL for what would be .db <xxx and DH for .db >xxxx
Apparently they use '!' for local labels.
They use hardwired addresses like $200 to setup their sprites, apparently they use a sprite zero hit. Shame on them
They use the word "attribute" so apparently attribute tables were actually called like this.
Their temporary variables are called ZPAGE_BYTE[n] Doesn't sounds very friendly to code this way.
Apparently they use macros for several kind of stuff, like ADD16
Their banks were apparently programmed in reverse order as we can see here :
Code:
; End of bank $39
; --- -- ---- ---
;======================================
; Start of bank $38
; ----- -- ---- ---
ORG $138,$8000
; --- -- ---- ---
;======================================
; Start of bank $38
; ----- -- ---- ---
ORG $138,$8000
Apparently they were using MS-DOS, and the same PDS environment that was used for Ian Bell's tank demo as I can conclude from this :
Code:
; End of bank $30/$31
; --- -- ---- -------
;======================================
IF EPROM=99
SEND COMPUTER1
ENDIF
IF EPROM=98
SEND MSDOS,"C:\PDSMAST\DLAIRFCS\EPROM\DL.PDS"
ENDIF
; --- -- ---- -------
;======================================
IF EPROM=99
SEND COMPUTER1
ENDIF
IF EPROM=98
SEND MSDOS,"C:\PDSMAST\DLAIRFCS\EPROM\DL.PDS"
ENDIF
3) Robin Hood
Apprently they used .chr files
They used structure-like syntax with dots in their labels. This is really elegant in fact !
4) Secret of Evermore
Okay it's not NES it's Super NES and there is nothing much interesting other than the game was written in C instead of assembly !
5) Zig Zag Cat
Also Super NES, this time it's in assembly. Also it looks more like 6502 assembly than 65816 to me. They also use the ! for local labels, which means it's probably PDS too.