-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathUI.i.asm
More file actions
81 lines (73 loc) · 3.01 KB
/
UI.i.asm
File metadata and controls
81 lines (73 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
; attribute line offsets in the VRAM to control-key position
KEY_ATTR_OFS_HELP equ 0
KEY_ATTR_OFS_TURBO equ 5
KEY_ATTR_OFS_FULL equ 10
KEY_ATTR_OFS_RUN equ 15
KEY_ATTR_OFS_CORE equ 22
KEY_ATTR_OFS_INSTR equ 27
CHARPOS_INS_END equ 13
CHARPOS_ENCODING equ 15
CHARPOS_INS_KEY equ KEY_ATTR_OFS_INSTR
CHARPOS_STATUS equ 29
MachineInfoLabels:
; 0123456789A123456789A123456789A1
db '1Hlp 2T28 3Ful 5Go m',0,'c',0
InstructionMnemonics:
db 'BRLC DE,B',0
db 'BSLA DE,B',0
db 'BSRA DE,B',0
db 'BSRF DE,B',0
db 'BSRL DE,B',0
db 'JP (C)',0
; Two bytes per instruction: Char to display, location in key-array to test
InstructionsData_KeyLegends:
db 'Q', KEY_Q ; BRLC DE,B
db 'W', KEY_W ; BSLA DE,B
db 'E', KEY_E ; BSRA DE,B
db 'R', KEY_R ; BSRF DE,B
db 'T', KEY_T ; BSRL DE,B
db 'Y', KEY_Y ; JP (C)
; four bytes per instruction, either real opcode byte, or special opcode equ
InstructionsData_Encoding:
db $ED, $2C, 0, 0 ; BRLC DE,B
db $ED, $28, 0, 0 ; BSLA DE,B
db $ED, $29, 0, 0 ; BSRA DE,B
db $ED, $2B, 0, 0 ; BSRF DE,B
db $ED, $2A, 0, 0 ; BSRL DE,B
db $ED, $98, 0, 0 ; JP (C)
; byte 0 = encoding bytes [2:0], special mask [7:3] (from top to bottom)
; byte 1 = result
; byte 2 = logIndex (first log index, 0 == no log)
; byte 3 = ??
InstructionsData_Details:
db $02, RESULT_NONE, 0, -1 ; BRLC DE,B
db $02, RESULT_NONE, 0, -1 ; BSLA DE,B
db $02, RESULT_NONE, 0, -1 ; BSRA DE,B
db $02, RESULT_NONE, 0, -1 ; BSRF DE,B
db $02, RESULT_NONE, 0, -1 ; BSRL DE,B
db $02, RESULT_NONE, 0, -1 ; JP (C)
HelpTxt:
; 0123456789A123456789A123456789A1
db ' ',0
db 'Read "!Z80Nc2.txt" for details.',0
db ' ',0
db 'Press 2 to switch 28Mhz turbo.',0
db 'Press 5 to run all tests (~6s).',0
db 'Option 3 for full tests (~4min).',0
db ' ',0
db 'To run particular test or check',0
db 'error log in case of "ERR" state',0
db 'press the highlighted letter.',0
db ' ',0
db 'Values in log are hexadecimal.',0
db ' ',0
db 'For instruction details you can',0
db 'check:',0
db 'https://wiki.specnext.dev/Extend',0
db 'ed_Z80_instruction_set',0
db ' ',0
db 'Tests can be run only once.',0
db ' ',0
db ' Press any key',0
db 0
include "../Z80N/UIcode.i.asm"