Skip to content

Instantly share code, notes, and snippets.

@segrax
Last active April 18, 2020 23:13
Show Gist options
  • Select an option

  • Save segrax/bac6ff9e202eb76b43b960cc4285c1a7 to your computer and use it in GitHub Desktop.

Select an option

Save segrax/bac6ff9e202eb76b43b960cc4285c1a7 to your computer and use it in GitHub Desktop.

Revisions

  1. segrax renamed this gist Apr 18, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. segrax renamed this gist Apr 18, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. segrax created this gist Apr 18, 2020.
    40 changes: 40 additions & 0 deletions ManiacMansion.C64 Disk Information
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    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