From c1d285d293c5f764b7557cdcef92fe33a6c84c2d Mon Sep 17 00:00:00 2001 From: Paul Maddern Date: Mon, 8 Apr 2024 12:57:58 +0000 Subject: [PATCH] Updates 08042024. --- asm/5B00.html | 49 ++------- asm/5B01.html | 115 ++++++++++++++++++++++ asm/5B3F.html | 9 +- asm/5BCC.html | 4 +- asm/5BCD.html | 4 +- asm/5BCF.html | 4 +- asm/5BD0.html | 4 +- asm/5BD1.html | 4 +- asm/5BD2.html | 4 +- asm/5BD6.html | 14 +-- asm/5BE6.html | 12 ++- asm/5BE8.html | 12 ++- asm/5BF4.html | 19 ++-- asm/5BF6.html | 69 +++++++++++++ asm/5BFA.html | 4 +- asm/6940.html | 11 ++- asm/6957.html | 13 ++- asm/A8D8.html | 4 +- asm/A900.html | 59 ++++++++--- asm/AA97.html | 54 +++++----- asm/AAF4.html | 59 +++++------ asm/AB44.html | 183 +++++++++++++++++++++++++++------- asm/ABC2.html | 38 ++++--- asm/BAD5.html | 2 +- asm/CD14.html | 56 ++++++++++- asm/CD86.html | 4 +- asm/CDD1.html | 2 +- asm/CE41.html | 2 +- asm/DEA8.html | 34 ++++--- asm/DFD3.html | 2 +- asm/E064.html | 10 ++ asm/E0A9.html | 4 +- asm/E118.html | 4 +- asm/E11F.html | 18 ++-- asm/E12A.html | 176 ++++++++++++++++++++++++++------- asm/E22D.html | 23 ++--- asm/E349.html | 59 ++++++++--- asm/E361.html | 16 +-- asm/E3E0.html | 8 +- asm/E47A.html | 8 +- asm/E581.html | 82 +++++++++++---- asm/E5F4.html | 5 +- asm/E6DC.html | 2 +- asm/E72F.html | 10 +- asm/E762.html | 4 +- asm/E787.html | 120 +++++++++++++++++----- asm/E804.html | 2 +- asm/E821.html | 186 ++++++++++++++++++++--------------- asm/E9E2.html | 16 +-- asm/EA93.html | 16 +-- asm/EB05.html | 2 +- asm/EB49.html | 2 +- asm/EB8D.html | 12 +-- asm/EBD8.html | 28 +++--- asm/EE5B.html | 4 +- asm/EED7.html | 16 +-- asm/F001.html | 2 +- asm/F107.html | 2 +- asm/F1FC.html | 2 +- asm/F2DB.html | 36 ++++--- asm/F2F9.html | 36 ++++--- asm/F317.html | 44 +-------- asm/F31C.html | 104 ++++++++++++++++++++ asm/F334.html | 4 +- asm/F335.html | 46 ++------- asm/F336.html | 73 ++++++++++++++ asm/F337.html | 69 +++++++++++++ asm/F33A.html | 89 +++++++++++++++++ asm/F341.html | 4 +- asm/F343.html | 127 ++---------------------- asm/F345.html | 184 ++++++++++++++++++++++++++++++++++ asm/F400.html | 4 +- asm/F618.html | 4 +- asm/F648.html | 4 +- asm/F66C.html | 4 +- asm/F68F.html | 4 +- asm/F6B5.html | 4 +- buffers/gbuffer.html | 100 ++++++++++++++----- dec/asm/23296.html | 49 ++------- dec/asm/23297.html | 115 ++++++++++++++++++++++ dec/asm/23359.html | 9 +- dec/asm/23500.html | 4 +- dec/asm/23501.html | 4 +- dec/asm/23503.html | 4 +- dec/asm/23504.html | 4 +- dec/asm/23505.html | 4 +- dec/asm/23506.html | 4 +- dec/asm/23510.html | 14 +-- dec/asm/23526.html | 12 ++- dec/asm/23528.html | 12 ++- dec/asm/23540.html | 19 ++-- dec/asm/23542.html | 69 +++++++++++++ dec/asm/23546.html | 4 +- dec/asm/26944.html | 11 ++- dec/asm/26967.html | 13 ++- dec/asm/43224.html | 4 +- dec/asm/43264.html | 59 ++++++++--- dec/asm/43671.html | 54 +++++----- dec/asm/43764.html | 59 +++++------ dec/asm/43844.html | 183 +++++++++++++++++++++++++++------- dec/asm/43970.html | 38 ++++--- dec/asm/47829.html | 2 +- dec/asm/52500.html | 56 ++++++++++- dec/asm/52614.html | 4 +- dec/asm/52689.html | 2 +- dec/asm/52801.html | 2 +- dec/asm/57000.html | 34 ++++--- dec/asm/57299.html | 2 +- dec/asm/57444.html | 10 ++ dec/asm/57513.html | 4 +- dec/asm/57624.html | 4 +- dec/asm/57631.html | 18 ++-- dec/asm/57642.html | 176 ++++++++++++++++++++++++++------- dec/asm/57901.html | 23 ++--- dec/asm/58185.html | 59 ++++++++--- dec/asm/58209.html | 16 +-- dec/asm/58336.html | 8 +- dec/asm/58490.html | 8 +- dec/asm/58753.html | 82 +++++++++++---- dec/asm/58868.html | 5 +- dec/asm/59100.html | 2 +- dec/asm/59183.html | 10 +- dec/asm/59234.html | 4 +- dec/asm/59271.html | 120 +++++++++++++++++----- dec/asm/59396.html | 2 +- dec/asm/59425.html | 186 ++++++++++++++++++++--------------- dec/asm/59874.html | 16 +-- dec/asm/60051.html | 16 +-- dec/asm/60165.html | 2 +- dec/asm/60233.html | 2 +- dec/asm/60301.html | 12 +-- dec/asm/60376.html | 28 +++--- dec/asm/61019.html | 4 +- dec/asm/61143.html | 16 +-- dec/asm/61441.html | 2 +- dec/asm/61703.html | 2 +- dec/asm/61948.html | 2 +- dec/asm/62171.html | 36 ++++--- dec/asm/62201.html | 36 ++++--- dec/asm/62231.html | 44 +-------- dec/asm/62236.html | 104 ++++++++++++++++++++ dec/asm/62260.html | 4 +- dec/asm/62261.html | 46 ++------- dec/asm/62262.html | 73 ++++++++++++++ dec/asm/62263.html | 69 +++++++++++++ dec/asm/62266.html | 89 +++++++++++++++++ dec/asm/62273.html | 4 +- dec/asm/62275.html | 127 ++---------------------- dec/asm/62277.html | 184 ++++++++++++++++++++++++++++++++++ dec/asm/62464.html | 4 +- dec/asm/63000.html | 4 +- dec/asm/63048.html | 4 +- dec/asm/63084.html | 4 +- dec/asm/63119.html | 4 +- dec/asm/63157.html | 4 +- dec/buffers/gbuffer.html | 100 ++++++++++++++----- dec/maps/all.html | 112 +++++++++++++++------ dec/maps/data.html | 12 +-- dec/maps/routines.html | 18 ++-- dec/maps/unused.html | 36 +++++++ dec/reference/changelog.html | 20 ++++ maps/all.html | 112 +++++++++++++++------ maps/data.html | 12 +-- maps/routines.html | 18 ++-- maps/unused.html | 28 ++++++ reference/changelog.html | 20 ++++ 166 files changed, 3972 insertions(+), 1674 deletions(-) create mode 100644 asm/5B01.html create mode 100644 asm/5BF6.html create mode 100644 asm/F31C.html create mode 100644 asm/F336.html create mode 100644 asm/F337.html create mode 100644 asm/F33A.html create mode 100644 asm/F345.html create mode 100644 dec/asm/23297.html create mode 100644 dec/asm/23542.html create mode 100644 dec/asm/62236.html create mode 100644 dec/asm/62262.html create mode 100644 dec/asm/62263.html create mode 100644 dec/asm/62266.html create mode 100644 dec/asm/62277.html diff --git a/asm/5B00.html b/asm/5B00.html index 887be22..72926e7 100644 --- a/asm/5B00.html +++ b/asm/5B00.html @@ -1,7 +1,7 @@ -Booty: Data at 5B00 +Booty: Unused RAM at 5B00 @@ -15,11 +15,11 @@ gtag('config', 'G-75RERFCHBG'); - + - +
@@ -29,11 +29,11 @@
Up: Map -Next: 5B3F +Next: 5B01
-
5B00: Data block at 5B00
+
5B00: Unused
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
@@ -43,42 +43,7 @@
5B00DEFB $00,$21,$FE,$FE,$3E,$C3,$77,$23
5B08DEFB $3E,$69,$77,$23,$3E,$FE,$77,$21
5B10DEFB $00,$F4,$01,$04,$01,$3E,$FE,$77
5B18DEFB $23,$0B,$78,$B1,$20,$F7,$01,$00
5B20DEFB $00,$ED,$43,$FE,$FF,$ED,$43,$FC
5B28DEFB $FF,$ED,$43,$FB,$FF,$F3,$21,$00
5B30DEFB $FA,$22,$F9,$FF,$3E,$F4,$ED,$47
5B38DEFB $ED,$5E,$3E,$03,$32,$F7,$FFDEFB $00
@@ -89,7 +54,7 @@ Up: Map -Next: 5B3F +Next: 5B01 diff --git a/asm/5B01.html b/asm/5B01.html new file mode 100644 index 0000000..84b6252 --- /dev/null +++ b/asm/5B01.html @@ -0,0 +1,115 @@ + + + +Booty: Data at 5B01 + + + + + + + + + + + + + + +
+ + + + + + +
+Prev: 5B00 +Up: Map +Next: 5B3F +
+
5B01: Game Entry Commands
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+See LoadingEntryPointContinued. This data is copied to GameEntryPoint after the game is loaded and then becomes the game entry point executable code. +
+
+
GameEntryCommands5B01DEFB $21,$FE,$FE,$3E,$C3,$77,$23,$3E
5B09DEFB $69,$77,$23,$3E,$FE,$77,$21,$00
5B11DEFB $F4,$01,$04,$01,$3E,$FE,$77,$23
5B19DEFB $0B,$78,$B1,$20,$F7,$01,$00,$00
5B21DEFB $ED,$43,$FE,$FF,$ED,$43,$FC,$FF
5B29DEFB $ED,$43,$FB,$FF,$F3,$21,$00,$FA
5B31DEFB $22,$F9,$FF,$3E,$F4,$ED,$47,$ED
5B39DEFB $5E,$3E,$03,$32,$F7,$FF
+ + + + + + +
+Prev: 5B00 +Up: Map +Next: 5B3F +
+ + + \ No newline at end of file diff --git a/asm/5B3F.html b/asm/5B3F.html index 5818458..960674b 100644 --- a/asm/5B3F.html +++ b/asm/5B3F.html @@ -25,7 +25,7 @@
-Prev: 5B00 +Prev: 5B01 Up: Map @@ -33,7 +33,7 @@
-
5B3F: Game status buffer entry at 5B3F
+
5B3F: Pointer: Game Entry Point
+ - +
@@ -42,15 +42,16 @@
Pointer_GameEntryPoint 5B3FDEFW $CD14DEFW GameEntryPoint
-Prev: 5B00 +Prev: 5B01 Up: Map diff --git a/asm/5BCC.html b/asm/5BCC.html index 0fe57f3..c845f38 100644 --- a/asm/5BCC.html +++ b/asm/5BCC.html @@ -33,7 +33,7 @@
-
5BCC: Current Room: Key Colour
+
5BCC: Active Room: Key Colour
- + diff --git a/asm/5BCD.html b/asm/5BCD.html index daf81f0..7fa7dba 100644 --- a/asm/5BCD.html +++ b/asm/5BCD.html @@ -33,7 +33,7 @@
@@ -45,7 +45,7 @@
CurrentRoom_KeyColourActiveRoom_KeyColour 5BCC DEFB $00
-
5BCD: Current Room: Closed Door Colour
+
5BCD: Active Room: Closed Door Colour
- + diff --git a/asm/5BCF.html b/asm/5BCF.html index c29e6d9..3505d9e 100644 --- a/asm/5BCF.html +++ b/asm/5BCF.html @@ -33,7 +33,7 @@
@@ -45,7 +45,7 @@
CurrentRoom_ClosedDoorColourActiveRoom_ClosedDoorColour 5BCD DEFB $00
-
5BCF: Current Room: Room Scaffolding Colour
+
5BCF: Active Room: Room Scaffolding Colour
- + diff --git a/asm/5BD0.html b/asm/5BD0.html index f9b50bd..90c99e4 100644 --- a/asm/5BD0.html +++ b/asm/5BD0.html @@ -33,7 +33,7 @@
@@ -45,7 +45,7 @@
CurrentRoom_ScaffoldingColourActiveRoom_ScaffoldingColour 5BCF DEFB $00
-
5BD0: Current Border Colour
+
5BD0: Active Border Colour
- + diff --git a/asm/5BD1.html b/asm/5BD1.html index b81e815..85c566a 100644 --- a/asm/5BD1.html +++ b/asm/5BD1.html @@ -33,7 +33,7 @@
@@ -42,7 +42,7 @@
Current_BorderColourActive_BorderColour 5BD0 DEFB $00
-
5BD1: Current Room: Paper Colour
+
5BD1: Active Room: Paper Colour
- + diff --git a/asm/5BD2.html b/asm/5BD2.html index d806fe2..ff1b8b6 100644 --- a/asm/5BD2.html +++ b/asm/5BD2.html @@ -33,7 +33,7 @@
@@ -45,7 +45,7 @@
CurrentRoom_PaperColourActiveRoom_PaperColour 5BD1 DEFB $00
-
5BD2: Current Room: Ladder Colour
+
5BD2: Active Room: Ladder Colour
- + diff --git a/asm/5BD6.html b/asm/5BD6.html index 3e779c2..dc88c13 100644 --- a/asm/5BD6.html +++ b/asm/5BD6.html @@ -33,27 +33,21 @@
@@ -45,7 +45,7 @@
CurrentRoom_LadderColourActiveRoom_LadderColour 5BD2 DEFB $00
-
5BD6: Current Room: Door Colour
+
5BD6: Reference: Doors
- + - - - - - - - +
CurrentRoom_DoorColourReferenceDoors 5BD6DEFB $00
5BD7DEFB $00DEFW $0000
diff --git a/asm/5BE6.html b/asm/5BE6.html index be94428..7dcfa82 100644 --- a/asm/5BE6.html +++ b/asm/5BE6.html @@ -29,21 +29,25 @@ Up: Map -Next: 5BE7 +Next: 5BE8 -
5BE6: Game status buffer entry at 5BE6
+
5BE6: Reference: Disappearing Floors
+ - +
ReferenceDisappearingFloors 5BE6DEFB $00DEFW $0000
@@ -54,7 +58,7 @@ Up: Map -Next: 5BE7 +Next: 5BE8 diff --git a/asm/5BE8.html b/asm/5BE8.html index 2a0ef21..f93736d 100644 --- a/asm/5BE8.html +++ b/asm/5BE8.html @@ -25,7 +25,7 @@
-Prev: 5BE7 +Prev: 5BE6 Up: Map @@ -33,24 +33,28 @@
-
5BE8: Game status buffer entry at 5BE8
+
5BE8: Pointer: Current Room Buffer
+ - +
+
+Initialised at PopulateCurrentRoomBuffersAndReferences. Used by the routine at DrawRoom. +
PointerCurrentRoomBuffer 5BE8 DEFW $0000Will always be BufferCurrentRoomData when set.
-Prev: 5BE7 +Prev: 5BE6 Up: Map diff --git a/asm/5BF4.html b/asm/5BF4.html index a5682e5..fd6af5e 100644 --- a/asm/5BF4.html +++ b/asm/5BF4.html @@ -29,7 +29,7 @@ Up: Map -Next: 5BFA +Next: 5BF6
@@ -38,6 +38,15 @@
+
+The count of how much booty the player has collected in the current game. +
+
+Initialised to 0000 in InitialiseGame at the start of a new game, unless GameState is set to "Mystery Game Mode" (02) in which case the game begins with the previous games value continued (but all the booty is respawned). +
+
@@ -47,12 +56,6 @@ DEFB $00,$00 - - -5BF6 -DEFB $00,$00,$00,$00 - - @@ -61,7 +64,7 @@
Up: Map -Next: 5BFA +Next: 5BF6
diff --git a/asm/5BF6.html b/asm/5BF6.html new file mode 100644 index 0000000..68dd5b4 --- /dev/null +++ b/asm/5BF6.html @@ -0,0 +1,69 @@ + + + +Booty: Unused RAM at 5BF6 + + + + + + + + + + + + + + +
+ + + + + + +
+Prev: 5BF4 +Up: Map +Next: 5BFA +
+
5BF6: Unused
+ + + + + + + + + +
+
+
+
5BF6DEFB $00,$00,$00,$00
+ + + + + + +
+Prev: 5BF4 +Up: Map +Next: 5BFA +
+ + + \ No newline at end of file diff --git a/asm/5BFA.html b/asm/5BFA.html index 5e95105..960d07c 100644 --- a/asm/5BFA.html +++ b/asm/5BFA.html @@ -25,7 +25,7 @@
-Prev: 5BF4 +Prev: 5BF6 Up: Map @@ -54,7 +54,7 @@
-Prev: 5BF4 +Prev: 5BF6 Up: Map diff --git a/asm/6940.html b/asm/6940.html index 11f1b8d..16078ea 100644 --- a/asm/6940.html +++ b/asm/6940.html @@ -33,7 +33,7 @@
-
6940: Game Entry Point
+
6940: On-Load Entry Point #1
+ + - + + - - + +
@@ -42,19 +42,22 @@
FinishedLoadingEntryPoint 6940 DI Disable interrupts.
6941 LD DE,($5B3F)DE=*5B3F.DE=*Pointer_GameEntryPoint.
6945JR $6957Jump to 6957.JR LoadingEntryPointContinuedJump to LoadingEntryPointContinued.
diff --git a/asm/6957.html b/asm/6957.html index ca5ff72..950950f 100644 --- a/asm/6957.html +++ b/asm/6957.html @@ -33,58 +33,67 @@
-
6957: Routine at 6957
+
6957: On-Load Entry Point #2
+ + + + + + + + + diff --git a/asm/A8D8.html b/asm/A8D8.html index 4c58c6f..4c1b15e 100644 --- a/asm/A8D8.html +++ b/asm/A8D8.html @@ -146,13 +146,13 @@ - + - + diff --git a/asm/A900.html b/asm/A900.html index 90cb3d5..550ff9a 100644 --- a/asm/A900.html +++ b/asm/A900.html @@ -48,7 +48,10 @@ - + @@ -65,13 +68,13 @@ - + - + @@ -93,7 +96,7 @@ - + @@ -111,6 +114,16 @@ + + + @@ -122,10 +135,20 @@ + + + - + @@ -143,10 +166,20 @@ + + + - + - + @@ -410,7 +443,7 @@ - + @@ -554,7 +587,7 @@ - + @@ -649,7 +682,7 @@ - + @@ -694,7 +727,7 @@ - + @@ -787,7 +820,7 @@ - + @@ -1195,7 +1228,7 @@ - + diff --git a/asm/AA97.html b/asm/AA97.html index 3fa47d5..eca3bd6 100644 --- a/asm/AA97.html +++ b/asm/AA97.html @@ -178,7 +178,7 @@ Now move onto actually copying the room data.
-Set up counters for copying data from the default state to the room buffer. +Set up counters for copying data from the default state to the room buffer. The counter length relates to the length of the data for each instance of the "thing" being copied (NOT the length of the data being copied). For an example; portholes are 0003 bytes of data each, so B is 03 when calling CopyRoomData. How many portholes being copied just depends on when the loop reads a termination character (FF).
@@ -192,127 +192,117 @@ - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + diff --git a/asm/AAF4.html b/asm/AAF4.html index 67fcc80..ce2627d 100644 --- a/asm/AAF4.html +++ b/asm/AAF4.html @@ -39,7 +39,7 @@ @@ -127,7 +127,7 @@
-Move the room buffer data address pointer to the room data (the first 08 bytes are colour data. There's no need to copy the colours here, as they don't vary between each game. +Move the room buffer data address pointer to the room data itself (the first 08 bytes are colour data). There's no need to copy the colours here, as they don't vary between each game.
@@ -174,7 +174,10 @@
-Set up counters for copying data from the room data buffer to the current room buffer. +Set up counters for copying data from the default state to the room buffer. +
+
+The counter length relates to the length of the data for each instance of the "thing" being copied (NOT the length of the data being copied). For an example; portholes are 0003 bytes of data each, so B is 03 when calling CopyRoomData. How many portholes being copied just depends on when the loop reads a termination character (FF).
@@ -183,121 +186,111 @@ - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + diff --git a/asm/AB44.html b/asm/AB44.html index 053fb5b..74fd19b 100644 --- a/asm/AB44.html +++ b/asm/AB44.html @@ -111,7 +111,7 @@ - + @@ -127,13 +127,22 @@ - + + + - + @@ -149,13 +158,23 @@ - + + + + - + @@ -166,37 +185,57 @@ - + - - + + + + + - + - + - - + + + + + - + @@ -207,14 +246,24 @@ - - + + + + + - + @@ -225,14 +274,24 @@ - - + + + + + - + @@ -243,14 +302,24 @@ - - + + + + + - + @@ -261,14 +330,24 @@ - - + + + + + - + @@ -279,14 +358,24 @@ - - + + + + + - + @@ -297,14 +386,24 @@ - - + + + + + - + @@ -315,26 +414,36 @@ - - + + + + + - + - + - - + + diff --git a/asm/ABC2.html b/asm/ABC2.html index d08ed40..d4d0ab4 100644 --- a/asm/ABC2.html +++ b/asm/ABC2.html @@ -33,7 +33,7 @@
-Used by the routine at 6940. +Used by the routine at FinishedLoadingEntryPoint.
LoadingEntryPointContinued 6957 LD HL,$5B01 HL=5B01.
695A LD BC,$003E BC=003E.
695D LDIR Copy HL to DE 003E times.
695F EXX Switch to the shadow registers.
6960 LD HL,$2758 HL'=2758.
6963 EXX Switch back to the normal registers.
6964 EI Enable interrupts.
6965 POP DE Restore DE from the stack.
6966 RET Return.ClearRoomAttributeBuffer_Loop A8EF LD A,($5BD1)A=*CurrentRoom_PaperColour.A=*ActiveRoom_PaperColour.
A8F2 SLA AConvert a PAPER value to INK.Convert a PAPER value (using bits 3, 4 and 5) to an INK value (shifted left to bits 0, 1 and 2).
DrawRoom A900 LD A,$00Write 00 to *ATTR_P.Write + + +BLACK to *ATTR_P.
A908 LD A,($5BD1)A=*CurrentRoom_PaperColour.A=*ActiveRoom_PaperColour.
A90B SLA AShift A left three positions (with carry).Convert a PAPER value (using bits 3, 4 and 5) to an "INK" value (shifted left to bits 0, 1 and 2).
A914 LD A,$11Set PAPER: *CurrentRoom_PaperColour.Set PAPER: *ActiveRoom_PaperColour.
RST $10
+ +
+
+Set the UDG graphics pointer. +
+
+
A91B LD HL,$8378LD ($5C36),HL
+ +
+
+Set the attributes for drawing the room scaffolding (i.e. ceilings and floors). +
+
+
A921 LD A,$10Set INK: *CurrentRoom_ScaffoldingColour.Set INK: *ActiveRoom_ScaffoldingColour.
RST $10
+ +
+
+Fetch the address of the current room data buffer. +
+
+
A928 LD HL,($5BE8)HL=*5BE8.HL=*PointerCurrentRoomBuffer.
@@ -296,7 +329,7 @@ DrawRoomLadders A952 LD A,$10Set INK: *CurrentRoom_LadderColour.Set INK: *ActiveRoom_LadderColour.
DrawRoomDoors A973 LD HL,($5BD6)HL=*CurrentRoom_DoorColour.HL=*ReferenceDoors.
DrawRoomDoors_Loop A997 LD A,$10Set INK: *CurrentRoom_ScaffoldingColour.Set INK: *ActiveRoom_ScaffoldingColour.
A9BF LD A,$10Set INK: *CurrentRoom_ScaffoldingColour.Set INK: *ActiveRoom_ScaffoldingColour.
A9D1 LD A,$10Set INK: *CurrentRoom_ClosedDoorColour.Set INK: *ActiveRoom_ClosedDoorColour.
A9F3 LD A,$10Set INK: *CurrentRoom_KeyColour.Set INK: *ActiveRoom_KeyColour.
AA90 LD A,($5BD0)Set the border to *Current_BorderColour using BORDER.Set the border to *Active_BorderColour using BORDER.
AAB7CALL MoveRoomDataCALL CopyRoomData
AABA LD B,$03B=03 (loop counter).Handle copying the ... data.
AABCCALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AABF LD B,$04B=04 (loop counter).Handle copying the doors data.
AAC1CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AAC4 LD B,$02B=02 (loop counter).Handle copying the ladders data.
AAC6CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AAC9 LD B,$06B=06 (loop counter).Handle copying the keys and locked doors data.
AACBCALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AACE LD B,$03B=03 (loop counter).Handle copying the porthole data.
AAD0CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AAD3 LD B,$10B=10 (loop counter).Handle copying the pirate data.
AAD5CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AAD8 LD B,$07B=07 (loop counter).Handle copying the items data.
AADACALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AADD LD B,$04B=04 (loop counter).Handle copying the furniture data.
AADFCALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AAE2 LD B,$10B=10 (loop counter).Handle copying the lifts data.
AAE4CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AAE7 LD B,$06B=06 (loop counter).Handle copying the disappearing floors data.
AAE9CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
-This is similar to UnpackAllRooms, however instead of copying ALL the room data from the default room data into the room data buffers, this routine copies a single room from the room data buffers into the active room buffer. The reason for this is because the game opens with the default positions for everything held by the defaults but as the player moves around the game and interacts with doors/ keys/ items/ etc, the buffers keep track of what's been collected, and where the pirates were when the player left the room. +This is similar to UnpackAllRooms, however instead of copying ALL the room data from the default room data into the room data buffers, this routine copies a single room from the room data buffers into the active room buffer. The reason for this is because the game opens with the default positions for everything held by the defaults but as the player moves around the game and interacts with doors/ keys/ items/ etc, the buffers keep track of what's been collected, and where the pirates were when the player left the room so when they're revisited, they retain those changes.
AB11 LD B,$03B=03 (loop counter).Handle copying the ... data.
AB13CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB16 LD B,$04B=04 (loop counter).Handle copying the doors data.
AB18CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB1B LD B,$02B=02 (loop counter).Handle copying the ladders data.
AB1DCALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB20 LD B,$06B=06 (loop counter).Handle copying the keys and locked doors data.
AB22CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB25 LD B,$03B=03 (loop counter).Handle copying the porthole data.
AB27CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB2A LD B,$10B=10 (loop counter).Handle copying the pirate data.
AB2CCALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB2F LD B,$07B=07 (loop counter).Handle copying the items data.
AB31CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB34 LD B,$04B=04 (loop counter).Handle copying the furniture data.
AB36CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB39 LD B,$10B=10 (loop counter).Handle copying the lifts data.
AB3BCALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB3E LD B,$06B=06 (loop counter).Handle copying the disappearing floors data.
AB40CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
AB57 LD E,(HL)Store the room data address for the requested room in DE.Store the room data address for the requested room in HL.
AB5A EX DE,HLSwitch the DE and HL registers.
+ +
+
+Set the colours for the active room. +
+
+
AB5B LD DE,$5BCCCopy 0007 bytes of room data from the buffer to *CurrentRoom_KeyColour.Copy 0007 bytes of room data from the buffer to *ActiveRoom_KeyColour.
AB63 INC HLIncrement HL by one.Skip the terminator character in the room data.
+ +
+
+Handle populating the ... data. +
+
+
AB64 LD DE,$BAD7Write BufferCurrentRoomData to *5BE8.Write BufferCurrentRoomData to *PointerCurrentRoomBuffer.
AB6B LD B,$03B=03 (loop counter).B=03 (length counter).
AB6DCALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
+ +
+
+Handle populating the doors data. +
+
+
AB70 LD B,$04B=04 (loop counter).B=04 (length counter).
AB72 LD ($5BD6),DEWrite DE to *CurrentRoom_DoorColour.Write DE to *ReferenceDoors.
AB76CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
+ +
+
+Handle populating the ladders data. +
+
+
AB79 LD B,$02B=02 (loop counter).B=02 (length counter).
AB7FCALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
+ +
+
+Handle populating the keys and locked doors data. +
+
+
AB82 LD B,$06B=06 (loop counter).B=06 (length counter).
AB88CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
+ +
+
+Handle populating the porthole data. +
+
+
AB8B LD B,$03B=03 (loop counter).B=03 (length counter).
AB91CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
+ +
+
+Handle populating the pirate data. +
+
+
AB94 LD B,$10B=10 (loop counter).B=10 (length counter).
AB9ACALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
+ +
+
+Handle populating the items data. +
+
+
AB9D LD B,$07B=07 (loop counter).B=07 (length counter).
ABA3CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
+ +
+
+Handle populating the furniture data. +
+
+
ABA6 LD B,$04B=04 (loop counter).B=04 (length counter).
ABACCALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
+ +
+
+Handle populating the lifts data. +
+
+
ABAF LD B,$10B=10 (loop counter).B=10 (length counter).
ABB5CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
+ +
+
+Handle populating the disappearing floors data. +
+
+
ABB8 LD B,$06B=06 (loop counter).B=06 (length counter).
ABBA LD ($5BE6),DEWrite DE to *5BE6.Write DE to *ReferenceDisappearingFloors.
ABBECALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
-
ABC2: Move Room Data
+
ABC2: Copy Room Data
- + @@ -62,10 +62,20 @@ - + + + + - + @@ -87,12 +97,12 @@ - + - + - + @@ -131,8 +141,8 @@ - - + + - + - - + + - + @@ -188,7 +198,7 @@ - + diff --git a/asm/BAD5.html b/asm/BAD5.html index b144cee..96bd6c4 100644 --- a/asm/BAD5.html +++ b/asm/BAD5.html @@ -47,7 +47,7 @@ - +
@@ -48,7 +48,7 @@
BLoop counterLength of data to be copied
DE
MoveRoomData + +
+
+This routine copies the number of bytes given by B, from *HL to *DE, and keeps on looping until a termination character is returned. +
+
+
CopyRoomData ABC2 PUSH BCStash the loop counter on the stack.Stash the length counter on the stack.
ABC4 CP $FFIf the terminator character (FF) has been reached jump to MoveRoomData_Next.If the terminator character (FF) has been reached jump to CopyRoomData_Next.
ABC6JR Z,MoveRoomData_NextJR Z,CopyRoomData_Next
@@ -105,7 +115,7 @@
MoveRoomData_LoopCopyRoomData_Loop ABC8 LD (DE),A Write the room data byte to the room buffer target destination.
ABCCDJNZ MoveRoomData_LoopDecrease counter by one and loop back to MoveRoomData_Loop until counter is zero.DJNZ CopyRoomData_LoopDecrease counter by one and loop back to CopyRoomData_Loop until counter is zero.
@@ -148,13 +158,13 @@ ABCE POP BCRestore the original loop counter from the stack.Restore the original length counter from the stack.
ABCFJR MoveRoomDataJump to MoveRoomData.JR CopyRoomDataJump to CopyRoomData.
@@ -167,7 +177,7 @@
MoveRoomData_NextCopyRoomData_Next ABD1 LD (DE),A Write the termination character to the room buffer target destination. ABD4 POP BCHousekeeping; discard the loop counter from the stack.Housekeeping; discard the length counter from the stack.
BufferPointer BAD5DEFB $95,$CBDEFW $CB95
diff --git a/asm/CD14.html b/asm/CD14.html index fd115dc..bf690a9 100644 --- a/asm/CD14.html +++ b/asm/CD14.html @@ -33,7 +33,7 @@
-
CD14: Routine at CD14
+
CD14: Game Entry Point
+ + + + + + + + + + + + + + + + - + + + - + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + diff --git a/asm/CD86.html b/asm/CD86.html index 0ba1b98..6722818 100644 --- a/asm/CD86.html +++ b/asm/CD86.html @@ -39,7 +39,7 @@ @@ -100,7 +100,7 @@ - + diff --git a/asm/CDD1.html b/asm/CDD1.html index 3817a2e..7680755 100644 --- a/asm/CDD1.html +++ b/asm/CDD1.html @@ -100,7 +100,7 @@ PAPER: BLACK - (00) to *Current_BorderColour. + (00) to *Active_BorderColour. diff --git a/asm/CE41.html b/asm/CE41.html index 08bc7a1..6aad526 100644 --- a/asm/CE41.html +++ b/asm/CE41.html @@ -188,7 +188,7 @@ - + diff --git a/asm/DEA8.html b/asm/DEA8.html index d0013ab..02feb6a 100644 --- a/asm/DEA8.html +++ b/asm/DEA8.html @@ -200,8 +200,8 @@ @@ -236,10 +236,10 @@ @@ -263,6 +263,16 @@ + + + @@ -314,7 +324,7 @@ - + @@ -347,7 +357,7 @@ - + @@ -497,8 +507,8 @@ - - + + - + @@ -674,7 +684,7 @@ - + @@ -700,8 +710,8 @@ - - + + diff --git a/asm/DFD3.html b/asm/DFD3.html index 23d8067..fe24df7 100644 --- a/asm/DFD3.html +++ b/asm/DFD3.html @@ -100,7 +100,7 @@ - + diff --git a/asm/E064.html b/asm/E064.html index d692c08..82152eb 100644 --- a/asm/E064.html +++ b/asm/E064.html @@ -82,6 +82,16 @@ + + + diff --git a/asm/E0A9.html b/asm/E0A9.html index b7265f1..a5ec466 100644 --- a/asm/E0A9.html +++ b/asm/E0A9.html @@ -106,7 +106,7 @@ - + @@ -348,7 +348,7 @@ - + diff --git a/asm/E118.html b/asm/E118.html index d5b342a..2ac9ecc 100644 --- a/asm/E118.html +++ b/asm/E118.html @@ -39,7 +39,7 @@ @@ -52,7 +52,7 @@ - + diff --git a/asm/E11F.html b/asm/E11F.html index 5e7249b..6a6a04e 100644 --- a/asm/E11F.html +++ b/asm/E11F.html @@ -33,41 +33,43 @@
@@ -42,91 +42,110 @@
GameEntryPoint CD14 LD HL,$FEFE HL=FEFE.
CD17 LD A,$C3 Write C3 to *HL.
CD19 LD (HL),A
CD1A INC HL Increment HL by one.
CD1B LD A,$69 Write 69 to *HL.
CD1D LD (HL),A
CD1E INC HL Increment HL by one.
CD1F LD A,$FE Write FE to *HL.
CD21 LD (HL),A
CD22 LD HL,$F400 HL=F400.
CD25 LD BC,$0104 BC=0104.
GameEntryPoint_0 CD28 LD A,$FE A=FE.
CD2A LD (HL),A Write A to *HL.
CD2B INC HL Increment HL by one.
CD2C DEC BC Decrease BC by one.
CD2D LD A,BJump to CD28 until BC is zero.Jump to GameEntryPoint_0 until BC is zero.
CD2E OR C
CD2FJR NZ,$CD28JR NZ,GameEntryPoint_0
CD31 LD BC,$0000 Write 0000 to:
    @@ -136,46 +155,56 @@
CD34 LD ($FFFE),BC
CD38 LD ($FFFC),BC
CD3C LD ($FFFB),BC
CD40 DI Disable interrupts.
CD41 LD HL,$FA00 Write FA00 to *FFF9.
CD44 LD ($FFF9),HL
CD47 LD A,$F4 I=F4.
CD49 LD I,A
CD4B IM 2 Set interrupt mode 02.
CD4D LD A,$03 Write 03 to:
    @@ -184,82 +213,99 @@
CD4F LD ($FFF7),A
CD52 LD ($FFF8),A
CD55 EI Enable interrupts.
CD56 LD HL,$A06C HL=A06C.
CD59 LD B,$80 B=80.
CD5B XOR A Write 00 to *HL.
GameEntryPoint_1 CD5C LD (HL),A
CD5D INC HL Increment HL by one.
CD5EDJNZ $CD5CDecrease counter by one and loop back to CD5C until counter is zero.DJNZ GameEntryPoint_1Decrease counter by one and loop back to GameEntryPoint_1 until counter is zero.
CD60 EXX Switch to the shadow registers.
CD61 PUSH HL Stash HL' on the stack.
CD62 EXX Switch back to the normal registers.
CD63 XOR A Write 00 to *DF_SZ.
CD64 LD ($5C6B),A
CD67 LD A,$02 A=02.
CD69 CALL $1601 Call CHAN_OPEN.
CD6C JP DisplayIntroductionScreen Jump to DisplayIntroductionScreen.
-Used by the routines at CD14, StartGame and DemoMode. +Used by the routines at GameEntryPoint, StartGame and DemoMode.
CD98 LD A,$03Write MAGENTA to *Current_BorderColour.Write MAGENTA to *Active_BorderColour.
CE61 LD A,$05Write CYAN (05) to *Current_BorderColour.Write CYAN (05) to *Active_BorderColour.
DED9 LD A,$00 Write 00 to:
DEE9 LD A,$00 Write 00 to:
LD ($F340),A
+ +
+
+This also draws the whole room. +
+
+
DEF7 CALL PrintStatusBar DF06 LD A,$11Set PAPER: *Current_BorderColour.Set PAPER: *Active_BorderColour.
InitialiseGame_0 DF13 LD A,$11Set PAPER: *CurrentRoom_PaperColour.Set PAPER: *ActiveRoom_PaperColour.
DF58CALL $E581Call E581.CALL Handler_DisappearingFloorsCall Handler_DisappearingFloors.
@@ -538,7 +548,7 @@ DF61 LD A,$11Set PAPER: *Current_BorderColour.Set PAPER: *Active_BorderColour.
DF9A LD A,($F340)Increment *F340 by one.Increment *F340 by one.
DFA6CALL $E349Call E349.CALL GetRandomNumberCall GetRandomNumber.
DFDF LD A,$11Set PAPER: *CurrentRoom_PaperColour.Set PAPER: *ActiveRoom_PaperColour.
CALL $0DD9
+ +
+
+Skip showing any lives if the player is using their last life. +
+
+
E071 LD A,($5BF1) E0B8 LD A,$11Set PAPER: *Current_BorderColour.Set PAPER: *Active_BorderColour.
E0FD LD A,$11Set PAPER: *CurrentRoom_PaperColour.Set PAPER: *ActiveRoom_PaperColour.
-Used by the routine at E12A. +Used by the routine at AnimalsEventTiming.
E119 LD A,$00Write 00 to *F31C.Write 00 to *F31C.
E11B
-
E11F: Routine at E11F
+
E11F: Increased Frequency Animals Event Timing
+ - + + - + - + - - + + - +
-Used by the routine at E12A. +Used by the routine at AnimalsEventTiming.
IncreasedFrequencyAnimalsEventTiming E11F LD HL,($5C78)A=*FRAMES.Jump to StartAnimalsEvent if *FRAMES is higher than 0352.
E122 LD DE,$0352DE=0352.
E125 SBC HL,DEHL-=DE (with carry).
E127JR NC,$E13CJump to E13C if {} is higher.JR NC,StartAnimalsEvent
E129 RETReturn.Else, return.
diff --git a/asm/E12A.html b/asm/E12A.html index 64f9f55..3f910e0 100644 --- a/asm/E12A.html +++ b/asm/E12A.html @@ -33,7 +33,7 @@
-
E12A: Routine at E12A
+
E12A: Animals Event Timing
+ + + + - + + - + + - + + - + + - + - + - + - + + + - - + + + - + + - + + - + - + - + + + + + + - + + + - + + - + + + - + + + + + + + - - + + + - + + - - + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + - - + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/asm/E22D.html b/asm/E22D.html index 1160867..ef163e3 100644 --- a/asm/E22D.html +++ b/asm/E22D.html @@ -48,13 +48,13 @@ - + - + @@ -64,7 +64,7 @@ - + @@ -194,8 +194,8 @@ - - + + @@ -251,8 +251,8 @@ - - + + @@ -451,13 +451,12 @@ - + - @@ -492,25 +491,23 @@ - + - - + - diff --git a/asm/E349.html b/asm/E349.html index 277f953..fe01258 100644 --- a/asm/E349.html +++ b/asm/E349.html @@ -33,93 +33,122 @@
@@ -45,42 +45,56 @@
+ +
+
+*PlayerBooty starts at 0000 and counts up for every item of booty collected. This means that, the chance that animals appear increases when the player has collected over 100 items (of booty, not treasure - which counts down from 007D). +
+
+
AnimalsEventTiming E12A LD BC,($5BF4)BC=*PlayerBooty.If the player has collected over 100 items of booty (in *PlayerBooty) then jump to IncreasedFrequencyAnimalsEventTiming.
E12E LD A,CJump to E11F if C is higher than 64.
E12F CP $64
E131JR NC,$E11FJR NC,IncreasedFrequencyAnimalsEventTiming
E133 LD HL,($5C78)HL=*FRAMES.Return if *FRAMES is lower than 0578.
E136 LD DE,$0578DE=0578.
E139 SBC HL,DEHL-=DE (with carry).
E13B RET CReturn if {} is lower.
@@ -93,456 +107,548 @@
StartAnimalsEvent E13C LD HL,$0000Reset *FRAMES to 0000.Reset *FRAMES to 0000 to start a new event cycle.
E13F LD ($5C78),HL
E142CALL $E349Call E349.CALL GetRandomNumberCall GetRandomNumber.
E145 AND %00000011Keep only bits 0-1.Ensure the random number is between 00 and 03.
E147 LD HL,$F317HL=F317.HL=F317+the random number.
E14A LD E,AE=A.
E14B LD D,$00D=00.
E14D ADD HL,DEHL+=DE.
E14E PUSH HL Stash HL on the stack.
E14F INC HL Increment HL by one.
E150 LD A,(HL) A=*HL.
E151 LD IX,($5BDA) IX=ReferenceKeysAndLockedDoors.
E155 LD B,A B=A.
AnimalsEventTiming_0 E156 LD A,(IX+$00)Jump to E172 if *IX+00 is equal to FF.Jump to AnimalsEventTiming_2 if *IX+00 is equal to FF.
E159 CP $FF
E15BJR Z,$E172JR Z,AnimalsEventTiming_2
E15D LD A,(IX+$01)Jump to E16B if *IX+01 is not equal to B.Jump to AnimalsEventTiming_1 if *IX+01 is not equal to B.
E160 CP B
E161JR NZ,$E16BJR NZ,AnimalsEventTiming_1
E163 LD A,(IX+$05) Jump to E118 if *IX+05 is not equal to 00.
E166 CP $00
E168 JP NZ,$E118
AnimalsEventTiming_1 E16B LD DE,$0006 IX+=0006.
E16E ADD IX,DE
E170JR $E156Jump to E156.JR AnimalsEventTiming_0Jump to AnimalsEventTiming_0.
AnimalsEventTiming_2 E172 LD IX,$F31CIX=F31C.IX=F31C.
E176CALL $E349Call E349.CALL GetRandomNumberCall GetRandomNumber.
E179 BIT 3,A Test bit 3 of A.
E17BJR Z,$E197Jump to E197 if {} is zero.JR Z,AnimalsEventTiming_3Jump to AnimalsEventTiming_3 if {} is zero.
E17D LD (IX+$00),$02 Write 02 to *IX+00.
E181 LD (IX+$02),$01 Write 01 to *IX+02.
E185 LD (IX+$04),$01 Write 01 to *IX+04.
E189 LD (IX+$05),$00 Write 00 to *IX+05.
E18D LD (IX+$0B),$01 Write 01 to *IX+0B.
E191 LD (IX+$0D),$02 Write 02 to *IX+0D.
E195JR $E1AFJump to E1AF.JR AnimalsEventTiming_4Jump to AnimalsEventTiming_4.
AnimalsEventTiming_3 E197 LD (IX+$00),$25 Write 25 to *IX+00.
E19B LD (IX+$02),$00 Write 00 to *IX+02.
E19F LD (IX+$04),$FF Write FF to *IX+04.
E1A3 LD (IX+$05),$00 Write 00 to *IX+05.
E1A7 LD (IX+$0B),$00 Write 00 to *IX+0B.
E1AB LD (IX+$0D),$24 Write 24 to *IX+0D.
AnimalsEventTiming_4 E1AFCALL $E349Call E349.CALL GetRandomNumberCall GetRandomNumber.
E1B2 BIT 5,A Test bit 5 of A.
E1B4JR Z,$E1FEJump to E1FE if {} is zero.JR Z,AnimalsEventTiming_6Jump to AnimalsEventTiming_6 if {} is zero.
E1B6 POP HL Restore HL from the stack.
E1B7 PUSH HL Stash HL on the stack.
E1B8 LD A,(HL) Set up the screen buffer location 21/*HL using CL_SET.
E1B9 LD B,A
E1BA LD C,$21
E1BC CALL $0DD9
E1BF LD HL,($5C84) HL=*DF_CC.
E1C2 LD B,$20 B=20.
AnimalsEventTiming_5 E1C4 LD A,(HL) A=*HL.
E1C5 INC HL Increment HL by one.
E1C6 CP $FF Jump to E118 if A is not equal to FF.
E1C8 JP NZ,$E118
E1CBDJNZ $E1C4Decrease counter by one and loop back to E1C4 until counter is zero.DJNZ AnimalsEventTiming_5Decrease counter by one and loop back to AnimalsEventTiming_5 until counter is zero.
E1CD POP HL Restore HL from the stack.
E1CE LD A,(HL) A=*HL.
E1CF INC A Increment A by one.
E1D0 LD (IX+$01),A Write A to *IX+01.
E1D3 LD (IX+$0E),A Write A to *IX+0E.
E1D6 LD (IX+$03),$03 Write 03 to *IX+03.
E1DA LD (IX+$0F),$03 Write 03 to *IX+0F.
E1DE LD (IX+$06),$20 Write 20 to *IX+06.
E1E2 LD (IX+$09),$03 Write 03 to *IX+09.
E1E6 LD (IX+$07),$04 Write 04 to *IX+07.
E1EA LD (IX+$08),$01 Write 01 to *IX+08.
E1EE LD A,$01 Write 01 to *FFFF.
E1F0 LD ($FFFF),A
E1F3 LD A,(IX+$04) Return if *IX+04 is equal to 01.
E1F6 CP $01
E1F8 RET Z
E1F9 LD (IX+$06),$24 Write 24 to *IX+06.
E1FD RET Return.
AnimalsEventTiming_6 E1FE POP HL Restore HL from the stack.
E1FF LD A,(HL) A=*HL.
E200 INC A Increment A by three.
E201 INC A
E202 INC A
E203 LD (IX+$01),A Write A to *IX+01.
E206 LD (IX+$0E),A Write A to *IX+0E.
E209 LD (IX+$03),$03 Write 03 to *IX+03.
E20D LD (IX+$06),$28 Write 28 to *IX+06.
E211 LD (IX+$09),$06 Write 06 to *IX+09.
E215 LD (IX+$07),$02 Write 02 to *IX+07.
E219 LD (IX+$08),$02 Write 02 to *IX+08.
E21D LD A,$02 Write 02 to *FFFF.
E21F LD ($FFFF),A
E222 LD A,(IX+$04) Return if *IX+04 is equal to FF.
E225 CP $FF
E227 RET Z
E228 LD (IX+$06),$2C Write 2C to *IX+06.
E22C RET Return.Handler_Animals E22D LD IX,$F31CIX=F31C.IX=F31C.
E231 LD A,(IX+$00)Jump to E12A if *IX+00 is equal to 00.Jump to AnimalsEventTiming if *IX+00 is equal to 00.
E236JP Z,$E12AJP Z,AnimalsEventTiming
E26CCALL $E787Call E787.CALL MaskSpriteCall MaskSprite.
E280CALL $E787Call E787.CALL MaskSpriteCall MaskSprite.
Handler_Animals_1 E2D5 SLA AShift A left (with carry).Shift A left two positions (with carry).
E2D7 SLA AShift A left (with carry).
E2E2 SLA AShift A left (with carry).Shift A left two positions (with carry).
E2E4 SLA AShift A left (with carry).
E2E6 ADD A,(IX+$02)A+=*IX+02.C=A+*IX+02.
E2E9 LD C,AC=A.
-
E349: Routine at E349
+
E349: Get Random Number
+ + + + + - + + - + + - + + - + - + - + + - + + - + - + - + + - + - + - + + + diff --git a/asm/E361.html b/asm/E361.html index f425156..d5fa82a 100644 --- a/asm/E361.html +++ b/asm/E361.html @@ -135,7 +135,7 @@ - + @@ -152,8 +152,8 @@ - - + + @@ -177,7 +177,7 @@ - + @@ -188,8 +188,8 @@ - - + + @@ -380,8 +380,8 @@ - - + + diff --git a/asm/E3E0.html b/asm/E3E0.html index d75e319..27dd51e 100644 --- a/asm/E3E0.html +++ b/asm/E3E0.html @@ -120,7 +120,7 @@ - + @@ -169,8 +169,8 @@ - - + + @@ -280,7 +280,7 @@ - + diff --git a/asm/E47A.html b/asm/E47A.html index 49147cc..2291759 100644 --- a/asm/E47A.html +++ b/asm/E47A.html @@ -206,7 +206,7 @@ - + @@ -240,13 +240,13 @@ - + - - + + diff --git a/asm/E581.html b/asm/E581.html index 2085ee7..b39c444 100644 --- a/asm/E581.html +++ b/asm/E581.html @@ -33,7 +33,7 @@
-Used by the routines at InitialiseGame, E12A and E361. +Used by the routines at InitialiseGame, AnimalsEventTiming and E361. +
+
+ + + + + + + + +
Output
AThe random number
+
+ +
+
+(((B + C) % 0100 + AB) % 0100) * 0100 + (C + CD) % 0100
GetRandomNumber E349 PUSH BC Stash BC on the stack.
E34A LD BC,($F343)BC=*F343.BC=*RandomNumberSeed.
E34E XOR AA=00.Reset the flags.
E34F LD A,CA=C.B=B+C.
E350 ADD A,BA+=B.
E351 LD B,AB=A.
E352 XOR AA=00.Reset the flags.
E353 LD A,$CDA=CD.C=CD+C.
E355 ADD A,CA+=C.
E356 LD C,AC=A.
E357 LD A,$ABA=AB.B+=AB.
E359 ADC A,BA+=B.
E35A LD B,AB=A.
E35B LD ($F343),BCWrite BC to *F343.Write the updated BC backit to *RandomNumberSeed.
E35F POP BC Restore BC from the stack.
E360 RET Return. E37B LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
E382CALL $E349Call E349.CALL GetRandomNumberCall GetRandomNumber.
E38B LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
E390CALL $E349Call E349.CALL GetRandomNumberCall GetRandomNumber.
E3C2CALL $E349Call E349.CALL GetRandomNumberCall GetRandomNumber.
E3FC LD DE,$0101DE=Sprite height/ width (0101).DE=Set the sprite width/ height (01/ 01).
E40DCALL $E787Call E787.CALL MaskSpriteCall MaskSprite.
E435 LD DE,$0101DE=Sprite height/ width (0101).DE=Set the sprite width/ height (01/ 01).
E4A8 LD DE,$0202DE=Sprite height/ width (0202).DE=Set the sprite width/ height (02/ 02).
E4B3 LD DE,$0202DE=Sprite height/ width (0202).DE=Set the sprite width/ height (02/ 02).
E4B6CALL $E787Call E787.CALL MaskSpriteCall MaskSprite.
-
E581: Routine at E581
+
E581: Handler: Disappearing Floors
+ - + + + + + + + - - + + + + + + - + + + - + + + + + + + + + + - + + - + + - + + + - - + + + + + - + + - + + + + + + + + + + - + + - + + - - + + + + + - - + +
@@ -45,217 +45,261 @@
Handler_DisappearingFloors E581 LD IX,($5BE6)IX=5BE6.IX=ReferenceDisappearingFloors.
Handler_DisappearingFloors_Loop E585 LD A,(IX+$00) Return if *IX+00 is equal to FF.
E588 CP $FF
E58A RET Z
E58B LD A,(IX+$02) A=*IX+02.
E58E AND %10000000 Keep only bit 7.
E590JP Z,$E5C5Jump to E5C5 if the result is zero.JP Z,Handler_DisappearingFloors_1Jump to Handler_DisappearingFloors_1 if the result is zero.
E593 LD HL,$9F6C Write 9F6C (A06C) to *CHARS.
E596 LD ($5C36),HL
E599 INC (IX+$05) Increment *IX+05 by one.
E59C LD A,(IX+$04)Jump to E5B0 if *IX+04 is not equal to *IX+05.Jump to Handler_DisappearingFloors_0 if *IX+04 is not equal to *IX+05.
E59F CP (IX+$05)
E5A2JR NZ,$E5B0JR NZ,Handler_DisappearingFloors_0
E5A4 LD A,(IX+$02) A=*IX+02.
E5A7 AND %01111111 Keep only bits 0-6.
E5A9 LD (IX+$02),A Write A to *IX+02.
E5AC LD (IX+$05),$00 Write 00 to *IX+05.
Handler_DisappearingFloors_0 E5B0 LD C,(IX+$00) C=*IX+00.
E5B3 LD B,(IX+$01) B=*IX+01.
E5B6 LD A,(IX+$02) A=*IX+02.
E5B9 AND %01111111 Keep only bits 0-6.
E5BB LD E,AE=A.E=Sprite width (A).
E5BC LD D,$01D=01.D=Sprite height (01).
E5BE LD A,$20A=20.A=base sprite ID (20).
E5C0 CALL PrintSprite Call PrintSprite.
E5C3JR $E5EDJump to E5ED.JR Handler_DisappearingFloors_NextJump to Handler_DisappearingFloors_Next.
Handler_DisappearingFloors_1 E5C5 LD A,(IX+$03) A=*IX+03.
E5C8 INC (IX+$05) Increment *IX+05 by one.
E5CB CP (IX+$05)Jump to E5DC if A is not equal to *IX+05.Jump to Handler_DisappearingFloors_2 if A is not equal to *IX+05.
E5CEJR NZ,$E5DCJR NZ,Handler_DisappearingFloors_2
E5D0 LD A,(IX+$02) A=*IX+02.
E5D3 OR %10000000 Set bit 7.
E5D5 LD (IX+$02),A Write A to *IX+02.
E5D8 LD (IX+$05),$00 Write 00 to *IX+05.
Handler_DisappearingFloors_2 E5DC LD C,(IX+$00) C=*IX+00.
E5DF LD B,(IX+$01) B=*IX+01.
E5E2 LD A,(IX+$02) A=*IX+02.
E5E5 AND %01111111 Keep only bits 0-6.
E5E7 LD E,AE=A.E=Sprite width (A).
E5E8 LD D,$01D=01.D=Sprite height (01).
E5EACALL $E787Call E787.CALL MaskSpriteCall MaskSprite.
Handler_DisappearingFloors_Next E5ED LD DE,$0006 IX+=0006.
E5F0 ADD IX,DE
E5F2JR $E585Jump to E585.JR Handler_DisappearingFloors_LoopJump to Handler_DisappearingFloors_Loop.
diff --git a/asm/E5F4.html b/asm/E5F4.html index 955f552..df8a2db 100644 --- a/asm/E5F4.html +++ b/asm/E5F4.html @@ -190,13 +190,12 @@ - + - @@ -276,7 +275,7 @@ - + diff --git a/asm/E6DC.html b/asm/E6DC.html index 9b4338c..7043656 100644 --- a/asm/E6DC.html +++ b/asm/E6DC.html @@ -39,7 +39,7 @@ @@ -47,12 +56,6 @@ - - - - - -
E62B LD D,$02D=02.DE=Set the sprite width/ height (02/ 02).
E62D LD E,$02E=02.
E64C LD A,$11Set PAPER: *Current_BorderColour.Set PAPER: *Active_BorderColour.
diff --git a/asm/E72F.html b/asm/E72F.html index b6906c3..e263e3d 100644 --- a/asm/E72F.html +++ b/asm/E72F.html @@ -69,7 +69,7 @@ - + @@ -79,12 +79,12 @@ - + - + @@ -117,7 +117,7 @@ - + @@ -136,7 +136,7 @@ - + diff --git a/asm/E762.html b/asm/E762.html index 1a47e28..9f52128 100644 --- a/asm/E762.html +++ b/asm/E762.html @@ -39,7 +39,7 @@ @@ -129,7 +129,7 @@ - + diff --git a/asm/E787.html b/asm/E787.html index a29941c..4398912 100644 --- a/asm/E787.html +++ b/asm/E787.html @@ -33,351 +33,421 @@
E734 LD ($F336),AWrite A to *F336.Write A to *ActiveSpriteID.
E737
E738 LD ($F335),AWrite A to *F335.Write A to *ActiveSpriteWidth.
E73B LD A,($F335)A=*F335.A=*ActiveSpriteWidth.
E73E
E746 LD A,($F336)A=*F336.A=*ActiveSpriteID.
E749
E74E LD ($F336),AWrite A to *F336.Write A to *ActiveSpriteID.
E751
-Used by the routines at E72F, E787, Handler_Pirates and Handler_KeysAndLockedDoors. +Used by the routines at E72F, MaskSprite, Handler_Pirates and Handler_KeysAndLockedDoors.
E783 LD ($F330),HLWrite HL to *F330.Write HL to *F330.
E786
-
E787: Routine at E787
+
E787: Mask Sprite?
+ - + + - + + + - + + + - + + + + + + + + + + - + + + + + + + + + - + + - + + + + - - + + + + + + - - + + + + + + + - - + + + + + + + + + - + + + + + - + + + - + + + - + + + + + + + + - - + + + + - - + + + + - - + + + + + + + + + + diff --git a/asm/E804.html b/asm/E804.html index a81ecb4..60fa378 100644 --- a/asm/E804.html +++ b/asm/E804.html @@ -60,7 +60,7 @@ - + diff --git a/asm/E821.html b/asm/E821.html index e42361d..28a4c23 100644 --- a/asm/E821.html +++ b/asm/E821.html @@ -45,6 +45,16 @@ + + + @@ -60,13 +70,13 @@ - + - + @@ -80,6 +90,16 @@ + + + @@ -91,13 +111,23 @@ + + + - + @@ -116,7 +146,7 @@ - + @@ -126,13 +156,13 @@ - + - + @@ -142,7 +172,7 @@ - + @@ -178,12 +208,12 @@ - + - + @@ -277,7 +307,7 @@ - + @@ -287,7 +317,7 @@ - + @@ -296,7 +326,7 @@ - + @@ -310,8 +340,8 @@ - - + + @@ -328,17 +358,17 @@ - - + + - - + + - + @@ -352,7 +382,7 @@ - + @@ -362,7 +392,7 @@ - + @@ -379,8 +409,8 @@ - - + + @@ -391,14 +421,14 @@ - - + + - + - + @@ -408,7 +438,7 @@ - + @@ -425,8 +455,8 @@ - - + + @@ -437,11 +467,11 @@ - - + + - + @@ -467,8 +497,8 @@ - - + + @@ -479,8 +509,8 @@ - - + + @@ -526,14 +556,14 @@ - - + + - + - + @@ -543,7 +573,7 @@ - + @@ -590,7 +620,7 @@ - + @@ -634,10 +664,10 @@ - + - + @@ -647,7 +677,7 @@ - + @@ -694,7 +724,7 @@ - + @@ -738,7 +768,7 @@ - + @@ -760,7 +790,7 @@ - + @@ -782,7 +812,7 @@ - + @@ -804,7 +834,7 @@ - + @@ -826,7 +856,7 @@ - + @@ -847,12 +877,12 @@ - + - + @@ -887,8 +917,8 @@ - - + + @@ -897,7 +927,7 @@ - + @@ -906,12 +936,12 @@ - + - + @@ -941,12 +971,12 @@ - + - + @@ -964,12 +994,12 @@ - + - + @@ -987,12 +1017,12 @@ - + - + @@ -1004,12 +1034,12 @@ - + - + @@ -1018,7 +1048,7 @@ - + @@ -1032,8 +1062,8 @@ - - + + @@ -1050,17 +1080,17 @@ - - + + - - + + - + @@ -1121,7 +1151,7 @@ - + @@ -1172,7 +1202,7 @@ - + @@ -1213,7 +1243,7 @@ - + diff --git a/asm/E9E2.html b/asm/E9E2.html index 56d1702..8dc44c6 100644 --- a/asm/E9E2.html +++ b/asm/E9E2.html @@ -232,8 +232,8 @@ - - + + @@ -313,8 +313,8 @@ - - + + @@ -394,8 +394,8 @@ - - + + @@ -460,8 +460,8 @@ - - + + diff --git a/asm/EA93.html b/asm/EA93.html index f20f742..cf2deb4 100644 --- a/asm/EA93.html +++ b/asm/EA93.html @@ -39,7 +39,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MaskSprite E787 LD HL,($5C36)HL=*CHARS.Stash *CHARS on the stack.
E78A PUSH HLStash HL on the stack.
E78B LD HL,$8378 Write 8378 (Graphics_RoomScaffolding_Empty) to *CHARS.
E78E LD ($5C36),HL
E791 LD A,EWrite E to *F335.Write E to *ActiveSpriteWidth.
E792 LD ($F335),A
MaskSprite_0 E795 LD A,($F335)E=*F335.E=*ActiveSpriteWidth.
E798 LD E,A
E799 PUSH BC Stash BC and DE on the stack.
E79A PUSH DE
E79B CALL $E762 Call E762.
E79E CALL $0DD9 Call CL_SET.
E7A1 POP DE Restore DE and BC from the stack.
E7A2 POP BC
MaskSprite_1 E7A3 PUSH DE Stash DE on the stack.
E7A4 LD HL,($F330)Increment *F330 by one.Increment *F330 by one.
E7A7 INC HL
E7A8 LD ($F330),HL
E7AB DEC HL Decrease HL by one.
E7AC LD DE,$A1C4 HL+=BufferRoom.
E7AF ADD HL,DE
E7B0 LD A,(HL) A=*HL.
E7B1 POP DE Restore DE from the stack.
E7B2 CP $00Jump to E7BD if A is not equal to 00.Jump to MaskSprite_2 if A is not equal to 00.
E7B4JR NZ,$E7BDJR NZ,MaskSprite_2
E7B6 LD A,$20 A=20.
E7B8 CALL PrintColourCharacter Call PrintColourCharacter.
E7BBJR $E7D3Jump to E7D3.JR MaskSprite_3Jump to MaskSprite_3.
MaskSprite_2 E7BD PUSH AF Stash AF and AF on the stack.
E7BE PUSH AF
E7BF AND %10000000 Keep only bit 7.
E7C1CALL NZ,$E7FBCall E7FB not zero.CALL NZ,MaskSprite_6Call MaskSprite_6 not zero.
E7C4 POP AF Restore AF from the stack.
E7C5 AND %01111111 Keep only bits 0-6.
E7C7 RST $10
E7C8 POP AF Restore AF from the stack.
E7C9JR Z,$E7D3Jump to E7D3 if {} is zero.JR Z,MaskSprite_3Jump to MaskSprite_3 if {} is zero.
E7CB PUSH HL Stash HL on the stack.
E7CC LD HL,$8378 Write 8378 (Graphics_RoomScaffolding_Empty) to *CHARS.
E7CF LD ($5C36),HL
E7D2 POP HL Restore HL from the stack.
MaskSprite_3 E7D3 PUSH DE Stash DE and HL on the stack.
E7D4 PUSH HL
E7D5 LD HL,($F330)HL=*F330.HL=*F330.
E7D8 DEC HL Decrease HL by one.
E7D9 LD DE,$A4E4 HL+=BufferRoomAttributes.
E7DC ADD HL,DE
E7DD LD A,(HL)Jump to E7EB if *HL is equal to 00.Jump to MaskSprite_4 if *HL is equal to 00.
E7DE CP $00
E7E0JR Z,$E7EBJR Z,MaskSprite_4
E7E2 LD DE,$5800 DE=5800 (attribute buffer location).
E7E5 LD HL,($F330)HL=*F330.HL=*F330.
E7E8 DEC HL Decrease HL by one.
E7E9 ADD HL,DE HL+=DE.
E7EA LD (HL),A Write A to *HL.
MaskSprite_4 E7EB POP HL Restore HL and DE from the stack.
E7EC POP DE
E7ED DEC E Decrease E by one.
E7EEJR NZ,$E7A3Jump to E7A3 until E is zero.JR NZ,MaskSprite_1Jump to MaskSprite_1 until E is zero.
E7F0 DEC D Decrease D by one.
E7F1JR Z,$E7F6Jump to E7F6 if D is zero.JR Z,MaskSprite_5Jump to MaskSprite_5 if D is zero.
E7F3 DEC B Decrease B by one.
E7F4JR $E795Jump to E795.JR MaskSprite_0Jump to MaskSprite_0.
MaskSprite_5 E7F6 POP HL Restore HL from the stack.
E7F7 LD ($5C36),HL Write HL to *CHARS.
E7FA RET Return.
MaskSprite_6 E7FB PUSH HL Stash HL on the stack.
E7FC LD HL,$8678 Write 8678 (Graphics_Barrels) to *CHARS.
E7FF LD ($5C36),HL
E802 POP HL Restore HL from the stack.
E803 RET Return.
E807 LD HL,($F330)Increment *F330 by one.Increment *F330 by one.
E80A
+ +
+
+Only action lifts every other frame. +
+
+
Handler_Lifts E821 LD A,($F334) E825 AND %00000001Keep only bit 0.Ensure A is either 00 or 01.
E827 LD ($F334),AWrite A to *LiftsPiratesFrameSkip.Write A back to *LiftsPiratesFrameSkip.
RET NZ
+ +
+
+Set the UDG graphics pointer. +
+
+
E82D LD HL,$F17BLD ($5C36),HL
+ +
+
+Find active lifts. +
+
+
E833 LD IX,($5BE4) IX=*ReferenceLifts.
Handler_Lifts_0Handler_Lifts_Loop E837 LD A,(IX+$00) Return if *IX+00 is equal to FF. E83D LD A,(IX+$04)Jump to Handler_Lifts_13 if *IX+04 is equal to 00.Jump to Handler_Lifts_12 if *IX+04 is equal to 00.
E842JP Z,Handler_Lifts_13JP Z,Handler_Lifts_12
E845 LD A,($F240)Jump to Handler_Lifts_4 if *F240 is not equal to 03.Jump to Handler_Lifts_3 if *F240 is not equal to 03.
E84AJR NZ,Handler_Lifts_4JR NZ,Handler_Lifts_3
E85A CP BJump to Handler_Lifts_4 if A is not equal to B.Jump to Handler_Lifts_3 if A is not equal to B.
E85BJR NZ,Handler_Lifts_4JR NZ,Handler_Lifts_3
E87C LD A,(IX+$02)Jump to Handler_Lifts_1 if *IX+02 is higher than 02.Jump to Handler_Lifts_0 if *IX+02 is higher than 02.
E881JR NC,Handler_Lifts_1JR NC,Handler_Lifts_0
Increment B by one.
Handler_Lifts_1Handler_Lifts_0 E884 LD A,(DE) A=*DE.
E886JR NZ,Handler_Lifts_2Jump to Handler_Lifts_2 if the result is not zero.JR NZ,Handler_Lifts_1Jump to Handler_Lifts_1 if the result is not zero.
E88ADJNZ Handler_Lifts_1Decrease counter by one and loop back to Handler_Lifts_1 until counter is zero.DJNZ Handler_Lifts_0Decrease counter by one and loop back to Handler_Lifts_0 until counter is zero.
E88CJR Handler_Lifts_4Jump to Handler_Lifts_4.JR Handler_Lifts_3Jump to Handler_Lifts_3.
Handler_Lifts_2Handler_Lifts_1 E88E LD A,$02 Write 02 to *E820. E893 LD A,(IX+$04)Jump to Handler_Lifts_3 if *IX+04 is equal to 00.Jump to Handler_Lifts_2 if *IX+04 is equal to 00.
E898JR Z,Handler_Lifts_3JR Z,Handler_Lifts_2
E89DCALL Z,Handler_Lifts_10Call Handler_Lifts_10 zero.CALL Z,Handler_Lifts_9Call Handler_Lifts_9 zero.
E8A1CALL NZ,Handler_Lifts_9Call Handler_Lifts_9 not zero.CALL NZ,Handler_Lifts_8Call Handler_Lifts_8 not zero.
Handler_Lifts_3Handler_Lifts_2 E8A4 LD A,(IX+$05)Jump to Handler_Lifts_4 if *IX+05 is equal to 00.Jump to Handler_Lifts_3 if *IX+05 is equal to 00.
E8A9JR Z,Handler_Lifts_4JR Z,Handler_Lifts_3
E8AECALL Z,Handler_Lifts_12Call Handler_Lifts_12 if A was equal to FF on line E8AB.CALL Z,Handler_Lifts_11Call Handler_Lifts_11 if A was equal to FF on line E8AB.
E8B2CALL NZ,Handler_Lifts_11Call Handler_Lifts_11 if A was not equal to FF on line E8AB.CALL NZ,Handler_Lifts_10Call Handler_Lifts_10 if A was not equal to FF on line E8AB.
Handler_Lifts_4Handler_Lifts_3 E8B5 CALL $EEA6 Call EEA6.
E8BECALL Z,Handler_Lifts_7Call Handler_Lifts_7 if A was equal to FF on line E8BB.CALL Z,Handler_Lifts_6Call Handler_Lifts_6 if A was equal to FF on line E8BB.
E8C2CALL NZ,Handler_Lifts_5Call Handler_Lifts_5 if A was not equal to FF on line E8BB.CALL NZ,Handler_Lifts_4Call Handler_Lifts_4 if A was not equal to FF on line E8BB.
E8D9JP Handler_Lifts_0Jump to Handler_Lifts_0.JP Handler_Lifts_LoopJump to Handler_Lifts_Loop.
Handler_Lifts_5Handler_Lifts_4 E8DC LD A,(IX+$04)Jump to Handler_Lifts_6 if *IX+04 is equal to FF.Jump to Handler_Lifts_5 if *IX+04 is equal to FF.
E8E1JR Z,Handler_Lifts_6JR Z,Handler_Lifts_5
Return.
Handler_Lifts_6Handler_Lifts_5 E8F2 LD A,(IX+$0C) Return if *IX+0C is not equal to C.Return.
Handler_Lifts_7Handler_Lifts_6 E901 LD A,(IX+$05)Jump to Handler_Lifts_8 if *IX+05 is equal to FF.Jump to Handler_Lifts_7 if *IX+05 is equal to FF.
E906JR Z,Handler_Lifts_8JR Z,Handler_Lifts_7
Return.
Handler_Lifts_8Handler_Lifts_7 E917 LD A,(IX+$0C) Return if *IX+0C is not equal to B.Return.
Handler_Lifts_9Handler_Lifts_8 E926 LD A,($F235) Increment *F235 by one.Return.
Handler_Lifts_10Handler_Lifts_9 E92E LD A,($F235) Decrease *F235 by one.Return.
Handler_Lifts_11Handler_Lifts_10 E936 LD A,($F236) Increment *F236 by one.Return.
Handler_Lifts_12Handler_Lifts_11 E93E LD A,($F236) Decrease *F236 by one.Return.
Handler_Lifts_13Handler_Lifts_12 E946 LD A,($F240) A=*F240. E94C CP (IX+$03)Jump to Handler_Lifts_4 if A is not equal to *IX+03.Jump to Handler_Lifts_3 if A is not equal to *IX+03.
E94FJP NZ,Handler_Lifts_4JP NZ,Handler_Lifts_3
E960JR Z,Handler_Lifts_14Jump to Handler_Lifts_14 if A was equal to 00 on line E95B.JR Z,Handler_Lifts_13Jump to Handler_Lifts_13 if A was equal to 00 on line E95B.
Decrease A by one.
Handler_Lifts_14Handler_Lifts_13 E963 SUB $02 A-=02. E965 CP BJump to Handler_Lifts_4 if A is not equal to B.Jump to Handler_Lifts_3 if A is not equal to B.
E966JP NZ,Handler_Lifts_4JP NZ,Handler_Lifts_3
E973 CP $03Call Handler_Lifts_18 if A is equal to 03.Call Handler_Lifts_17 if A is equal to 03.
E975CALL Z,Handler_Lifts_18CALL Z,Handler_Lifts_17
E97A CP $02Call Handler_Lifts_17 if A is equal to 02.Call Handler_Lifts_16 if A is equal to 02.
E97CCALL Z,Handler_Lifts_17CALL Z,Handler_Lifts_16
E981 CP $01Call Handler_Lifts_16 if A is equal to 01.Call Handler_Lifts_15 if A is equal to 01.
E983CALL Z,Handler_Lifts_16CALL Z,Handler_Lifts_15
E987 CP $00Call Handler_Lifts_19 if A is equal to 00.Call Handler_Lifts_18 if A is equal to 00.
E989CALL Z,Handler_Lifts_19CALL Z,Handler_Lifts_18
B=*IX+07.
Handler_Lifts_15Handler_Lifts_14 E98F LD A,(DE) A=*DE.
E991JP NZ,Handler_Lifts_2Jump to Handler_Lifts_2 if the result is not zero.JP NZ,Handler_Lifts_1Jump to Handler_Lifts_1 if the result is not zero.
E996DJNZ Handler_Lifts_15Decrease counter by one and loop back to Handler_Lifts_15 until counter is zero.DJNZ Handler_Lifts_14Decrease counter by one and loop back to Handler_Lifts_14 until counter is zero.
E998JP Handler_Lifts_4Jump to Handler_Lifts_4.JP Handler_Lifts_3Jump to Handler_Lifts_3.
Handler_Lifts_16Handler_Lifts_15 E99B CALL $0DD9 Call CL_SET.Return.
Handler_Lifts_17Handler_Lifts_16 E9AA CALL $0DD9 Call CL_SET.Return.
Handler_Lifts_18Handler_Lifts_17 E9B7 CALL $0DD9 Call CL_SET.Return.
Handler_Lifts_19Handler_Lifts_18 E9C2 PUSH BC Stash BC on the stack.
EA32CALL $E787Call E787.CALL MaskSpriteCall MaskSprite.
EA35
EA52CALL $E787Call E787.CALL MaskSpriteCall MaskSprite.
EA55
EA72CALL $E787Call E787.CALL MaskSpriteCall MaskSprite.
EA75
EA8DCALL $E787Call E787.CALL MaskSpriteCall MaskSprite.
EA90 @@ -85,13 +85,13 @@ - + - + @@ -118,7 +118,7 @@ - + @@ -168,7 +168,7 @@ - + @@ -284,7 +284,7 @@ - + @@ -306,7 +306,7 @@ - + @@ -324,7 +324,7 @@ - + diff --git a/asm/EB05.html b/asm/EB05.html index 2e82fd2..f2d42ea 100644 --- a/asm/EB05.html +++ b/asm/EB05.html @@ -91,7 +91,7 @@ - + diff --git a/asm/EB49.html b/asm/EB49.html index d338349..9e7ed57 100644 --- a/asm/EB49.html +++ b/asm/EB49.html @@ -91,7 +91,7 @@ - + diff --git a/asm/EB8D.html b/asm/EB8D.html index 71c1544..a595e4b 100644 --- a/asm/EB8D.html +++ b/asm/EB8D.html @@ -134,12 +134,11 @@ - + - @@ -153,12 +152,11 @@ - + - @@ -183,17 +181,16 @@ - + - - + @@ -202,7 +199,6 @@ - diff --git a/asm/EBD8.html b/asm/EBD8.html index 6dc04f5..9f9e329 100644 --- a/asm/EBD8.html +++ b/asm/EBD8.html @@ -75,7 +75,7 @@ - + @@ -250,7 +250,7 @@ - + @@ -274,7 +274,7 @@ - + @@ -298,7 +298,7 @@ - + @@ -322,7 +322,7 @@ - + @@ -344,7 +344,7 @@ - + @@ -367,7 +367,7 @@ - + @@ -486,7 +486,7 @@ - + @@ -644,7 +644,7 @@ - + @@ -677,7 +677,7 @@ - + @@ -688,7 +688,7 @@ - + @@ -699,7 +699,7 @@ - + @@ -754,7 +754,7 @@ - + @@ -833,7 +833,7 @@ - + diff --git a/asm/EE5B.html b/asm/EE5B.html index 691d420..53483f6 100644 --- a/asm/EE5B.html +++ b/asm/EE5B.html @@ -48,7 +48,7 @@ - + @@ -169,7 +169,7 @@
  • *F241
  • *TableBombSparks
  • *TableBomb_Flag
  • -
  • *F31C
  • +
  • *F31C
  • diff --git a/asm/EED7.html b/asm/EED7.html index 9c7242d..f0f2467 100644 --- a/asm/EED7.html +++ b/asm/EED7.html @@ -164,7 +164,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -285,7 +285,7 @@ - + @@ -365,7 +365,7 @@ - + @@ -507,7 +507,7 @@ - + @@ -643,7 +643,7 @@ - + @@ -744,7 +744,7 @@ - + @@ -762,7 +762,7 @@ - + diff --git a/asm/F001.html b/asm/F001.html index 0322ee7..e1d3aec 100644 --- a/asm/F001.html +++ b/asm/F001.html @@ -355,7 +355,7 @@ - + diff --git a/asm/F107.html b/asm/F107.html index 4a62b18..6066ba2 100644 --- a/asm/F107.html +++ b/asm/F107.html @@ -308,7 +308,7 @@ - + diff --git a/asm/F1FC.html b/asm/F1FC.html index ee7cbfa..958d932 100644 --- a/asm/F1FC.html +++ b/asm/F1FC.html @@ -305,7 +305,7 @@ - + diff --git a/asm/F2DB.html b/asm/F2DB.html index 3ef50ef..e84c5a3 100644 --- a/asm/F2DB.html +++ b/asm/F2DB.html @@ -38,6 +38,12 @@ @@ -67,19 +73,19 @@ - + - + - + @@ -113,19 +119,19 @@ - + - + - + @@ -159,19 +165,19 @@ - + - + - + @@ -205,19 +211,19 @@ - + - + - + @@ -251,19 +257,19 @@ - + - + - + diff --git a/asm/F2F9.html b/asm/F2F9.html index a794c5e..5661992 100644 --- a/asm/F2F9.html +++ b/asm/F2F9.html @@ -38,6 +38,12 @@ @@ -67,19 +73,19 @@ - + - + - + @@ -113,19 +119,19 @@ - + - + - + @@ -159,19 +165,19 @@ - + - + - + @@ -205,19 +211,19 @@ - + - + - + @@ -251,19 +257,19 @@ - + - + - + diff --git a/asm/F317.html b/asm/F317.html index bee68e6..ebc6d4e 100644 --- a/asm/F317.html +++ b/asm/F317.html @@ -29,7 +29,7 @@
    EA95 LD ($F336),AWrite A to *F336.Write A to *ActiveSpriteID.
    EA98 LD A,EWrite E to *F335.Write E to *ActiveSpriteWidth.
    EAA2 LD A,($F335)E=*F335.E=*ActiveSpriteWidth.
    PrintSprite_2 EAB2 LD A,($F336)Increment *F336 by one.Increment *ActiveSpriteID by one.
    EAD2 LD A,($F336)Increment *F336 by one.Increment *ActiveSpriteID by one.
    EADA RET ZReturn if *F336 is zero.Return if *ActiveSpriteID is zero.
    PrintSprite_5 EADE LD A,($F336)Increment *F336 by one.Increment *ActiveSpriteID by one.
    EB15 LD A,$FFWrite FF to *F32D.Write FF to *F32D.
    EB59 LD A,$FFWrite FF to *F32D.Write FF to *F32D.
    EBB3 LD HL,($5C36)HL=*CHARS.Stash *CHARS on the stack.
    EBB6 PUSH HLStash HL on the stack.
    EBB7
    EBBD LD D,$04D=04.DE=Set the sprite width/ height (01/ 04).
    EBBF LD E,$01E=01.
    EBC1
    EBCB POP HLRestore HL from the stack.Restore the previous value of *CHARS from the stack.
    EBCC LD ($5C36),HLWrite HL to *CHARS.
    EBCF POP DERestore DE and BC from the stack.Restore DE, BC and IX from the stack.
    EBD0
    EBD1 POP IXRestore IX from the stack.
    EBD3 EBE2 XOR AWrite 00 to *F32F.Write 00 to *F32F.
    EC29 LD A,($F32C)A=*F32C.A=*F32C.
    EC30 LD A,($F32D)A=*F32D.A=*F32D.
    EC37 LD A,($F32E)A=*F32E.A=*F32E.
    EC40 LD A,($F33A)Increment *F33A by one.Increment *F33A by one.
    Handler_Player_2 EC49 LD A,($F33F)A=*F33F.A=*F33F.
    EC54 LD A,$00Write 00 to *F33A.Write 00 to *F33A.
    Handler_Player_4 EC84 LD A,$01Write 01 to *F32F.Write 01 to *F32F.
    ECBC LD A,($F33A)Call Handler_Player_9 if *F33A is higher than 08.Call Handler_Player_9 if *F33A is higher than 08.
    ECCD LD A,($A10B)Write *A10B to *F32C.Write *A10B to *F32C.
    ECD3 LD A,($A12B)Write *A12B to *F32D.Write *A12B to *F32D.
    ECD9 LD A,($A14B)Write *A14B to *F32E.Write *A14B to *F32E.
    ECF7 LD A,($F32F)Jump to Handler_Player_8 if *F32F is equal to 00.Jump to Handler_Player_8 if *F32F is equal to 00.
    Handler_Player_9 ED19 LD A,$01Write 01 to *F33F.Write 01 to *F33F.
    PlayerFire EE5B LD IX,($5BD6)IX=CurrentRoom_DoorColour.IX=ReferenceDoors.
    EF09 LD ($F332),BCWrite BC to *F332.Write BC to *F332.
    EF0D
    EF2D LD ($F33C),BCWrite BC to *F33C.Write BC to *F33C.
    EF31
    EF3C LD BC,($F332)BC=*F332.BC=*F332.
    EF40
    EF5D LD BC,($F33C)HL+=*F33C.HL+=*F33C.
    EF61
    EF94 LD ($F33E),AWrite A to *F33E.Write A to *F33E.
    EF97
    EFC7 LD A,($F33E)D+=*F33E.D+=*F33E.
    EFCA
    EFE2 LD A,($F33E)D+=*F33E.D+=*F33E.
    EFE5
    EFE9 LD A,($F33E)D+=*F33E.D+=*F33E.
    EFEC F06D LD DE,($F330)DE=*F330.DE=*F330.
    F175 LD A,$10Set INK: *CurrentRoom_KeyColour.Set INK: *ActiveRoom_KeyColour.
    F228 LD D,$02Set the sprite width/ height.DE=Set the sprite width/ height (02/ 02).
    +
    +Used by the routines at Handler_Bomb (for creation) and Handler_Explosion for animation. +
    +
    +Initial values are populated from TableDefaultBombSparks. +
    F2DD DEFB $00Velocity: Left.
    F2DE DEFB $00Velocity: Up.
    F2DF DEFB $00Velocity: Right.
    F2E3 DEFB $00Velocity: Left.
    F2E4 DEFB $00Velocity: Up.
    F2E5 DEFB $00Velocity: Right.
    F2E9 DEFB $00Velocity: Left.
    F2EA DEFB $00Velocity: Up.
    F2EB DEFB $00Velocity: Right.
    F2EF DEFB $00Velocity: Left.
    F2F0 DEFB $00Velocity: Up.
    F2F1 DEFB $00Velocity: Right.
    F2F5 DEFB $00Velocity: Left.
    F2F6 DEFB $00Velocity: Up.
    F2F7 DEFB $00Velocity: Right.
    +
    +Used by the routine at Handler_Bomb. +
    +
    +These default values are copied to TableBombSparks. +
    F2FB DEFB $01Velocity: Left.
    F2FC DEFB $00Velocity: Up.
    F2FD DEFB $00Velocity: Right.
    F301 DEFB $01Velocity: Left.
    F302 DEFB $01Velocity: Up.
    F303 DEFB $00Velocity: Right.
    F307 DEFB $00Velocity: Left.
    F308 DEFB $01Velocity: Up.
    F309 DEFB $00Velocity: Right.
    F30D DEFB $FFVelocity: Left.
    F30E DEFB $01Velocity: Up.
    F30F DEFB $00Velocity: Right.
    F313 DEFB $FFVelocity: Left.
    F314 DEFB $00Velocity: Up.
    F315 DEFB $00Velocity: Right.
    Up: Map -Next: F334 +Next: F31C
    @@ -46,46 +46,6 @@
    DEFB $03,$08,$0D,$12,$17
    F31CDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F324DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F32CDEFB $FF
    F32DDEFB $FF
    F32EDEFB $FF
    F32FDEFB $00
    F330DEFB $00,$00
    F332DEFB $00,$00
    @@ -94,7 +54,7 @@
    Up: Map -Next: F334 +Next: F31C
    diff --git a/asm/F31C.html b/asm/F31C.html new file mode 100644 index 0000000..7943743 --- /dev/null +++ b/asm/F31C.html @@ -0,0 +1,104 @@ + + + +Booty: Game status buffer entry at F31C + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: F317 +Up: Map +Next: F334 +
    +
    F31C: Game status buffer entry at F31C
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    F31CDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F324DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F32CDEFB $FF
    F32DDEFB $FF
    F32EDEFB $FF
    F32FDEFB $00
    F330DEFB $00,$00
    F332DEFB $00,$00
    + + + + + + +
    +Prev: F317 +Up: Map +Next: F334 +
    + + + \ No newline at end of file diff --git a/asm/F334.html b/asm/F334.html index e8e1167..ab6fb4d 100644 --- a/asm/F334.html +++ b/asm/F334.html @@ -25,7 +25,7 @@
    -Prev: F317 +Prev: F31C Up: Map @@ -54,7 +54,7 @@
    -Prev: F317 +Prev: F31C Up: Map diff --git a/asm/F335.html b/asm/F335.html index b1292f3..edcb199 100644 --- a/asm/F335.html +++ b/asm/F335.html @@ -1,7 +1,7 @@ -Booty: Data at F335 +Booty: Game status buffer entry at F335 @@ -15,11 +15,11 @@ gtag('config', 'G-75RERFCHBG'); - + - +
    @@ -29,53 +29,27 @@
    Up: Map -Next: F341 +Next: F336
    -
    F335: Data block at F335
    +
    F335: Active Sprite Width
    + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    +
    +The width of the sprite actively being printed. +
    ActiveSpriteWidth F335 DEFB $00
    F336DEFB $00,$00,$00,$00
    F33ADEFB $00,$00
    F33CDEFB $00,$00
    F33EDEFB $00
    F33FDEFB $00
    F340DEFB $00
    @@ -84,7 +58,7 @@
    Up: Map -Next: F341 +Next: F336
    diff --git a/asm/F336.html b/asm/F336.html new file mode 100644 index 0000000..a9ba88a --- /dev/null +++ b/asm/F336.html @@ -0,0 +1,73 @@ + + + +Booty: Game status buffer entry at F336 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: F335 +Up: Map +Next: F337 +
    +
    F336: Active Sprite ID
    + + + + + + + + + + +
    +
    +
    +The ID of the sprite actively being printed. Note; this starts off as -1 of the real value as it increments to the base sprite ID in the printing loop. +
    +
    +
    ActiveSpriteIDF336DEFB $00
    + + + + + + +
    +Prev: F335 +Up: Map +Next: F337 +
    + + + \ No newline at end of file diff --git a/asm/F337.html b/asm/F337.html new file mode 100644 index 0000000..35baa9e --- /dev/null +++ b/asm/F337.html @@ -0,0 +1,69 @@ + + + +Booty: Unused RAM at F337 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: F336 +Up: Map +Next: F33A +
    +
    F337: Unused
    + + + + + + + + + +
    +
    +
    +
    F337DEFB $00,$00,$00
    + + + + + + +
    +Prev: F336 +Up: Map +Next: F33A +
    + + + \ No newline at end of file diff --git a/asm/F33A.html b/asm/F33A.html new file mode 100644 index 0000000..27c8d38 --- /dev/null +++ b/asm/F33A.html @@ -0,0 +1,89 @@ + + + +Booty: Data at F33A + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: F337 +Up: Map +Next: F341 +
    +
    F33A: Data block at F33A
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    F33ADEFB $00,$00
    F33CDEFB $00,$00
    F33EDEFB $00
    F33FDEFB $00
    F340DEFB $00
    + + + + + + +
    +Prev: F337 +Up: Map +Next: F341 +
    + + + \ No newline at end of file diff --git a/asm/F341.html b/asm/F341.html index 1ae15e4..1a96aee 100644 --- a/asm/F341.html +++ b/asm/F341.html @@ -25,7 +25,7 @@
    -Prev: F335 +Prev: F33A Up: Map @@ -54,7 +54,7 @@
    -Prev: F335 +Prev: F33A Up: Map diff --git a/asm/F343.html b/asm/F343.html index 8c125a8..46193c9 100644 --- a/asm/F343.html +++ b/asm/F343.html @@ -29,136 +29,25 @@ Up: Map -Next: F400 +Next: F345
    -
    F343: Game status buffer entry at F343
    +
    F343: Random Number Seed
    + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    +
    +Used by the routine at GetRandomNumber. Not random at all! +
    RandomNumberSeed F343DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F34BDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F353DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F35BDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F363DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F36BDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F373DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F37BDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F383DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F38BDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F393DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F39BDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3A3DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3ABDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3B3DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3BBDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3C3DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3CBDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3D3DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3DBDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3E3DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3EBDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3F3DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3FBDEFB $00,$00,$00,$00,$00DEFW $0000
    @@ -169,7 +58,7 @@
    Up: Map -Next: F400 +Next: F345
    diff --git a/asm/F345.html b/asm/F345.html new file mode 100644 index 0000000..550832d --- /dev/null +++ b/asm/F345.html @@ -0,0 +1,184 @@ + + + +Booty: Unused RAM at F345 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: F343 +Up: Map +Next: F400 +
    +
    F345: Unused
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    F345DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F34DDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F355DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F35DDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F365DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F36DDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F375DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F37DDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F385DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F38DDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F395DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F39DDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3A5DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3ADDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3B5DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3BDDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3C5DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3CDDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3D5DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3DDDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3E5DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3EDDEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3F5DEFB $00,$00,$00,$00,$00,$00,$00,$00
    F3FDDEFB $00,$00,$00
    + + + + + + +
    +Prev: F343 +Up: Map +Next: F400 +
    + + + \ No newline at end of file diff --git a/asm/F400.html b/asm/F400.html index fd13e0f..c3a10ac 100644 --- a/asm/F400.html +++ b/asm/F400.html @@ -25,7 +25,7 @@
    -Prev: F343 +Prev: F345 Up: Map @@ -380,7 +380,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/asm/F648.html b/asm/F648.html index b747f1a..ec11d5f 100644 --- a/asm/F648.html +++ b/asm/F648.html @@ -52,7 +52,7 @@ - + @@ -82,7 +82,7 @@ - + diff --git a/asm/F66C.html b/asm/F66C.html index 988d01c..6cfbc74 100644 --- a/asm/F66C.html +++ b/asm/F66C.html @@ -66,7 +66,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/asm/F68F.html b/asm/F68F.html index e821919..397294a 100644 --- a/asm/F68F.html +++ b/asm/F68F.html @@ -63,7 +63,7 @@ - + @@ -88,7 +88,7 @@ - + diff --git a/asm/F6B5.html b/asm/F6B5.html index db347ac..8e88f9b 100644 --- a/asm/F6B5.html +++ b/asm/F6B5.html @@ -66,7 +66,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/buffers/gbuffer.html b/buffers/gbuffer.html index 25af6f2..65271ac 100644 --- a/buffers/gbuffer.html +++ b/buffers/gbuffer.html @@ -33,7 +33,7 @@ @@ -42,7 +42,7 @@ @@ -87,7 +87,7 @@ @@ -236,19 +236,13 @@ - + - - - - - @@ -256,8 +250,11 @@ @@ -352,10 +349,19 @@ - + @@ -929,6 +935,12 @@ @@ -938,6 +950,21 @@ + + + + + @@ -954,6 +981,30 @@ + + + + + + + + + + - + diff --git a/dec/asm/23296.html b/dec/asm/23296.html index 24d18e3..14a2530 100644 --- a/dec/asm/23296.html +++ b/dec/asm/23296.html @@ -1,7 +1,7 @@ -Booty: Data at 23296 +Booty: Unused RAM at 23296 @@ -15,11 +15,11 @@ gtag('config', 'G-75RERFCHBG'); - +
    -Prev: F343 +Prev: F345 Up: Map diff --git a/asm/F618.html b/asm/F618.html index cb25918..2606558 100644 --- a/asm/F618.html +++ b/asm/F618.html @@ -66,7 +66,7 @@
    F620 LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F623
    F62C LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F62F
    F649 LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F64C
    F656 LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F659
    F674 LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F677
    F680 LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F683
    F697 LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F69A
    F6A4 LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F6A7
    F6BD LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F6C0
    F6C9 LD A,($5BD0)A=*Current_BorderColour.A=*Active_BorderColour.
    F6CC5B3F 2 -
    Game status buffer entry at 5B3F
    +
    Pointer: Game Entry Point
    5BCC 1 -
    Current Room: Key Colour
    +
    Active Room: Key Colour
    5BCD 1 -
    Current Room: Closed Door Colour
    +
    Active Room: Closed Door Colour
    See A9D1. @@ -66,7 +66,7 @@
    5BCF 1 -
    Current Room: Room Scaffolding Colour
    +
    Active Room: Room Scaffolding Colour
    See A921, A997 and A9BF. @@ -78,7 +78,7 @@
    5BD0 1 -
    Current Border Colour
    +
    Active Border Colour
    5BD1 1 -
    Current Room: Paper Colour
    +
    Active Room: Paper Colour
    See. @@ -99,7 +99,7 @@
    5BD2 1 -
    Current Room: Ladder Colour
    +
    Active Room: Ladder Colour
    See DrawRoomLadders. @@ -129,10 +129,10 @@
    5BD6 2 -
    Current Room: Door Colour
    +
    Reference: Doors
    5BE612 -
    Game status buffer entry at 5BE6
    +
    Reference: Disappearing Floors
    + -
    5BE71 -
    Pirate Attribute
    -
    5BE8 2 -
    Game status buffer entry at 5BE8
    +
    Pointer: Current Room Buffer
    +
    +Initialised at PopulateCurrentRoomBuffersAndReferences. Used by the routine at DrawRoom. +
    5BF462
    Player Booty
    +
    +The count of how much booty the player has collected in the current game. +
    +
    +Initialised to 0000 in InitialiseGame at the start of a new game, unless GameState is set to "Mystery Game Mode" (02) in which case the game begins with the previous games value continued (but all the booty is respawned). +
    +
    Table: Bomb Sparks
    +
    +Used by the routines at Handler_Bomb (for creation) and Handler_Explosion for animation. +
    +
    +Initial values are populated from TableDefaultBombSparks. +
    Table: Default Bomb Sparks
    +
    +Used by the routine at Handler_Bomb. +
    +
    +These default values are copied to TableBombSparks. +
    +
    +
    F31C24 +
    Game status buffer entry at F31C
    +
    F3351 +
    Active Sprite Width
    +
    +
    +The width of the sprite actively being printed. +
    +
    +
    F3361 +
    Active Sprite ID
    +
    +
    +The ID of the sprite actively being printed. Note; this starts off as -1 of the real value as it increments to the base sprite ID in the printing loop. +
    +
    +
    F341 1 @@ -976,10 +1027,13 @@
    F3431892 -
    Game status buffer entry at F343
    +
    Random Number Seed
    +
    +Used by the routine at GetRandomNumber. Not random at all! +
    - +
    @@ -29,11 +29,11 @@
    Up: Map -Next: 23359 +Next: 23297
    -
    23296: Data block at 5B00
    +
    23296: Unused
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    @@ -43,42 +43,7 @@
    23296DEFB 0,33,254,254,62,195,119,35
    23304DEFB 62,105,119,35,62,254,119,33
    23312DEFB 0,244,1,4,1,62,254,119
    23320DEFB 35,11,120,177,32,247,1,0
    23328DEFB 0,237,67,254,255,237,67,252
    23336DEFB 255,237,67,251,255,243,33,0
    23344DEFB 250,34,249,255,62,244,237,71
    23352DEFB 237,94,62,3,50,247,255DEFB 0
    @@ -89,7 +54,7 @@
    Up: Map -Next: 23359 +Next: 23297
    diff --git a/dec/asm/23297.html b/dec/asm/23297.html new file mode 100644 index 0000000..62a59f0 --- /dev/null +++ b/dec/asm/23297.html @@ -0,0 +1,115 @@ + + + +Booty: Data at 23297 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: 23296 +Up: Map +Next: 23359 +
    +
    23297: Game Entry Commands
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +See LoadingEntryPointContinued. This data is copied to GameEntryPoint after the game is loaded and then becomes the game entry point executable code. +
    +
    +
    GameEntryCommands23297DEFB 33,254,254,62,195,119,35,62
    23305DEFB 105,119,35,62,254,119,33,0
    23313DEFB 244,1,4,1,62,254,119,35
    23321DEFB 11,120,177,32,247,1,0,0
    23329DEFB 237,67,254,255,237,67,252,255
    23337DEFB 237,67,251,255,243,33,0,250
    23345DEFB 34,249,255,62,244,237,71,237
    23353DEFB 94,62,3,50,247,255
    + + + + + + +
    +Prev: 23296 +Up: Map +Next: 23359 +
    + + + \ No newline at end of file diff --git a/dec/asm/23359.html b/dec/asm/23359.html index bed6716..3fe2834 100644 --- a/dec/asm/23359.html +++ b/dec/asm/23359.html @@ -25,7 +25,7 @@
    -Prev: 23296 +Prev: 23297 Up: Map @@ -33,7 +33,7 @@
    -
    23359: Game status buffer entry at 5B3F
    +
    23359: Pointer: Game Entry Point
    + - +
    @@ -42,15 +42,16 @@
    Pointer_GameEntryPoint 23359DEFW 52500DEFW GameEntryPoint
    -Prev: 23296 +Prev: 23297 Up: Map diff --git a/dec/asm/23500.html b/dec/asm/23500.html index 564a790..fdff1d3 100644 --- a/dec/asm/23500.html +++ b/dec/asm/23500.html @@ -33,7 +33,7 @@
    -
    23500: Current Room: Key Colour
    +
    23500: Active Room: Key Colour
    - + diff --git a/dec/asm/23501.html b/dec/asm/23501.html index 151d06a..52d27ed 100644 --- a/dec/asm/23501.html +++ b/dec/asm/23501.html @@ -33,7 +33,7 @@
    @@ -45,7 +45,7 @@
    CurrentRoom_KeyColourActiveRoom_KeyColour 23500 DEFB 0
    -
    23501: Current Room: Closed Door Colour
    +
    23501: Active Room: Closed Door Colour
    - + diff --git a/dec/asm/23503.html b/dec/asm/23503.html index 505107a..1103c71 100644 --- a/dec/asm/23503.html +++ b/dec/asm/23503.html @@ -33,7 +33,7 @@
    @@ -45,7 +45,7 @@
    CurrentRoom_ClosedDoorColourActiveRoom_ClosedDoorColour 23501 DEFB 0
    -
    23503: Current Room: Room Scaffolding Colour
    +
    23503: Active Room: Room Scaffolding Colour
    - + diff --git a/dec/asm/23504.html b/dec/asm/23504.html index ac5ae26..8b6386a 100644 --- a/dec/asm/23504.html +++ b/dec/asm/23504.html @@ -33,7 +33,7 @@
    @@ -45,7 +45,7 @@
    CurrentRoom_ScaffoldingColourActiveRoom_ScaffoldingColour 23503 DEFB 0
    -
    23504: Current Border Colour
    +
    23504: Active Border Colour
    - + diff --git a/dec/asm/23505.html b/dec/asm/23505.html index f1dc32a..2c183c7 100644 --- a/dec/asm/23505.html +++ b/dec/asm/23505.html @@ -33,7 +33,7 @@
    @@ -42,7 +42,7 @@
    Current_BorderColourActive_BorderColour 23504 DEFB 0
    -
    23505: Current Room: Paper Colour
    +
    23505: Active Room: Paper Colour
    - + diff --git a/dec/asm/23506.html b/dec/asm/23506.html index 25f4fc4..64f3b33 100644 --- a/dec/asm/23506.html +++ b/dec/asm/23506.html @@ -33,7 +33,7 @@
    @@ -45,7 +45,7 @@
    CurrentRoom_PaperColourActiveRoom_PaperColour 23505 DEFB 0
    -
    23506: Current Room: Ladder Colour
    +
    23506: Active Room: Ladder Colour
    - + diff --git a/dec/asm/23510.html b/dec/asm/23510.html index b0648b7..1351a66 100644 --- a/dec/asm/23510.html +++ b/dec/asm/23510.html @@ -33,27 +33,21 @@
    @@ -45,7 +45,7 @@
    CurrentRoom_LadderColourActiveRoom_LadderColour 23506 DEFB 0
    -
    23510: Current Room: Door Colour
    +
    23510: Reference: Doors
    - + - - - - - - - +
    CurrentRoom_DoorColourReferenceDoors 23510DEFB 0
    23511DEFB 0DEFW 0
    diff --git a/dec/asm/23526.html b/dec/asm/23526.html index 1cb0f48..34532a2 100644 --- a/dec/asm/23526.html +++ b/dec/asm/23526.html @@ -29,21 +29,25 @@
    Up: Map -Next: 23527 +Next: 23528
    -
    23526: Game status buffer entry at 5BE6
    +
    23526: Reference: Disappearing Floors
    + - +
    ReferenceDisappearingFloors 23526DEFB 0DEFW 0
    @@ -54,7 +58,7 @@
    Up: Map -Next: 23527 +Next: 23528
    diff --git a/dec/asm/23528.html b/dec/asm/23528.html index 584de00..1802612 100644 --- a/dec/asm/23528.html +++ b/dec/asm/23528.html @@ -25,7 +25,7 @@
    -Prev: 23527 +Prev: 23526 Up: Map @@ -33,24 +33,28 @@
    -
    23528: Game status buffer entry at 5BE8
    +
    23528: Pointer: Current Room Buffer
    + - +
    +
    +Initialised at PopulateCurrentRoomBuffersAndReferences. Used by the routine at DrawRoom. +
    PointerCurrentRoomBuffer 23528 DEFW 0Will always be BufferCurrentRoomData when set.
    -Prev: 23527 +Prev: 23526 Up: Map diff --git a/dec/asm/23540.html b/dec/asm/23540.html index fd33de4..9dcb309 100644 --- a/dec/asm/23540.html +++ b/dec/asm/23540.html @@ -29,7 +29,7 @@ Up: Map -Next: 23546 +Next: 23542
    @@ -38,6 +38,15 @@
    +
    +The count of how much booty the player has collected in the current game. +
    +
    +Initialised to 0000 in InitialiseGame at the start of a new game, unless GameState is set to "Mystery Game Mode" (2) in which case the game begins with the previous games value continued (but all the booty is respawned). +
    +
    DEFB 0,0
    23542DEFB 0,0,0,0
    @@ -61,7 +64,7 @@
    Up: Map -Next: 23546 +Next: 23542
    diff --git a/dec/asm/23542.html b/dec/asm/23542.html new file mode 100644 index 0000000..b299414 --- /dev/null +++ b/dec/asm/23542.html @@ -0,0 +1,69 @@ + + + +Booty: Unused RAM at 23542 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: 23540 +Up: Map +Next: 23546 +
    +
    23542: Unused
    + + + + + + + + + +
    +
    +
    +
    23542DEFB 0,0,0,0
    + + + + + + +
    +Prev: 23540 +Up: Map +Next: 23546 +
    + + + \ No newline at end of file diff --git a/dec/asm/23546.html b/dec/asm/23546.html index 5ba1718..eccee54 100644 --- a/dec/asm/23546.html +++ b/dec/asm/23546.html @@ -25,7 +25,7 @@
    -Prev: 23540 +Prev: 23542 Up: Map @@ -54,7 +54,7 @@
    -Prev: 23540 +Prev: 23542 Up: Map diff --git a/dec/asm/26944.html b/dec/asm/26944.html index 13140b8..06d1b62 100644 --- a/dec/asm/26944.html +++ b/dec/asm/26944.html @@ -33,7 +33,7 @@
    -
    26944: Game Entry Point
    +
    26944: On-Load Entry Point #1
    + + - + + - - + +
    @@ -42,19 +42,22 @@
    FinishedLoadingEntryPoint 26944 DI Disable interrupts.
    26945 LD DE,(23359)DE=*23359.DE=*Pointer_GameEntryPoint.
    26949JR 26967Jump to 26967.JR LoadingEntryPointContinuedJump to LoadingEntryPointContinued.
    diff --git a/dec/asm/26967.html b/dec/asm/26967.html index 8f7a58e..509fc38 100644 --- a/dec/asm/26967.html +++ b/dec/asm/26967.html @@ -33,58 +33,67 @@
    -
    26967: Routine at 6957
    +
    26967: On-Load Entry Point #2
    + + + + + + + + + diff --git a/dec/asm/43224.html b/dec/asm/43224.html index 5e8a074..cbf56cf 100644 --- a/dec/asm/43224.html +++ b/dec/asm/43224.html @@ -146,13 +146,13 @@ - + - + diff --git a/dec/asm/43264.html b/dec/asm/43264.html index 96fabe8..d98d1a2 100644 --- a/dec/asm/43264.html +++ b/dec/asm/43264.html @@ -48,7 +48,10 @@ - + @@ -65,13 +68,13 @@ - + - + @@ -93,7 +96,7 @@ - + @@ -111,6 +114,16 @@ + + + @@ -122,10 +135,20 @@ + + + - + @@ -143,10 +166,20 @@ + + + - + - + @@ -410,7 +443,7 @@ - + @@ -554,7 +587,7 @@ - + @@ -649,7 +682,7 @@ - + @@ -694,7 +727,7 @@ - + @@ -787,7 +820,7 @@ - + @@ -1195,7 +1228,7 @@ - + diff --git a/dec/asm/43671.html b/dec/asm/43671.html index 6399c0d..2e2f13e 100644 --- a/dec/asm/43671.html +++ b/dec/asm/43671.html @@ -178,7 +178,7 @@ Now move onto actually copying the room data.
    -Set up counters for copying data from the default state to the room buffer. +Set up counters for copying data from the default state to the room buffer. The counter length relates to the length of the data for each instance of the "thing" being copied (NOT the length of the data being copied). For an example; portholes are 0003 bytes of data each, so B is 3 when calling CopyRoomData. How many portholes being copied just depends on when the loop reads a termination character (255).
    @@ -192,127 +192,117 @@ - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + diff --git a/dec/asm/43764.html b/dec/asm/43764.html index b69ca03..61ca8f3 100644 --- a/dec/asm/43764.html +++ b/dec/asm/43764.html @@ -39,7 +39,7 @@ @@ -127,7 +127,7 @@
    -Move the room buffer data address pointer to the room data (the first 8 bytes are colour data. There's no need to copy the colours here, as they don't vary between each game. +Move the room buffer data address pointer to the room data itself (the first 8 bytes are colour data). There's no need to copy the colours here, as they don't vary between each game.
    @@ -174,7 +174,10 @@
    -Set up counters for copying data from the room data buffer to the current room buffer. +Set up counters for copying data from the default state to the room buffer. +
    +
    +The counter length relates to the length of the data for each instance of the "thing" being copied (NOT the length of the data being copied). For an example; portholes are 0003 bytes of data each, so B is 3 when calling CopyRoomData. How many portholes being copied just depends on when the loop reads a termination character (255).
    @@ -183,121 +186,111 @@ - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + diff --git a/dec/asm/43844.html b/dec/asm/43844.html index 06dbce5..a6a032c 100644 --- a/dec/asm/43844.html +++ b/dec/asm/43844.html @@ -111,7 +111,7 @@ - + @@ -127,13 +127,22 @@ - + + + - + @@ -149,13 +158,23 @@ - + + + + - + @@ -166,37 +185,57 @@ - + - - + + + + + - + - + - - + + + + + - + @@ -207,14 +246,24 @@ - - + + + + + - + @@ -225,14 +274,24 @@ - - + + + + + - + @@ -243,14 +302,24 @@ - - + + + + + - + @@ -261,14 +330,24 @@ - - + + + + + - + @@ -279,14 +358,24 @@ - - + + + + + - + @@ -297,14 +386,24 @@ - - + + + + + - + @@ -315,26 +414,36 @@ - - + + + + + - + - + - - + + diff --git a/dec/asm/43970.html b/dec/asm/43970.html index e23cc06..258bd54 100644 --- a/dec/asm/43970.html +++ b/dec/asm/43970.html @@ -33,7 +33,7 @@
    -Used by the routine at 26944. +Used by the routine at FinishedLoadingEntryPoint.
    LoadingEntryPointContinued 26967 LD HL,23297 HL=23297.
    26970 LD BC,62 BC=0062.
    26973 LDIR Copy HL to DE 0062 times.
    26975 EXX Switch to the shadow registers.
    26976 LD HL,10072 HL'=10072.
    26979 EXX Switch back to the normal registers.
    26980 EI Enable interrupts.
    26981 POP DE Restore DE from the stack.
    26982 RET Return.ClearRoomAttributeBuffer_Loop 43247 LD A,(23505)A=*CurrentRoom_PaperColour.A=*ActiveRoom_PaperColour.
    43250 SLA AConvert a PAPER value to INK.Convert a PAPER value (using bits 3, 4 and 5) to an INK value (shifted left to bits 0, 1 and 2).
    DrawRoom 43264 LD A,0Write 0 to *ATTR_P.Write + + +BLACK to *ATTR_P.
    43272 LD A,(23505)A=*CurrentRoom_PaperColour.A=*ActiveRoom_PaperColour.
    43275 SLA AShift A left three positions (with carry).Convert a PAPER value (using bits 3, 4 and 5) to an "INK" value (shifted left to bits 0, 1 and 2).
    43284 LD A,17Set PAPER: *CurrentRoom_PaperColour.Set PAPER: *ActiveRoom_PaperColour.
    RST 16
    + +
    +
    +Set the UDG graphics pointer. +
    +
    +
    43291 LD HL,33656LD (23606),HL
    + +
    +
    +Set the attributes for drawing the room scaffolding (i.e. ceilings and floors). +
    +
    +
    43297 LD A,16Set INK: *CurrentRoom_ScaffoldingColour.Set INK: *ActiveRoom_ScaffoldingColour.
    RST 16
    + +
    +
    +Fetch the address of the current room data buffer. +
    +
    +
    43304 LD HL,(23528)HL=*23528.HL=*PointerCurrentRoomBuffer.
    @@ -296,7 +329,7 @@ DrawRoomLadders 43346 LD A,16Set INK: *CurrentRoom_LadderColour.Set INK: *ActiveRoom_LadderColour.
    DrawRoomDoors 43379 LD HL,(23510)HL=*CurrentRoom_DoorColour.HL=*ReferenceDoors.
    DrawRoomDoors_Loop 43415 LD A,16Set INK: *CurrentRoom_ScaffoldingColour.Set INK: *ActiveRoom_ScaffoldingColour.
    43455 LD A,16Set INK: *CurrentRoom_ScaffoldingColour.Set INK: *ActiveRoom_ScaffoldingColour.
    43473 LD A,16Set INK: *CurrentRoom_ClosedDoorColour.Set INK: *ActiveRoom_ClosedDoorColour.
    43507 LD A,16Set INK: *CurrentRoom_KeyColour.Set INK: *ActiveRoom_KeyColour.
    43664 LD A,(23504)Set the border to *Current_BorderColour using BORDER.Set the border to *Active_BorderColour using BORDER.
    43703CALL MoveRoomDataCALL CopyRoomData
    43706 LD B,3B=3 (loop counter).Handle copying the ... data.
    43708CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43711 LD B,4B=4 (loop counter).Handle copying the doors data.
    43713CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43716 LD B,2B=2 (loop counter).Handle copying the ladders data.
    43718CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43721 LD B,6B=6 (loop counter).Handle copying the keys and locked doors data.
    43723CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43726 LD B,3B=3 (loop counter).Handle copying the porthole data.
    43728CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43731 LD B,16B=16 (loop counter).Handle copying the pirate data.
    43733CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43736 LD B,7B=7 (loop counter).Handle copying the items data.
    43738CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43741 LD B,4B=4 (loop counter).Handle copying the furniture data.
    43743CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43746 LD B,16B=16 (loop counter).Handle copying the lifts data.
    43748CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43751 LD B,6B=6 (loop counter).Handle copying the disappearing floors data.
    43753CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    -This is similar to UnpackAllRooms, however instead of copying ALL the room data from the default room data into the room data buffers, this routine copies a single room from the room data buffers into the active room buffer. The reason for this is because the game opens with the default positions for everything held by the defaults but as the player moves around the game and interacts with doors/ keys/ items/ etc, the buffers keep track of what's been collected, and where the pirates were when the player left the room. +This is similar to UnpackAllRooms, however instead of copying ALL the room data from the default room data into the room data buffers, this routine copies a single room from the room data buffers into the active room buffer. The reason for this is because the game opens with the default positions for everything held by the defaults but as the player moves around the game and interacts with doors/ keys/ items/ etc, the buffers keep track of what's been collected, and where the pirates were when the player left the room so when they're revisited, they retain those changes.
    43793 LD B,3B=3 (loop counter).Handle copying the ... data.
    43795CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43798 LD B,4B=4 (loop counter).Handle copying the doors data.
    43800CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43803 LD B,2B=2 (loop counter).Handle copying the ladders data.
    43805CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43808 LD B,6B=6 (loop counter).Handle copying the keys and locked doors data.
    43810CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43813 LD B,3B=3 (loop counter).Handle copying the porthole data.
    43815CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43818 LD B,16B=16 (loop counter).Handle copying the pirate data.
    43820CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43823 LD B,7B=7 (loop counter).Handle copying the items data.
    43825CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43828 LD B,4B=4 (loop counter).Handle copying the furniture data.
    43830CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43833 LD B,16B=16 (loop counter).Handle copying the lifts data.
    43835CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43838 LD B,6B=6 (loop counter).Handle copying the disappearing floors data.
    43840CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomData
    43863 LD E,(HL)Store the room data address for the requested room in DE.Store the room data address for the requested room in HL.
    43866 EX DE,HLSwitch the DE and HL registers.
    + +
    +
    +Set the colours for the active room. +
    +
    +
    43867 LD DE,23500Copy 0007 bytes of room data from the buffer to *CurrentRoom_KeyColour.Copy 0007 bytes of room data from the buffer to *ActiveRoom_KeyColour.
    43875 INC HLIncrement HL by one.Skip the terminator character in the room data.
    + +
    +
    +Handle populating the ... data. +
    +
    +
    43876 LD DE,47831Write BufferCurrentRoomData to *23528.Write BufferCurrentRoomData to *PointerCurrentRoomBuffer.
    43883 LD B,3B=3 (loop counter).B=3 (length counter).
    43885CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    + +
    +
    +Handle populating the doors data. +
    +
    +
    43888 LD B,4B=4 (loop counter).B=4 (length counter).
    43890 LD (23510),DEWrite DE to *CurrentRoom_DoorColour.Write DE to *ReferenceDoors.
    43894CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    + +
    +
    +Handle populating the ladders data. +
    +
    +
    43897 LD B,2B=2 (loop counter).B=2 (length counter).
    43903CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    + +
    +
    +Handle populating the keys and locked doors data. +
    +
    +
    43906 LD B,6B=6 (loop counter).B=6 (length counter).
    43912CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    + +
    +
    +Handle populating the porthole data. +
    +
    +
    43915 LD B,3B=3 (loop counter).B=3 (length counter).
    43921CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    + +
    +
    +Handle populating the pirate data. +
    +
    +
    43924 LD B,16B=16 (loop counter).B=16 (length counter).
    43930CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    + +
    +
    +Handle populating the items data. +
    +
    +
    43933 LD B,7B=7 (loop counter).B=7 (length counter).
    43939CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    + +
    +
    +Handle populating the furniture data. +
    +
    +
    43942 LD B,4B=4 (loop counter).B=4 (length counter).
    43948CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    + +
    +
    +Handle populating the lifts data. +
    +
    +
    43951 LD B,16B=16 (loop counter).B=16 (length counter).
    43957CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    + +
    +
    +Handle populating the disappearing floors data. +
    +
    +
    43960 LD B,6B=6 (loop counter).B=6 (length counter).
    43962 LD (23526),DEWrite DE to *23526.Write DE to *ReferenceDisappearingFloors.
    43966CALL MoveRoomDataCall MoveRoomData.CALL CopyRoomDataCall CopyRoomData.
    -
    43970: Move Room Data
    +
    43970: Copy Room Data
    - + @@ -62,10 +62,20 @@ - + + + + - + @@ -87,12 +97,12 @@ - + - + - + @@ -131,8 +141,8 @@ - - + + - + - - + + - + @@ -188,7 +198,7 @@ - + diff --git a/dec/asm/47829.html b/dec/asm/47829.html index 9fa862c..9844a23 100644 --- a/dec/asm/47829.html +++ b/dec/asm/47829.html @@ -47,7 +47,7 @@ - +
    @@ -48,7 +48,7 @@
    BLoop counterLength of data to be copied
    DE
    MoveRoomData + +
    +
    +This routine copies the number of bytes given by B, from *HL to *DE, and keeps on looping until a termination character is returned. +
    +
    +
    CopyRoomData 43970 PUSH BCStash the loop counter on the stack.Stash the length counter on the stack.
    43972 CP 255If the terminator character (255) has been reached jump to MoveRoomData_Next.If the terminator character (255) has been reached jump to CopyRoomData_Next.
    43974JR Z,MoveRoomData_NextJR Z,CopyRoomData_Next
    @@ -105,7 +115,7 @@
    MoveRoomData_LoopCopyRoomData_Loop 43976 LD (DE),A Write the room data byte to the room buffer target destination.
    43980DJNZ MoveRoomData_LoopDecrease counter by one and loop back to MoveRoomData_Loop until counter is zero.DJNZ CopyRoomData_LoopDecrease counter by one and loop back to CopyRoomData_Loop until counter is zero.
    @@ -148,13 +158,13 @@ 43982 POP BCRestore the original loop counter from the stack.Restore the original length counter from the stack.
    43983JR MoveRoomDataJump to MoveRoomData.JR CopyRoomDataJump to CopyRoomData.
    @@ -167,7 +177,7 @@
    MoveRoomData_NextCopyRoomData_Next 43985 LD (DE),A Write the termination character to the room buffer target destination. 43988 POP BCHousekeeping; discard the loop counter from the stack.Housekeeping; discard the length counter from the stack.
    BufferPointer 47829DEFB 149,203DEFW 52117
    diff --git a/dec/asm/52500.html b/dec/asm/52500.html index 6d79b5f..fa3d163 100644 --- a/dec/asm/52500.html +++ b/dec/asm/52500.html @@ -33,7 +33,7 @@
    -
    52500: Routine at CD14
    +
    52500: Game Entry Point
    + + + + + + + + + + + + + + + + - + + + - + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + diff --git a/dec/asm/52614.html b/dec/asm/52614.html index 854cc52..41c2030 100644 --- a/dec/asm/52614.html +++ b/dec/asm/52614.html @@ -39,7 +39,7 @@ @@ -100,7 +100,7 @@ - + diff --git a/dec/asm/52689.html b/dec/asm/52689.html index 600ef7e..09110dc 100644 --- a/dec/asm/52689.html +++ b/dec/asm/52689.html @@ -100,7 +100,7 @@ PAPER: BLACK - (0) to *Current_BorderColour. + (0) to *Active_BorderColour. diff --git a/dec/asm/52801.html b/dec/asm/52801.html index 9dc4d06..fb2b890 100644 --- a/dec/asm/52801.html +++ b/dec/asm/52801.html @@ -188,7 +188,7 @@ - + diff --git a/dec/asm/57000.html b/dec/asm/57000.html index a812c8b..34b7062 100644 --- a/dec/asm/57000.html +++ b/dec/asm/57000.html @@ -200,8 +200,8 @@ @@ -236,10 +236,10 @@ @@ -263,6 +263,16 @@ + + + @@ -314,7 +324,7 @@ - + @@ -347,7 +357,7 @@ - + @@ -497,8 +507,8 @@ - - + + - + @@ -674,7 +684,7 @@ - + @@ -700,8 +710,8 @@ - - + + diff --git a/dec/asm/57299.html b/dec/asm/57299.html index 1be9817..8665345 100644 --- a/dec/asm/57299.html +++ b/dec/asm/57299.html @@ -100,7 +100,7 @@ - + diff --git a/dec/asm/57444.html b/dec/asm/57444.html index 89ac60c..aae8913 100644 --- a/dec/asm/57444.html +++ b/dec/asm/57444.html @@ -82,6 +82,16 @@ + + + diff --git a/dec/asm/57513.html b/dec/asm/57513.html index f6a841e..f441c64 100644 --- a/dec/asm/57513.html +++ b/dec/asm/57513.html @@ -106,7 +106,7 @@ - + @@ -348,7 +348,7 @@ - + diff --git a/dec/asm/57624.html b/dec/asm/57624.html index bb594a5..2c91493 100644 --- a/dec/asm/57624.html +++ b/dec/asm/57624.html @@ -39,7 +39,7 @@ @@ -52,7 +52,7 @@ - + diff --git a/dec/asm/57631.html b/dec/asm/57631.html index 0f04e56..a7f23f6 100644 --- a/dec/asm/57631.html +++ b/dec/asm/57631.html @@ -33,41 +33,43 @@
    @@ -42,91 +42,110 @@
    GameEntryPoint 52500 LD HL,65278 HL=65278.
    52503 LD A,195 Write 195 to *HL.
    52505 LD (HL),A
    52506 INC HL Increment HL by one.
    52507 LD A,105 Write 105 to *HL.
    52509 LD (HL),A
    52510 INC HL Increment HL by one.
    52511 LD A,254 Write 254 to *HL.
    52513 LD (HL),A
    52514 LD HL,62464 HL=62464.
    52517 LD BC,260 BC=0260.
    GameEntryPoint_0 52520 LD A,254 A=254.
    52522 LD (HL),A Write A to *HL.
    52523 INC HL Increment HL by one.
    52524 DEC BC Decrease BC by one.
    52525 LD A,BJump to 52520 until BC is zero.Jump to GameEntryPoint_0 until BC is zero.
    52526 OR C
    52527JR NZ,52520JR NZ,GameEntryPoint_0
    52529 LD BC,0 Write 0000 to:
      @@ -136,46 +155,56 @@
    52532 LD (65534),BC
    52536 LD (65532),BC
    52540 LD (65531),BC
    52544 DI Disable interrupts.
    52545 LD HL,64000 Write 64000 to *65529.
    52548 LD (65529),HL
    52551 LD A,244 I=244.
    52553 LD I,A
    52555 IM 2 Set interrupt mode 2.
    52557 LD A,3 Write 3 to:
      @@ -184,82 +213,99 @@
    52559 LD (65527),A
    52562 LD (65528),A
    52565 EI Enable interrupts.
    52566 LD HL,41068 HL=41068.
    52569 LD B,128 B=128.
    52571 XOR A Write 0 to *HL.
    GameEntryPoint_1 52572 LD (HL),A
    52573 INC HL Increment HL by one.
    52574DJNZ 52572Decrease counter by one and loop back to 52572 until counter is zero.DJNZ GameEntryPoint_1Decrease counter by one and loop back to GameEntryPoint_1 until counter is zero.
    52576 EXX Switch to the shadow registers.
    52577 PUSH HL Stash HL' on the stack.
    52578 EXX Switch back to the normal registers.
    52579 XOR A Write 0 to *DF_SZ.
    52580 LD (23659),A
    52583 LD A,2 A=2.
    52585 CALL 5633 Call CHAN_OPEN.
    52588 JP DisplayIntroductionScreen Jump to DisplayIntroductionScreen.
    -Used by the routines at 52500, StartGame and DemoMode. +Used by the routines at GameEntryPoint, StartGame and DemoMode.
    52632 LD A,3Write MAGENTA to *Current_BorderColour.Write MAGENTA to *Active_BorderColour.
    52833 LD A,5Write CYAN (5) to *Current_BorderColour.Write CYAN (5) to *Active_BorderColour.
    57049 LD A,0 Write 0 to:
    57065 LD A,0 Write 0 to:
    LD (62272),A
    + +
    +
    +This also draws the whole room. +
    +
    +
    57079 CALL PrintStatusBar 57094 LD A,17Set PAPER: *Current_BorderColour.Set PAPER: *Active_BorderColour.
    InitialiseGame_0 57107 LD A,17Set PAPER: *CurrentRoom_PaperColour.Set PAPER: *ActiveRoom_PaperColour.
    57176CALL 58753Call 58753.CALL Handler_DisappearingFloorsCall Handler_DisappearingFloors.
    @@ -538,7 +548,7 @@ 57185 LD A,17Set PAPER: *Current_BorderColour.Set PAPER: *Active_BorderColour.
    57242 LD A,(62272)Increment *62272 by one.Increment *62272 by one.
    57254CALL 58185Call 58185.CALL GetRandomNumberCall GetRandomNumber.
    57311 LD A,17Set PAPER: *CurrentRoom_PaperColour.Set PAPER: *ActiveRoom_PaperColour.
    CALL 3545
    + +
    +
    +Skip showing any lives if the player is using their last life. +
    +
    +
    57457 LD A,(23537) 57528 LD A,17Set PAPER: *Current_BorderColour.Set PAPER: *Active_BorderColour.
    57597 LD A,17Set PAPER: *CurrentRoom_PaperColour.Set PAPER: *ActiveRoom_PaperColour.
    -Used by the routine at 57642. +Used by the routine at AnimalsEventTiming.
    57625 LD A,0Write 0 to *62236.Write 0 to *62236.
    57627
    -
    57631: Routine at E11F
    +
    57631: Increased Frequency Animals Event Timing
    + - + + - + - + - - + + - +
    -Used by the routine at 57642. +Used by the routine at AnimalsEventTiming.
    IncreasedFrequencyAnimalsEventTiming 57631 LD HL,(23672)A=*FRAMES.Jump to StartAnimalsEvent if *FRAMES is higher than 850.
    57634 LD DE,850DE=850.
    57637 SBC HL,DEHL-=DE (with carry).
    57639JR NC,57660Jump to 57660 if {} is higher.JR NC,StartAnimalsEvent
    57641 RETReturn.Else, return.
    diff --git a/dec/asm/57642.html b/dec/asm/57642.html index 3427090..c71b236 100644 --- a/dec/asm/57642.html +++ b/dec/asm/57642.html @@ -33,7 +33,7 @@
    -
    57642: Routine at E12A
    +
    57642: Animals Event Timing
    + + + + - + + - + + - + + - + + - + - + - + - + + + - - + + + - + + - + + - + - + - + + + + + + - + + + - + + - + + + - + + + + + + + - - + + + - + + - - + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + - - + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dec/asm/57901.html b/dec/asm/57901.html index b18f5a3..ac0c956 100644 --- a/dec/asm/57901.html +++ b/dec/asm/57901.html @@ -48,13 +48,13 @@ - + - + @@ -64,7 +64,7 @@ - + @@ -194,8 +194,8 @@ - - + + @@ -251,8 +251,8 @@ - - + + @@ -451,13 +451,12 @@ - + - @@ -492,25 +491,23 @@ - + - - + - diff --git a/dec/asm/58185.html b/dec/asm/58185.html index 712d17c..2e3d69c 100644 --- a/dec/asm/58185.html +++ b/dec/asm/58185.html @@ -33,93 +33,122 @@
    @@ -45,42 +45,56 @@
    + +
    +
    +*PlayerBooty starts at 0000 and counts up for every item of booty collected. This means that, the chance that animals appear increases when the player has collected over 100 items (of booty, not treasure - which counts down from 0125). +
    +
    +
    AnimalsEventTiming 57642 LD BC,(23540)BC=*PlayerBooty.If the player has collected over 100 items of booty (in *PlayerBooty) then jump to IncreasedFrequencyAnimalsEventTiming.
    57646 LD A,CJump to 57631 if C is higher than 100.
    57647 CP 100
    57649JR NC,57631JR NC,IncreasedFrequencyAnimalsEventTiming
    57651 LD HL,(23672)HL=*FRAMES.Return if *FRAMES is lower than 1400.
    57654 LD DE,1400DE=1400.
    57657 SBC HL,DEHL-=DE (with carry).
    57659 RET CReturn if {} is lower.
    @@ -93,456 +107,548 @@
    StartAnimalsEvent 57660 LD HL,0Reset *FRAMES to 0000.Reset *FRAMES to 0000 to start a new event cycle.
    57663 LD (23672),HL
    57666CALL 58185Call 58185.CALL GetRandomNumberCall GetRandomNumber.
    57669 AND %00000011Keep only bits 0-1.Ensure the random number is between 0 and 3.
    57671 LD HL,62231HL=62231.HL=62231+the random number.
    57674 LD E,AE=A.
    57675 LD D,0D=0.
    57677 ADD HL,DEHL+=DE.
    57678 PUSH HL Stash HL on the stack.
    57679 INC HL Increment HL by one.
    57680 LD A,(HL) A=*HL.
    57681 LD IX,(23514) IX=ReferenceKeysAndLockedDoors.
    57685 LD B,A B=A.
    AnimalsEventTiming_0 57686 LD A,(IX+0)Jump to 57714 if *IX+0 is equal to 255.Jump to AnimalsEventTiming_2 if *IX+0 is equal to 255.
    57689 CP 255
    57691JR Z,57714JR Z,AnimalsEventTiming_2
    57693 LD A,(IX+1)Jump to 57707 if *IX+1 is not equal to B.Jump to AnimalsEventTiming_1 if *IX+1 is not equal to B.
    57696 CP B
    57697JR NZ,57707JR NZ,AnimalsEventTiming_1
    57699 LD A,(IX+5) Jump to 57624 if *IX+5 is not equal to 0.
    57702 CP 0
    57704 JP NZ,57624
    AnimalsEventTiming_1 57707 LD DE,6 IX+=0006.
    57710 ADD IX,DE
    57712JR 57686Jump to 57686.JR AnimalsEventTiming_0Jump to AnimalsEventTiming_0.
    AnimalsEventTiming_2 57714 LD IX,62236IX=62236.IX=62236.
    57718CALL 58185Call 58185.CALL GetRandomNumberCall GetRandomNumber.
    57721 BIT 3,A Test bit 3 of A.
    57723JR Z,57751Jump to 57751 if {} is zero.JR Z,AnimalsEventTiming_3Jump to AnimalsEventTiming_3 if {} is zero.
    57725 LD (IX+0),2 Write 2 to *IX+0.
    57729 LD (IX+2),1 Write 1 to *IX+2.
    57733 LD (IX+4),1 Write 1 to *IX+4.
    57737 LD (IX+5),0 Write 0 to *IX+5.
    57741 LD (IX+11),1 Write 1 to *IX+11.
    57745 LD (IX+13),2 Write 2 to *IX+13.
    57749JR 57775Jump to 57775.JR AnimalsEventTiming_4Jump to AnimalsEventTiming_4.
    AnimalsEventTiming_3 57751 LD (IX+0),37 Write 37 to *IX+0.
    57755 LD (IX+2),0 Write 0 to *IX+2.
    57759 LD (IX+4),255 Write 255 to *IX+4.
    57763 LD (IX+5),0 Write 0 to *IX+5.
    57767 LD (IX+11),0 Write 0 to *IX+11.
    57771 LD (IX+13),36 Write 36 to *IX+13.
    AnimalsEventTiming_4 57775CALL 58185Call 58185.CALL GetRandomNumberCall GetRandomNumber.
    57778 BIT 5,A Test bit 5 of A.
    57780JR Z,57854Jump to 57854 if {} is zero.JR Z,AnimalsEventTiming_6Jump to AnimalsEventTiming_6 if {} is zero.
    57782 POP HL Restore HL from the stack.
    57783 PUSH HL Stash HL on the stack.
    57784 LD A,(HL) Set up the screen buffer location 33/*HL using CL_SET.
    57785 LD B,A
    57786 LD C,33
    57788 CALL 3545
    57791 LD HL,(23684) HL=*DF_CC.
    57794 LD B,32 B=32.
    AnimalsEventTiming_5 57796 LD A,(HL) A=*HL.
    57797 INC HL Increment HL by one.
    57798 CP 255 Jump to 57624 if A is not equal to 255.
    57800 JP NZ,57624
    57803DJNZ 57796Decrease counter by one and loop back to 57796 until counter is zero.DJNZ AnimalsEventTiming_5Decrease counter by one and loop back to AnimalsEventTiming_5 until counter is zero.
    57805 POP HL Restore HL from the stack.
    57806 LD A,(HL) A=*HL.
    57807 INC A Increment A by one.
    57808 LD (IX+1),A Write A to *IX+1.
    57811 LD (IX+14),A Write A to *IX+14.
    57814 LD (IX+3),3 Write 3 to *IX+3.
    57818 LD (IX+15),3 Write 3 to *IX+15.
    57822 LD (IX+6),32 Write 32 to *IX+6.
    57826 LD (IX+9),3 Write 3 to *IX+9.
    57830 LD (IX+7),4 Write 4 to *IX+7.
    57834 LD (IX+8),1 Write 1 to *IX+8.
    57838 LD A,1 Write 1 to *65535.
    57840 LD (65535),A
    57843 LD A,(IX+4) Return if *IX+4 is equal to 1.
    57846 CP 1
    57848 RET Z
    57849 LD (IX+6),36 Write 36 to *IX+6.
    57853 RET Return.
    AnimalsEventTiming_6 57854 POP HL Restore HL from the stack.
    57855 LD A,(HL) A=*HL.
    57856 INC A Increment A by three.
    57857 INC A
    57858 INC A
    57859 LD (IX+1),A Write A to *IX+1.
    57862 LD (IX+14),A Write A to *IX+14.
    57865 LD (IX+3),3 Write 3 to *IX+3.
    57869 LD (IX+6),40 Write 40 to *IX+6.
    57873 LD (IX+9),6 Write 6 to *IX+9.
    57877 LD (IX+7),2 Write 2 to *IX+7.
    57881 LD (IX+8),2 Write 2 to *IX+8.
    57885 LD A,2 Write 2 to *65535.
    57887 LD (65535),A
    57890 LD A,(IX+4) Return if *IX+4 is equal to 255.
    57893 CP 255
    57895 RET Z
    57896 LD (IX+6),44 Write 44 to *IX+6.
    57900 RET Return.Handler_Animals 57901 LD IX,62236IX=62236.IX=62236.
    57905 LD A,(IX+0)Jump to 57642 if *IX+0 is equal to 0.Jump to AnimalsEventTiming if *IX+0 is equal to 0.
    57910JP Z,57642JP Z,AnimalsEventTiming
    57964CALL 59271Call 59271.CALL MaskSpriteCall MaskSprite.
    57984CALL 59271Call 59271.CALL MaskSpriteCall MaskSprite.
    Handler_Animals_1 58069 SLA AShift A left (with carry).Shift A left two positions (with carry).
    58071 SLA AShift A left (with carry).
    58082 SLA AShift A left (with carry).Shift A left two positions (with carry).
    58084 SLA AShift A left (with carry).
    58086 ADD A,(IX+2)A+=*IX+2.C=A+*IX+2.
    58089 LD C,AC=A.
    -
    58185: Routine at E349
    +
    58185: Get Random Number
    + + + + + - + + - + + - + + - + - + - + + - + + - + - + - + + - + - + - + + + diff --git a/dec/asm/58209.html b/dec/asm/58209.html index 8321147..d686c1d 100644 --- a/dec/asm/58209.html +++ b/dec/asm/58209.html @@ -135,7 +135,7 @@ - + @@ -152,8 +152,8 @@ - - + + @@ -177,7 +177,7 @@ - + @@ -188,8 +188,8 @@ - - + + @@ -380,8 +380,8 @@ - - + + diff --git a/dec/asm/58336.html b/dec/asm/58336.html index 4b4a6bd..24a43c8 100644 --- a/dec/asm/58336.html +++ b/dec/asm/58336.html @@ -120,7 +120,7 @@ - + @@ -169,8 +169,8 @@ - - + + @@ -280,7 +280,7 @@ - + diff --git a/dec/asm/58490.html b/dec/asm/58490.html index d409c29..ec47492 100644 --- a/dec/asm/58490.html +++ b/dec/asm/58490.html @@ -206,7 +206,7 @@ - + @@ -240,13 +240,13 @@ - + - - + + diff --git a/dec/asm/58753.html b/dec/asm/58753.html index 61c3fe7..52f3fa3 100644 --- a/dec/asm/58753.html +++ b/dec/asm/58753.html @@ -33,7 +33,7 @@
    -Used by the routines at InitialiseGame, 57642 and 58209. +Used by the routines at InitialiseGame, AnimalsEventTiming and 58209. +
    +
    + + + + + + + + +
    Output
    AThe random number
    +
    + +
    +
    +(((B + C) % 256 + 171) % 256) * 256 + (C + 205) % 256
    GetRandomNumber 58185 PUSH BC Stash BC on the stack.
    58186 LD BC,(62275)BC=*62275.BC=*RandomNumberSeed.
    58190 XOR AA=0.Reset the flags.
    58191 LD A,CA=C.B=B+C.
    58192 ADD A,BA+=B.
    58193 LD B,AB=A.
    58194 XOR AA=0.Reset the flags.
    58195 LD A,205A=205.C=205+C.
    58197 ADD A,CA+=C.
    58198 LD C,AC=A.
    58199 LD A,171A=171.B+=171.
    58201 ADC A,BA+=B.
    58202 LD B,AB=A.
    58203 LD (62275),BCWrite BC to *62275.Write the updated BC backit to *RandomNumberSeed.
    58207 POP BC Restore BC from the stack.
    58208 RET Return. 58235 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    58242CALL 58185Call 58185.CALL GetRandomNumberCall GetRandomNumber.
    58251 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    58256CALL 58185Call 58185.CALL GetRandomNumberCall GetRandomNumber.
    58306CALL 58185Call 58185.CALL GetRandomNumberCall GetRandomNumber.
    58364 LD DE,257DE=Sprite height/ width (257).DE=Set the sprite width/ height (1/ 1).
    58381CALL 59271Call 59271.CALL MaskSpriteCall MaskSprite.
    58421 LD DE,257DE=Sprite height/ width (257).DE=Set the sprite width/ height (1/ 1).
    58536 LD DE,514DE=Sprite height/ width (514).DE=Set the sprite width/ height (2/ 2).
    58547 LD DE,514DE=Sprite height/ width (514).DE=Set the sprite width/ height (2/ 2).
    58550CALL 59271Call 59271.CALL MaskSpriteCall MaskSprite.
    -
    58753: Routine at E581
    +
    58753: Handler: Disappearing Floors
    + - + + + + + + + - - + + + + + + - + + + - + + + + + + + + + + - + + - + + - + + + - - + + + + + - + + - + + + + + + + + + + - + + - + + - - + + + + + - - + +
    @@ -45,217 +45,261 @@
    Handler_DisappearingFloors 58753 LD IX,(23526)IX=23526.IX=ReferenceDisappearingFloors.
    Handler_DisappearingFloors_Loop 58757 LD A,(IX+0) Return if *IX+0 is equal to 255.
    58760 CP 255
    58762 RET Z
    58763 LD A,(IX+2) A=*IX+2.
    58766 AND %10000000 Keep only bit 7.
    58768JP Z,58821Jump to 58821 if the result is zero.JP Z,Handler_DisappearingFloors_1Jump to Handler_DisappearingFloors_1 if the result is zero.
    58771 LD HL,40812 Write 40812 (41068) to *CHARS.
    58774 LD (23606),HL
    58777 INC (IX+5) Increment *IX+5 by one.
    58780 LD A,(IX+4)Jump to 58800 if *IX+4 is not equal to *IX+5.Jump to Handler_DisappearingFloors_0 if *IX+4 is not equal to *IX+5.
    58783 CP (IX+5)
    58786JR NZ,58800JR NZ,Handler_DisappearingFloors_0
    58788 LD A,(IX+2) A=*IX+2.
    58791 AND %01111111 Keep only bits 0-6.
    58793 LD (IX+2),A Write A to *IX+2.
    58796 LD (IX+5),0 Write 0 to *IX+5.
    Handler_DisappearingFloors_0 58800 LD C,(IX+0) C=*IX+0.
    58803 LD B,(IX+1) B=*IX+1.
    58806 LD A,(IX+2) A=*IX+2.
    58809 AND %01111111 Keep only bits 0-6.
    58811 LD E,AE=A.E=Sprite width (A).
    58812 LD D,1D=1.D=Sprite height (1).
    58814 LD A,32A=32.A=base sprite ID (32).
    58816 CALL PrintSprite Call PrintSprite.
    58819JR 58861Jump to 58861.JR Handler_DisappearingFloors_NextJump to Handler_DisappearingFloors_Next.
    Handler_DisappearingFloors_1 58821 LD A,(IX+3) A=*IX+3.
    58824 INC (IX+5) Increment *IX+5 by one.
    58827 CP (IX+5)Jump to 58844 if A is not equal to *IX+5.Jump to Handler_DisappearingFloors_2 if A is not equal to *IX+5.
    58830JR NZ,58844JR NZ,Handler_DisappearingFloors_2
    58832 LD A,(IX+2) A=*IX+2.
    58835 OR %10000000 Set bit 7.
    58837 LD (IX+2),A Write A to *IX+2.
    58840 LD (IX+5),0 Write 0 to *IX+5.
    Handler_DisappearingFloors_2 58844 LD C,(IX+0) C=*IX+0.
    58847 LD B,(IX+1) B=*IX+1.
    58850 LD A,(IX+2) A=*IX+2.
    58853 AND %01111111 Keep only bits 0-6.
    58855 LD E,AE=A.E=Sprite width (A).
    58856 LD D,1D=1.D=Sprite height (1).
    58858CALL 59271Call 59271.CALL MaskSpriteCall MaskSprite.
    Handler_DisappearingFloors_Next 58861 LD DE,6 IX+=0006.
    58864 ADD IX,DE
    58866JR 58757Jump to 58757.JR Handler_DisappearingFloors_LoopJump to Handler_DisappearingFloors_Loop.
    diff --git a/dec/asm/58868.html b/dec/asm/58868.html index 95f82f1..05f6b7b 100644 --- a/dec/asm/58868.html +++ b/dec/asm/58868.html @@ -190,13 +190,12 @@ - + - @@ -276,7 +275,7 @@ - + diff --git a/dec/asm/59100.html b/dec/asm/59100.html index 4d433af..0262ddc 100644 --- a/dec/asm/59100.html +++ b/dec/asm/59100.html @@ -39,7 +39,7 @@
    58923 LD D,2D=2.DE=Set the sprite width/ height (2/ 2).
    58925 LD E,2E=2.
    58956 LD A,17Set PAPER: *Current_BorderColour.Set PAPER: *Active_BorderColour.
    diff --git a/dec/asm/59183.html b/dec/asm/59183.html index 33f7b01..d3eaf54 100644 --- a/dec/asm/59183.html +++ b/dec/asm/59183.html @@ -69,7 +69,7 @@ - + @@ -79,12 +79,12 @@ - + - + @@ -117,7 +117,7 @@ - + @@ -136,7 +136,7 @@ - + diff --git a/dec/asm/59234.html b/dec/asm/59234.html index 37e3cb8..a421a46 100644 --- a/dec/asm/59234.html +++ b/dec/asm/59234.html @@ -39,7 +39,7 @@ @@ -129,7 +129,7 @@ - + diff --git a/dec/asm/59271.html b/dec/asm/59271.html index f477e23..d2cfc01 100644 --- a/dec/asm/59271.html +++ b/dec/asm/59271.html @@ -33,351 +33,421 @@
    59188 LD (62262),AWrite A to *62262.Write A to *ActiveSpriteID.
    59191
    59192 LD (62261),AWrite A to *62261.Write A to *ActiveSpriteWidth.
    59195 LD A,(62261)A=*62261.A=*ActiveSpriteWidth.
    59198
    59206 LD A,(62262)A=*62262.A=*ActiveSpriteID.
    59209
    59214 LD (62262),AWrite A to *62262.Write A to *ActiveSpriteID.
    59217
    -Used by the routines at 59183, 59271, Handler_Pirates and Handler_KeysAndLockedDoors. +Used by the routines at 59183, MaskSprite, Handler_Pirates and Handler_KeysAndLockedDoors.
    59267 LD (62256),HLWrite HL to *62256.Write HL to *62256.
    59270
    -
    59271: Routine at E787
    +
    59271: Mask Sprite?
    + - + + - + + + - + + + - + + + + + + + + + + - + + + + + + + + + - + + - + + + + - - + + + + + + - - + + + + + + + - - + + + + + + + + + - + + + + + - + + + - + + + - + + + + + + + + - - + + + + - - + + + + - - + + + + + + + + + + diff --git a/dec/asm/59396.html b/dec/asm/59396.html index 627950c..a25af4e 100644 --- a/dec/asm/59396.html +++ b/dec/asm/59396.html @@ -60,7 +60,7 @@ - + diff --git a/dec/asm/59425.html b/dec/asm/59425.html index 8c03433..76969e0 100644 --- a/dec/asm/59425.html +++ b/dec/asm/59425.html @@ -45,6 +45,16 @@ + + + @@ -60,13 +70,13 @@ - + - + @@ -80,6 +90,16 @@ + + + @@ -91,13 +111,23 @@ + + + - + @@ -116,7 +146,7 @@ - + @@ -126,13 +156,13 @@ - + - + @@ -142,7 +172,7 @@ - + @@ -178,12 +208,12 @@ - + - + @@ -277,7 +307,7 @@ - + @@ -287,7 +317,7 @@ - + @@ -296,7 +326,7 @@ - + @@ -310,8 +340,8 @@ - - + + @@ -328,17 +358,17 @@ - - + + - - + + - + @@ -352,7 +382,7 @@ - + @@ -362,7 +392,7 @@ - + @@ -379,8 +409,8 @@ - - + + @@ -391,14 +421,14 @@ - - + + - + - + @@ -408,7 +438,7 @@ - + @@ -425,8 +455,8 @@ - - + + @@ -437,11 +467,11 @@ - - + + - + @@ -467,8 +497,8 @@ - - + + @@ -479,8 +509,8 @@ - - + + @@ -526,14 +556,14 @@ - - + + - + - + @@ -543,7 +573,7 @@ - + @@ -590,7 +620,7 @@ - + @@ -634,10 +664,10 @@ - + - + @@ -647,7 +677,7 @@ - + @@ -694,7 +724,7 @@ - + @@ -738,7 +768,7 @@ - + @@ -760,7 +790,7 @@ - + @@ -782,7 +812,7 @@ - + @@ -804,7 +834,7 @@ - + @@ -826,7 +856,7 @@ - + @@ -847,12 +877,12 @@ - + - + @@ -887,8 +917,8 @@ - - + + @@ -897,7 +927,7 @@ - + @@ -906,12 +936,12 @@ - + - + @@ -941,12 +971,12 @@ - + - + @@ -964,12 +994,12 @@ - + - + @@ -987,12 +1017,12 @@ - + - + @@ -1004,12 +1034,12 @@ - + - + @@ -1018,7 +1048,7 @@ - + @@ -1032,8 +1062,8 @@ - - + + @@ -1050,17 +1080,17 @@ - - + + - - + + - + @@ -1121,7 +1151,7 @@ - + @@ -1172,7 +1202,7 @@ - + @@ -1213,7 +1243,7 @@ - + diff --git a/dec/asm/59874.html b/dec/asm/59874.html index 6374b5d..e200290 100644 --- a/dec/asm/59874.html +++ b/dec/asm/59874.html @@ -232,8 +232,8 @@ - - + + @@ -313,8 +313,8 @@ - - + + @@ -394,8 +394,8 @@ - - + + @@ -460,8 +460,8 @@ - - + + diff --git a/dec/asm/60051.html b/dec/asm/60051.html index 6b8d521..34580b1 100644 --- a/dec/asm/60051.html +++ b/dec/asm/60051.html @@ -39,7 +39,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MaskSprite 59271 LD HL,(23606)HL=*CHARS.Stash *CHARS on the stack.
    59274 PUSH HLStash HL on the stack.
    59275 LD HL,33656 Write 33656 (Graphics_RoomScaffolding_Empty) to *CHARS.
    59278 LD (23606),HL
    59281 LD A,EWrite E to *62261.Write E to *ActiveSpriteWidth.
    59282 LD (62261),A
    MaskSprite_0 59285 LD A,(62261)E=*62261.E=*ActiveSpriteWidth.
    59288 LD E,A
    59289 PUSH BC Stash BC and DE on the stack.
    59290 PUSH DE
    59291 CALL 59234 Call 59234.
    59294 CALL 3545 Call CL_SET.
    59297 POP DE Restore DE and BC from the stack.
    59298 POP BC
    MaskSprite_1 59299 PUSH DE Stash DE on the stack.
    59300 LD HL,(62256)Increment *62256 by one.Increment *62256 by one.
    59303 INC HL
    59304 LD (62256),HL
    59307 DEC HL Decrease HL by one.
    59308 LD DE,41412 HL+=BufferRoom.
    59311 ADD HL,DE
    59312 LD A,(HL) A=*HL.
    59313 POP DE Restore DE from the stack.
    59314 CP 0Jump to 59325 if A is not equal to 0.Jump to MaskSprite_2 if A is not equal to 0.
    59316JR NZ,59325JR NZ,MaskSprite_2
    59318 LD A,32 A=32.
    59320 CALL PrintColourCharacter Call PrintColourCharacter.
    59323JR 59347Jump to 59347.JR MaskSprite_3Jump to MaskSprite_3.
    MaskSprite_2 59325 PUSH AF Stash AF and AF on the stack.
    59326 PUSH AF
    59327 AND %10000000 Keep only bit 7.
    59329CALL NZ,59387Call 59387 not zero.CALL NZ,MaskSprite_6Call MaskSprite_6 not zero.
    59332 POP AF Restore AF from the stack.
    59333 AND %01111111 Keep only bits 0-6.
    59335 RST 16
    59336 POP AF Restore AF from the stack.
    59337JR Z,59347Jump to 59347 if {} is zero.JR Z,MaskSprite_3Jump to MaskSprite_3 if {} is zero.
    59339 PUSH HL Stash HL on the stack.
    59340 LD HL,33656 Write 33656 (Graphics_RoomScaffolding_Empty) to *CHARS.
    59343 LD (23606),HL
    59346 POP HL Restore HL from the stack.
    MaskSprite_3 59347 PUSH DE Stash DE and HL on the stack.
    59348 PUSH HL
    59349 LD HL,(62256)HL=*62256.HL=*62256.
    59352 DEC HL Decrease HL by one.
    59353 LD DE,42212 HL+=BufferRoomAttributes.
    59356 ADD HL,DE
    59357 LD A,(HL)Jump to 59371 if *HL is equal to 0.Jump to MaskSprite_4 if *HL is equal to 0.
    59358 CP 0
    59360JR Z,59371JR Z,MaskSprite_4
    59362 LD DE,22528 DE=22528 (attribute buffer location).
    59365 LD HL,(62256)HL=*62256.HL=*62256.
    59368 DEC HL Decrease HL by one.
    59369 ADD HL,DE HL+=DE.
    59370 LD (HL),A Write A to *HL.
    MaskSprite_4 59371 POP HL Restore HL and DE from the stack.
    59372 POP DE
    59373 DEC E Decrease E by one.
    59374JR NZ,59299Jump to 59299 until E is zero.JR NZ,MaskSprite_1Jump to MaskSprite_1 until E is zero.
    59376 DEC D Decrease D by one.
    59377JR Z,59382Jump to 59382 if D is zero.JR Z,MaskSprite_5Jump to MaskSprite_5 if D is zero.
    59379 DEC B Decrease B by one.
    59380JR 59285Jump to 59285.JR MaskSprite_0Jump to MaskSprite_0.
    MaskSprite_5 59382 POP HL Restore HL from the stack.
    59383 LD (23606),HL Write HL to *CHARS.
    59386 RET Return.
    MaskSprite_6 59387 PUSH HL Stash HL on the stack.
    59388 LD HL,34424 Write 34424 (Graphics_Barrels) to *CHARS.
    59391 LD (23606),HL
    59394 POP HL Restore HL from the stack.
    59395 RET Return.
    59399 LD HL,(62256)Increment *62256 by one.Increment *62256 by one.
    59402
    + +
    +
    +Only action lifts every other frame. +
    +
    +
    Handler_Lifts 59425 LD A,(62260) 59429 AND %00000001Keep only bit 0.Ensure A is either 0 or 1.
    59431 LD (62260),AWrite A to *LiftsPiratesFrameSkip.Write A back to *LiftsPiratesFrameSkip.
    RET NZ
    + +
    +
    +Set the UDG graphics pointer. +
    +
    +
    59437 LD HL,61819LD (23606),HL
    + +
    +
    +Find active lifts. +
    +
    +
    59443 LD IX,(23524) IX=*ReferenceLifts.
    Handler_Lifts_0Handler_Lifts_Loop 59447 LD A,(IX+0) Return if *IX+0 is equal to 255. 59453 LD A,(IX+4)Jump to Handler_Lifts_13 if *IX+4 is equal to 0.Jump to Handler_Lifts_12 if *IX+4 is equal to 0.
    59458JP Z,Handler_Lifts_13JP Z,Handler_Lifts_12
    59461 LD A,(62016)Jump to Handler_Lifts_4 if *62016 is not equal to 3.Jump to Handler_Lifts_3 if *62016 is not equal to 3.
    59466JR NZ,Handler_Lifts_4JR NZ,Handler_Lifts_3
    59482 CP BJump to Handler_Lifts_4 if A is not equal to B.Jump to Handler_Lifts_3 if A is not equal to B.
    59483JR NZ,Handler_Lifts_4JR NZ,Handler_Lifts_3
    59516 LD A,(IX+2)Jump to Handler_Lifts_1 if *IX+2 is higher than 2.Jump to Handler_Lifts_0 if *IX+2 is higher than 2.
    59521JR NC,Handler_Lifts_1JR NC,Handler_Lifts_0
    Increment B by one.
    Handler_Lifts_1Handler_Lifts_0 59524 LD A,(DE) A=*DE.
    59526JR NZ,Handler_Lifts_2Jump to Handler_Lifts_2 if the result is not zero.JR NZ,Handler_Lifts_1Jump to Handler_Lifts_1 if the result is not zero.
    59530DJNZ Handler_Lifts_1Decrease counter by one and loop back to Handler_Lifts_1 until counter is zero.DJNZ Handler_Lifts_0Decrease counter by one and loop back to Handler_Lifts_0 until counter is zero.
    59532JR Handler_Lifts_4Jump to Handler_Lifts_4.JR Handler_Lifts_3Jump to Handler_Lifts_3.
    Handler_Lifts_2Handler_Lifts_1 59534 LD A,2 Write 2 to *59424. 59539 LD A,(IX+4)Jump to Handler_Lifts_3 if *IX+4 is equal to 0.Jump to Handler_Lifts_2 if *IX+4 is equal to 0.
    59544JR Z,Handler_Lifts_3JR Z,Handler_Lifts_2
    59549CALL Z,Handler_Lifts_10Call Handler_Lifts_10 zero.CALL Z,Handler_Lifts_9Call Handler_Lifts_9 zero.
    59553CALL NZ,Handler_Lifts_9Call Handler_Lifts_9 not zero.CALL NZ,Handler_Lifts_8Call Handler_Lifts_8 not zero.
    Handler_Lifts_3Handler_Lifts_2 59556 LD A,(IX+5)Jump to Handler_Lifts_4 if *IX+5 is equal to 0.Jump to Handler_Lifts_3 if *IX+5 is equal to 0.
    59561JR Z,Handler_Lifts_4JR Z,Handler_Lifts_3
    59566CALL Z,Handler_Lifts_12Call Handler_Lifts_12 if A was equal to 255 on line 59563.CALL Z,Handler_Lifts_11Call Handler_Lifts_11 if A was equal to 255 on line 59563.
    59570CALL NZ,Handler_Lifts_11Call Handler_Lifts_11 if A was not equal to 255 on line 59563.CALL NZ,Handler_Lifts_10Call Handler_Lifts_10 if A was not equal to 255 on line 59563.
    Handler_Lifts_4Handler_Lifts_3 59573 CALL 61094 Call 61094.
    59582CALL Z,Handler_Lifts_7Call Handler_Lifts_7 if A was equal to 255 on line 59579.CALL Z,Handler_Lifts_6Call Handler_Lifts_6 if A was equal to 255 on line 59579.
    59586CALL NZ,Handler_Lifts_5Call Handler_Lifts_5 if A was not equal to 255 on line 59579.CALL NZ,Handler_Lifts_4Call Handler_Lifts_4 if A was not equal to 255 on line 59579.
    59609JP Handler_Lifts_0Jump to Handler_Lifts_0.JP Handler_Lifts_LoopJump to Handler_Lifts_Loop.
    Handler_Lifts_5Handler_Lifts_4 59612 LD A,(IX+4)Jump to Handler_Lifts_6 if *IX+4 is equal to 255.Jump to Handler_Lifts_5 if *IX+4 is equal to 255.
    59617JR Z,Handler_Lifts_6JR Z,Handler_Lifts_5
    Return.
    Handler_Lifts_6Handler_Lifts_5 59634 LD A,(IX+12) Return if *IX+12 is not equal to C.Return.
    Handler_Lifts_7Handler_Lifts_6 59649 LD A,(IX+5)Jump to Handler_Lifts_8 if *IX+5 is equal to 255.Jump to Handler_Lifts_7 if *IX+5 is equal to 255.
    59654JR Z,Handler_Lifts_8JR Z,Handler_Lifts_7
    Return.
    Handler_Lifts_8Handler_Lifts_7 59671 LD A,(IX+12) Return if *IX+12 is not equal to B.Return.
    Handler_Lifts_9Handler_Lifts_8 59686 LD A,(62005) Increment *62005 by one.Return.
    Handler_Lifts_10Handler_Lifts_9 59694 LD A,(62005) Decrease *62005 by one.Return.
    Handler_Lifts_11Handler_Lifts_10 59702 LD A,(62006) Increment *62006 by one.Return.
    Handler_Lifts_12Handler_Lifts_11 59710 LD A,(62006) Decrease *62006 by one.Return.
    Handler_Lifts_13Handler_Lifts_12 59718 LD A,(62016) A=*62016. 59724 CP (IX+3)Jump to Handler_Lifts_4 if A is not equal to *IX+3.Jump to Handler_Lifts_3 if A is not equal to *IX+3.
    59727JP NZ,Handler_Lifts_4JP NZ,Handler_Lifts_3
    59744JR Z,Handler_Lifts_14Jump to Handler_Lifts_14 if A was equal to 0 on line 59739.JR Z,Handler_Lifts_13Jump to Handler_Lifts_13 if A was equal to 0 on line 59739.
    Decrease A by one.
    Handler_Lifts_14Handler_Lifts_13 59747 SUB 2 A-=2. 59749 CP BJump to Handler_Lifts_4 if A is not equal to B.Jump to Handler_Lifts_3 if A is not equal to B.
    59750JP NZ,Handler_Lifts_4JP NZ,Handler_Lifts_3
    59763 CP 3Call Handler_Lifts_18 if A is equal to 3.Call Handler_Lifts_17 if A is equal to 3.
    59765CALL Z,Handler_Lifts_18CALL Z,Handler_Lifts_17
    59770 CP 2Call Handler_Lifts_17 if A is equal to 2.Call Handler_Lifts_16 if A is equal to 2.
    59772CALL Z,Handler_Lifts_17CALL Z,Handler_Lifts_16
    59777 CP 1Call Handler_Lifts_16 if A is equal to 1.Call Handler_Lifts_15 if A is equal to 1.
    59779CALL Z,Handler_Lifts_16CALL Z,Handler_Lifts_15
    59783 CP 0Call Handler_Lifts_19 if A is equal to 0.Call Handler_Lifts_18 if A is equal to 0.
    59785CALL Z,Handler_Lifts_19CALL Z,Handler_Lifts_18
    B=*IX+7.
    Handler_Lifts_15Handler_Lifts_14 59791 LD A,(DE) A=*DE.
    59793JP NZ,Handler_Lifts_2Jump to Handler_Lifts_2 if the result is not zero.JP NZ,Handler_Lifts_1Jump to Handler_Lifts_1 if the result is not zero.
    59798DJNZ Handler_Lifts_15Decrease counter by one and loop back to Handler_Lifts_15 until counter is zero.DJNZ Handler_Lifts_14Decrease counter by one and loop back to Handler_Lifts_14 until counter is zero.
    59800JP Handler_Lifts_4Jump to Handler_Lifts_4.JP Handler_Lifts_3Jump to Handler_Lifts_3.
    Handler_Lifts_16Handler_Lifts_15 59803 CALL 3545 Call CL_SET.Return.
    Handler_Lifts_17Handler_Lifts_16 59818 CALL 3545 Call CL_SET.Return.
    Handler_Lifts_18Handler_Lifts_17 59831 CALL 3545 Call CL_SET.Return.
    Handler_Lifts_19Handler_Lifts_18 59842 PUSH BC Stash BC on the stack.
    59954CALL 59271Call 59271.CALL MaskSpriteCall MaskSprite.
    59957
    59986CALL 59271Call 59271.CALL MaskSpriteCall MaskSprite.
    59989
    60018CALL 59271Call 59271.CALL MaskSpriteCall MaskSprite.
    60021
    60045CALL 59271Call 59271.CALL MaskSpriteCall MaskSprite.
    60048 @@ -85,13 +85,13 @@ - + - + @@ -118,7 +118,7 @@ - + @@ -168,7 +168,7 @@ - + @@ -284,7 +284,7 @@ - + @@ -306,7 +306,7 @@ - + @@ -324,7 +324,7 @@ - + diff --git a/dec/asm/60165.html b/dec/asm/60165.html index 643b6f6..dae486d 100644 --- a/dec/asm/60165.html +++ b/dec/asm/60165.html @@ -91,7 +91,7 @@ - + diff --git a/dec/asm/60233.html b/dec/asm/60233.html index 61c8635..bba0bf8 100644 --- a/dec/asm/60233.html +++ b/dec/asm/60233.html @@ -91,7 +91,7 @@ - + diff --git a/dec/asm/60301.html b/dec/asm/60301.html index 3f89390..62a0c37 100644 --- a/dec/asm/60301.html +++ b/dec/asm/60301.html @@ -134,12 +134,11 @@ - + - @@ -153,12 +152,11 @@ - + - @@ -183,17 +181,16 @@ - + - - + @@ -202,7 +199,6 @@ - diff --git a/dec/asm/60376.html b/dec/asm/60376.html index 02388f5..d47de2b 100644 --- a/dec/asm/60376.html +++ b/dec/asm/60376.html @@ -75,7 +75,7 @@ - + @@ -250,7 +250,7 @@ - + @@ -274,7 +274,7 @@ - + @@ -298,7 +298,7 @@ - + @@ -322,7 +322,7 @@ - + @@ -344,7 +344,7 @@ - + @@ -367,7 +367,7 @@ - + @@ -486,7 +486,7 @@ - + @@ -644,7 +644,7 @@ - + @@ -677,7 +677,7 @@ - + @@ -688,7 +688,7 @@ - + @@ -699,7 +699,7 @@ - + @@ -754,7 +754,7 @@ - + @@ -833,7 +833,7 @@ - + diff --git a/dec/asm/61019.html b/dec/asm/61019.html index 216ee64..ebce56d 100644 --- a/dec/asm/61019.html +++ b/dec/asm/61019.html @@ -48,7 +48,7 @@ - + @@ -169,7 +169,7 @@
  • *62017
  • *TableBombSparks
  • *TableBomb_Flag
  • -
  • *62236
  • +
  • *62236
  • diff --git a/dec/asm/61143.html b/dec/asm/61143.html index 526abc3..10888c6 100644 --- a/dec/asm/61143.html +++ b/dec/asm/61143.html @@ -164,7 +164,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -285,7 +285,7 @@ - + @@ -365,7 +365,7 @@ - + @@ -507,7 +507,7 @@ - + @@ -643,7 +643,7 @@ - + @@ -744,7 +744,7 @@ - + @@ -762,7 +762,7 @@ - + diff --git a/dec/asm/61441.html b/dec/asm/61441.html index 9565f9f..b395a08 100644 --- a/dec/asm/61441.html +++ b/dec/asm/61441.html @@ -355,7 +355,7 @@ - + diff --git a/dec/asm/61703.html b/dec/asm/61703.html index 36fe2f5..e730dd4 100644 --- a/dec/asm/61703.html +++ b/dec/asm/61703.html @@ -308,7 +308,7 @@ - + diff --git a/dec/asm/61948.html b/dec/asm/61948.html index 33b5578..a4f8476 100644 --- a/dec/asm/61948.html +++ b/dec/asm/61948.html @@ -305,7 +305,7 @@ - + diff --git a/dec/asm/62171.html b/dec/asm/62171.html index d5db738..d6a9f01 100644 --- a/dec/asm/62171.html +++ b/dec/asm/62171.html @@ -38,6 +38,12 @@ @@ -67,19 +73,19 @@ - + - + - + @@ -113,19 +119,19 @@ - + - + - + @@ -159,19 +165,19 @@ - + - + - + @@ -205,19 +211,19 @@ - + - + - + @@ -251,19 +257,19 @@ - + - + - + diff --git a/dec/asm/62201.html b/dec/asm/62201.html index 67aed0d..01207b1 100644 --- a/dec/asm/62201.html +++ b/dec/asm/62201.html @@ -38,6 +38,12 @@ @@ -67,19 +73,19 @@ - + - + - + @@ -113,19 +119,19 @@ - + - + - + @@ -159,19 +165,19 @@ - + - + - + @@ -205,19 +211,19 @@ - + - + - + @@ -251,19 +257,19 @@ - + - + - + diff --git a/dec/asm/62231.html b/dec/asm/62231.html index fb700c1..866d97e 100644 --- a/dec/asm/62231.html +++ b/dec/asm/62231.html @@ -29,7 +29,7 @@
    60053 LD (62262),AWrite A to *62262.Write A to *ActiveSpriteID.
    60056 LD A,EWrite E to *62261.Write E to *ActiveSpriteWidth.
    60066 LD A,(62261)E=*62261.E=*ActiveSpriteWidth.
    PrintSprite_2 60082 LD A,(62262)Increment *62262 by one.Increment *ActiveSpriteID by one.
    60114 LD A,(62262)Increment *62262 by one.Increment *ActiveSpriteID by one.
    60122 RET ZReturn if *62262 is zero.Return if *ActiveSpriteID is zero.
    PrintSprite_5 60126 LD A,(62262)Increment *62262 by one.Increment *ActiveSpriteID by one.
    60181 LD A,255Write 255 to *62253.Write 255 to *62253.
    60249 LD A,255Write 255 to *62253.Write 255 to *62253.
    60339 LD HL,(23606)HL=*CHARS.Stash *CHARS on the stack.
    60342 PUSH HLStash HL on the stack.
    60343
    60349 LD D,4D=4.DE=Set the sprite width/ height (1/ 4).
    60351 LD E,1E=1.
    60353
    60363 POP HLRestore HL from the stack.Restore the previous value of *CHARS from the stack.
    60364 LD (23606),HLWrite HL to *CHARS.
    60367 POP DERestore DE and BC from the stack.Restore DE, BC and IX from the stack.
    60368
    60369 POP IXRestore IX from the stack.
    60371 60386 XOR AWrite 0 to *62255.Write 0 to *62255.
    60457 LD A,(62252)A=*62252.A=*62252.
    60464 LD A,(62253)A=*62253.A=*62253.
    60471 LD A,(62254)A=*62254.A=*62254.
    60480 LD A,(62266)Increment *62266 by one.Increment *62266 by one.
    Handler_Player_2 60489 LD A,(62271)A=*62271.A=*62271.
    60500 LD A,0Write 0 to *62266.Write 0 to *62266.
    Handler_Player_4 60548 LD A,1Write 1 to *62255.Write 1 to *62255.
    60604 LD A,(62266)Call Handler_Player_9 if *62266 is higher than 8.Call Handler_Player_9 if *62266 is higher than 8.
    60621 LD A,(41227)Write *41227 to *62252.Write *41227 to *62252.
    60627 LD A,(41259)Write *41259 to *62253.Write *41259 to *62253.
    60633 LD A,(41291)Write *41291 to *62254.Write *41291 to *62254.
    60663 LD A,(62255)Jump to Handler_Player_8 if *62255 is equal to 0.Jump to Handler_Player_8 if *62255 is equal to 0.
    Handler_Player_9 60697 LD A,1Write 1 to *62271.Write 1 to *62271.
    PlayerFire 61019 LD IX,(23510)IX=CurrentRoom_DoorColour.IX=ReferenceDoors.
    61193 LD (62258),BCWrite BC to *62258.Write BC to *62258.
    61197
    61229 LD (62268),BCWrite BC to *62268.Write BC to *62268.
    61233
    61244 LD BC,(62258)BC=*62258.BC=*62258.
    61248
    61277 LD BC,(62268)HL+=*62268.HL+=*62268.
    61281
    61332 LD (62270),AWrite A to *62270.Write A to *62270.
    61335
    61383 LD A,(62270)D+=*62270.D+=*62270.
    61386
    61410 LD A,(62270)D+=*62270.D+=*62270.
    61413
    61417 LD A,(62270)D+=*62270.D+=*62270.
    61420 61549 LD DE,(62256)DE=*62256.DE=*62256.
    61813 LD A,16Set INK: *CurrentRoom_KeyColour.Set INK: *ActiveRoom_KeyColour.
    61992 LD D,2Set the sprite width/ height.DE=Set the sprite width/ height (2/ 2).
    +
    +Used by the routines at Handler_Bomb (for creation) and Handler_Explosion for animation. +
    +
    +Initial values are populated from TableDefaultBombSparks. +
    62173 DEFB 0Velocity: Left.
    62174 DEFB 0Velocity: Up.
    62175 DEFB 0Velocity: Right.
    62179 DEFB 0Velocity: Left.
    62180 DEFB 0Velocity: Up.
    62181 DEFB 0Velocity: Right.
    62185 DEFB 0Velocity: Left.
    62186 DEFB 0Velocity: Up.
    62187 DEFB 0Velocity: Right.
    62191 DEFB 0Velocity: Left.
    62192 DEFB 0Velocity: Up.
    62193 DEFB 0Velocity: Right.
    62197 DEFB 0Velocity: Left.
    62198 DEFB 0Velocity: Up.
    62199 DEFB 0Velocity: Right.
    +
    +Used by the routine at Handler_Bomb. +
    +
    +These default values are copied to TableBombSparks. +
    62203 DEFB 1Velocity: Left.
    62204 DEFB 0Velocity: Up.
    62205 DEFB 0Velocity: Right.
    62209 DEFB 1Velocity: Left.
    62210 DEFB 1Velocity: Up.
    62211 DEFB 0Velocity: Right.
    62215 DEFB 0Velocity: Left.
    62216 DEFB 1Velocity: Up.
    62217 DEFB 0Velocity: Right.
    62221 DEFB 255Velocity: Left.
    62222 DEFB 1Velocity: Up.
    62223 DEFB 0Velocity: Right.
    62227 DEFB 255Velocity: Left.
    62228 DEFB 0Velocity: Up.
    62229 DEFB 0Velocity: Right.
    Up: Map -Next: 62260 +Next: 62236
    @@ -46,46 +46,6 @@
    DEFB 3,8,13,18,23
    62236DEFB 0,0,0,0,0,0,0,0
    62244DEFB 0,0,0,0,0,0,0,0
    62252DEFB 255
    62253DEFB 255
    62254DEFB 255
    62255DEFB 0
    62256DEFB 0,0
    62258DEFB 0,0
    @@ -94,7 +54,7 @@
    Up: Map -Next: 62260 +Next: 62236
    diff --git a/dec/asm/62236.html b/dec/asm/62236.html new file mode 100644 index 0000000..99ae969 --- /dev/null +++ b/dec/asm/62236.html @@ -0,0 +1,104 @@ + + + +Booty: Game status buffer entry at 62236 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: 62231 +Up: Map +Next: 62260 +
    +
    62236: Game status buffer entry at F31C
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    62236DEFB 0,0,0,0,0,0,0,0
    62244DEFB 0,0,0,0,0,0,0,0
    62252DEFB 255
    62253DEFB 255
    62254DEFB 255
    62255DEFB 0
    62256DEFB 0,0
    62258DEFB 0,0
    + + + + + + +
    +Prev: 62231 +Up: Map +Next: 62260 +
    + + + \ No newline at end of file diff --git a/dec/asm/62260.html b/dec/asm/62260.html index 2faf263..29e1ca4 100644 --- a/dec/asm/62260.html +++ b/dec/asm/62260.html @@ -25,7 +25,7 @@
    -Prev: 62231 +Prev: 62236 Up: Map @@ -54,7 +54,7 @@
    -Prev: 62231 +Prev: 62236 Up: Map diff --git a/dec/asm/62261.html b/dec/asm/62261.html index 7ca63e2..99c9173 100644 --- a/dec/asm/62261.html +++ b/dec/asm/62261.html @@ -1,7 +1,7 @@ -Booty: Data at 62261 +Booty: Game status buffer entry at 62261 @@ -15,11 +15,11 @@ gtag('config', 'G-75RERFCHBG'); - + - +
    @@ -29,53 +29,27 @@
    Up: Map -Next: 62273 +Next: 62262
    -
    62261: Data block at F335
    +
    62261: Active Sprite Width
    + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    +
    +The width of the sprite actively being printed. +
    ActiveSpriteWidth 62261 DEFB 0
    62262DEFB 0,0,0,0
    62266DEFB 0,0
    62268DEFB 0,0
    62270DEFB 0
    62271DEFB 0
    62272DEFB 0
    @@ -84,7 +58,7 @@
    Up: Map -Next: 62273 +Next: 62262
    diff --git a/dec/asm/62262.html b/dec/asm/62262.html new file mode 100644 index 0000000..931efe1 --- /dev/null +++ b/dec/asm/62262.html @@ -0,0 +1,73 @@ + + + +Booty: Game status buffer entry at 62262 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: 62261 +Up: Map +Next: 62263 +
    +
    62262: Active Sprite ID
    + + + + + + + + + + +
    +
    +
    +The ID of the sprite actively being printed. Note; this starts off as -1 of the real value as it increments to the base sprite ID in the printing loop. +
    +
    +
    ActiveSpriteID62262DEFB 0
    + + + + + + +
    +Prev: 62261 +Up: Map +Next: 62263 +
    + + + \ No newline at end of file diff --git a/dec/asm/62263.html b/dec/asm/62263.html new file mode 100644 index 0000000..d2c9c6b --- /dev/null +++ b/dec/asm/62263.html @@ -0,0 +1,69 @@ + + + +Booty: Unused RAM at 62263 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: 62262 +Up: Map +Next: 62266 +
    +
    62263: Unused
    + + + + + + + + + +
    +
    +
    +
    62263DEFB 0,0,0
    + + + + + + +
    +Prev: 62262 +Up: Map +Next: 62266 +
    + + + \ No newline at end of file diff --git a/dec/asm/62266.html b/dec/asm/62266.html new file mode 100644 index 0000000..1c6a568 --- /dev/null +++ b/dec/asm/62266.html @@ -0,0 +1,89 @@ + + + +Booty: Data at 62266 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: 62263 +Up: Map +Next: 62273 +
    +
    62266: Data block at F33A
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    62266DEFB 0,0
    62268DEFB 0,0
    62270DEFB 0
    62271DEFB 0
    62272DEFB 0
    + + + + + + +
    +Prev: 62263 +Up: Map +Next: 62273 +
    + + + \ No newline at end of file diff --git a/dec/asm/62273.html b/dec/asm/62273.html index 14f0408..49f0c9a 100644 --- a/dec/asm/62273.html +++ b/dec/asm/62273.html @@ -25,7 +25,7 @@
    -Prev: 62261 +Prev: 62266 Up: Map @@ -54,7 +54,7 @@
    -Prev: 62261 +Prev: 62266 Up: Map diff --git a/dec/asm/62275.html b/dec/asm/62275.html index dd8b76b..6aea5c3 100644 --- a/dec/asm/62275.html +++ b/dec/asm/62275.html @@ -29,136 +29,25 @@ Up: Map -Next: 62464 +Next: 62277
    -
    62275: Game status buffer entry at F343
    +
    62275: Random Number Seed
    + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    +
    +Used by the routine at GetRandomNumber. Not random at all! +
    RandomNumberSeed 62275DEFB 0,0,0,0,0,0,0,0
    62283DEFB 0,0,0,0,0,0,0,0
    62291DEFB 0,0,0,0,0,0,0,0
    62299DEFB 0,0,0,0,0,0,0,0
    62307DEFB 0,0,0,0,0,0,0,0
    62315DEFB 0,0,0,0,0,0,0,0
    62323DEFB 0,0,0,0,0,0,0,0
    62331DEFB 0,0,0,0,0,0,0,0
    62339DEFB 0,0,0,0,0,0,0,0
    62347DEFB 0,0,0,0,0,0,0,0
    62355DEFB 0,0,0,0,0,0,0,0
    62363DEFB 0,0,0,0,0,0,0,0
    62371DEFB 0,0,0,0,0,0,0,0
    62379DEFB 0,0,0,0,0,0,0,0
    62387DEFB 0,0,0,0,0,0,0,0
    62395DEFB 0,0,0,0,0,0,0,0
    62403DEFB 0,0,0,0,0,0,0,0
    62411DEFB 0,0,0,0,0,0,0,0
    62419DEFB 0,0,0,0,0,0,0,0
    62427DEFB 0,0,0,0,0,0,0,0
    62435DEFB 0,0,0,0,0,0,0,0
    62443DEFB 0,0,0,0,0,0,0,0
    62451DEFB 0,0,0,0,0,0,0,0
    62459DEFB 0,0,0,0,0DEFW 0
    @@ -169,7 +58,7 @@
    Up: Map -Next: 62464 +Next: 62277
    diff --git a/dec/asm/62277.html b/dec/asm/62277.html new file mode 100644 index 0000000..aa65ec2 --- /dev/null +++ b/dec/asm/62277.html @@ -0,0 +1,184 @@ + + + +Booty: Unused RAM at 62277 + + + + + + + + + + + + + + +
    + + + + + + +
    +Prev: 62275 +Up: Map +Next: 62464 +
    +
    62277: Unused
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    62277DEFB 0,0,0,0,0,0,0,0
    62285DEFB 0,0,0,0,0,0,0,0
    62293DEFB 0,0,0,0,0,0,0,0
    62301DEFB 0,0,0,0,0,0,0,0
    62309DEFB 0,0,0,0,0,0,0,0
    62317DEFB 0,0,0,0,0,0,0,0
    62325DEFB 0,0,0,0,0,0,0,0
    62333DEFB 0,0,0,0,0,0,0,0
    62341DEFB 0,0,0,0,0,0,0,0
    62349DEFB 0,0,0,0,0,0,0,0
    62357DEFB 0,0,0,0,0,0,0,0
    62365DEFB 0,0,0,0,0,0,0,0
    62373DEFB 0,0,0,0,0,0,0,0
    62381DEFB 0,0,0,0,0,0,0,0
    62389DEFB 0,0,0,0,0,0,0,0
    62397DEFB 0,0,0,0,0,0,0,0
    62405DEFB 0,0,0,0,0,0,0,0
    62413DEFB 0,0,0,0,0,0,0,0
    62421DEFB 0,0,0,0,0,0,0,0
    62429DEFB 0,0,0,0,0,0,0,0
    62437DEFB 0,0,0,0,0,0,0,0
    62445DEFB 0,0,0,0,0,0,0,0
    62453DEFB 0,0,0,0,0,0,0,0
    62461DEFB 0,0,0
    + + + + + + +
    +Prev: 62275 +Up: Map +Next: 62464 +
    + + + \ No newline at end of file diff --git a/dec/asm/62464.html b/dec/asm/62464.html index cfd1776..9b9b3a5 100644 --- a/dec/asm/62464.html +++ b/dec/asm/62464.html @@ -25,7 +25,7 @@ - + + + + + + + @@ -51,7 +59,7 @@ @@ -67,7 +75,7 @@ @@ -75,7 +83,7 @@ @@ -91,7 +99,7 @@ @@ -99,7 +107,7 @@ @@ -107,7 +115,7 @@ @@ -115,7 +123,7 @@ @@ -147,7 +155,7 @@ @@ -211,15 +219,7 @@ - - - - - - @@ -227,7 +227,7 @@ @@ -280,6 +280,14 @@ + + + + + + @@ -355,7 +363,7 @@ @@ -651,7 +659,7 @@ @@ -931,7 +939,7 @@ @@ -1683,7 +1691,7 @@ @@ -1691,7 +1699,7 @@ @@ -1715,7 +1723,7 @@ @@ -1763,7 +1771,7 @@ @@ -1811,7 +1819,7 @@ @@ -2088,6 +2096,14 @@ + + + + + + - + + + + + + + + + + + + + + + + + + + @@ -2123,7 +2163,15 @@ + + + + + + diff --git a/maps/data.html b/maps/data.html index 3f474de..cc0653d 100644 --- a/maps/data.html +++ b/maps/data.html @@ -40,10 +40,10 @@ - - + + @@ -344,10 +344,10 @@ - - + + diff --git a/maps/routines.html b/maps/routines.html index 818d25f..3f750d6 100644 --- a/maps/routines.html +++ b/maps/routines.html @@ -31,13 +31,13 @@ @@ -109,13 +109,13 @@ @@ -439,13 +439,13 @@ @@ -463,7 +463,7 @@ @@ -493,7 +493,7 @@ @@ -523,7 +523,7 @@ diff --git a/maps/unused.html b/maps/unused.html index 5e0bf48..61e6e5f 100644 --- a/maps/unused.html +++ b/maps/unused.html @@ -35,6 +35,13 @@ + + + + + + + + + + + + + + + + + + + +
    -Prev: 62275 +Prev: 62277 Up: Map @@ -380,7 +380,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/dec/asm/63048.html b/dec/asm/63048.html index 8d509d7..3a243e1 100644 --- a/dec/asm/63048.html +++ b/dec/asm/63048.html @@ -52,7 +52,7 @@ - + @@ -82,7 +82,7 @@ - + diff --git a/dec/asm/63084.html b/dec/asm/63084.html index 54f4e08..c31288b 100644 --- a/dec/asm/63084.html +++ b/dec/asm/63084.html @@ -66,7 +66,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/dec/asm/63119.html b/dec/asm/63119.html index 7b1e6d8..e2d6f33 100644 --- a/dec/asm/63119.html +++ b/dec/asm/63119.html @@ -63,7 +63,7 @@ - + @@ -88,7 +88,7 @@ - + diff --git a/dec/asm/63157.html b/dec/asm/63157.html index 4fc6616..22c7fb2 100644 --- a/dec/asm/63157.html +++ b/dec/asm/63157.html @@ -66,7 +66,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/dec/buffers/gbuffer.html b/dec/buffers/gbuffer.html index b9356ab..bf6e1c8 100644 --- a/dec/buffers/gbuffer.html +++ b/dec/buffers/gbuffer.html @@ -33,7 +33,7 @@ @@ -42,7 +42,7 @@ @@ -87,7 +87,7 @@ @@ -236,19 +236,13 @@ - + - - - - - @@ -256,8 +250,11 @@ @@ -352,10 +349,19 @@ - + @@ -929,6 +935,12 @@ @@ -938,6 +950,21 @@ + + + + + @@ -954,6 +981,30 @@ + + + + + + + + + + - + diff --git a/dec/maps/all.html b/dec/maps/all.html index e62a7d6..b1dd2f2 100644 --- a/dec/maps/all.html +++ b/dec/maps/all.html @@ -41,9 +41,17 @@ - + + + + + + + @@ -51,7 +59,7 @@ @@ -67,7 +75,7 @@ @@ -75,7 +83,7 @@ @@ -91,7 +99,7 @@ @@ -99,7 +107,7 @@ @@ -107,7 +115,7 @@ @@ -115,7 +123,7 @@ @@ -147,7 +155,7 @@ @@ -211,15 +219,7 @@ - - - - - - @@ -227,7 +227,7 @@ @@ -280,6 +280,14 @@ + + + + + + @@ -355,7 +363,7 @@ @@ -651,7 +659,7 @@ @@ -931,7 +939,7 @@ @@ -1683,7 +1691,7 @@ @@ -1691,7 +1699,7 @@ @@ -1715,7 +1723,7 @@ @@ -1763,7 +1771,7 @@ @@ -1811,7 +1819,7 @@ @@ -2088,6 +2096,14 @@ + + + + + + - + + + + + + + + + + + + + + + + + + + @@ -2123,7 +2163,15 @@ + + + + + + diff --git a/dec/maps/data.html b/dec/maps/data.html index 321ff41..d27d1d8 100644 --- a/dec/maps/data.html +++ b/dec/maps/data.html @@ -40,10 +40,10 @@ - - + + @@ -344,10 +344,10 @@ - - + + diff --git a/dec/maps/routines.html b/dec/maps/routines.html index 711d2ee..b7b02d1 100644 --- a/dec/maps/routines.html +++ b/dec/maps/routines.html @@ -31,13 +31,13 @@ @@ -109,13 +109,13 @@ @@ -439,13 +439,13 @@ @@ -463,7 +463,7 @@ @@ -493,7 +493,7 @@ @@ -523,7 +523,7 @@ diff --git a/dec/maps/unused.html b/dec/maps/unused.html index a97116f..db2440d 100644 --- a/dec/maps/unused.html +++ b/dec/maps/unused.html @@ -38,6 +38,15 @@ + + + + + + + @@ -55,6 +64,15 @@ + + + + + + + @@ -145,6 +163,24 @@ + + + + + + + + + + + + + + diff --git a/dec/reference/changelog.html b/dec/reference/changelog.html index 94c7885..6eafb1c 100644 --- a/dec/reference/changelog.html +++ b/dec/reference/changelog.html @@ -23,6 +23,8 @@
    -Prev: 62275 +Prev: 62277 Up: Map diff --git a/dec/asm/63000.html b/dec/asm/63000.html index 63ace23..b185d3c 100644 --- a/dec/asm/63000.html +++ b/dec/asm/63000.html @@ -66,7 +66,7 @@
    63008 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    63011
    63020 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    63023
    63049 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    63052
    63062 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    63065
    63092 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    63095
    63104 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    63107
    63127 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    63130
    63140 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    63143
    63165 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    63168
    63177 LD A,(23504)A=*Current_BorderColour.A=*Active_BorderColour.
    6318023359 2 -
    Game status buffer entry at 5B3F
    +
    Pointer: Game Entry Point
    23500 1 -
    Current Room: Key Colour
    +
    Active Room: Key Colour
    23501 1 -
    Current Room: Closed Door Colour
    +
    Active Room: Closed Door Colour
    See 43473. @@ -66,7 +66,7 @@
    23503 1 -
    Current Room: Room Scaffolding Colour
    +
    Active Room: Room Scaffolding Colour
    See 43297, 43415 and 43455. @@ -78,7 +78,7 @@
    23504 1 -
    Current Border Colour
    +
    Active Border Colour
    23505 1 -
    Current Room: Paper Colour
    +
    Active Room: Paper Colour
    See. @@ -99,7 +99,7 @@
    23506 1 -
    Current Room: Ladder Colour
    +
    Active Room: Ladder Colour
    See DrawRoomLadders. @@ -129,10 +129,10 @@
    23510 2 -
    Current Room: Door Colour
    +
    Reference: Doors
    2352612 -
    Game status buffer entry at 5BE6
    +
    Reference: Disappearing Floors
    + -
    235271 -
    Pirate Attribute
    -
    23528 2 -
    Game status buffer entry at 5BE8
    +
    Pointer: Current Room Buffer
    +
    +Initialised at PopulateCurrentRoomBuffersAndReferences. Used by the routine at DrawRoom. +
    2354062
    Player Booty
    +
    +The count of how much booty the player has collected in the current game. +
    +
    +Initialised to 0000 in InitialiseGame at the start of a new game, unless GameState is set to "Mystery Game Mode" (2) in which case the game begins with the previous games value continued (but all the booty is respawned). +
    +
    Table: Bomb Sparks
    +
    +Used by the routines at Handler_Bomb (for creation) and Handler_Explosion for animation. +
    +
    +Initial values are populated from TableDefaultBombSparks. +
    Table: Default Bomb Sparks
    +
    +Used by the routine at Handler_Bomb. +
    +
    +These default values are copied to TableBombSparks. +
    +
    +
    6223624 +
    Game status buffer entry at F31C
    +
    622611 +
    Active Sprite Width
    +
    +
    +The width of the sprite actively being printed. +
    +
    +
    622621 +
    Active Sprite ID
    +
    +
    +The ID of the sprite actively being printed. Note; this starts off as -1 of the real value as it increments to the base sprite ID in the printing loop. +
    +
    +
    62273 1 @@ -976,10 +1027,13 @@
    622751892 -
    Game status buffer entry at F343
    +
    Random Number Seed
    +
    +Used by the routine at GetRandomNumber. Not random at all! +
    91 02329623296 +
    Unused
    +
    91123297 -
    Data block at 5B00
    +
    Game Entry Commands
    63 23359 -
    Game status buffer entry at 5B3F
    +
    Pointer: Game Entry Point
    204 23500 -
    Current Room: Key Colour
    +
    Active Room: Key Colour
    205 23501 -
    Current Room: Closed Door Colour
    +
    Active Room: Closed Door Colour
    207 23503 -
    Current Room: Room Scaffolding Colour
    +
    Active Room: Room Scaffolding Colour
    208 23504 -
    Current Border Colour
    +
    Active Border Colour
    209 23505 -
    Current Room: Paper Colour
    +
    Active Room: Paper Colour
    210 23506 -
    Current Room: Ladder Colour
    +
    Active Room: Ladder Colour
    214 23510 -
    Current Room: Door Colour
    +
    Reference: Doors
    230 23526 -
    Game status buffer entry at 5BE6
    -
    9123123527 -
    Pirate Attribute
    +
    Reference: Disappearing Floors
    232 23528 -
    Game status buffer entry at 5BE8
    +
    Pointer: Current Room Buffer
    9124623542 +
    Unused
    +
    91 250 23546 @@ -339,7 +347,7 @@ 64 26944 -
    Game Entry Point
    +
    On-Load Entry Point #1
    87 26967 -
    Routine at 6957
    +
    On-Load Entry Point #2
    194 43970 -
    Move Room Data
    +
    Copy Room Data
    20 52500 -
    Routine at CD14
    +
    Game Entry Point
    31 57631 -
    Routine at E11F
    +
    Increased Frequency Animals Event Timing
    42 57642 -
    Routine at E12A
    +
    Animals Event Timing
    73 58185 -
    Routine at E349
    +
    Get Random Number
    129 58753 -
    Routine at E581
    +
    Handler: Disappearing Floors
    135 59271 -
    Routine at E787
    +
    Mask Sprite?
    2432862236 +
    Game status buffer entry at F31C
    +
    243 52 62260 @@ -2097,9 +2113,33 @@
    243 536226162261 +
    Active Sprite Width
    +
    2435462262 +
    Active Sprite ID
    +
    2435562263 +
    Unused
    +
    2435862266 -
    Data block at F335
    +
    Data block at F33A
    67 62275 -
    Game status buffer entry at F343
    +
    Random Number Seed
    +
    2436962277 +
    Unused
    91023296123297 -
    Data block at 5B00
    +
    Game Entry Commands
    24353622615862266 -
    Data block at F335
    +
    Data block at F33A
    26944 -
    Game Entry Point
    +
    On-Load Entry Point #1
    26967 -
    Routine at 6957
    +
    On-Load Entry Point #2
    43970 -
    Move Room Data
    +
    Copy Room Data
    52500 -
    Routine at CD14
    +
    Game Entry Point
    57631 -
    Routine at E11F
    +
    Increased Frequency Animals Event Timing
    57642 -
    Routine at E12A
    +
    Animals Event Timing
    58185 -
    Routine at E349
    +
    Get Random Number
    58753 -
    Routine at E581
    +
    Handler: Disappearing Floors
    59271 -
    Routine at E787
    +
    Mask Sprite?
    910232961 +
    Unused
    +
    91 206 23502 1
    91246235424 +
    Unused
    +
    92 0 23552
    24355622633 +
    Unused
    +
    2436962277187 +
    Unused
    +
    248 198 63686
    +
    +
    +
    20240408
    +
    +
      +
    • Fine tuned wording where I've guessed functionality and now know more about what is happening.
    • +
    • Commented some of the animals (rat + bird) event timing.
    • +
    +
    +
    +
    +
    20240407
    +
    +
      +
    • Fixed issue with room four screenshot as player is drawn in the same starting place, which happens to be where a pirate is also drawn (hence, the screenshot showed only 2 lives, and reset back to screen one).
    • +
    • Commented the unpacking routines.
    • +
    +
    20240403
    diff --git a/maps/all.html b/maps/all.html index dea12d7..d787ef2 100644 --- a/maps/all.html +++ b/maps/all.html @@ -41,9 +41,17 @@
    91 05B005B00 +
    Unused
    +
    9115B01 -
    Data block at 5B00
    +
    Game Entry Commands
    63 5B3F -
    Game status buffer entry at 5B3F
    +
    Pointer: Game Entry Point
    204 5BCC -
    Current Room: Key Colour
    +
    Active Room: Key Colour
    205 5BCD -
    Current Room: Closed Door Colour
    +
    Active Room: Closed Door Colour
    207 5BCF -
    Current Room: Room Scaffolding Colour
    +
    Active Room: Room Scaffolding Colour
    208 5BD0 -
    Current Border Colour
    +
    Active Border Colour
    209 5BD1 -
    Current Room: Paper Colour
    +
    Active Room: Paper Colour
    210 5BD2 -
    Current Room: Ladder Colour
    +
    Active Room: Ladder Colour
    214 5BD6 -
    Current Room: Door Colour
    +
    Reference: Doors
    230 5BE6 -
    Game status buffer entry at 5BE6
    -
    912315BE7 -
    Pirate Attribute
    +
    Reference: Disappearing Floors
    232 5BE8 -
    Game status buffer entry at 5BE8
    +
    Pointer: Current Room Buffer
    912465BF6 +
    Unused
    +
    91 250 5BFA @@ -339,7 +347,7 @@ 64 6940 -
    Game Entry Point
    +
    On-Load Entry Point #1
    87 6957 -
    Routine at 6957
    +
    On-Load Entry Point #2
    194 ABC2 -
    Move Room Data
    +
    Copy Room Data
    20 CD14 -
    Routine at CD14
    +
    Game Entry Point
    31 E11F -
    Routine at E11F
    +
    Increased Frequency Animals Event Timing
    42 E12A -
    Routine at E12A
    +
    Animals Event Timing
    73 E349 -
    Routine at E349
    +
    Get Random Number
    129 E581 -
    Routine at E581
    +
    Handler: Disappearing Floors
    135 E787 -
    Routine at E787
    +
    Mask Sprite?
    24328F31C +
    Game status buffer entry at F31C
    +
    243 52 F334 @@ -2097,9 +2113,33 @@
    243 53F335F335 +
    Active Sprite Width
    +
    24354F336 +
    Active Sprite ID
    +
    24355F337 +
    Unused
    +
    24358F33A -
    Data block at F335
    +
    Data block at F33A
    67 F343 -
    Game status buffer entry at F343
    +
    Random Number Seed
    +
    24369F345 +
    Unused
    9105B0015B01 -
    Data block at 5B00
    +
    Game Entry Commands
    24353F33558F33A -
    Data block at F335
    +
    Data block at F33A
    6940 -
    Game Entry Point
    +
    On-Load Entry Point #1
    6957 -
    Routine at 6957
    +
    On-Load Entry Point #2
    ABC2 -
    Move Room Data
    +
    Copy Room Data
    CD14 -
    Routine at CD14
    +
    Game Entry Point
    E11F -
    Routine at E11F
    +
    Increased Frequency Animals Event Timing
    E12A -
    Routine at E12A
    +
    Animals Event Timing
    E349 -
    Routine at E349
    +
    Get Random Number
    E581 -
    Routine at E581
    +
    Handler: Disappearing Floors
    E787 -
    Routine at E787
    +
    Mask Sprite?
    Description
    5B001 +
    Unused
    +
    5BCE 1 @@ -49,6 +56,13 @@
    5BF64 +
    Unused
    +
    5C00 479 @@ -119,6 +133,20 @@
    F3373 +
    Unused
    +
    F345187 +
    Unused
    +
    F8C6 314 diff --git a/reference/changelog.html b/reference/changelog.html index d72aebd..c83e0f9 100644 --- a/reference/changelog.html +++ b/reference/changelog.html @@ -23,6 +23,8 @@
    +
    +
    +
    20240408
    +
    +
      +
    • Fine tuned wording where I've guessed functionality and now know more about what is happening.
    • +
    • Commented some of the animals (rat + bird) event timing.
    • +
    +
    +
    +
    +
    20240407
    +
    +
      +
    • Fixed issue with room four screenshot as player is drawn in the same starting place, which happens to be where a pirate is also drawn (hence, the screenshot showed only 2 lives, and reset back to screen one).
    • +
    • Commented the unpacking routines.
    • +
    +
    20240403