Skip to content

Instantly share code, notes, and snippets.

@segrax
Last active April 18, 2020 23:13
Show Gist options
  • Save segrax/bac6ff9e202eb76b43b960cc4285c1a7 to your computer and use it in GitHub Desktop.
Save segrax/bac6ff9e202eb76b43b960cc4285c1a7 to your computer and use it in GitHub Desktop.
Maniac Mansion C64 Disk Layout Information
Table Offset:
0x102: Room Disk Number
0x139: Room Track / Sector (0x6E, 110 bytes)
Demo:
0x1F2: Script Room Numbers (0x37, 55 bytes)
0x292: Script Offsets (0x6E, 110 bytes)
Retail:
0x1F2: Script Room Numbers (0x37, 55 bytes)
0x229: Script Offsets (0x6E, 110 bytes)
Room Format:
Length of resource
Resource
Script Format:
Length of script
Checksum
Script
private function sectorCount(int $pTrack) {
return (21 - ($pTrack > 17) * 2 - ($pTrack > 24) - ($pTrack > 30));
}
RoomSectorAlgorithm = (sectorCount(_roomTracks[res]) + _roomSectors[res]) * 256;
Room-8
Track:5
Sector:17
Disk Image Offset = 0x5400 + (0x11 * 0x100) = 0x6500
Script-6
Room:8
Script Offset: 0x0D70
Disk Image Offset: 0x0D70 + 0x6500 = 0x7270
@segrax
Copy link
Author

segrax commented Apr 18, 2020

Disk number is in ASCII - 0x32 = '2' = Disk 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment