Patch:Bio Menace/Goplat

From ModdingWiki
Jump to: navigation, search

This page covers goplat-related patches for Bio Menace (mostly for moving platforms).

Horizontally moving goplats responding to blocking tiles

Originally, horizontally moving goplats (well, platforms) exist and function; They just don't respond to blocking tiles as expected.

The patch is provided later, as a portion of the "Platforms following paths" patches.

Platforms following paths

Taking advantage of existing code, a set of patches is provided here, basically adding platforms that follow paths (like in Commander Keen 5 and 6). It should be noted that, by the way of flipping switches, such paths can be modified (again like in CK 5 and 6).

In level editors like TED5 you can find two tiles (numbered 56 and 57, or 38h and 39h in hex), which appear to let you add platforms, although they don't spawn platforms by default (and in BM 1 and 2 don't spawn anything). Well, these tiles are patched here so they can be used for platforms following paths.

Here are a few more important notes:

- As a side effect, horizontally moving goplats would respond to blocking tiles as expected (because they were patched earlier and use code smaller than the original). While this could be avoided, it's a bit hard to see good reasons to do it.

- While platforms may now move horizontally, it doesn't mean all of the player's frames would move horizontally as expected. You'll need to add a few "shifts" to some of the frames (using a KeenGraph-style program), e.g. the crouching frames.

- Back to the tiles to be used in a level editor, in Bio Menace 3, they already have a default role: Load a goplat appearing to have a leftover unused spaceship frame, also following paths (and moving faster than the standard platforms). Note that they'd begin moving in the opposite direction to the one you'd expect!

Patch: Bio Menace 1, shareware release (v1.1)
###On the initialization of map where it's checking all sprites, make it so
###a few unused sprites would be used for path following platforms now.
###Practically, initialization code shared with the ordinary
###horizontally/vertically moving platforms would be called.
%patch $F419 $E9 $04
#Sprite matches platform following a path, initially down.
%patch $F41B $E9 $04
#Sprite matches platform following a path, initially left.
###Change platform goplat initialization so we take care of the one following
###paths as well (in addition to the vertically/horizontally moving platforms)
%patch $1001F $C7 $47 $02 $02 $00 $C7 $47 $22 $01 $00 $8B $46 $06 $B1 $08 $D3 $E0 $89 $47 $0A $8B $46 $08 $B1 $08 $D3 $E0 $89 $47 $0C $57 $8B $7E $0A $81 $FF $03 $00 $77 $2A $C7 $47 $44 $00 $00 $C1 $E7 $02 $2E $8B $85 $C1 $03 $89 $47 $0E $2E $8B $85 $C3 $03 $89 $47 $10 $EB $40 $00 $00 $FF $FF $01 $00 $00 $00 $00 $00 $01 $00 $FF $FF $00 $00 $C7 $47 $44 $32 $00 $8B $5E $08 $D1 $E3 $8B $9F $42 $B7 $D1 $EB $D1 $E3 $8E $06 $F2 $71 $8B $46 $06 $D1 $E0 $01 $C3 $8B $46 $0A $05 $46 $00 $26 $89 $07 $8B $1E $80 $43 $2D $3A $00 $89 $47 $48 $5F $E9 $07 $00
###Patch for horizontally moving goplats (platforms). Basically, ensures that
###such goplats do respond to blocking sprites as expected.
###It's also structured in a way that lets you change goplat speed.
%patch $10194 $8E $E5 $83 $3E $40 $71 $00 $75 $07 $83 $3E $42 $71 $00 $74 $03 $E9 $FE $00 $8B $44 $0E $BA %patch $101AB $0C $00
#Horizontally moving goplat speed
%patch $101AD $F7 $EA $F7 $2E $C2 $B9 $A3 $40 $71 $8B $44 $10 $BA %patch $101BA $0C $00
#Vertically moving goplat speed
%patch $101BC $F7 $EA $F7 $2E $C2 $B9 $A3 $42 $71 $31 $FF $81 $7C $10 $FF $FF $75 $03 $47 $EB $11 $81 $7C $0E $FF $FF $74 $0A $47 $47 $81 $7C $10 $01 $00 $75 $01 $47 $89 $F5 $D1 $E7 $89 $FE $81 $E6 $02 $00 $8B $43 $24 $03 $84 $40 $71 $8C $E3 $89 $47 $FE $B1 $08 $D3 $E8 $89 $C2 $39 $53 $2E $74 $A1 $31 $C9 $09 $F6 $74 $04 $89 $D3 $EB $03 $8B $5E $30 $81 $F9 $02 $00 $7C $0C $81 $FF $04 $00 $7C $04 $4B $4B $EB $02 $43 $43 $D1 $E3 $8B $9F $42 $B7 $D1 $EB $D1 $E3 $8E $06 $F2 $71 $09 $F6 $74 $05 $8B $46 $2E $EB $02 $89 $D0 $D1 $E0 $01 $C3 $81 $F9 $01 $00 $74 $16 $7F $21 $26 $83 $3F $47 $75 $18 $C7 $84 $40 $71 $00 $00 $C7 $46 $04 $01 $00 $E9 $4A $00 $26 $83 $3F $46 $75 $44 $09 $F6 $74 $09 $41 $EB $9D $26 $83 $3F $46 $74 $DF $89 $F3 $81 $C3 $40 $71 $81 $FF $04 $00 $8C $E7 $7C $13 $C7 $42 $0E $FF $FF $8B $45 $FE $25 $FF $00 $8B $17 $29 $C2 $89 $17 $EB $16 $C7 $42 $0E $01 $00 $8B $45 $FE $25 $FF $00 $BA $00 $01 $29 $C2 $8B $07 $01 $D0 $89 $07 $5F $5E $8C $E4 $5D $CB
###New function to be called for each platform on a single game 'tick',
###determining which kind of platform is it (following a path or not).
###Also, if following a path, adjusts speed.
%patch $102AB $55 $89 $E5 $81 $EC $48 $00 $56 $57 $8B $76 $06 $8E $E5 $81 $3E $40 $71 $00 $00 $75 $1F $81 $3E $42 $71 $00 $00 $75 $17 $81 $7C $44 $00 $00 $75 $07 $81 $C4 $46 $00 $E9 $D0 $FE $A1 $C2 $B9 $BA %patch $102DB $0C $00
#Set speed for platform following a path
%patch $102DD $E9 $5D $01
###Change code reference (pointer) in the platform segment, so the new function
###would be called on each game 'tick' (detecting the kind of platform).
%patch $22260 $0B $06 $0FCARW

Patch: Bio Menace 1, freeware release (v1.1)
###On the initialization of map where it's checking all sprites, make it so
###a few unused sprites would be used for path following platforms now.
###Practically, initialization code shared with the ordinary
###horizontally/vertically moving platforms would be called.
%patch $FA1B $EB $04
#Sprite matches platform following a path, initially down.
%patch $FA1D $EB $04
#Sprite matches platform following a path, initially left.
###Change platform goplat initialization so we take care of the one following
###paths as well (in addition to the vertically/horizontally moving platforms)
%patch $10621 $C7 $47 $02 $02 $00 $C7 $47 $22 $01 $00 $8B $46 $06 $B1 $08 $D3 $E0 $89 $47 $0A $8B $46 $08 $B1 $08 $D3 $E0 $89 $47 $0C $57 $8B $7E $0A $81 $FF $03 $00 $77 $2A $C7 $47 $44 $00 $00 $C1 $E7 $02 $2E $8B $85 $C3 $03 $89 $47 $0E $2E $8B $85 $C5 $03 $89 $47 $10 $EB $40 $00 $00 $FF $FF $01 $00 $00 $00 $00 $00 $01 $00 $FF $FF $00 $00 $C7 $47 $44 $32 $00 $8B $5E $08 $D1 $E3 $8B $9F $12 $B8 $D1 $EB $D1 $E3 $8E $06 $C2 $72 $8B $46 $06 $D1 $E0 $01 $C3 $8B $46 $0A $05 $46 $00 $26 $89 $07 $8B $1E $50 $44 $2D $3A $00 $89 $47 $48 $5F $E9 $07 $00
###Patch for horizontally moving goplats (platforms). Basically, ensures that
###such goplats do respond to blocking sprites as expected.
###It's also structured in a way that lets you change goplat speed.
%patch $10796 $8E $E5 $83 $3E $10 $72 $00 $75 $07 $83 $3E $12 $72 $00 $74 $03 $E9 $FE $00 $8B $44 $0E $BA %patch $107AD $0C $00
#Horizontally moving goplat speed
%patch $107AF $F7 $EA $F7 $2E $92 $BA $A3 $10 $72 $8B $44 $10 $BA %patch $107BC $0C $00
#Vertically moving goplat speed
%patch $107BE $F7 $EA $F7 $2E $92 $BA $A3 $12 $72 $31 $FF $81 $7C $10 $FF $FF $75 $03 $47 $EB $11 $81 $7C $0E $FF $FF $74 $0A $47 $47 $81 $7C $10 $01 $00 $75 $01 $47 $89 $F5 $D1 $E7 $89 $FE $81 $E6 $02 $00 $8B $43 $24 $03 $84 $10 $72 $8C $E3 $89 $47 $FE $B1 $08 $D3 $E8 $89 $C2 $39 $53 $2E $74 $A1 $31 $C9 $09 $F6 $74 $04 $89 $D3 $EB $03 $8B $5E $30 $81 $F9 $02 $00 $7C $0C $81 $FF $04 $00 $7C $04 $4B $4B $EB $02 $43 $43 $D1 $E3 $8B $9F $12 $B8 $D1 $EB $D1 $E3 $8E $06 $C2 $72 $09 $F6 $74 $05 $8B $46 $2E $EB $02 $89 $D0 $D1 $E0 $01 $C3 $81 $F9 $01 $00 $74 $16 $7F $21 $26 $83 $3F $47 $75 $18 $C7 $84 $10 $72 $00 $00 $C7 $46 $04 $01 $00 $E9 $4A $00 $26 $83 $3F $46 $75 $44 $09 $F6 $74 $09 $41 $EB $9D $26 $83 $3F $46 $74 $DF $89 $F3 $81 $C3 $10 $72 $81 $FF $04 $00 $8C $E7 $7C $13 $C7 $42 $0E $FF $FF $8B $45 $FE $25 $FF $00 $8B $17 $29 $C2 $89 $17 $EB $16 $C7 $42 $0E $01 $00 $8B $45 $FE $25 $FF $00 $BA $00 $01 $29 $C2 $8B $07 $01 $D0 $89 $07 $5F $5E $8C $E4 $5D $CB
###New function to be called for each platform on a single game 'tick',
###determining which kind of platform is it (following a path or not).
###Also, if following a path, adjusts speed.
%patch $108AD $55 $89 $E5 $81 $EC $48 $00 $56 $57 $8B $76 $06 $8E $E5 $81 $3E $10 $72 $00 $00 $75 $1F $81 $3E $12 $72 $00 $00 $75 $17 $81 $7C $44 $00 $00 $75 $07 $81 $C4 $46 $00 $E9 $D0 $FE $A1 $92 $BA $BA %patch $108DD $0C $00
#Set speed for platform following a path
%patch $108DF $E9 $5D $01
###Change code reference (pointer) in the platform segment, so the new function
###would be called on each game 'tick' (detecting the kind of platform).
%patch $22860 $0D $06 $102ARW

Patch: Bio Menace 2, freeware release (v1.1)
###On the initialization of map where it's checking all sprites, make it so
###a few unused sprites would be used for path following platforms now.
###Practically, initialization code shared with the ordinary
###horizontally/vertically moving platforms would be called.
%patch $FE83 $E0 $04
#Sprite matches platform following a path, initially down.
%patch $FE85 $E0 $04
#Sprite matches platform following a path, initially left.
###Change platform goplat initialization so we take care of the one following
###paths as well (in addition to the vertically/horizontally moving platforms)
%patch $10ACA $C7 $47 $02 $02 $00 $C7 $47 $22 $00 $00 $8B $46 $06 $B1 $08 $D3 $E0 $89 $47 $0A $8B $46 $08 $B1 $08 $D3 $E0 $89 $47 $0C $57 $8B $7E $0A $81 $FF $03 $00 $77 $2A $C7 $47 $44 $00 $00 $C1 $E7 $02 $2E $8B $85 $BC $03 $89 $47 $0E $2E $8B $85 $BE $03 $89 $47 $10 $EB $40 $00 $00 $FF $FF $01 $00 $00 $00 $00 $00 $01 $00 $FF $FF $00 $00 $C7 $47 $44 $32 $00 $8B $5E $08 $D1 $E3 $8B $9F $66 $B8 $D1 $EB $D1 $E3 $8E $06 $CE $72 $8B $46 $06 $D1 $E0 $01 $C3 $8B $46 $0A $05 $46 $00 $26 $89 $07 $8B $1E $5E $44 $2D $3A $00 $89 $47 $48 $5F $E9 $07 $00
###Patch for horizontally moving goplats (platforms). Basically, ensures that
###such goplats do respond to blocking sprites as expected.
###It's also structured in a way that lets you change goplat speed.
%patch $10C3F $8E $E5 $83 $3E $1E $72 $00 $75 $07 $83 $3E $20 $72 $00 $74 $03 $E9 $FE $00 $8B $44 $0E $BA %patch $10C56 $0C $00
#Horizontally moving goplat speed
%patch $10C58 $F7 $EA $F7 $2E $E6 $BA $A3 $1E $72 $8B $44 $10 $BA %patch $10C65 $0C $00
#Vertically moving goplat speed
%patch $10C67 $F7 $EA $F7 $2E $E6 $BA $A3 $20 $72 $31 $FF $81 $7C $10 $FF $FF $75 $03 $47 $EB $11 $81 $7C $0E $FF $FF $74 $0A $47 $47 $81 $7C $10 $01 $00 $75 $01 $47 $89 $F5 $D1 $E7 $89 $FE $81 $E6 $02 $00 $8B $43 $24 $03 $84 $1E $72 $8C $E3 $89 $47 $FE $B1 $08 $D3 $E8 $89 $C2 $39 $53 $2E $74 $A1 $31 $C9 $09 $F6 $74 $04 $89 $D3 $EB $03 $8B $5E $30 $81 $F9 $02 $00 $7C $0C $81 $FF $04 $00 $7C $04 $4B $4B $EB $02 $43 $43 $D1 $E3 $8B $9F $66 $B8 $D1 $EB $D1 $E3 $8E $06 $CE $72 $09 $F6 $74 $05 $8B $46 $2E $EB $02 $89 $D0 $D1 $E0 $01 $C3 $81 $F9 $01 $00 $74 $16 $7F $21 $26 $83 $3F $47 $75 $18 $C7 $84 $1E $72 $00 $00 $C7 $46 $04 $01 $00 $E9 $4A $00 $26 $83 $3F $46 $75 $44 $09 $F6 $74 $09 $41 $EB $9D $26 $83 $3F $46 $74 $DF $89 $F3 $81 $C3 $1E $72 $81 $FF $04 $00 $8C $E7 $7C $13 $C7 $42 $0E $FF $FF $8B $45 $FE $25 $FF $00 $8B $17 $29 $C2 $89 $17 $EB $16 $C7 $42 $0E $01 $00 $8B $45 $FE $25 $FF $00 $BA $00 $01 $29 $C2 $8B $07 $01 $D0 $89 $07 $5F $5E $8C $E4 $5D $CB
###New function to be called for each platform on a single game 'tick',
###determining which kind of platform is it (following a path or not).
###Also, if following a path, adjusts speed.
%patch $10D56 $55 $89 $E5 $81 $EC $48 $00 $56 $57 $8B $76 $06 $8E $E5 $81 $3E $1E $72 $00 $00 $75 $1F $81 $3E $20 $72 $00 $00 $75 $17 $81 $7C $44 $00 $00 $75 $07 $81 $C4 $46 $00 $E9 $D0 $FE $A1 $E6 $BA $BA %patch $10D86 $0C $00
#Set speed for platform following a path
%patch $10D88 $E9 $A7 $03
###Change code reference (pointer) in the platform segment, so the new function
###would be called on each game 'tick' (detecting the kind of platform).
%patch $229E0 $06 $06 $1075RW

Patch: Bio Menace 3, freeware release (v1.1)
###On the initialization of map where it's checking all sprites, make it so
###a few unused sprites would be used for path following platforms now.
###Practically, initialization code shared with the ordinary
###horizontally/vertically moving platforms would be called.
###
###A LITTLE WORD OF WARNING: By default, the sprites are used for leftover
###shuttles (not appearing in the original BM levels),
###with OPPOSITE initial directions of moving!
%patch $FA71 $3E $05
#Sprite matches platform following a path, initially down.
%patch $FA73 $3E $05
#Sprite matches platform following a path, initially left.
###Change platform goplat initialization so we take care of the one following
###paths as well (in addition to the vertically/horizontally moving platforms)
%patch $1049E $C7 $47 $02 $02 $00 $C7 $47 $22 $00 $00 $8B $46 $06 $B1 $08 $D3 $E0 $89 $47 $0A $8B $46 $08 $B1 $08 $D3 $E0 $89 $47 $0C $57 $8B $7E $0A $81 $FF $03 $00 $77 $2A $C7 $47 $44 $00 $00 $C1 $E7 $02 $2E $8B $85 $C0 $03 $89 $47 $0E $2E $8B $85 $C2 $03 $89 $47 $10 $EB $40 $00 $00 $FF $FF $01 $00 $00 $00 $00 $00 $01 $00 $FF $FF $00 $00 $C7 $47 $44 $32 $00 $8B $5E $08 $D1 $E3 $8B $9F $9E $B3 $D1 $EB $D1 $E3 $8E $06 $F2 $72 $8B $46 $06 $D1 $E0 $01 $C3 $8B $46 $0A $05 $46 $00 $26 $89 $07 $8B $1E $76 $44 $2D $3A $00 $89 $47 $48 $5F $E9 $07 $00
###Patch for horizontally moving goplats (platforms). Basically, ensures that
###such goplats do respond to blocking sprites as expected.
###It's also structured in a way that lets you change goplat speed.
%patch $10613 $8E $E5 $83 $3E $36 $72 $00 $75 $07 $83 $3E $38 $72 $00 $74 $03 $E9 $FE $00 $8B $44 $0E $BA %patch $1062A $0C $00
#Horizontally moving goplat speed
%patch $1062C $F7 $EA $F7 $2E $1E $B6 $A3 $36 $72 $8B $44 $10 $BA %patch $10639 $0C $00
#Vertically moving goplat speed
%patch $1063B $F7 $EA $F7 $2E $1E $B6 $A3 $38 $72 $31 $FF $81 $7C $10 $FF $FF $75 $03 $47 $EB $11 $81 $7C $0E $FF $FF $74 $0A $47 $47 $81 $7C $10 $01 $00 $75 $01 $47 $89 $F5 $D1 $E7 $89 $FE $81 $E6 $02 $00 $8B $43 $24 $03 $84 $36 $72 $8C $E3 $89 $47 $FE $B1 $08 $D3 $E8 $89 $C2 $39 $53 $2E $74 $A1 $31 $C9 $09 $F6 $74 $04 $89 $D3 $EB $03 $8B $5E $30 $81 $F9 $02 $00 $7C $0C $81 $FF $04 $00 $7C $04 $4B $4B $EB $02 $43 $43 $D1 $E3 $8B $9F $9E $B3 $D1 $EB $D1 $E3 $8E $06 $F2 $72 $09 $F6 $74 $05 $8B $46 $2E $EB $02 $89 $D0 $D1 $E0 $01 $C3 $81 $F9 $01 $00 $74 $16 $7F $21 $26 $83 $3F $47 $75 $18 $C7 $84 $36 $72 $00 $00 $C7 $46 $04 $01 $00 $E9 $4A $00 $26 $83 $3F $46 $75 $44 $09 $F6 $74 $09 $41 $EB $9D $26 $83 $3F $46 $74 $DF $89 $F3 $81 $C3 $36 $72 $81 $FF $04 $00 $8C $E7 $7C $13 $C7 $42 $0E $FF $FF $8B $45 $FE $25 $FF $00 $8B $17 $29 $C2 $89 $17 $EB $16 $C7 $42 $0E $01 $00 $8B $45 $FE $25 $FF $00 $BA $00 $01 $29 $C2 $8B $07 $01 $D0 $89 $07 $5F $5E $8C $E4 $5D $CB
###New function to be called for each platform on a single game 'tick',
###determining which kind of platform is it (following a path or not).
###Also, if following a path, adjusts speed.
%patch $1072A $55 $89 $E5 $81 $EC $48 $00 $56 $57 $8B $76 $06 $8E $E5 $81 $3E $36 $72 $00 $00 $75 $1F $81 $3E $38 $72 $00 $00 $75 $17 $81 $7C $44 $00 $00 $75 $07 $81 $C4 $46 $00 $E9 $D0 $FE $A1 $1E $B6 $BA %patch $1075A $0C $00
#Set speed for platform following a path
%patch $1075C $E9 $48 $02
###Change code reference (pointer) in the platform segment, so the new function
###would be called on each game 'tick' (detecting the kind of platform).
%patch $22770 $0A $06 $1012RW