mirror of
https://github.com/Tolik-Trek/ZX-SP-ROMs.git
synced 2026-06-15 09:21:45 +03:00
адаптация под работу с биосом
This commit is contained in:
parent
228f513fe8
commit
eb37c13a60
19
SP_128.ASM
19
SP_128.ASM
@ -876,9 +876,9 @@ NMI_POINT:
|
|||||||
|
|
||||||
;
|
;
|
||||||
BLOCK #6B-$,0
|
BLOCK #6B-$,0
|
||||||
; ============
|
; ============
|
||||||
; RAM ROUTINES
|
; RAM ROUTINES
|
||||||
; ============
|
; ============
|
||||||
; The following code will be copied to locations #5B00 to #5B57, within the old ZX Printer buffer.
|
; The following code will be copied to locations #5B00 to #5B57, within the old ZX Printer buffer.
|
||||||
|
|
||||||
; -----------------
|
; -----------------
|
||||||
@ -922,6 +922,7 @@ NMI_POINT:
|
|||||||
; ENT
|
; ENT
|
||||||
|
|
||||||
;SWAP_ROM
|
;SWAP_ROM
|
||||||
|
RAM_ROUTINES:
|
||||||
L006B: PUSH AF ; Save AF and BC.
|
L006B: PUSH AF ; Save AF and BC.
|
||||||
PUSH BC ;
|
PUSH BC ;
|
||||||
LD BC,#7FFD ;
|
LD BC,#7FFD ;
|
||||||
@ -1012,7 +1013,9 @@ L00B5: EX AF,AF' ; Save AF registers. For a read, A holds the byte read
|
|||||||
OUT (C),A ; Switch back to original paging configuration.
|
OUT (C),A ; Switch back to original paging configuration.
|
||||||
EI ;
|
EI ;
|
||||||
EX AF,AF' ; Restore AF registers. For a read, A holds the byte read and the flags the success status.
|
EX AF,AF' ; Restore AF registers. For a read, A holds the byte read and the flags the success status.
|
||||||
RET ; <<< End of RAM Routines >>>
|
RET
|
||||||
|
RAM_ROUTINES.Size EQU $-RAM_ROUTINES
|
||||||
|
;<<<<<<<<<<<<<<<<<<<<<<<<< End of RAM Routines >>>>>>>>>>>>>>>>>>>>>>>>>;
|
||||||
|
|
||||||
|
|
||||||
; ===============================
|
; ===============================
|
||||||
@ -1142,10 +1145,10 @@ L0137: LD B,D ; Complete setting up the sound chip registers.
|
|||||||
LD A,#FF ; Disable AY-3-8912 sound channels.
|
LD A,#FF ; Disable AY-3-8912 sound channels.
|
||||||
OUT (C),A ;
|
OUT (C),A ;
|
||||||
|
|
||||||
LD DE,SWAP_ROM ; #5B00. Copy the various paging routines to the old printer buffer.
|
LD DE,SWAP_ROM ; #5B00. Copy the various paging routines to the old printer buffer.
|
||||||
LD HL,L006B ; The source is in this ROM.
|
LD HL,RAM_ROUTINES ; The source is in this ROM.
|
||||||
LD BC,L006B.Size; There are eighty eight bytes to copy.
|
LD BC,RAM_ROUTINES.Size ; There are eighty eight bytes to copy.
|
||||||
LDIR ; Copy the block of bytes.
|
LDIR ; Copy the block of bytes.
|
||||||
|
|
||||||
LD A,#CF ; Load A with the code for the Z80 instruction 'RST #08'.
|
LD A,#CF ; Load A with the code for the Z80 instruction 'RST #08'.
|
||||||
LD (RAMRST),A ; #5B5D. Insert into new System Variable RAMRST.
|
LD (RAMRST),A ; #5B5D. Insert into new System Variable RAMRST.
|
||||||
|
|||||||
@ -18971,17 +18971,14 @@ L3B3B: BIT 4,(IY+$01) ; FLAGS 3 - In 128K mode?
|
|||||||
JR NZ,L3B46 ; NZ=128K mode
|
JR NZ,L3B46 ; NZ=128K mode
|
||||||
|
|
||||||
; In 48K mode
|
; In 48K mode
|
||||||
|
|
||||||
XOR A ; Replicate code from standard ROM that the patch over-wrote
|
XOR A ; Replicate code from standard ROM that the patch over-wrote
|
||||||
LD DE,$1536
|
LD DE,$1536
|
||||||
RET
|
RET
|
||||||
|
|
||||||
; In 128K mode
|
; In 128K mode
|
||||||
|
|
||||||
L3B46: LD HL,$010F ; Vector table entry in Editor ROM -> JP $03A2
|
L3B46: LD HL,$010F ; Vector table entry in Editor ROM -> JP $03A2
|
||||||
|
|
||||||
; Return to Editor ROM at address in HL
|
; Return to Editor ROM at address in HL
|
||||||
|
|
||||||
L3B49: EX (SP),HL ; Change the return address
|
L3B49: EX (SP),HL ; Change the return address
|
||||||
JP $5B00 ; Page Editor ROM and return to the address on the stack
|
JP $5B00 ; Page Editor ROM and return to the address on the stack
|
||||||
|
|
||||||
@ -18993,12 +18990,10 @@ L3B4D: BIT 4,(IY+$01) ; In 128K mode?
|
|||||||
JR NZ,L3B58 ; NZ=128K mode
|
JR NZ,L3B58 ; NZ=128K mode
|
||||||
|
|
||||||
; In 48K mode
|
; In 48K mode
|
||||||
|
|
||||||
BIT 7,(IY+$0A) ; replicate code from standard ROM that the patch over-wrote
|
BIT 7,(IY+$0A) ; replicate code from standard ROM that the patch over-wrote
|
||||||
RET
|
RET
|
||||||
|
|
||||||
; In 128K mode
|
; In 128K mode
|
||||||
|
|
||||||
L3B58: LD HL,$0112 ; Handle in Editor ROM by jumping to Vector table entry in Editor ROM -> JP #182A
|
L3B58: LD HL,$0112 ; Handle in Editor ROM by jumping to Vector table entry in Editor ROM -> JP #182A
|
||||||
JR L3B49
|
JR L3B49
|
||||||
|
|
||||||
@ -19010,7 +19005,6 @@ L3B5D: BIT 4,(IY+$01) ; In 128K mode?
|
|||||||
JR NZ,L3B67 ; NZ=128K mode
|
JR NZ,L3B67 ; NZ=128K mode
|
||||||
|
|
||||||
; In 48K mode
|
; In 48K mode
|
||||||
|
|
||||||
RST 18H ; replicate code from standard ROM that the patch over-wrote
|
RST 18H ; replicate code from standard ROM that the patch over-wrote
|
||||||
CP $0D
|
CP $0D
|
||||||
RET
|
RET
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user