![Wink ;)](./images/smilies/icon_e_wink.gif)
Siggi
Edit: I have sent a PM to Pokemon
If that is the only reason: maybe it would be sufficient to leave the "NMI-CONT" routine at its original place? That would not waste time, only some bytes space ...
Code: Select all
; ------------------------------------
; THE 'NON MASKABLE INTERRUPT' ROUTINE
; ------------------------------------
;
; ( It takes 29 clock cycles while incrementing towards zero - it was 32TS).
;; NMI
L0066:
EX AF,AF' ; (4) switch in the NMI's copy of the
; accumulator.
INC A ; (4) increment.
;
; JP M,L006D (10) was removed for faster NMI-service: the user application gets +3TS/NMI
;
JR Z,L006C ; (12) forward to NMI-CONT
; when line count has incremented to zero.
;
;; NMI-RET (7!!!) else
;
EX AF,AF' ; (4) switch out the incremented line counter
; or test result $80
RET ; (10) return to User application for a while.
; ---
; This branch is taken when the 55 (or 31) lines have been drawn.
;; NMI-CONT (its address was L006F)
L006C:
EX AF,AF' ; (4) restore the main accumulator.
PUSH AF ; (11) * Save Main Registers
PUSH BC ; (11) **
PUSH DE ; (11) ***
PUSH HL ; (11) ****
; the next set-up procedure is only really applicable when the top set of
; blank lines have been generated.
LD HL,($400C) ; (16) fetch start of Display File from D_FILE
; points to the HALT at beginning.
SET 7,H ; (8) point to upper 32K 'echo display file'
HALT ; (1) HALT synchronizes with NMI.
; Used with special hardware connected to the
; Z80 HALT and WAIT lines to take 1 clock cycle.
OUT ($FD),A ; (11) Stop the NMI generator.
JP IX_to_PC ; (10) Delay because of the removed 'JP M,...'
IX_to_PC
JP (IX) ; (8) forward to L0281 (after top) or L028F
Pokemon has not published this code, so currently the answer is NO. But I will ask Pokemon (but he is very busy at the moment).
Code: Select all
;; NMI
L0066:
EX AF,AF' ; (4) switch in the NMI's copy of the
; accumulator.
INC A ; (4) increment.
;
; JP M,L006D (10) was removed for faster NMI-service: the user application gets +3TS/NMI
;
JR Z,L006C ; (12) forward to NMI-CONT
; when line count has incremented to zero.
;
;; NMI-RET (7!!!) else
;
EX AF,AF' ; (4) switch out the incremented line counter
; or test result $80
RET ; (10) return to User application for a while.
; ---
; This branch is taken when the 55 (or 31) lines have been drawn.
Code: Select all
;; NMI-CONT (its address was L006F)
L006C:
EX AF,AF' ; (4) restore the main accumulator.
PUSH AF ; (11) * Save Main Registers
PUSH BC ; (11) **
PUSH DE ; (11) ***
PUSH HL ; (11) ****
; the next set-up procedure is only really applicable when the top set of
; blank lines have been generated.
LD HL,($400C) ; (16) fetch start of Display File from D_FILE
; points to the HALT at beginning.
SET 7,H ; (8) point to upper 32K 'echo display file'
HALT ; (1) HALT synchronizes with NMI.
; Used with special hardware connected to the
; Z80 HALT and WAIT lines to take 1 clock cycle.
OUT ($FD),A ; (11) Stop the NMI generator.
JP IX_to_PC ; (10) Delay because of the removed 'JP M,...'
IX_to_PC
JP (IX) ; (8) forward to L0281 (after top) or L028F