Mysterious error message ?

Something just occurred to me, when I try to load certain JSW games which require 128k memory into my emulator in 48K mode I get this error message.

4 Requires 128k memory, 40:1

Doesn't that strike you as weird ? Is that error message in the original ROM from 1982 ?! How did they know they were gonna make a 128k Speccy! Isn't there anything Clive can't do ? He's a time traveller too :)

Comments

  • Do you have an example? The most likely cause is the game itself is detecting the issue and reporting the error (though why it would show up in that specific format seems odd, unless something is hooking the error handling code)
  • This is in Marvin on Android I've tried to load one of JSW128 games from 48k mode.

    https://www.dropbox.com/s/a1ofznfus3t0tfa/Screenshot_20161208-004153.png
  • Can you see that ?
  • I just tried it on Speccy on Android same thing happens :)
  • Try loading JSW - Join the Jet Set on your emulator running in 48k mode
  • The only version of "JSW - Join the Jet Set" I can find is from 1985 and works perfectly on the 48K Spectrum (which is hardly surprising).

    Are you referring to a remake of the game for the 128k? In which case, the loader obviously checks that it's running on the correct machine and displays a custom error message. Whether it hijacks the ROM error routine or (more likely) just prints it to the lower screen, the message itself isn't in ROM.
    Comp.Sys.Sinclair Crap Games Competition 2017
    Everyone has a crap game inside them, let yours out!
  • Take a look at something like Jet Set Willy - Dragon64 :) Put your emulator in 48 mode and load it
  • It looks like something the JSWED engine does, you can see the message in RAM when it loads. I suspect it's hooking the error message response somehow, so that it doesn't immediately get overwritten by the 0 OK message.
  • Generating a custom error message as JSW64 does here is quite fiddly, because you need separate versions depending whether you're running in 48BASIC, 128BASIC or +3BASIC. The VERS subroutine (which I haven't provided) looks at various locations in the ROM to detect 48k (H=0), 128k (H=1), +3 (H=2) or unknown (H=0FFh).

    Enter with DE = address of custom error message, bit 7 set on last character.
    ZXERR:	LD	(MSERR),DE	;Error string
    	LD	IY,5C3AH	;Spectrum system veriables
    	EI
    	CALL	VERS		;This is done differently on 128s, 48s and +3s
    	LD	A,H
    	OR	A
    	JR	Z,BERR48
    	DEC	A
    	JP	NZ,BERRP3
    ;
    ;Running on a 128.
    ;
    	BIT	4,(IY+1)	;Running 128 BASIC?
    	JR	Z,BERR48	;No; 48 mode is assumed.
    	LD	HL,(5B8BH)	;Fake a 128 BASIC error.
    	LD	(MSRET),HL
    	LD	HL,0397H	;Jump in after the part which determines the
    	LD	(MSMES+1),HL	;address of the message.
    	LD	HL,ERRRT1
    	LD	(5B8BH),HL
    	JP	23325		;Page in ROM 1 etc.
    ;
    ERRRT1:	LD	HL,(MSRET)
    	LD	(5B8BH),HL	;Restore old SYNRET.
    	LD	SP,(RAMTOP)	;Clear machine & GOSUB stacks.
    	INC	SP
    	LD	HL,5BFFH
    	LD	(5B81H),HL	;OLDSP
    	HALT
    	RES	5,(IY+1)
    	LD	HL,5B66H
    	BIT	2,(HL)
    	JP	Z,R034A	;$+14
    	CALL	1F45H
    	LD	IX,(5B83H)
    	LD	BC,14H
    	ADD	IX,BC
    	CALL	1D56H
    	CALL	1F20H
    	JR	R034A
    ;
    BERR48:	HALT
    	RES 	5,(IY+01H)
    	BIT 	1,(IY+30H)
    	CALL	NZ,0ECDH
    	LD  	HL,0
    	LD  	(IY+37H),H
    	LD  	(IY+26H),H
    	LD  	(5C0BH),HL
    	LD  	HL,1
    	LD  	(5C16H),HL
    	CALL	16B0H
    	RES 	5,(IY+37H)
    	CALL	0D6EH
    	SET 	5,(IY+02H)
    	LD	DE,(MSERR)
    L0C22:	LD	A,(DE)
    	AND	7FH
    	CALL	0C3BH
    	LD	A,(DE)
    	INC	DE
    	ADD	A,A
    	JR	NC,L0C22
    	JP	1349H
    ;
    BERRP3:	BIT	4,(IY+1)	;Running +3BASIC?
    	JR	Z,BERR48	;No; 48 mode is assumed.
    	LD	HL,(SYNRET)	;Fake a +3BASIC error.
    	LD	(MSRET),HL
    	LD	DE,61H
    	ADD	HL,DE		;Jump in after the part which determines the
    	LD	(MSMES+1),HL	;address of the message.
    	LD	HL,ERRRTN
    	LD	(SYNRET),HL
    	JP	ONERR		;Page in ROM 1 etc.
    ;
    ERRRTN:	LD	HL,(MSRET)
    	LD	(SYNRET),HL	;Restore old SYNRET.
    	LD	SP,(RAMTOP)	;Clear machine & GOSUB stacks.
    	INC	SP
    	LD	HL,5BFFh
    	LD	(OLDSP),HL
    	HALT
    	RES	5,(IY+1)
    R034A:	LD	HL,0
    	LD	(IY+55),H
    	LD	(IY+38),H
    	LD	(5C0BH),HL
    	INC	HL
    	LD	(5C16H),HL
    	RST	28H
    	DEFW	16B0H
    	RES	5,(IY+55)
    	RST	28H
    	DEFW	0D6EH
    	SET	5,(IY+2)
    	LD	DE,(MSERR)	;Address of error message.
    MSMES:	JP	0
    
    MSRET:	DEFW	0
    MSERR:	DEFW	0
    ;
    not128:	defb	'4 Requires 128k memor'
    	defb	0F9h			;'y'+128
    ;
    	end
    
    
    Thanked by 1p13z
Sign In or Register to comment.