News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Dumping old lost NES roms/games  (Read 4662 times)

Arcade-Elite

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Dumping old lost NES roms/games
« on: December 25, 2019, 06:59:54 pm »
Hi everyone,

I figured this was a shot in the dark but i was wondering if anyone could modify or extract nes roms from multicarts ect. For good game's that should have had there own rom dumped, instead of getting lost in plug n plays or multicarts where they should have there own NES cart's with nice artwork labels. A couple of examples are games like Elf Land, Sky Dreamer, and Forest Adventure.

Sky dreamer: https://www.youtube.com/watch?v=6dkeAdfvObM
Elf Land: https://www.youtube.com/watch?v=g6TCri-NY98
Forest Adventure: https://www.youtube.com/watch?v=PgmKUmoSCi8

Now these games are not AAA NES games by any stretch, but for me as a hardcore gammer and collector i would love to get them each on there own cart. I did some home work and found that some one was doing this for these games because they got Mirror Devil World made/converted to a nes rom.But that was 20 years ago. If anyone is interested of getting this done it would be awesome and it would help out romhacking for more new Homebrew/Unlicensed gamers. As i have seen the homebrew communities have sky rocket in games even if they are only short 5 min games like blade buster ect.

Like i said just a shot in the dark if anyone could continue this recovering lost nes games. If anyone could do it i think romhacking.net is the main place to ask as you guys have done soooo much good work already. Thanks again for checking out this idea.  :beer:

Googie

  • Hero Member
  • *****
  • Posts: 874
  • I'd like to solve the puzzle... Jiggers!
    • View Profile
    • My work in progress ROM Hacking site
Re: Dumping old lost NES roms/games
« Reply #1 on: December 26, 2019, 07:48:23 pm »
Those are cool videos of those games. :)

You might wanna contact KingPepe and his crew here, they deal with NES bootlegs and those type'a games. But it would be cool to see those games in their own NES ROM. They have a Discord server too, in case anyone doesn't contact you right away in those forums.

Good luck, bro.

nesrocks

  • Hero Member
  • *****
  • Posts: 638
    • View Profile
    • nesrocks.com
Re: Dumping old lost NES roms/games
« Reply #2 on: December 26, 2019, 08:15:36 pm »
Elf Land has been dumped, look in the comments in the video you posted.
Sky Dreamer looks like a VT game, not NES. I could be wrong.

Arcade-Elite

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Dumping old lost NES roms/games
« Reply #3 on: December 29, 2019, 02:50:12 am »
Elf land has not been dumped yet, they call the hole multicart rom elf land as its the best game on the multicart.

Arcade-Elite

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Dumping old lost NES roms/games
« Reply #4 on: December 29, 2019, 02:52:19 am »
Thanks for checking this idea tho maybe some day someone would want these games on a cart like me.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6939
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Dumping old lost NES roms/games
« Reply #5 on: December 29, 2019, 01:07:19 pm »
DreamGear is dumped and supported in MAME.
The last video even shows the person running it in MAME.
"My watch says 30 chickens" Google, 2018

nesrocks

  • Hero Member
  • *****
  • Posts: 638
    • View Profile
    • nesrocks.com
Re: Dumping old lost NES roms/games
« Reply #6 on: December 29, 2019, 03:00:28 pm »
Elf land has been dumped.

PowerPanda

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Dumping old lost NES roms/games
« Reply #7 on: December 29, 2019, 05:25:52 pm »
My guess is that each of these games exists as a block of hex code, and the selection screen just uses a jump table. All you'd theoretically have to do is figure out which block of hex to copy and copy it to a new file. I haven't actually looked at the rom though, so that's literally a guess.

Arcade-Elite

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Dumping old lost NES roms/games
« Reply #8 on: December 29, 2019, 10:29:33 pm »
Yeah elf land has not been dumped as a nes rom that can be played on a nes mapper for the system. Yes it can be played on mame as everything can or pc. But those games where made for 8 bit nes structure but not sold on nes do to license and cost so they made there own code for the plug n plays. Thats why 100's of plug n plays where made in the 80's and 90's.hopefully some one can use the hex code and make them there own nes rom (like i said before Mirrior devil was done). As a dendy rom, same as nes i think.    http://u168.ru/shares/Games/Dendy/Rom/

Mirrior devil world: https://www.youtube.com/watch?v=0B3uol0qWpw

Now i did find info that they where made in a famicom multicart but there all in 1 rom so it would be making a custom mapper for each game rom i guess.

I also found out that maybe.. Maybe some one made elfland for famicom.   https://famicomworld.com/game/1629/

And the last info i could find of this is cah4e3 dumping the multicart rom and trying to mapper i guess but no luck on finding the standalong game roms.  April 2010.        https://cah4e3.shedevr.org.ru/dumping_2010.php

Arcade-Elite

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Dumping old lost NES roms/games
« Reply #9 on: December 29, 2019, 10:50:41 pm »
O and thanks powerpanda that's seems to be the right step on the multicart rom just hope any hackers on this site wants to do it as 400 and more ppl have seen this topic. It probably is easy for you guess thats why i figured to get on here and ask  :)

Dacicus

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: Dumping old lost NES roms/games
« Reply #10 on: December 31, 2019, 02:28:20 pm »
I decided to take a look into the Elf Land situation using FCEUX 2.2.3.  The multicart ROM that I used is 393,333 bytes in size and has these hashes:

MD5: aad2e7bc4e1da2ddc7f91b44bb8181a9
SHA-1: af767130ec844ab7fe5952e4ac1cfcfe8b53ba71

Based on the way that FCEUX's hex editor shows the ROM file, it appears that FCEUX removes bytes 0x10 through 0x63 from the ROM (additional header info?).  The ROM locations indicated below all assume that this removal has been done, unless specified otherwise.

Via basic RAM search, you find that $0052 stores the game selection on the menu screen.  Setting a read breakpoint on that address leads to this code when you press A or B:

Code: [Select]
>00:C13F:A5 52     LDA $0052
 00:C141:48        PHA         ; Save the value of $0052
 00:C142:A2 00     LDX #$00
 00:C144:8A        TXA
 00:C145:95 00     STA $00,X   ; Clear out RAM
 00:C147:9D 00 02  STA $0200,X
 00:C14A:9D 00 03  STA $0300,X
 00:C14D:9D 00 04  STA $0400,X
 00:C150:9D 00 05  STA $0500,X
 00:C153:9D 00 06  STA $0600,X
 00:C156:9D 00 07  STA $0700,X
 00:C159:CA        DEX
 00:C15A:D0 E9     BNE $C145
 00:C15C:68        PLA
 00:C15D:85 52     STA $0052   ; Restore the value of $0052
 00:C15F:A2 00     LDX #$00
 00:C161:8A        TXA
 00:C162:9D 00 01  STA $0100,X ; Clear out the stack
 00:C165:CA        DEX
 00:C166:D0 FA     BNE $C162
 00:C168:CA        DEX
 00:C169:9A        TXS         ; S = 0xFF

At this point, all of the internal RAM should be zero except for the value of $0052.  Then this happens:

Code: [Select]
>00:C16A:A5 52     LDA $0052   ; A = game selection
 00:C16C:AA        TAX
 00:C16D:BD 87 C1  LDA $C187,X ; 0x0197 in the ROM file
 00:C170:85 54     STA $0054
 00:C172:BD 4F C2  LDA $C24F,X ; 0x025F in the ROM file
 00:C175:85 55     STA $0055
 00:C177:0A        ASL
 00:C178:AA        TAX
 00:C179:BD 17 C3  LDA $C317,X ; 0x0327 in the ROM file
 00:C17C:85 00     STA $0000
 00:C17E:E8        INX
 00:C17F:BD 17 C3  LDA $C317,X
 00:C182:85 01     STA $0001
 00:C184:6C 00 00  JMP ($0000) ; $C33F for Elf Land = 0x034F in the ROM file

The data at 0x0327 seems to be the jump table mentioned by PowerPanda previously.

Code: [Select]
00:C33F:A5 54     LDA $0054   ; From above
 00:C341:85 15     STA $0015
 00:C343:4C 53 C5  JMP $C553
...
>00:C553:A2 00     LDX #$00
 00:C555:BD 7F C5  LDA $C57F,X ; 0x058F in the ROM file
 00:C558:9D 00 04  STA $0400,X
 00:C55B:E8        INX
 00:C55C:E0 06     CPX #$06
 00:C55E:D0 F5     BNE $C555
 00:C560:A5 55     LDA $0055   ; From above
 00:C562:0A        ASL
 00:C563:AA        TAX
 00:C564:BD 85 C5  LDA $C585,X ; 0x0595 in the ROM file
 00:C567:05 5D     ORA $005D   ; Should be 0 because RAM was cleared out
 00:C569:8D 01 04  STA $0401
 00:C56C:E8        INX
 00:C56D:BD 85 C5  LDA $C585,X ; 0x0595 in the ROM file
 00:C570:8D 02 04  STA $0402
 00:C573:78        SEI         ; This looks typical for
 00:C574:D8        CLD         ; game start-up code
 00:C575:A2 FF     LDX #$FF
 00:C577:AD 02 20  LDA PPU_STATUS
 00:C57A:10 FB     BPL $C577
 00:C57C:4C 00 04  JMP $0400

The values at $0400 were set in the code starting at $C553 earlier.  For Elf Land, it looks like:

Code: [Select]
>  :0400:8D C8 F0  STA $F0C8   ; Causes a bank switch
   :0403:6C FC FF  JMP ($FFFC) ; $FFFC is the reset vector = $B814 for Elf Land

Examining the values that get loaded into $8000, $A000, $C000, and $E000 after the bank switch suggests that the Elf Land part of the ROM starts at 0x8064 in the fully headered (i.e., without removing bytes 0x10 throught 0x63) multicart ROM.  I haven't tested further to determine if any additional bank switching is done, but this should serve as a start for making a ROM that contains only Elf Land.

EDIT:
I did some more work on this.  By comparing FCEUX's PPU Viewer with the graphics in YY-CHR, it appears that Elf Land's graphics are the 32 KiB (0x8000 bytes) starting at 0x5006C in the fully headered multicart ROM.  You can combine the 32 KiB starting at 0x8064 (PRG) with those 32 KiB (CHR) to make an Elf Land-only ROM.  The NESDev wiki says that Elf Land is a CNROM game, so I added an iNES header with values 0x02 0x04 0x31 for bytes 4-6 and 0x00 for bytes 7-15.  This allows the game to run, but it loads incorrect level data when you start playing.  I think that this is a result of FCEUX's default initial RAM state.  You might be able to fix this by inserting that internal RAM clearing code somewhere in the ROM, if you can find free space.

EDIT 2:
It turns out that someone from Bootleg Games Central (see Googie's post earlier) has already done the fix.  The solution was more simple than I thought, simply changing:

Code: [Select]
00:B81E:A5 15     LDA $0015
to

Code: [Select]
00:B81E:A9 00     LDA #$00
FCEUX's default initial RAM state would cause A to be loaded with 0xFF when reading $0015, leading to the incorrect level data that I mentioned.  The fixed ROM has four other bytes changed, including two in the header, but I believe that the game should work with just the info provided so far.
« Last Edit: January 02, 2020, 02:52:58 am by Dacicus »

Arcade-Elite

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Dumping old lost NES roms/games
« Reply #11 on: January 03, 2020, 06:52:09 pm »
Awesome this is why you guys rock!! with these classic roms lol thanks alot Dacicus for the info  ;D