Trying to figure out Action53

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

JRoatch
Formerly 43110
Posts: 422
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Trying to figure out Action53

Post by JRoatch »

I'm not prepared to explain command line, but in a once you know how to invoke a command with parameters I usually end up with something like this in my terminal window.

Code: Select all

$ python --a53 "path-to-action53/tools/prgunused.py" "path-to-roms/Gruniożerca-2.nes"
prgunused0=8637-8656,bfab-bfff,ffdc-ffff
prgunused1=bfdd-bfff,eac6-eb84,fd1b-ff1f
or don't bother with the tool and just add prgunused0=ffe0-ffff to the ROM's entry in the cfg file.

P.S. Now that I'm reading through the thread, I apologize for leaving these tools in the mess that it is. At one point in history I wanted to make the build process more user friendly, but ended up discarding that idea for compression shenanigans.
blahblahblah
Posts: 37
Joined: Sun May 01, 2022 6:02 pm

Re: Trying to figure out Action53

Post by blahblahblah »

JRoatch wrote: Sat May 07, 2022 7:18 pm I'm not prepared to explain command line, but in a once you know how to invoke a command with parameters I usually end up with something like this in my terminal window.

Code: Select all

$ python --a53 "path-to-action53/tools/prgunused.py" "path-to-roms/Gruniożerca-2.nes"
prgunused0=8637-8656,bfab-bfff,ffdc-ffff
prgunused1=bfdd-bfff,eac6-eb84,fd1b-ff1f
or don't bother with the tool and just add prgunused0=ffe0-ffff to the ROM's entry in the cfg file.

P.S. Now that I'm reading through the thread, I apologize for leaving these tools in the mess it is, At one point in history I wanted to make the build process more user friendly, but ended up discarding that idea for compression shenanigans.
It still thinks it's 8 banks though and it's still trying to stick the patch into Bank 7. How do I fix that?
JRoatch
Formerly 43110
Posts: 422
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Trying to figure out Action53

Post by JRoatch »

Unfortunate differences in numbering.
Yes 16KiB Bank 15 for UxROM, but it's bank 7 of the 32KiB banks of Action53 which originally was kept track of due to it's former oversized BNROM compatibility mode
blahblahblah
Posts: 37
Joined: Sun May 01, 2022 6:02 pm

Re: Trying to figure out Action53

Post by blahblahblah »

JRoatch wrote: Sat May 07, 2022 7:31 pm Unfortunate differences in numbering.
Yes 16KiB Bank 15 for UxROM, but it's bank 7 of the 32KiB banks of Action53 which originally was kept track of due to it's former oversized BNROM compatibility mode
But how do I fix it?
blahblahblah
Posts: 37
Joined: Sun May 01, 2022 6:02 pm

Re: Trying to figure out Action53

Post by blahblahblah »

JRoatch wrote: Sat May 07, 2022 7:31 pm Unfortunate differences in numbering.
Yes 16KiB Bank 15 for UxROM, but it's bank 7 of the 32KiB banks of Action53 which originally was kept track of due to it's former oversized BNROM compatibility mode
No matter what I put into prgunused0, it keeps telling me "no room in bank 7 for an exit patch." It won't take ffe0-ffff, it gives me the same error.
JRoatch
Formerly 43110
Posts: 422
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Trying to figure out Action53

Post by JRoatch »

At this point I would have to read the entire output log (With a few verbosity flags turned on) and try interactively tinkering with various things, maybe add few print statements interjected in key places, basically a debugging session to figure out what's actually happening.

The Action 53 menu builder is very quirky, and is basically being held up like a house of cards. Sorry I couldn't be of much help.
blahblahblah
Posts: 37
Joined: Sun May 01, 2022 6:02 pm

Re: Trying to figure out Action53

Post by blahblahblah »

JRoatch wrote: Sat May 07, 2022 8:03 pm At this point I would have to read the entire output log (With a few verbosity flags turned on) and try interactively tinkering with various things, maybe add few print statements interjected in key places, basically a debugging session figure out what's actually happening.

The Action 53 menu builder is very quirky, and is basically being held up like a house of cards. Sorry I couldn't be of much help.
I don't know what a verbosity flag is but here's what the latest log looks like:
C:\Users\HP ProDesk\Desktop\action53-master\collections\demo\roms\pretendo.nes: guessed mapmode 82
unused in 0: (65520, 65530)
roms\cnrom.nes: paginating: 'roms\\cnrom.nes'
roms\jmp-to-coredump.nes: paginating: 'roms\\jmp-to-coredump.nes'
..\..\..\240p-test-mini\nes\240pee.nes: paginating: '..\\..\\..\\240p-test-mini\\nes\\240pee.nes'
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
[[], [], [], [], [], [], [], []]
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
JRoatch
Formerly 43110
Posts: 422
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Trying to figure out Action53

Post by JRoatch »

Best I can tell is that it failed to see prgunused0, what's the contents of your edited action53/collections/demo/a53.cfg? The syntax can be unforgiving.
blahblahblah
Posts: 37
Joined: Sun May 01, 2022 6:02 pm

Re: Trying to figure out Action53

Post by blahblahblah »

Finally......got it working. Here's the secret: you have to put prgunused7 as the entry, not prgunused0. I didn't realize the zero was referring to the bank it was trying to stuff it in. It wasn't going to get anywhere with Bank 0.
JRoatch
Formerly 43110
Posts: 422
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Trying to figure out Action53

Post by JRoatch »

Oh, I forgotten about that, it's been awhile. Glad you figured it out.
Seems like I've only ever went up to "prgunused3" for the 128K game Streemerz.
blahblahblah
Posts: 37
Joined: Sun May 01, 2022 6:02 pm

Re: Trying to figure out Action53

Post by blahblahblah »

JRoatch wrote: Sat May 07, 2022 8:36 pm Oh, I forgotten about that, it's been awhile. Glad you figured it out.
Seems like I've only ever went up to "prgunused3" for the 128K game Streemerz.
Okay, new problem. I tested it with all the ROMs I had planned -- eight at 256kb -- and Action53 compiled correctly (I think), but no emulator will play it and when I try to examine the banks with the NES Space Checker, I get the error "Floating point division by zero." What's going on there? How do I fix it?
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Trying to figure out Action53

Post by unregistered »

blahblahblah wrote: Wed May 11, 2022 1:55 pmOkay, new problem. I tested it with all the ROMs I had planned -- eight at 256kb -- and Action53 compiled correctly (I think), but no emulator will play it and when I try to examine the banks with the NES Space Checker, I get the error "Floating point division by zero." What's going on there? How do I fix it?
Have you tried playing it with Mesen?


Action53 compiled correctly, you think? Well, to be sure about what happened, I would attempt to compile it again, but use gdb to compile it. Gdb is a c debugger… and you can step through the entire compiling process, slowly or jump to certain sections, to see if it compiled correctly.

I believe gdb comes with MingW.

Here is the site where I learned how to use gdb:

https://www.cs.cmu.edu/~gilpin/tutorial/

That site will teach you the basics… like how to start the compilation with gdb, and some basic super helpful useful commands. If you ever need to learn more about a command than gdb’s help tells you, just search that command with duckduckgo.com and look for an explanation listed at https://stackoverflow.com/. :)


At least, that’s how it was possible for me to use gdb, but I guess others could help too.


Ooh, gdb is a command line debugger… but, it’s very powerful and super extremely helpful once you learn how to use it. :)



EDIT: Don’t worry about the very top of that gdb learning site… start reading at the Debug section.

I guess you could type gdb yourAction53programName and then type run and see how/or-if your Action53 crashes.

Actually, for debugging my asm6_.exe, I typed gdb asm6_ and-the-rest-of-the-assembly-command-line-used-to-assemble-my-nes-game to start the debugging process. Normally, that assembly command line starts with asm6_.
Last edited by unregistered on Wed May 11, 2022 4:14 pm, edited 1 time in total.
blahblahblah
Posts: 37
Joined: Sun May 01, 2022 6:02 pm

Re: Trying to figure out Action53

Post by blahblahblah »

unregistered wrote: Wed May 11, 2022 3:30 pm Have you tried playing it with Mesen?
Yes....it doesn't play in either FCEUX or Mesen. Blank screen.

I'm not sure what good this gdb thing is going to be...the native program alone is usually good at targeting errors. I can't get it to do anything anyway:
C:\Users\HP ProDesk\Desktop\action53-master\tools>gdb a53build.py
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"C:\Users\HP ProDesk\Desktop\action53-master\tools/a53build.py": not in executable format: File format not recognized
(gdb) a53build.py
Undefined command: "a53build". Try "help".
(gdb) run
Starting program:
No executable specified, use `target exec'.
The problem with a53build.py seems to occur when the compiler has to spill over into a 4mb ROM. I have eight ROMS at 256kb; add them together and you get a solid 2MB, but since the Action53 ROM needs two ADDITIONAL banks to hold the main menu and stuff, and the number of banks has to be a mathematically perfect multiple of 2, it compiles as a 4MB ROM with a ton of wasted space.

I suspect the ACTUAL problem is that the number of banks in the ROM is now greater than 255, meaning they can't all be counted. Or is that a thing?
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Trying to figure out Action53

Post by unregistered »

a53build.py is not an executable. And it’s python code…

Sorry, you’d need a53build.exe and a53build.exe would need to be written with C code, not python. Sigh, I forgot you were using python. gdb is a C debugger… I don’t know how to debug python… never have used python… sry. 😔
blahblahblah
Posts: 37
Joined: Sun May 01, 2022 6:02 pm

Re: Trying to figure out Action53

Post by blahblahblah »

While I'm waiting, another thing....how come the descriptions are being printed double-spaced? They aren't written that way, and they don't appear that way on the Action53 contest cart....
doublespace.jpg
Post Reply