One more hint: any call to an external BASIC program part could use FAST or SLOW rom calls (e. g. within MEFISDOS to allow access to MMC without being interrupted by NMI), so this rom calls hook off the C internal display routine. So you should call zx_fast() and zx_slow(), when the C program is running again to reenable the C display routine.
And I had a lot of trouble when calling external routines (in EPROM), which write things onto screen. Then often the print positons of C and BASIC/ROM did not match, resulting in a corrupt display file
So i call
"zx_cls()" and "putchar(12)"
after being back in C to clear the screen and reset the BASIC print system vars as well as the C console print position ...
This is the BASIC loader; I compile it with zxtxt2p. hashed lines are omitted from the compilation, they are 'super REMs'. I didn't make the attached P file auto-run, as you'll want to edit the code LLIST maps to CONFIG on a ZXpand enabled machine, and LPRINT maps to DELETE.
Code: Select all
REM SUPER DARK STAR REM ENHANCED FOR ZXPAND # RAM at 8K LLIST "M=L" LOAD "SDSTITLE.HRG;8192" # inform c program that the title was loaded. LET TITLE=1 # the HS data gets checksummed so no need to flag its presence LOAD "SDSBEST.BIN;15872" # C code returns 42 when new high scores need saving IF USR 16514 <> 42 THEN GOTO @NOSAVE LPRINT "SDSBEST.BIN" SAVE "SDSBEST.BIN;8192,512" PRINT "HIGH SCORES SAVED."; @NOSAVE: STOP
- (5.71 KiB) Downloaded 171 times
i just tested the V2.0 version and that is the result:
I started with goto line 70 (if usr 16514 ...) and did not yet add myload/save-routines. The display says, that no "ZXPAND -AY" is detected ...
So there is still no sound with Sascha's sound board
Maybe those who use a ZX81 to control a nuclear power plant should take care when playing that game while the reactor is onAndy Rea wrote:Just a thought... is there any special reason why one can not just assume a sound board is present ? would the 'out' instructions cause any side effects ?
if it´s not okay, it´s not the end.
and: uıɐbɐ ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ɹǝʌǝ ɹǝʌǝu ןןıʍ ı
Andy Rea wrote:Just a thought... is there any special reason why one can not just assume a sound board is present ?
That's what we do on Spectrum actually.
If there's no AY, then the game remains silent. If there's an AY present, then we hear sounds.
In both cases CPU send commands to "supposed-to-be" AY. It doesn't slow down a game at all.
Btw - for ZXpand: which version should I use? 2.0 or 1.4?