Dumping RAM variables from Emulator?
Moderator: Moderators
- neilbaldwin
- Posts: 481
- Joined: Tue Apr 28, 2009 4:12 am
- Contact:
Dumping RAM variables from Emulator?
Does anyone know of a clever way that I could dump a portion of RAM from an emulator (Nestopia) so that I can access the binary file from my computer?
I'm writing a NES drum-sound editor and want to be able to save the sound tables to include in my sound engine.
I'm writing a NES drum-sound editor and want to be able to save the sound tables to include in my sound engine.
- neilbaldwin
- Posts: 481
- Joined: Tue Apr 28, 2009 4:12 am
- Contact:
Hmmmm, it seems it does but getting it to work seems quite far from "automatic" 
Can anyone help? I'm guessing I have to configure my iNES header to use an MMC1 mapper with batter-backed RAM option?
I think I've done that because now when I load the ROM file into Nestopia it comes up with the battery-file-not-found-one-will-be-created dialogue box.
However, despite what it says it doesn't seem to create a file anywhere. Though I've tried it with a game ROM and the correct <game>.IPS file gets created. I tried writing a bunch of numbers to $6000 (and onwards) but still nothing.
I seem to remember you have to do some MMC1 register stuff but I've no chance of remembering and can't find anything relevant on the net.
Can anyone help? I'm guessing I have to configure my iNES header to use an MMC1 mapper with batter-backed RAM option?
I think I've done that because now when I load the ROM file into Nestopia it comes up with the battery-file-not-found-one-will-be-created dialogue box.
However, despite what it says it doesn't seem to create a file anywhere. Though I've tried it with a game ROM and the correct <game>.IPS file gets created. I tried writing a bunch of numbers to $6000 (and onwards) but still nothing.
I seem to remember you have to do some MMC1 register stuff but I've no chance of remembering and can't find anything relevant on the net.
- neilbaldwin
- Posts: 481
- Joined: Tue Apr 28, 2009 4:12 am
- Contact:
mic_ wrote:Enabling the PRG RAM..?
I've just tried that by doing;
Code: Select all
lda #%00000000
ldx #$80
stx $FFFF
sta $FFFF
lsr a
sta $FFFF
lsr a
sta $FFFF
lsr a
sta $FFFF
lsr a
sta $FFFF
1) Do you have to write all of the MMC1 registers in sequence or can you just write to one (as I've done)?
2) Presumably, writing to the SRAM area you can just write to it like normal RAM;
Code: Select all
ldx #$00
--a lda some_variables,x
sta $6000,x
inx
bne --a
- neilbaldwin
- Posts: 481
- Joined: Tue Apr 28, 2009 4:12 am
- Contact:
I don't know about MMC1 but if commercial games does create the save file then the emulator seems to be working fine.neilbaldwin wrote:But in any case, commercial game ROMs seem able to create an .IPS file in the folder where the ROM is.
In that case, there is a good chance that it's a setting problem in your ines header. What I would do in that situation is to try to find a commercial game that support the same setting and see what is the difference between your header and the commercial game one.
Or even more simple, you could post your ines header setting and people could confirm if your settings are fine or not.
- neilbaldwin
- Posts: 481
- Joined: Tue Apr 28, 2009 4:12 am
- Contact:
Two good ideas. While I'm off to try the first one, here's the second oneBanshaku wrote:I don't know about MMC1 but if commercial games does create the save file then the emulator seems to be working fine.neilbaldwin wrote:But in any case, commercial game ROMs seem able to create an .IPS file in the folder where the ROM is.
In that case, there is a good chance that it's a setting problem in your ines header. What I would do in that situation is to try to find a commercial game that support the same setting and see what is the difference between your header and the commercial game one.
Or even more simple, you could post your ines header setting and people could confirm if your settings are fine or not.
Code: Select all
; iNES header
; iNES identifier
.byte "NES",$1a
; Number of PRG-ROM blocks
.byte $02
; Number of CHR-ROM blocks
.byte $01
; ROM control bytes: Horizontal mirroring, no SRAM
; or trainer, Mapper #0
.byte %00010010, %00000000
; Filler
.byte $00,$00,$00,$00,$00,$00,$00,$00- neilbaldwin
- Posts: 481
- Joined: Tue Apr 28, 2009 4:12 am
- Contact:
hmm.. I don't see any problem here, your ines header seems fine.
Since I don't know much about MMC1 I did an overview of the doc made by Disch and some revision of the MMC1 required you to set a flag here:
Maybe some emulator requires it but now I'm just speculating. I wanted to help you more but my knowledge about the subject stop there. I'm sure someone else on the board should be able to confirm the cause of your problem.
Since I don't know much about MMC1 I did an overview of the doc made by Disch and some revision of the MMC1 required you to set a flag here:
Code: Select all
$E000-FFFF: [...W PPPP]
W = WRAM Disable (0=enabled, 1=disabled)
Disabled WRAM cannot be read or written. Earlier MMC1 versions apparently do not have this bit implemented. Later ones do.
- neilbaldwin
- Posts: 481
- Joined: Tue Apr 28, 2009 4:12 am
- Contact:
No problem, thanks for the info.Banshaku wrote: Maybe some emulator requires it but now I'm just speculating. I wanted to help you more but my knowledge about the subject stop there. I'm sure someone else on the board should be able to confirm the cause of your problem.
It's got to be something simple/silly - it always is