Would I have to rewrite the entire thing? I don't know any Python.calima wrote: ↑Tue May 03, 2022 1:09 am Manually editing each ROM means they can access the mapper's full abilities (up to 8mb total PRG size, etc). The 256kb limit is when it's pretending to be UNROM.
But to be clear, you can't feed such edited ROMs to the a53 menu maker scripts, they're not designed for that. You'd have to edit them as the complete whole, and make a menu manually too.
Trying to figure out Action53
Moderator: Moderators
-
- Posts: 37
- Joined: Sun May 01, 2022 6:02 pm
Re: Trying to figure out Action53
Re: Trying to figure out Action53
Well, you don't need to know Python, you need to know 6502 asm. Both to do mapper change edits to ROMs, and to make a custom menu. If you don't have any programming experience, this is not doable in weeks.
-
- Posts: 37
- Joined: Sun May 01, 2022 6:02 pm
Re: Trying to figure out Action53
I know ASM. I thought you meant redo the entire thing. But it looks entirely Python to me -- there are no ASM files in the folders.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: Trying to figure out Action53
blahblahblah, pleased you learned and figured part 1 out!blahblahblah wrote: ↑Mon May 02, 2022 11:27 pmWeirdly I still get the error message from exitpatch.py even though it should be tolerating way more than 256kb. What am I missing?if prgsize not in (0x8000, 0x10000, 0x20000, 0x40000, 0x50000, 0x60000):
calima has you covered, but I wanted to point out a small detail in the, your, quoted code above.
From your posts, it’s shown that the 0x, in code like python code, always precedes a number in hexadecimal format.
0x40000 is equal to 256k.
0x80000 is equal to 512k.
Can easily check this with Windows 10 Calculator; open it and click the menu icon (3 short, stacked, horizontal white bars); select Programmer mode; finally, in Programmer mode, click on HEX and enter 80000. Then, next to DEC (for decimal), it will show the decimal version of 0x80000; same value you entered in your second code change.
It makes sense that the 0x50000 and 0x60000 values don’t make much sense in the context in which you are attempting to use them. That’s the reason for your part2 error message.
tldr: 0x60000 < 512k
EDITS were: a.) switched the bold
b.) misspelled calima
Last edited by unregistered on Tue May 03, 2022 12:38 pm, edited 3 times in total.
Re: Trying to figure out Action53
If you go the manual path, you won't be using the a53 menu scripts at all?blahblahblah wrote: ↑Tue May 03, 2022 1:41 am I know ASM. I thought you meant redo the entire thing. But it looks entirely Python to me -- there are no ASM files in the folders.
-
- Posts: 37
- Joined: Sun May 01, 2022 6:02 pm
Re: Trying to figure out Action53
A custom menu is one thing; making an entire custom multicart on my own is another.calima wrote: ↑Tue May 03, 2022 1:51 amIf you go the manual path, you won't be using the a53 menu scripts at all?blahblahblah wrote: ↑Tue May 03, 2022 1:41 am I know ASM. I thought you meant redo the entire thing. But it looks entirely Python to me -- there are no ASM files in the folders.
-
- Posts: 37
- Joined: Sun May 01, 2022 6:02 pm
Re: Trying to figure out Action53
Trying to convert Mapper 30 to Mapper 28, finding no help whatsoever. This is the bankswitch macro that works with Mapper 30:
https://www.nesdev.org/wiki/Action_53_mapper
Just for kicks I hard-changed the ROM to Mapper 28 with Mesen and ran it through the program to see what would happen. Obviously the game doesn't boot that way but the compile script theoretically shouldn't know the difference. It recognizes it as 28 but still treats it the same way as 2. More specifically, it still thinks the ROM has 16 banks instead of 32. I can't find an instance of a 16-bank limit definitively mentioned, so I don't know how to change it. It also needs to overwrite Bank 15 with some information specific to the multicart, and can't. Can I alter what bank it tries to write to?
There are bankswitch suggestions for Mapper 28 on this page, but they all look completely different and I don't know what they even mean. What do I do with all this?doBankswitchY:
STA currentBank
bankswitchNoSave:
AND #%00011111
ORA chrRamBank
STA $c000
RTS
https://www.nesdev.org/wiki/Action_53_mapper
Just for kicks I hard-changed the ROM to Mapper 28 with Mesen and ran it through the program to see what would happen. Obviously the game doesn't boot that way but the compile script theoretically shouldn't know the difference. It recognizes it as 28 but still treats it the same way as 2. More specifically, it still thinks the ROM has 16 banks instead of 32. I can't find an instance of a 16-bank limit definitively mentioned, so I don't know how to change it. It also needs to overwrite Bank 15 with some information specific to the multicart, and can't. Can I alter what bank it tries to write to?
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Trying to figure out Action53
It's here:blahblahblah wrote: ↑Wed May 04, 2022 2:22 pmI can't find an instance of a 16-bank limit definitively mentioned, so I don't know how to change it.
Code: Select all
=== $01: Inner bank ===
7654 3210
M BBBB
| ++++- Set current PRG ROM bank
+------ Set mirroring mode bit 0 if H/V mirroring is disabled
To expand to 5 bits, you'll need to replace banking with something more compilcated that transfers the 5th bit to the outer bank register.
In a lot of cases, you might be able to replace a bankswitching STA with a JSR to a more complicated subroutine, though this will add extra execution time to every bankswitch. As long as you're not bankswitching too many times per frame, the speed difference might be fine. If you use the CHR bankswitching as well, it gets a little more complicated. Depending on your threading situation you might need to take care to avoid register corruption during NMI.
Also, when you switch outer banks, you'll also be switching the "fixed" bank, so you'll probably need to reserve bank 15 as a duplicate of bank 31... or if you can't, use a third outer bank and yet more bankswitch complexity to work around that.
-
- Posts: 37
- Joined: Sun May 01, 2022 6:02 pm
Re: Trying to figure out Action53
Ugh, this is all way above my skill level. I only have experience manipulating the NESMaker engine, not shoving bits of other engines in there. I don't know what to do. I wish someone could guide me completely step-by-step on this.rainwarrior wrote: ↑Wed May 04, 2022 3:58 pmIt's here:blahblahblah wrote: ↑Wed May 04, 2022 2:22 pmI can't find an instance of a 16-bank limit definitively mentioned, so I don't know how to change it.The inner bank register only has 4 bits.Code: Select all
=== $01: Inner bank === 7654 3210 M BBBB | ++++- Set current PRG ROM bank +------ Set mirroring mode bit 0 if H/V mirroring is disabled
To expand to 5 bits, you'll need to replace banking with something more compilcated that transfers the 5th bit to the outer bank register.
In a lot of cases, you might be able to replace a bankswitching STA with a JSR to a more complicated subroutine, though this will add extra execution time to every bankswitch. As long as you're not bankswitching too many times per frame, the speed difference might be fine. If you use the CHR bankswitching as well, it gets a little more complicated. Depending on your threading situation you might need to take care to avoid register corruption during NMI.
Also, when you switch outer banks, you'll also be switching the "fixed" bank, so you'll probably need to reserve bank 15 as a duplicate of bank 31... or if you can't, use a third outer bank and yet more bankswitch complexity to work around that.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Trying to figure out Action53
I think trying to guide you to do it would be a lot more difficult than just doing it for you. The details of what to do will require a lot of hands-on knowledge of the ROM you're working with, I can't just make a recipe.blahblahblah wrote: ↑Wed May 04, 2022 4:36 pmI wish someone could guide me completely step-by-step on this.
Sometimes it's worth making free step by step tutorials, if I think there's a public value to them, but you're asking for something extremely specific, and the contributed value would mostly be to someone else's commercial product (NESMaker).
So, maybe there's other people out there who want an NESMaker multicart. If anybody should invest time into this problem, it should probably be the makers of NESMaker, or at least people who are involved with that product.
Trying to do it with Action 53's multicart, which was definitely not designed for this purpose, will be an uphill battle. Creating a new multicart hardware for NESMaker specifically would make the operation easy and turnkey, repeatable for any NESMaker user that needs it. Unfortunately there just doesn't exist such hardware right now, as far as I know.
Otherwise if you do want to hammer your square-peg NESMaker ROMs into this round-hole Action 53 multicart, it's certainly possible to do. I think there are some people here who might be willing to do it for hire, if it's worth enough to you, but it might be expensive.
Alternative idea: if your NESMaker game isn't using the whole ROM, maybe figure out how to make a 256k NESMaker ROM that doesn't need CHR bankswitching. Then it's reduced to being the same as UxROM and Action 53 mapper will work properly. Not sure if that's possible because I have no idea what your game contains, but it's something worth checking.
Another idea: if your NESMaker games don't use the whole ROM... what about trying to merge them into a single NESMaker game? How feasible is that sort of thing?
-
- Posts: 37
- Joined: Sun May 01, 2022 6:02 pm
Re: Trying to figure out Action53
I purposely didn't use CHR bankswitching, or any of the other Mapper 30 exclusive features, because I was concerned it might cause problems in the future and I was right.rainwarrior wrote: ↑Wed May 04, 2022 4:58 pmAlternative idea: if your NESMaker game isn't using the whole ROM, maybe figure out how to make a 256k NESMaker ROM that doesn't need CHR bankswitching. Then it's reduced to being the same as UxROM and Action 53 mapper will work properly. Not sure if that's possible because I have no idea what your game contains, but it's something worth checking.blahblahblah wrote: ↑Wed May 04, 2022 4:36 pmI wish someone could guide me completely step-by-step on this.
The games definitely are not using the whole ROM:
Of the games completed so far, the one depicted above is the only one that takes over 50% and even then, not by much. Shrinking the space is also uncharted territory for me though. People on the Discord have suggested compression routines, but I took a look at the compression entry on NESDEV and didn't understand a word of it. I have no idea how to marry it with the NESMaker engine.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Trying to figure out Action53
Another route might be to use a PowerPak or Everdrive and replace the menu.
There's no ready made menu replacement for it that I know of, but at least the hardware exists and is very capable of doing it.
PowerPak's menu has available source code: http://nespowerpak.com/
Everdrive would be trickier, it has some development info but not source code like that.
The downside is it's an expensive cartridge, and maybe tricky to hide that CF card. If you're trying to make 100 of these, maybe this isn't a viable option, but if you're only making 1 or 2 for personal use the price is probably pretty reasonable?
There's no ready made menu replacement for it that I know of, but at least the hardware exists and is very capable of doing it.
PowerPak's menu has available source code: http://nespowerpak.com/
Everdrive would be trickier, it has some development info but not source code like that.
The downside is it's an expensive cartridge, and maybe tricky to hide that CF card. If you're trying to make 100 of these, maybe this isn't a viable option, but if you're only making 1 or 2 for personal use the price is probably pretty reasonable?
-
- Posts: 37
- Joined: Sun May 01, 2022 6:02 pm
Re: Trying to figure out Action53
OK, I'm back. I was right -- the shrinking was totally doable. I was able to rearrange one of my games into 16 banks and compile it into a 256k ROM!
Now my issues are with Action53 again. When I tried submitting it, it thought my ROM was EIGHT banks, not 16, and attempted to shove the exit patch into Bank 7 (where there is no room) instead of Bank 15 (where there is plenty of room).
Now my issues are with Action53 again. When I tried submitting it, it thought my ROM was EIGHT banks, not 16, and attempted to shove the exit patch into Bank 7 (where there is no room) instead of Bank 15 (where there is plenty of room).
When I was trying the 32-bank ROMs it also thought those were 16 banks. How do I get it to read the ROMs correctly?2 titles across 2 roms on 1 pages loaded successfully
start_bank is 0
Unused for C:\Users\HP ProDesk\Desktop\action53-master\collections\demo\roms\Allison2256.nes
[[(50288, 65530)], [], [], [], [], [], [], []]
Traceback (most recent call last):
File "C:\Users\HP ProDesk\Desktop\action53-master\tools\a53build.py", line 721, in get_exit_patches
patcher.add_patch(method, prgbank)
File "C:\Users\HP ProDesk\Desktop\action53-master\tools\exitpatch.py", line 356, in add_patch
loc, data = self.find_dest(method, entrybank)
File "C:\Users\HP ProDesk\Desktop\action53-master\tools\exitpatch.py", line 334, in find_dest
raise UnpatchableError("no room in bank %d for an exit patch"
exitpatch.UnpatchableError: no room in bank 7 for an exit patch
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\HP ProDesk\Desktop\action53-master\tools\a53build.py", line 1500, in <module>
main()
File "C:\Users\HP ProDesk\Desktop\action53-master\tools\a53build.py", line 1296, in main
exit_patches = get_exit_patches(titles, roms, skip_full)
File "C:\Users\HP ProDesk\Desktop\action53-master\tools\a53build.py", line 725, in get_exit_patches
raise UnpatchableError("%s: %s" % (path, e))
exitpatch.UnpatchableError: C:\Users\HP ProDesk\Desktop\action53-master\collections\demo\roms\Allison2256.nes: no room in bank 7 for an exit patch
Re: Trying to figure out Action53
Last I remembered (being the guy who put together a53v4), in most cases the builder does not automatically mark what's free space for use of the exit patch. I've always had to manually use prgunused.py --a53 rom.nes to quickly gauge the unused space to type into the collection's cfg file. You can probably start out with a line like prgunused0=ffe0-ffff to mark the last 32 bytes.blahblahblah wrote: ↑Sat May 07, 2022 6:28 pm Unused for C:\Users\HP ProDesk\Desktop\action53-master\collections\demo\roms\Allison2256.nes
[[(50288, 65530)], [], [], [], [], [], [], []]
...
exitpatch.UnpatchableError: C:\Users\HP ProDesk\Desktop\action53-master\collections\demo\roms\Allison2256.nes: no room in bank 7 for an exit patch
Last edited by JRoatch on Sat May 07, 2022 7:09 pm, edited 1 time in total.
-
- Posts: 37
- Joined: Sun May 01, 2022 6:02 pm
Re: Trying to figure out Action53
Manually? How do you go about that? I'm new to command lines.JRoatch wrote: ↑Sat May 07, 2022 7:04 pmLast I remembered (being the guy who put together a53v4), in most cases the builder does not automatically mark what's free space for the input ROM. I've always had to manually use prgunused.py (with the --a53 option) to quickly gauge the unused space to type into the collection's cfg fileblahblahblah wrote: ↑Sat May 07, 2022 6:28 pm Unused for C:\Users\HP ProDesk\Desktop\action53-master\collections\demo\roms\Allison2256.nes
[[(50288, 65530)], [], [], [], [], [], [], []]
...
exitpatch.UnpatchableError: C:\Users\HP ProDesk\Desktop\action53-master\collections\demo\roms\Allison2256.nes: no room in bank 7 for an exit patch