pyboy 2.2.0__tar.gz → 2.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyboy-2.2.0/pyboy.egg-info → pyboy-2.2.2}/PKG-INFO +1 -1
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/screen.py +1 -4
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/tile.pxd +2 -2
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/tile.py +2 -2
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/base_mbc.pxd +1 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/base_mbc.py +4 -7
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/mbc1.py +7 -11
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cpu.pxd +0 -3
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cpu.py +0 -8
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/lcd.pxd +36 -15
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/lcd.py +245 -177
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/mb.py +2 -2
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/opcodes.py +13 -7
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/opcodes_gen.py +9 -3
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/debug.pxd +4 -4
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/pyboy.py +5 -7
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/utils.pxd +1 -1
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/utils.py +2 -5
- {pyboy-2.2.0 → pyboy-2.2.2/pyboy.egg-info}/PKG-INFO +1 -1
- {pyboy-2.2.0 → pyboy-2.2.2}/pyproject.toml +1 -1
- {pyboy-2.2.0 → pyboy-2.2.2}/LICENSE.md +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/MANIFEST.in +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/README.md +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/__init__.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/__main__.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/__init__.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/constants.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/memory_scanner.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/memory_scanner.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/screen.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/sprite.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/sprite.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/tilemap.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/api/tilemap.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/conftest.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/__init__.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/bootrom.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/bootrom.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/bootrom_cgb.bin +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/bootrom_dmg.bin +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/__init__.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/cartridge.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/cartridge.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/mbc1.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/mbc2.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/mbc2.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/mbc3.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/mbc3.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/mbc5.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/mbc5.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/rtc.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/cartridge/rtc.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/interaction.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/interaction.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/mb.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/opcodes.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/ram.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/ram.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/sound.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/sound.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/timer.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/core/timer.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/default_rom.gb +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/logging/__init__.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/logging/_logging.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/logging/logging.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/logging/logging.pyx +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/__init__.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/auto_pause.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/auto_pause.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/base_plugin.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/base_plugin.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/debug.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/debug_prompt.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/debug_prompt.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/disable_input.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/disable_input.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/font.txt +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_kirby_dream_land.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_kirby_dream_land.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_pokemon_gen1.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_pokemon_gen1.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_pokemon_pinball.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_pokemon_pinball.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_super_mario_land.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_super_mario_land.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_tetris.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/game_wrapper_tetris.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/manager.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/manager.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/manager_gen.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/record_replay.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/record_replay.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/rewind.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/rewind.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/screen_recorder.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/screen_recorder.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/screenshot_recorder.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/screenshot_recorder.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/window_null.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/window_null.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/window_open_gl.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/window_open_gl.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/window_sdl2.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/plugins/window_sdl2.py +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy/pyboy.pxd +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy.egg-info/SOURCES.txt +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy.egg-info/dependency_links.txt +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy.egg-info/entry_points.txt +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy.egg-info/not-zip-safe +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy.egg-info/requires.txt +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/pyboy.egg-info/top_level.txt +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/setup.cfg +0 -0
- {pyboy-2.2.0 → pyboy-2.2.2}/setup.py +0 -0
|
@@ -202,12 +202,9 @@ class Screen:
|
|
|
202
202
|
list:
|
|
203
203
|
Nested list of SCX, SCY, WX and WY for each scanline (144x4). Returns (0, 0, 0, 0) when LCD is off.
|
|
204
204
|
"""
|
|
205
|
-
# self.tilemap_position_list = np.asarray(self.mb.lcd.renderer._scanlineparameters, dtype=np.uint8).reshape(144, 5)[:, :4]
|
|
206
|
-
# self.tilemap_position_list = self.mb.lcd.renderer._scanlineparameters
|
|
207
205
|
|
|
208
|
-
# # return self.mb.lcd.renderer._scanlineparameters
|
|
209
206
|
if self.mb.lcd._LCDC.lcd_enable:
|
|
210
|
-
return [[line[0], line[1], line[2], line[3]] for line in self.mb.lcd.
|
|
207
|
+
return [[line[0], line[1], line[2], line[3]] for line in self.mb.lcd._scanlineparameters]
|
|
211
208
|
else:
|
|
212
209
|
return [[0, 0, 0, 0] for line in range(144)]
|
|
213
210
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import cython
|
|
7
7
|
|
|
8
|
-
from libc.stdint cimport uint8_t, uint16_t, uint32_t
|
|
8
|
+
from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
|
|
9
9
|
|
|
10
10
|
from pyboy cimport utils
|
|
11
11
|
from pyboy.core.mb cimport Motherboard
|
|
@@ -25,5 +25,5 @@ cdef class Tile:
|
|
|
25
25
|
cpdef object ndarray(self) noexcept
|
|
26
26
|
|
|
27
27
|
cdef uint32_t[:,:] data # TODO: Add to locals instead
|
|
28
|
-
@cython.locals(byte1=uint8_t, byte2=uint8_t, colorcode=
|
|
28
|
+
@cython.locals(byte1=uint8_t, byte2=uint8_t, colorcode=uint64_t)
|
|
29
29
|
cdef uint32_t[:,:] _image_data(self) noexcept
|
|
@@ -190,9 +190,9 @@ class Tile:
|
|
|
190
190
|
byte1 = self.mb.lcd.VRAM1[self.data_address + k - VRAM_OFFSET]
|
|
191
191
|
byte2 = self.mb.lcd.VRAM1[self.data_address + k + 1 - VRAM_OFFSET]
|
|
192
192
|
|
|
193
|
+
colorcode = self.mb.lcd.renderer.colorcode(byte1, byte2)
|
|
193
194
|
for x in range(8):
|
|
194
|
-
|
|
195
|
-
self.data[k // 2][x] = self.mb.lcd.BGP.getcolor(colorcode)
|
|
195
|
+
self.data[k // 2][x] = self.mb.lcd.BGP.getcolor((colorcode >> x * 8) & 0xFF)
|
|
196
196
|
return self.data
|
|
197
197
|
|
|
198
198
|
def __eq__(self, other):
|
|
@@ -39,8 +39,9 @@ class BaseMBC:
|
|
|
39
39
|
self.rambank_enabled = False
|
|
40
40
|
self.rambank_selected = 0
|
|
41
41
|
self.rombank_selected = 1
|
|
42
|
+
self.rombank_selected_low = 0
|
|
42
43
|
|
|
43
|
-
self.cgb = bool(self.
|
|
44
|
+
self.cgb = bool(self.rombanks[0, 0x0143] >> 7)
|
|
44
45
|
|
|
45
46
|
if not os.path.exists(self.filename):
|
|
46
47
|
logger.debug("No RAM file found. Skipping.")
|
|
@@ -118,11 +119,7 @@ class BaseMBC:
|
|
|
118
119
|
logger.error("Invalid override address: %0.4x", address)
|
|
119
120
|
|
|
120
121
|
def getitem(self, address):
|
|
121
|
-
if
|
|
122
|
-
return self.rombanks[0, address]
|
|
123
|
-
elif 0x4000 <= address < 0x8000:
|
|
124
|
-
return self.rombanks[self.rombank_selected, address - 0x4000]
|
|
125
|
-
elif 0xA000 <= address < 0xC000:
|
|
122
|
+
if 0xA000 <= address < 0xC000:
|
|
126
123
|
# if not self.rambank_initialized:
|
|
127
124
|
# logger.error("RAM banks not initialized: 0.4x", address)
|
|
128
125
|
|
|
@@ -149,7 +146,7 @@ class BaseMBC:
|
|
|
149
146
|
"Number of RAM banks: %s" % len(self.rambanks),
|
|
150
147
|
"Active RAM bank: %s" % self.rambank_selected,
|
|
151
148
|
"Battery: %s" % self.battery,
|
|
152
|
-
"RTC: %s" % self.
|
|
149
|
+
"RTC: %s" % self.rtc_enabled
|
|
153
150
|
])
|
|
154
151
|
|
|
155
152
|
|
|
@@ -37,19 +37,15 @@ class MBC1(BaseMBC):
|
|
|
37
37
|
self.rambanks[self.rambank_selected % self.external_ram_count, address - 0xA000] = value
|
|
38
38
|
# else:
|
|
39
39
|
# logger.error("Invalid writing address: %0.4x", address)
|
|
40
|
+
if self.memorymodel == 1:
|
|
41
|
+
self.rombank_selected_low = (self.bank_select_register2 << 5) % self.external_rom_count
|
|
42
|
+
else:
|
|
43
|
+
self.rombank_selected_low = 0
|
|
44
|
+
self.rombank_selected = ((self.bank_select_register2 << 5) |
|
|
45
|
+
self.bank_select_register1) % self.external_rom_count
|
|
40
46
|
|
|
41
47
|
def getitem(self, address):
|
|
42
|
-
if
|
|
43
|
-
if self.memorymodel == 1:
|
|
44
|
-
self.rombank_selected = (self.bank_select_register2 << 5) % self.external_rom_count
|
|
45
|
-
else:
|
|
46
|
-
self.rombank_selected = 0
|
|
47
|
-
return self.rombanks[self.rombank_selected, address]
|
|
48
|
-
elif 0x4000 <= address < 0x8000:
|
|
49
|
-
self.rombank_selected = \
|
|
50
|
-
((self.bank_select_register2 << 5) | self.bank_select_register1) % self.external_rom_count
|
|
51
|
-
return self.rombanks[self.rombank_selected, address - 0x4000]
|
|
52
|
-
elif 0xA000 <= address < 0xC000:
|
|
48
|
+
if 0xA000 <= address < 0xC000:
|
|
53
49
|
if not self.rambank_initialized:
|
|
54
50
|
logger.error("RAM banks not initialized: %0.4x", address)
|
|
55
51
|
|
|
@@ -18,14 +18,6 @@ logger = pyboy.logging.get_logger(__name__)
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class CPU:
|
|
21
|
-
def set_bc(self, x):
|
|
22
|
-
self.B = x >> 8
|
|
23
|
-
self.C = x & 0x00FF
|
|
24
|
-
|
|
25
|
-
def set_de(self, x):
|
|
26
|
-
self.D = x >> 8
|
|
27
|
-
self.E = x & 0x00FF
|
|
28
|
-
|
|
29
21
|
def __init__(self, mb):
|
|
30
22
|
self.A = 0
|
|
31
23
|
self.F = 0
|
|
@@ -47,8 +47,9 @@ cdef class LCD:
|
|
|
47
47
|
cdef PaletteRegister OBP0
|
|
48
48
|
cdef PaletteRegister OBP1
|
|
49
49
|
cdef Renderer renderer
|
|
50
|
+
cdef uint8_t[144][5] _scanlineparameters
|
|
50
51
|
|
|
51
|
-
@cython.locals(interrupt_flag=uint8_t)
|
|
52
|
+
@cython.locals(interrupt_flag=uint8_t,bx=int,by=int,wx=int,wy=int)
|
|
52
53
|
cdef uint8_t tick(self, int) noexcept nogil
|
|
53
54
|
cdef int64_t cycles_to_interrupt(self) noexcept nogil
|
|
54
55
|
|
|
@@ -62,8 +63,8 @@ cdef class LCD:
|
|
|
62
63
|
cdef void save_state(self, IntIOInterface) noexcept
|
|
63
64
|
cdef void load_state(self, IntIOInterface, int) noexcept
|
|
64
65
|
|
|
65
|
-
cdef (int, int) getwindowpos(self) noexcept nogil
|
|
66
|
-
cdef (int, int) getviewport(self) noexcept nogil
|
|
66
|
+
cdef inline (int, int) getwindowpos(self) noexcept nogil
|
|
67
|
+
cdef inline (int, int) getviewport(self) noexcept nogil
|
|
67
68
|
|
|
68
69
|
# CGB
|
|
69
70
|
cdef bint cgb
|
|
@@ -108,6 +109,9 @@ cdef class LCDCRegister:
|
|
|
108
109
|
cdef bint background_enable
|
|
109
110
|
cdef bint cgb_master_priority
|
|
110
111
|
|
|
112
|
+
cdef uint16_t backgroundmap_offset
|
|
113
|
+
cdef uint16_t windowmap_offset
|
|
114
|
+
|
|
111
115
|
cpdef int _get_sprite_height(self)
|
|
112
116
|
|
|
113
117
|
cdef class Renderer:
|
|
@@ -124,19 +128,19 @@ cdef class Renderer:
|
|
|
124
128
|
cdef array _tilecache0_raw, _spritecache0_raw, _spritecache1_raw
|
|
125
129
|
cdef uint32_t[:,:] _screenbuffer
|
|
126
130
|
cdef uint8_t[:,:] _screenbuffer_attributes
|
|
127
|
-
cdef
|
|
131
|
+
cdef uint8_t[:,:] _tilecache0, _spritecache0, _spritecache1
|
|
132
|
+
cdef uint64_t[:] _tilecache0_64, _tilecache1_64, _spritecache0_64, _spritecache1_64
|
|
133
|
+
cdef uint32_t[:] colorcode_table
|
|
128
134
|
|
|
129
135
|
cdef int[10] sprites_to_render
|
|
130
136
|
cdef int ly_window
|
|
131
137
|
cdef void invalidate_tile(self, int, int) noexcept nogil
|
|
132
138
|
|
|
133
|
-
cdef uint8_t[144][5] _scanlineparameters
|
|
134
|
-
|
|
135
139
|
cdef void blank_screen(self, LCD) noexcept nogil
|
|
136
140
|
|
|
137
141
|
# CGB
|
|
138
142
|
cdef array _tilecache1_raw
|
|
139
|
-
cdef
|
|
143
|
+
cdef uint8_t[:,:] _tilecache1
|
|
140
144
|
|
|
141
145
|
@cython.locals(
|
|
142
146
|
bx=int,
|
|
@@ -150,12 +154,24 @@ cdef class Renderer:
|
|
|
150
154
|
bg_priority=bint,
|
|
151
155
|
xx=int,
|
|
152
156
|
yy=int,
|
|
153
|
-
tilecache=
|
|
157
|
+
tilecache=uint8_t[:,:],
|
|
154
158
|
bg_priority_apply=uint32_t,
|
|
155
159
|
col0=uint8_t,
|
|
160
|
+
pixel=uint32_t,
|
|
156
161
|
)
|
|
157
162
|
cdef void scanline(self, LCD, int) noexcept nogil
|
|
158
163
|
|
|
164
|
+
@cython.locals(tile_addr=uint64_t, tile=int)
|
|
165
|
+
cdef inline (int, int, uint16_t) _get_tile(self, uint8_t, uint8_t, uint16_t, LCD) noexcept nogil
|
|
166
|
+
cdef inline (int, int, uint8_t, bint, uint32_t, bint) _get_tile_cgb(self, uint8_t, uint8_t, uint16_t, LCD) noexcept nogil
|
|
167
|
+
@cython.locals(col0=uint8_t)
|
|
168
|
+
cdef inline void _pixel(self, uint8_t[:,:], uint32_t, int, int, int, int, uint32_t) noexcept nogil
|
|
169
|
+
cdef int scanline_background(self, int, int, int, int, int, LCD) noexcept nogil
|
|
170
|
+
cdef int scanline_window(self, int, int, int, int, int, LCD) noexcept nogil
|
|
171
|
+
cdef int scanline_background_cgb(self, int, int, int, int, int, LCD) noexcept nogil
|
|
172
|
+
cdef int scanline_window_cgb(self, int, int, int, int, int, LCD) noexcept nogil
|
|
173
|
+
cdef int scanline_blank(self, int, int, int, LCD) noexcept nogil
|
|
174
|
+
|
|
159
175
|
@cython.locals(
|
|
160
176
|
spriteheight=int,
|
|
161
177
|
spritecount=int,
|
|
@@ -169,7 +185,7 @@ cdef class Renderer:
|
|
|
169
185
|
yflip=bint,
|
|
170
186
|
spritepriority=bint,
|
|
171
187
|
palette=uint8_t,
|
|
172
|
-
spritecache=
|
|
188
|
+
spritecache=uint8_t[:,:],
|
|
173
189
|
dy=int,
|
|
174
190
|
dx=int,
|
|
175
191
|
yy=int,
|
|
@@ -180,7 +196,6 @@ cdef class Renderer:
|
|
|
180
196
|
)
|
|
181
197
|
cdef void scanline_sprites(self, LCD, int, uint32_t[:,:], uint8_t[:,:], bint) noexcept nogil
|
|
182
198
|
cdef void sort_sprites(self, int) noexcept nogil
|
|
183
|
-
cdef inline uint8_t color_code(self, uint8_t, uint8_t, uint8_t) noexcept nogil
|
|
184
199
|
|
|
185
200
|
cdef void clear_cache(self) noexcept nogil
|
|
186
201
|
cdef void clear_tilecache0(self) noexcept nogil
|
|
@@ -194,7 +209,8 @@ cdef class Renderer:
|
|
|
194
209
|
y=int,
|
|
195
210
|
byte1=uint8_t,
|
|
196
211
|
byte2=uint8_t,
|
|
197
|
-
|
|
212
|
+
colorcode_low=uint64_t,
|
|
213
|
+
colorcode_high=uint64_t,
|
|
198
214
|
)
|
|
199
215
|
cdef void update_tilecache0(self, LCD, int, int) noexcept nogil
|
|
200
216
|
@cython.locals(
|
|
@@ -204,7 +220,8 @@ cdef class Renderer:
|
|
|
204
220
|
y=int,
|
|
205
221
|
byte1=uint8_t,
|
|
206
222
|
byte2=uint8_t,
|
|
207
|
-
|
|
223
|
+
colorcode_low=uint64_t,
|
|
224
|
+
colorcode_high=uint64_t,
|
|
208
225
|
)
|
|
209
226
|
cdef void update_tilecache1(self, LCD, int, int) noexcept nogil # CGB Only
|
|
210
227
|
@cython.locals(
|
|
@@ -214,7 +231,8 @@ cdef class Renderer:
|
|
|
214
231
|
y=int,
|
|
215
232
|
byte1=uint8_t,
|
|
216
233
|
byte2=uint8_t,
|
|
217
|
-
|
|
234
|
+
colorcode_low=uint64_t,
|
|
235
|
+
colorcode_high=uint64_t,
|
|
218
236
|
)
|
|
219
237
|
cdef void update_spritecache0(self, LCD, int, int) noexcept nogil
|
|
220
238
|
@cython.locals(
|
|
@@ -224,10 +242,13 @@ cdef class Renderer:
|
|
|
224
242
|
y=int,
|
|
225
243
|
byte1=uint8_t,
|
|
226
244
|
byte2=uint8_t,
|
|
227
|
-
|
|
245
|
+
colorcode_low=uint64_t,
|
|
246
|
+
colorcode_high=uint64_t,
|
|
228
247
|
)
|
|
229
248
|
cdef void update_spritecache1(self, LCD, int, int) noexcept nogil
|
|
230
249
|
|
|
250
|
+
@cython.locals(colorcode_low=uint64_t, colorcode_high=uint64_t)
|
|
251
|
+
cdef inline uint64_t colorcode(self, uint64_t, uint64_t) noexcept nogil
|
|
231
252
|
|
|
232
253
|
cdef void save_state(self, IntIOInterface) noexcept
|
|
233
254
|
cdef void load_state(self, IntIOInterface, int) noexcept
|
|
@@ -240,7 +261,7 @@ cdef class Renderer:
|
|
|
240
261
|
vertflip = uint8_t,
|
|
241
262
|
bg_priority = uint8_t,
|
|
242
263
|
)
|
|
243
|
-
cdef (int, int, int, int, int) _cgb_get_background_map_attributes(self, LCD, int) noexcept nogil
|
|
264
|
+
cdef inline (int, int, int, int, int) _cgb_get_background_map_attributes(self, LCD, int) noexcept nogil
|
|
244
265
|
|
|
245
266
|
cdef class CGBLCD(LCD):
|
|
246
267
|
pass
|