-
Notifications
You must be signed in to change notification settings - Fork 1
/
K2GE.i
84 lines (68 loc) · 1.92 KB
/
K2GE.i
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
82
83
//
// K2GE.i
// K2GE
//
// Created by Fredrik Ahlström on 2008-04-02.
// Copyright © 2008-2024 Fredrik Ahlström. All rights reserved.
//
// ASM header for the SNK K1GE/K2GE Graphics Engine emulator
//
#if !__ASSEMBLER__
#error This header file is only for use in assembly files!
#endif
#define HW_AUTO (0)
#define HW_NGPMONO (1)
#define HW_NGPCOLOR (2)
#define HW_SELECT_END (3)
#define SOC_K1GE (0)
#define SOC_K2GE (1)
/** Game screen width in pixels */
#define GAME_WIDTH (160)
/** Game screen height in pixels */
#define GAME_HEIGHT (152)
geptr .req r12
;@ K2GE.s
.struct 0
scanline: .long 0 ;@ These 3 must be first in state.
nextLineChange: .long 0
lineState: .long 0
k2GEState: ;@
k2GERegs:
kgeWinXPos: .byte 0 ;@ Window X-Position
kgeWinYPos: .byte 0 ;@ Window Y-Position
kgeWinXSize: .byte 0 ;@ Window X-Size
kgeWinYSize: .byte 0 ;@ Window Y-Size
kgeFGXScroll: .byte 0,0 ;@ Foreground X-Scroll
kgeFGYScroll: .byte 0,0 ;@ Foreground Y-Scroll
kgeBGXScroll: .byte 0,0 ;@ Background X-Scroll
kgeBGYScroll: .byte 0,0 ;@ Background Y-Scroll
kgeSprXOfs: .byte 0
kgeSprYOfs: .byte 0
kgeIrqEnable: .byte 0
kgeRef: .byte 0
kgeBGCol: .byte 0
kgeBGPrio: .byte 0
kgeLedEnable: .byte 0
kgeLedBlink: .byte 0
kgeMode: .byte 0
kgeModeChange: .byte 0
kgeLedOnOff: .byte 0 ;@ Bit 0, Led On/Off.
kgeModel: .byte 0 ;@ SOC_K2GE / SOC_K1GE.
scrollLine: .long 0 ;@ Last write to scroll registers was when?
ledCounter: .long 0
windowData: .long 0
k2GEStateSize:
kgeBuffSetting: .byte 0
kgePadding1: .space 3
frameIrqFunc: .long 0 ;@ V-Blank Irq func ptr
hblankIrqFunc: .long 0 ;@ H-Blank Irq func ptr
dirtyPtr: .long 0
gfxRAMBuffPtr: .long 0
gfxRAM: .long 0 ;@ 0x3000
sprRAM: .long 0 ;@ 0x0140
paletteMonoRAM: .long 0 ;@ 0x0020
paletteRAM: .long 0 ;@ 0x0200
gfxRAMSwap: .long 0 ;@ 0x3000
scrollBuff: .long 0
k2GESize:
;@----------------------------------------------------------------------------