Shauing wrote: ↑August 15th, 2021, 7:08 am
There's a few other offsets that might be needed, if we're adapting it from the DOS version.
Some additions or removals might have to be done to the SNES one.
Here's the Autosplitter for the DOS PoP 1.4 (under the state 'DOSBOX' section, there's several addresses/bytes that are used for this autosplitter):
To see what variable does each offset access, I converted the number in the .asl file to the offset within the data segment (DOS PoP 1.4 disassembly), by subtracting 0x19410.
Then I tried to find a variable with the same purpose in the other two versions.
Code: Select all
byte Level : "DOSBox.exe", 0x193C370, 0x1D0F4; // shows level 1-14 changes as door is entered
DOS: data:3CE4 = next_level
SNES: 7E:0544 (byte) = next level
Apple II: 031C (byte) = NextLevel
Code: Select all
byte Scene : "DOSBox.exe", 0x193C370, 0x1A4BA; // shows level 1-14 changes as scenes end
DOS: data:10AA = current_level
SNES: 7E:0579 (byte) = current level
Apple II: 03F4 (byte) = level
Code: Select all
byte EndGame : "DOSBox.exe", 0x193C370, 0x1D74A; // 0 before endgame, 255 at endgame cutscene
DOS: data:433A = hourglass_sandflow
This is also set to 255 when the intro cutscene starts. Then it's set to 0 when the hourglass appears.
If the player interrupts the intro between the two then it remains 255 until a cutscene is shown.
This means that this variable is not a perfect indicator of whether the game ended.
Instead you could use disable_keys = data:5850 = 0x1EC60.
SNES: 7E:0629 (byte) = hourglass present -- 2 if the hourglass is present, otherwise 0.
This has a similar problem: If you interrupt the intro before the hourglass appears then it stays 0 until the next cutscene.
7E:0A84 (byte) = current cutscene -- This becomes 06 for the bad ending and 07 for the good ending.
It stays so even after the cutscene ends.
Apple II: E14A (byte) = psandcount -- Works like in the DOS version, with the same problems.
There is no equivalent of disable_keys because this version does not disable keys during the ending scene.
(The animation skips if you press a key then.)
Code: Select all
byte Start : "DOSBox.exe", 0x193C370, 0x1D694; // the level you start the game at
DOS: data:4284 = start_level
SNES: 7E:0E5D (byte) = decoded level -- This is the level number decoded from an entered password.
It stays 00 if you start the training so it's not exactly the same as the DOS variable.
Apple II: There is B6F0 = SavLevel, but it's updated when loading
or saving a game.
Code: Select all
byte GameRunning : "DOSBox.exe", 0x19175EA; // 0 if game isn't running
DOS: This offset is not within the emulated RAM, it's some variable of DOSBox itself.
Is this supposed to check if the player has quit PoP?
Code: Select all
byte MinutesLeft : "DOSBox.exe", 0x193C370, 0x1E350; // Minutes
int Count : "DOSBox.exe", 0x193C370, 0x1E354; // Frames
short FrameSeconds : "DOSBox.exe", 0x193C370, 0x1E356; // Frames in second part of time (720-0)
DOS:
* data:4F40 = rem_min
* data:4F44 = pickup_obj_type -- "Count" accesses two 16-bit integers, pickup_obj_type *and* the following rem_tick, as a single 32-bit integer!
* data:4F46 = rem_tick
SNES: 7E:052D (ushort) = FrameCount -- This is the number of elapsed ticks.
1 minute = 0x1A9 (425) ticks, 1 second = 7 ticks.
Apple II: 0306 (ushort) = FrameCount -- This is the number of elapsed ticks.
1 minute = 725 ticks, 1 second = 12 ticks.
Code: Select all
byte Sound : "DOSBox.exe", 0x193C370, 0x2F233; // 0 if sound is on, 1 if sound is off
DOS: 0x2F233 is somewhere in the Sound Blaster Pro driver, not in the main data segment.
SNES: Sound cannot be turned off in this version.
Apple II: 031A (byte) = musicon, 0203 (byte) = soundon
Code: Select all
byte Room : "DOSBox.exe", 0x193C370, 0x1D107; // shows current room ID
DOS: data:3CF7 = Char.room -- This is the room where the prince is. It's not necessarily the room currently shown if H/J/U/N has been used, but speedrunners don't use cheats.
SNES: 7E:0462 (byte) = CharScrn
Apple II: 004B (byte) = CharScrn
Code: Select all
byte IsRestartLevel : "DOSBox.exe", 0x193C370, 0x1E16A; // the is_restart_level (Ctrl+A) flag
DOS: data:4D5A = different_room -- This is set to 1 every time the prince enters a different room!
is_restart_level would be data:429C = 0x1D6AC
SNES: You can't restart the level in this version.
Apple II: 00A3 (byte) = cutplan (the equivalent of different_room)
Code: Select all
byte LevelTextTime : "DOSBox.exe", 0x193C370, 0x1F35E; // frames left for showing the "Level N" text
DOS: data:5F4E = text_time_remaining -- This is for all status bar messages, not just the level number.
SNES: 7E:0518 (byte) = msgtimer
Apple II: 00DB (byte) = msgtimer
Code: Select all
byte Level3CP : "DOSBox.exe", 0x193C370, 0x1E050; // Level 3 checkpoint flag (changes from 0-1)
DOS: data:4C40 = checkpoint
SNES: 7E:0627 (byte) = checkpoint on/off -- Here it's not limited to level 3, of course.
Apple II: 0212 (byte) = milestone
Code: Select all
int RestartFlag0 : "DOSBox.exe", 0x193C370, 0x1D0E2; // eien86's flag for restart detection
int RestartFlag1 : "DOSBox.exe", 0x193C370, 0x1D0E6; // eien86's flag for restart detection
short RestartFlag2 : "DOSBox.exe", 0x193C370, 0x1D0EA; // eien86's flag for restart detection
DOS: These variables cover one of the arrays used for collision detection.
data:3CD2 = below_row_coll_room[0]
data:3CD6 = below_row_coll_room[4]
data:3CDA = below_row_coll_room[8]
SNES:
7E:0605 (int) = SNbelow
7E:0609 (int) = SNbelow+4
7E:060D (short) = SNbelow+8
Apple II:
0380 (int) = SNbelow
0384 (int) = SNbelow+4
0388 (short) = SNbelow+8