From 9ff3e63fc8f4005aaeacf07fb58e002539e704d2 Mon Sep 17 00:00:00 2001 From: "coadde [Márcio Alexandre Silva Delgado]" Date: Wed, 11 Jan 2017 02:36:56 -0300 Subject: Update graphics modes --- src/hardware_data/graphics/ppu_lr35902-sgb.lua | 151 +++++++++++++++---------- 1 file changed, 91 insertions(+), 60 deletions(-) (limited to 'src/hardware_data/graphics/ppu_lr35902-sgb.lua') diff --git a/src/hardware_data/graphics/ppu_lr35902-sgb.lua b/src/hardware_data/graphics/ppu_lr35902-sgb.lua index fbbfdd3..6df6cfc 100644 --- a/src/hardware_data/graphics/ppu_lr35902-sgb.lua +++ b/src/hardware_data/graphics/ppu_lr35902-sgb.lua @@ -1,29 +1,43 @@ +-- Information: -- +-- PPU (Picture processing unit) -- +-- LR35902 (SGBv1) without mapper -- + return { screen = { - { - width = 160, - height = 144, - refresh = 61.17, - origin = { - x = 0, - y = 0, - }, - }, - { - width = 160, - height = 144, - refresh = 59.73, - origin = { - x = 0, - y = 0, - }, + width = 160, + height = 144, + vsync = 61.17, + origin = { + x = 0, + y = 0, }, + -- Total of unique texels, pixels and vertices on VRAM -- + pixels = 21504, + texels = 296, + vertices = false, }, colours = { total = '15bpp', limit = 10, - background = false, - transparent = 'colourKey', + transparent = { + sprite = 'colourKey', + tile = false, + }, + tileDepth = 'colourKey', + palettes = { + { + total = 2, + type = 'spritePerPalette', + colours = 4, + layers = false, + }, + { + total = 1, + type = 'tilePerPalette', + colours = 4, + layers = false, + }, + }, }, meshes = false, shaders = { @@ -36,21 +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, - }, - }, transform = { move = true, rotate = false, @@ -58,6 +61,7 @@ return { shear = false, affine = false, }, + -- Sprite sizes in pixels -- sizes = { { width = 8, @@ -72,37 +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 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, + }, + }, }, }, }, -- cgit v1.2.3-54-g00ecf