Dwedit's Board

Enjoy the board

You are not logged in.

Announcement

User passwords may have been corrupted, if you can't log in, use the "Forgot Password" feature. If you still can't log in, contact me and I can try to manually reset your password.

#1 2016-05-21 5:49:39 pm

catskull
Member
Registered: 2016-05-21
Posts: 6

NES 2.0 Header support in PocketNES

Hi, great emulator!

I am trying to use some nice music tools that you can find here: http://www.nes-audio.com/

Specifically I am trying to use Pulsar. On boot, the game complains that the emulator doesn't support 32k saves and to ask the author to fully support NES 2.0

How much work would it be to get the rom working? Does anyone have any tips or advice?

Thanks!

Offline

#2 2016-05-22 11:50:12 am

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,022
Website

Re: NES 2.0 Header support in PocketNES

Neil Baldwin does make nice programs.
PocketNES never had NES 2.0 support, and increasing SRAM size from fixed 8K to variable 8-32K might be a little tricky, but Goomba/Goomba Color has 32K saves already.
Besides specifying large amounts of SRAM/WRAM, and highly oversized games, I can't really think of any other practical uses of NES 2.0 support.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#3 2016-05-22 5:24:21 pm

catskull
Member
Registered: 2016-05-21
Posts: 6

Re: NES 2.0 Header support in PocketNES

Thanks for the reply. Really, even a special build specifically for Pulsar and maybe some of his other programs (which I believe have the same requirements as Pulsar) would suffice. I know there are quite a few people in the chipmusic community who would enjoy using this.

I have the source and am able to compile it. It's a little hard to follow, I'm not very familiar with GBA dev or NES emulators, but would it be as simple as changing

memset32(NES_SRAM,0,8192);

in loadcart.c, line 243 to be

memset32(NES_SRAM,0,32768);

?

Offline

#4 2016-05-22 6:02:42 pm

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,022
Website

Re: NES 2.0 Header support in PocketNES

Oh god no, not that easy.  That change you mentioned would just overwrite 24K of RAM past the end of the array, not what you want to do there.


Adding 32K SRAM support would require a bunch of changes.
The save system right now assumes that the only save size is 8K, and allocates the last 8K of GBA SRAM to allow power to be shut off at any time.  I'd have to force it to not use that kind of thing for 32K of SRAM, and instead not assign an owner to the last 8K of GBA SRAM.
Without the last 8K being reserved for letting you turn off the console at any time, saving would happen when you hit L+R to enter the menu.
Then the save files themselves need to account for multiple possible sizes for SRAM, and Save States would need a little changing too.
The emulator allocates RAM statically, which doesn't play nicely with varying the size of things.  Right now, SRAM is stored in fast IWRAM, at a fixed size of 8K regardless of whether a cartridge has RAM in it or not.  The emulator makes certain assumptions about how the emulator's EWRAM is laid out.  It assumes that nearly the entirety of EWRAM is available for holding cached ROM pages.  I'd need to change some stuff to get it to store an extra 24K of SRAM in there too.
Right now, there is no support for bankswitching the NES SRAM.  That needs to be done to make it bigger than 8K.  I'd need to look up the MMC1 variants do this and add in the feature, this is just me reading reference material.
Finally, there's adding in NES 2.0 support itself so the game can specify that it even has a larger RAM size.

Last edited by Dwedit (2016-05-22 6:10:09 pm)


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#5 2016-05-23 8:48:39 am

catskull
Member
Registered: 2016-05-21
Posts: 6

Re: NES 2.0 Header support in PocketNES

Ah, I see. Thanks for the nice reply, and sorry for my noob idea. As you can tell, I don't know what I'm doing.

Do you have any interest in doing this? It sounds like a lot of work. I would mostly be interested in a dedicated gba rom for Pulsar and his other music tools, so breaking some flexibility in SRAM size wouldn't be a big deal to me. There's also a possibility that I could compensate you for your time as well (I hope that's not offensive to you!). If you're interested, feel free to PM me and we can discuss further.

Offline

#6 2016-05-31 6:29:28 am

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,022
Website

Re: NES 2.0 Header support in PocketNES

Well I went ahead and implemented in 32K save support for MMC1, and the tracker seems to work okay.  Only thing is the tracker itself is confusing to use, and I can't figure out how to make a simple song in it.
It might need some more testing to verify that it works okay, including savestates and such.  And it would probably require making a big song that eats up more than one page of SRAM to verify that everything saves and loads okay.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#7 2016-06-02 12:35:42 pm

catskull
Member
Registered: 2016-05-21
Posts: 6

Re: NES 2.0 Header support in PocketNES

Oh excellent! Can I get a copy to test? I'm sure I can find plenty of people to help test as well.

Yeah, the tracker is confusing. I was talking with some Chinese cart manufacturers to get some NES carts made and they were like "WTF even is this?". Pretty funny.

Offline

#8 2016-06-28 7:15:36 pm

catskull
Member
Registered: 2016-05-21
Posts: 6

Re: NES 2.0 Header support in PocketNES

Sorry to bump this, but I check this thread like everyday. Can I get a copy of the updated emulator to play around with?

Offline

#9 2016-06-29 4:11:32 am

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,022
Website

Re: NES 2.0 Header support in PocketNES

Okay, here it is, haven't touched it in a month, I wanted to put in support for the 8K Battery backed + 8K non-backed SRAM games, but didn't end up doing it.  Instead it backs up the entire 16K.

Note that if you use an older version after saving with this version, it may screw up or corrupt memory or whatever, since the older versions have no support for oversized SRAM.


Attachments:
Attachment Icon pocketnes.gba, Size: 85,480 bytes, Downloads: 91

"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#10 2016-06-30 7:40:01 am

catskull
Member
Registered: 2016-05-21
Posts: 6

Re: NES 2.0 Header support in PocketNES

Thank you so much!!!

Offline

#11 2017-12-20 8:27:21 am

Jason Belgin
Guest

Re: NES 2.0 Header support in PocketNES

Hello !

Thank you so much for the efforts over the years of this . I am stoked to get my games on a flash cart here.  I have been testing some and most work .  Do you have any idea how to get Mike Tysons punch out to work ?  I do not even know if you will read this due to the age of this board, But any help would be appreciated .   I cant find anything googling but it does bring me back to here. 

THank you
JB

#12 2020-06-09 1:47:11 am

INFU
Member
Registered: 2020-06-09
Posts: 1

Re: NES 2.0 Header support in PocketNES

Let's revive this thread, it's very related.

I've got it to work nicely here, on my Twitter!
it's really awesome and it works for PR8 and Pulsar no problem!

There's plenty of people dying to use it, and your software allows it!
Can I speak with you about some feature request? There's couple things I have in mind that would make the whole pocketNES music experience much nicer!
Also, I'm working on NES audio homebrew list, would you mind if I distribute it there with my additional documentation? It's all to make it easier for everyone trying to make music on it! Of course you'll be appropriately credited!

Last edited by INFU (2020-06-09 4:06:45 am)


@infu_av

Offline

#13 2021-01-24 3:29:40 am

kelvin donna
Member
Registered: 2020-04-14
Posts: 6

Re: NES 2.0 Header support in PocketNES

INFU wrote:

Let's revive this thread, it's very related.

I've got it to work nicely here, on my Twitter!
it's really awesome and it works for PR8 and Pulsar no problem!

There's plenty of people dying to use it, and your software allows it!
Can I speak with you about some feature request? There's couple things I have in mind that would make the whole pocketNES music experience much nicer!
Also, I'm working on NES audio homebrew list, would you mind if I distribute it there with my additional documentation? It's all to make it easier for everyone trying to make music on it! Of course you'll be appropriately credited!

we could also call it for VT02 and mapper 256 support, especially for the following game i modified:


Attachments:
Attachment Icon Backgammon.nes, Size: 262,160 bytes, Downloads: 29

Offline

Registered users online in this topic: 0, guests: 1
[Bot] CCBot

Board footer

Powered by FluxBB
Modified by Visman