Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPZ in new version of decomp #65

Open
sdsdsdsrj4rjj opened this issue Jan 29, 2025 · 28 comments
Open

HPZ in new version of decomp #65

sdsdsdsrj4rjj opened this issue Jan 29, 2025 · 28 comments
Labels
help Help with using the disassembly.

Comments

@sdsdsdsrj4rjj
Copy link

sdsdsdsrj4rjj commented Jan 29, 2025

I am having trouble with HPZ which replaces OOZ in my rom hack im working on it loads but....

Image

can someone help?

@sdsdsdsrj4rjj
Copy link
Author

I've been watching clownacy's "How to restore hidden palace zone to sonic 2" video and there isnt any .bins in the directorys he goes to in the first 5 min i think

@sdsdsdsrj4rjj
Copy link
Author

@Clownacy any ideas?

@Clownacy
Copy link
Member

The tiles and blocks look correct, so the problem must be with the chunks. The .bins were renamed to suit the compression formats they use, so the are now .kos file because they're compressed in the Kosinski format.

@sdsdsdsrj4rjj
Copy link
Author

sdsdsdsrj4rjj commented Jan 29, 2025

@Clownacy
Copy link
Member

I used the master branch.

@sdsdsdsrj4rjj
Copy link
Author

I checked classic and it has the .bins

@sdsdsdsrj4rjj
Copy link
Author

Where can i find the chunks in the master branch and the s2 aug 21st disasm

@Clownacy
Copy link
Member

I checked classic and it has the .bins

That's because it's outdated. If you want the exact version of the master branch that was used in the video, it can be found here.

Where can i find the chunks in the master branch and the s2 aug 21st disasm

mappings/128x128/HPZ.kos for the master branch and Level/Hidden Palace Zone/Chunks.kos for the August 21st disassembly.

@sdsdsdsrj4rjj
Copy link
Author

I'll try when i get on a win10 machine, I am currently on a android device right now.

@sdsdsdsrj4rjj
Copy link
Author

I will update you when i get it to look normal

@sdsdsdsrj4rjj
Copy link
Author

Got a new error send you img in a few min if I can't fix it

@sdsdsdsrj4rjj
Copy link
Author

@Clownacy

Image

Image

@Clownacy
Copy link
Member

The thing before 'A1' is supposed to be a comma, not a full stop.

@sdsdsdsrj4rjj
Copy link
Author

oh that's was the issue

@sdsdsdsrj4rjj
Copy link
Author

Image

@sdsdsdsrj4rjj
Copy link
Author

oh wrong one

@sdsdsdsrj4rjj
Copy link
Author

sdsdsdsrj4rjj commented Jan 30, 2025

@Clownacy it has crashed but loaded

Image

@sdsdsdsrj4rjj
Copy link
Author

heres the zip

s2disasm-master (3).zip

@sdsdsdsrj4rjj
Copy link
Author

sdsdsdsrj4rjj commented Jan 30, 2025

@Clownacy what do i do if it crashes?

@sdsdsdsrj4rjj
Copy link
Author

@Clownacy ?

@Clownacy
Copy link
Member

You could install an error handler, like Flamewing's or Vladikcomper's, to see exactly what code is crashing and why. Since the game was previously not crashing, you could also undo changes until the game stops crashing.

My guess is that the chunks are in the wrong compression format, causing the Kosinski decompressor to crash the game.

@sdsdsdsrj4rjj
Copy link
Author

sdsdsdsrj4rjj commented Jan 31, 2025

@Clownacy got this when setting up debugger (valadikcomper)
`> > > s2.asm(85935) begin_animpat(2):30: error #1010: symbol undefined

APM_EHZ_Blocks
APM_EHZ_Len := APM_EHZ_End - APM_EHZ_Blocks
~~~~~~~~~~~~~~
s2.asm(85935) begin_animpat(3):22: error #1010: symbol undefined
APM_EHZ_Len
dc.w $1800 - APM_EHZ_Len
~~~~~~~~~~~
s2.asm(85935) begin_animpat(4):26: error #1010: symbol undefined
APM_EHZ_Len
dc.w bytesToWcnt(APM_EHZ_Len)
~~~~~~~~~~~
s2.asm(85985) begin_animpat(2):30: error #1010: symbol undefined
APM_MTZ_Blocks
APM_MTZ_Len := APM_MTZ_End - APM_MTZ_Blocks
~~~~~~~~~~~~~~
s2.asm(85985) begin_animpat(3):22: error #1010: symbol undefined
APM_MTZ_Len
dc.w $1800 - APM_MTZ_Len
~~~~~~~~~~~
s2.asm(85985) begin_animpat(4):26: error #1010: symbol undefined
APM_MTZ_Len
dc.w bytesToWcnt(APM_MTZ_Len)
~~~~~~~~~~~
s2.asm(86068) begin_animpat(2):30: error #1010: symbol undefined
APM_HPZ_Blocks
APM_HPZ_Len := APM_HPZ_End - APM_HPZ_Blocks
~~~~~~~~~~~~~~
s2.asm(86068) begin_animpat(3):22: error #1010: symbol undefined
APM_HPZ_Len
dc.w $1800 - APM_HPZ_Len
~~~~~~~~~~~
s2.asm(86068) begin_animpat(4):26: error #1010: symbol undefined
APM_HPZ_Len
dc.w bytesToWcnt(APM_HPZ_Len)
~~~~~~~~~~~
s2.asm(86216) begin_animpat(2):30: error #1010: symbol undefined
APM_OOZ_Blocks
APM_OOZ_Len := APM_OOZ_End - APM_OOZ_Blocks
~~~~~~~~~~~~~~
s2.asm(86216) begin_animpat(3):22: error #1010: symbol undefined
APM_OOZ_Len
dc.w $1800 - APM_OOZ_Len
~~~~~~~~~~~
s2.asm(86216) begin_animpat(4):26: error #1010: symbol undefined
APM_OOZ_Len
dc.w bytesToWcnt(APM_OOZ_Len)
~~~~~~~~~~~
s2.asm(86265) begin_animpat(2):30: error #1010: symbol undefined
APM_CNZ_Blocks
APM_CNZ_Len := APM_CNZ_End - APM_CNZ_Blocks
~~~~~~~~~~~~~~
s2.asm(86265) begin_animpat(3):22: error #1010: symbol undefined
APM_CNZ_Len
dc.w $1800 - APM_CNZ_Len
~~~~~~~~~~~
s2.asm(86265) begin_animpat(4):26: error #1010: symbol undefined
APM_CNZ_Len
dc.w bytesToWcnt(APM_CNZ_Len)
~~~~~~~~~~~
s2.asm(86330) begin_animpat(2):34: error #1010: symbol undefined
APM_CNZ2P_Blocks
APM_CNZ2P_Len := APM_CNZ2P_End - APM_CNZ2P_Blocks
~~~~~~~~~~~~~~~~
s2.asm(86330) begin_animpat(3):22: error #1010: symbol undefined
APM_CNZ2P_Len
dc.w $1800 - APM_CNZ2P_Len
~~~~~~~~~~~~~
s2.asm(86330) begin_animpat(4):26: error #1010: symbol undefined
APM_CNZ2P_Len
dc.w bytesToWcnt(APM_CNZ2P_Len)
~~~~~~~~~~~~~
s2.asm(86395) begin_animpat(2):30: error #1010: symbol undefined
APM_CPZ_Blocks
APM_CPZ_Len := APM_CPZ_End - APM_CPZ_Blocks
~~~~~~~~~~~~~~
s2.asm(86395) begin_animpat(3):22: error #1010: symbol undefined
APM_CPZ_Len
dc.w $1800 - APM_CPZ_Len
~~~~~~~~~~~
s2.asm(86395) begin_animpat(4):26: error #1010: symbol undefined
APM_CPZ_Len
dc.w bytesToWcnt(APM_CPZ_Len)
~~~~~~~~~~~
s2.asm(86403) begin_animpat(2):30: error #1010: symbol undefined
APM_DEZ_Blocks
APM_DEZ_Len := APM_DEZ_End - APM_DEZ_Blocks
~~~~~~~~~~~~~~
s2.asm(86403) begin_animpat(3):22: error #1010: symbol undefined
APM_DEZ_Len
dc.w $1800 - APM_DEZ_Len
~~~~~~~~~~~
s2.asm(86403) begin_animpat(4):26: error #1010: symbol undefined
APM_DEZ_Len
dc.w bytesToWcnt(APM_DEZ_Len)
~~~~~~~~~~~
s2.asm(86411) begin_animpat(2):30: error #1010: symbol undefined
APM_ARZ_Blocks
APM_ARZ_Len := APM_ARZ_End - APM_ARZ_Blocks
~~~~~~~~~~~~~~
s2.asm(86411) begin_animpat(3):22: error #1010: symbol undefined
APM_ARZ_Len
dc.w $1800 - APM_ARZ_Len
~~~~~~~~~~~
s2.asm(86411) begin_animpat(4):26: error #1010: symbol undefined
APM_ARZ_Len
dc.w bytesToWcnt(APM_ARZ_Len)
~~~~~~~~~~~
s2.asm(88397) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Std1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88407) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Std2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88417) plrlistheader(2):38: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_StdWtr_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88426) plrlistheader(2):40: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_GameOver_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88433) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Ehz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88445) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Ehz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88455) plrlistheader(2):43: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_MilesLife2P_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88462) plrlistheader(2):41: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_MilesLife_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88469) plrlistheader(2):43: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_TailsLife2P_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88476) plrlistheader(2):41: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_TailsLife_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88483) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Mtz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88498) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Mtz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88513) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Wfz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88530) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Wfz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88550) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Htz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88566) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Htz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88588) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Ooz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88603) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Ooz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88621) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Mcz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88633) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Mcz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88645) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Cnz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88661) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Cnz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88673) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Cpz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88688) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Cpz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88701) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Dez1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88708) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Dez2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88719) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Arz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88729) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Arz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88743) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Scz1_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88750) plrlistheader(2):36: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Scz2_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88762) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Results_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88772) plrlistheader(2):40: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Signpost_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88779) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_CpzBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88790) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_EhzBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88800) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_HtzBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88810) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_ArzBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88819) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_MczBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88828) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_CnzBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88837) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_MtzBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88847) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_OozBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88862) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_DezBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88869) plrlistheader(2):42: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_EhzAnimals_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88972) plrlistheader(2):46: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_SpecStageBombs_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88979) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_WfzBoss_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88990) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Tornado_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(88999) plrlistheader(2):39: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Capsule_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(89006) plrlistheader(2):41: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_Explosion_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
s2.asm(89013) plrlistheader(2):44: error #1010: symbol undefined
__LABEL__Plc
dc.w (((PlrList_ResultsTails_End - __LABEL__Plc) / 6) - 1)
~~~~~~~~~~~~
`

@sdsdsdsrj4rjj
Copy link
Author

clownmdemu shows

Image

@Clownacy
Copy link
Member

What ClownMDEmu shows is normal: you're disassembling the ROM's header, not its code. The first 0x200 bytes of the ROM is header data.

The assembler error messages are saying that APM_EHZ_Len and APM_MTZ_Blocks and other similar labels are missing. They are meant to be automatically generated by the begin_animpat macro. If you open the s2.lst file, you can search for 'begin_animpat' to see what that macro generates. Here is what the macro should be generating for APM_EHZ:

   85883/   40372 :                     ; byte_40372:
   85884/   40372 : (MACRO)              APM_EHZ:	begin_animpat
   85884/   40372 : =$40372              APM_EHZ label *
   85884/   40372 : =$78                 APM_EHZ_Len := APM_EHZ_End - APM_EHZ_Blocks
   85884/   40372 : 1788                        dc.w $1800 - APM_EHZ_Len
   85884/   40374 : 003B                        dc.w bytesToWcnt(APM_EHZ_Len)
   85884/   40376 :                     APM_EHZ_Blocks:

@sdsdsdsrj4rjj
Copy link
Author

i can't find the part of the code you said, heres the link to my s2.lsthttps://drive.google.com/file/d/1YpuNOiERIHg0IAV5r8W1molmLx1zQJDd/view?usp=sharing

@Clownacy
Copy link
Member

The code I'm describing is at line 150556. You can find it by searching 'byte_40372'.

Oddly, the labels that the error messages are saying do not exist do exists, as proven by s2.lst, so I do not know why those error messages are occurring.

One thing that often happens is that one error will cause hundreds of bogus errors to occur after it. In this case, only the first few errors are actually real, and the many ones after them should be ignored. Were there any error messages before the ones you posted earlier?

@sdsdsdsrj4rjj
Copy link
Author

no, it only happened when i tried installing the error handler
but found the line 85933/ 40436 : ; byte_40372: 85934/ 40436 : (MACRO) APM_EHZ: begin_animpat 85934/ 40436 : =$40436 APM_EHZ label * 85934/ 40436 : =$78 APM_EHZ_Len := APM_EHZ_End - APM_EHZ_Blocks 85934/ 40436 : 1788 dc.w $1800 - APM_EHZ_Len 85934/ 40438 : 003B dc.w bytesToWcnt(APM_EHZ_Len)

@sdsdsdsrj4rjj
Copy link
Author

they are matching but wrong location

@Clownacy Clownacy added the help Help with using the disassembly. label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help Help with using the disassembly.
Projects
None yet
Development

No branches or pull requests

2 participants