Blown Away - The Interactive Game
Technical Analysis and Fan Page

Content for everyone

Technical stuff

Links

YouTube Videos

(German or English)

Helicopter codeword savegame patch

The helicopter codeword (found in the template game) is saved in the savegame file (BLOWNAWY.SAV), but it won't be read from it. If you exit the game (so that the memory is cleared) and reload the savegame, the codeword will be "JAW".

Technical background: The codeword is saved at ds:0004C990+0x1AA and additionally internal at ds:0004E68 . The game will read the data only from ds:0004E68.

My patch solves this issue.

Bugfix explanation

BLOWN AWAY
BUGFIX: Helicopter code word is not loaded from savestate file
by Daniel Marschall  2021-02-25

---------------

(1)
	[EXE Offset 19E93]
	Find	31 C0 BA FF FF ff ff E8 69 AF 01 00 E8 F4 AE 01 00 31 C9 31 DB
	Replace	E8 43 09 00 00 31 C0 E8 69 AF 01 00 E8 F4 AE 01 00 31 C9 31 DB
		^^ ^^ ^^ ^^ ^^ ^^ ^^

Explanation:

			mov     eax, ds:4C990h            ; savestate structure = eax
			mov     di, [eax+1A4h]            ; savestate offset "chapter"
			cmp     di, 5                     ; chapter 5 = helicopter
			jle     short @heli_room_begin

			@heli_room_begin:
	31 C0		xor eax,eax		===> E8 43 09 00 00	call sub_3e73 ; jump to code gap
	BA FF FF ff ff	mov edx,FFFFFFFF	===> 31 C0		xor eax,eax
	E8 69 AF 01 00	call    sub_1E4A0
	E8 F4 AE 01 00	call    sub_1E430
	31 C9		xor     ecx, ecx
	31 DB		xor     ebx, ebx

---------------

(2)
	[EXE Offset 1A7DB]
	Find	8D 80 00 00 00 00 8D 92 00 00 00 00 90 53 56 C7 05 80 C9 04 00
	Replace	31 D2 8A 90 AA 01 00 00 E9 03 01 00 00 53 56 C7 05 80 C9 04 00
		^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^

Explanation:

				@sub_3e73:
	31 d2                   xor    edx,edx
	8a 90 aa 01 00 00       mov    dl,BYTE PTR [eax+0x1aa]
	e9 03 01 00 00		jmp    @sub_3f83

---------------

(3)
	[EXE Offset 1A8EB]
	Find	8D 80 00 00 00 00 8D 92 00 00 00 00 90 53 52 56 BA FF FF FF FF BE 10 00
	Replace	89 15 84 e6 04 00 31 D2 4A C3 90 90 90 53 52 56 BA FF FF FF FF BE 10 00
		^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^

Explanation:

				@sub_3f83:
	89 15 84 e6 04 00       mov    DWORD PTR ds:0x4e684,edx	; helicopter codeword variable; needs relocation entry (code offset 0x3F85)
	31 d2                   xor    edx,edx
	4a                      dec    edx
	c3                      ret
	90			nop
	90			nop
	90			nop

---------------

(4)
	[EXE Offset 16958]
	Find	02 80 7C E5 02 80 00 00 00 00 00 00 00 00 00 00
	Replace	02 80 7C E5 02 80 85 3F 00 80 00 00 00 00 00 00
		                  ^^ ^^ ^^ ^^

Explanation:

	Add relocation:
	85 3F 00 80

---------------

(5)
	[EXE Offset B148]
	Find	4D 51 BA 00 A2 02 FE 2D
	Replace	4D 51 BA 00 A2 02 FF 2D
	                          ^^

Explanation:

	Pharlap REX Header:
	signature                                 =      "MQ"
	file size mod 512                         =     00BAh
	file size in blocks                       =     02A2h
	number of relocation items                =     2DFEh ===> 2DFFh (Increase relocation count by 1)
	size of header in paragraphs              =     0B82h
	minimum data in 4k pages                  =     002Eh
	maximum data in 4k pages                  =     FFFFh
	initial ESP                               = 00076620h
	checksum                                  =     0000h
	initial EIP                               = 00020238h
	offset of first relocation item           =     001Eh
	overlay number                            =     0000h
	always one                                =     0001h

© 2024 Daniel Marschall - - www.daniel-marschall.de

Please also see my pages for other Imagination Pilots games:
Blown Away | Panic in the Park | Waldo at the Circus | Waldo Exploring Geography | Eraser Turnabout | Virtual K'Nex