Neko Project 21/W

Discuss other PoP1 related things here.
Post Reply
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Neko Project 21/W

Post by Norbert »

Norbert wrote: December 22nd, 2021, 3:01 pmTo enable save states, edit np21w.ini (after starting the application at least once) and add "STATSAVE=true" in the section "[NekoProject21]".
I'm happy to have these save states, but I'm unable to tweak np21w.ini (or a separate config through np21w.ini's npcfgDir) to make Neko Project 21/W launch PoP without having to re-open the FDDs. Nor does the program have any command-line options, from what I can tell. Setting FDD1FILE etc. in np21w.ini doesn't seem to have an effect... Any suggestions? Also, perhaps I'm using it incorrectly, but skipping the memory check with "BOOTSKIP=3" doesn't seem to work either. Finally, for the longer term, the to-do on the format's wiki page of being able to skip the Brøderbund logo (preferably into a specific level) would be extremely helpful too.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Neko Project 21/W

Post by David »

Norbert wrote: March 4th, 2022, 9:55 pm Setting FDD1FILE etc. in np21w.ini doesn't seem to have an effect... Any suggestions?
I figured out that setting SVFDFILE=true will load the specified FDD files.
(This setting is right before FDD1FILE.)

"SV" might stand for "save", but it affects loading.
The emulator always saves the last used files into the ini.

Norbert wrote: March 4th, 2022, 9:55 pm Also, perhaps I'm using it incorrectly, but skipping the memory check with "BOOTSKIP=3" doesn't seem to work either.
np21w.exe (from this post) doesn't contain the string "BOOTSKIP".
It does contain the names of other settings, like "SVFDFILE" and "STATSAVE". (In UTF-16! So there is a zero byte after each character.)

So that setting is not checked by this version (0.86), it seems.
It is checked by version 0.83, which I got from here: viewtopic.php?p=27987#p27987

There is the menu item "Other → Fast memcheck", but as I see it, that affects only the checking of extended memory (above 640 kB).
BTW, you can set Device → Memory → 640KB, if you haven't already.
Norbert wrote: March 4th, 2022, 9:55 pm Finally, for the longer term, the to-do on the format's wiki page of being able to skip the Brøderbund logo (preferably into a specific level) would be extremely helpful too.
To skip the Brøderbund logo, set the first byte of BJLOGO.PRG to 0xCB.
Search: 8C C8 8E D8 8E C0 8B
Change: 8C to CB
Offset in headered FDI files: 0x17400

The starting level is in SUBPROG.PRG at offset 0x1420.
Search: 00 00 C6 06 90 CD 01
Change: 01 to the level number
Offset in headered FDI files: 0x12C20

The valid level numbers are 0-14 (0x00-0x0E).
If you set it to level 0, you can play the demo level.
Apparently this version separates the automatic moves from the level number...

I still need to figure out how to skip the intro and the main menu.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Neko Project 21/W

Post by Norbert »

Thank you, your information is quite helpful.
It makes playtesting certain things a better experience.
David wrote: March 5th, 2022, 9:00 pmIt is checked by version 0.83, [...]
That one ("0.83k8/fmgen") doesn't have SVFDFILE though, I think?
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Neko Project 21/W

Post by David »

Norbert wrote: March 5th, 2022, 10:52 pm That one ("0.83k8/fmgen") doesn't have SVFDFILE though, I think?
It doesn't.
And it doesn't have FDD1FILE (etc.) either.
But interestingly it has HDD1FILE (etc.).

There is also a list FD1NAME0..FD1NAME7 and FD2NAME0..FD2NAME7.
These are for the Tool window which you can open from the window menu.

(On Windows I can open the window menu by either left-clicking on the icon in the title bar, or right-clicking the title bar anywhere.
This menu has some other interesting options as well.)

The Tool window does not automatically load the specified disk images, but you can pick them from a dropdown list.

I wonder why doesn't the newer 0.86 version check the BOOTSKIP setting.
Maybe it's an unofficial addition in the fmgen version only?
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Neko Project 21/W

Post by David »

David wrote: March 5th, 2022, 9:00 pm I still need to figure out how to skip the intro and the main menu.
Skipping the intro:

Code: Select all

MAIN:005F E8 15 00                                call    near ptr show_logo
MAIN:0062
MAIN:0062                         loc_6172:
MAIN:0062 C7 06 1E CD 00 00                       mov     is_memories?, 0
MAIN:0068 E8 40 00                                call    show_intro?
MAIN:006B
MAIN:006B                         loc_617B:
MAIN:006B E8 EB 00                                call    start_game
Search: C7 06 1E CD 00 00 E8 40 00
Change: E8 40 00 to 90 90 90
Offset in FDI: 0x4C68

Side effect: "BACK TO INTRO" will just blink the screen and return to the main menu.


You can also skip the loading of the Broderbund logo animation altogether:

Search: E8 15 00 C7 06 1E CD 00 00
Change: E8 15 00 to 90 90 90
Offset in FDI: 0x4C5F

The hack in my earlier post skips the animation after it has been loaded.


Skipping the main menu:

Code: Select all

MAIN:01C4 C7 06 26 CD FF FF                       mov     word_12E36, 0FFFFh
MAIN:01CA E8 B6 89                                call    load_moyou      ; background of the main menu
MAIN:01CD E8 B2 93                                call    near ptr call_subprog_2 ; main menu?
Search: E8 B6 89 E8 B2 93
Change: E8 B2 93 to 90 90 90
Offset in FDI: 0x4DCD

Side effect: "EXIT GAME" will show the main menu and then restart the level.


You can also skip loading the background image of the main menu:

Search: As above.
Change: E8 B6 89 to 90 90 90
Offset in FDI: 0x4DCA

This might further shorten the time from bootup to loading the level.


Setting the starting level and HP if the main menu is skipped:

Code: Select all

MAIN:0178 C6 06 90 CD 01                          mov     current_level, 1
MAIN:017D C6 06 EA E6 03                          mov     Kid.max_hp, 3
MAIN:0182 EB 0A                                   jmp     short loc_629E
Search: C6 06 90 CD 01 C6 06 EA E6 03
Change: 01 to the level number, 03 to the number of HPs.
Offset in FDI: level: 0x4D7C, HP: 0x4D81
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Neko Project 21/W

Post by Norbert »

That should make for an even better playtesting experience.

Will compression of custom levels change (file sizes and therefore) FDI offsets?
(I've not yet looked into saving.)
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Neko Project 21/W

Post by David »

Norbert wrote: March 14th, 2022, 11:49 am Will compression of custom levels change (file sizes and therefore) FDI offsets?
If you keep the original order of files then levels will be after PRG files, and thus the PRG files will stay at their original place.
The offsets in all my hacks point into PRG files, so based on the above, they won't change.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Neko Project 21/W

Post by Norbert »

David wrote: March 20th, 2022, 11:11 amThe offsets in all my hacks point into PRG files, so based on the above, they won't change.
That's nice to read.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Neko Project 21/W

Post by David »

David wrote: March 20th, 2022, 11:11 am If you keep the original order of files then levels will be after PRG files, and thus the PRG files will stay at their original place.
The offsets in all my hacks point into PRG files, so based on the above, they won't change.
Unfortunately, that's not fully true.
On the original disk image, the first sector of END2.MUS is wedged between MAIN.PRG and SUBPROG.PRG.
When making a new image with the original directory order of files, END2.MUS will be elsewhere, and thus SUBPROG.PRG will start one sector earlier than on the original disk image.
Post Reply