diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2017-01-11 02:36:56 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2017-01-11 02:36:56 -0300 |
commit | 9ff3e63fc8f4005aaeacf07fb58e002539e704d2 (patch) | |
tree | 5f18c8add3d95daad88e372763b7150007b32c85 /src/hardware_data/graphics/ppu_lr35902-cgb.lua | |
parent | 3ec72ed5adb613438f6d250ba8efd03fc807674a (diff) |
Update graphics modes
Diffstat (limited to 'src/hardware_data/graphics/ppu_lr35902-cgb.lua')
-rw-r--r-- | src/hardware_data/graphics/ppu_lr35902-cgb.lua | 214 |
1 files changed, 91 insertions, 123 deletions
diff --git a/src/hardware_data/graphics/ppu_lr35902-cgb.lua b/src/hardware_data/graphics/ppu_lr35902-cgb.lua index 4bb559a..df93988 100644 --- a/src/hardware_data/graphics/ppu_lr35902-cgb.lua +++ b/src/hardware_data/graphics/ppu_lr35902-cgb.lua @@ -1,20 +1,43 @@ +-- Information: -- +-- PPU (Picture processing unit) -- +-- LR35902 (CGB) without mapper -- + return { screen = { - { - width = 160, - height = 144, - refresh = 59.73, - origin = { - x = 0, - y = 0, - }, + width = 160, + height = 144, + vsync = 59.73, + origin = { + x = 0, + y = 0, }, + -- Total of unique texels, pixels and vertices on VRAM -- + pixels = 21504, + texels = 296, + vertices = false, }, colours = { total = '15bpp', limit = 56, - background = false, - transparent = 'colourKey', + transparent = { + sprite = 'colourKey', + tile = false, + }, + tileDepth = 'colourKey', + palettes = { + { + total = 8, + type = 'spritePerPalette', + colours = 4, + layers = false, + }, + { + total = 8, + type = 'tilePerPalette', + colours = 4, + layers = false, + }, + }, }, meshes = false, shaders = { @@ -27,51 +50,10 @@ return { }, physic = false, sprites = { + -- Limit sprites on screen -- onScreen = 40, + -- Limit sprites on line (scanline) without flickering -- onLine = 10, - palettes = { - specify = true, - { - total = 4, - limit = 3, - keys = 1, - }, - { - total = 4, - limit = 3, - keys = 1, - }, - { - total = 4, - limit = 3, - keys = 1, - }, - { - total = 4, - limit = 3, - keys = 1, - }, - { - total = 4, - limit = 3, - keys = 1, - }, - { - total = 4, - limit = 3, - keys = 1, - }, - { - total = 4, - limit = 3, - keys = 1, - }, - { - total = 4, - limit = 3, - keys = 1, - }, - }, transform = { move = true, rotate = false, @@ -79,6 +61,7 @@ return { shear = false, affine = false, }, + -- Sprite sizes in pixels -- sizes = { { width = 8, @@ -93,79 +76,64 @@ return { tiles = { layers = { { - total = { - x = 32, - y = 32, - 1024, - }, - onScreen = 399, - limit = false, - unique = 256, - independent = false, - palettes = { - specify = true, - { - total = 4, - limit = false, - keys = false, - map = false, - }, - { - total = 4, - limit = false, - keys = false, - map = false, - }, - { - total = 4, - limit = false, - keys = false, - map = false, - }, - { - total = 4, - limit = false, - keys = false, - map = false, - }, - { - total = 4, - limit = false, - keys = false, - map = false, - }, - { - total = 4, - limit = false, - keys = false, - map = false, - }, - { - total = 4, - limit = false, - keys = false, - map = false, - }, - { - total = 4, - limit = false, - keys = false, - map = false, + -- Total tiles and pixels on VRAM -- + onVRAM = { + screenSections = { + all = { + Xtiles = 32, + Ytiles = 32, + tiles = 1024, + pixels = 65536, + }, }, + tiles = 'screenSections', + pixels = 'screenSections', }, - mirror = true, - transform = { - individual = true, - move = true, - rotate = false, - scale = false, - shear = false, - affine = false, + -- Total tiles and pixels on screen -- + onScreen = { + screenSections = { + -- On screen section with support scrolling X and/or Y, -- + -- will be include one tile by axis -- + all = { + Xtiles = 20+1, + Ytiles = 18+1, + tiles = 360+20+18+1, + pixels = 23040, + }, + }, + tiles = 'screenSections', + pixels = 'screenSections', }, - sizes = { - { - width = 8, - height = 8, + -- Total of tiles on VRAM -- + unique = false, + maximum = 256, + mirror = false, + screenSections = { + main = { + optional = false, + moveSection = false, + { + startSection = { + x = 'startVRAM', + y = 'startVRAM', + }, + endSection = { + x = 'endVRAM', + y = 'endVRAM', + }, + size = { + -- Tile size in pixels -- + width = 8, + height = 8, + }, + transform = { + move = true, + rotate = false, + scale = false, + shear = false, + affine = false, + }, + }, }, }, }, |