Source Code Snippets
Posted: 2024-Apr-28, 19:45
I opened the patches for the Japanese ADF version (the ones listed/linked here) in a hex editor (to find out how patch files are compressed) and was quite surprised to find source code in there.
The way these snippets are interleaved with other data indicates that their homebrew tool for packing patches did not properly initialize all memory it uses. Windows 95/98 (DID’s/Imagineer’s platform at the time) does not isolate processes. So instead of ending up full of zeros, the uninitialized regions ended up containing whatever happened to be in RAM when some other process previously released the memory – in this case, source code.
I will now check all their patches/installers.
Code: Select all
mov [esi],ax ;convert from 68000 format
push esi
call [fixroute]
pop esi
mov ax,[esi]
cmp ax,7fffh ;closest?
jne @@loop
ret
_fixdp_ dd OFFSET fixdp0,OFFSET globfixdp0
_fixroute_ dd OFFSET fixroute1,OFFSET fixroute2
@@is_problem: push OFFSET byte_problem_msg
call [_fatal_error]
ret
iLocateShape ENDP
ALIGN 4
fixroute_code proc near
; esi = current shape _shptr_ = start of shape data
fixroute1 proc near
mov ebx,esi
add ebx,16
Code: Select all
at
; it only handles exceptions caused when in protected mode
;─────────────────────────────────────────────────────────────────────────
ALIGN 4
PUBLIC c mydiv0
; eax = address of divide instruction
; this routine only
Code: Select all
; mov eax,OFFSET ProjOverflow_Y
; mov eax,OFFSET ProjBehind
; ret
;abort_conecheck:
; mov eax,OFF
Code: Select all
DD 0 ;ptr to smallest y coord
Numpoints DD 0 ;number of points in this poly
div0off DD 0
;our_ds
I will now check all their patches/installers.