mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 02:18:20 -07:00
minor cleanups
This commit is contained in:
@@ -301,8 +301,6 @@ nv3_coord_16_t nv3_render_get_dfb_position(uint32_t vram_address)
|
||||
else if (nv3->nvbase.svga.bpp == 32)
|
||||
pitch <<= 2;
|
||||
|
||||
//vram_address -= nv3->pgraph.boffset[0];
|
||||
|
||||
pos.y = (vram_address / pitch);
|
||||
pos.x = (vram_address % pitch);
|
||||
|
||||
@@ -529,6 +527,10 @@ void nv3_render_ensure_screen_size(void)
|
||||
/* Blit to the monitor from DFB, 8bpp */
|
||||
void nv3_render_current_bpp_dfb_8(uint32_t address)
|
||||
{
|
||||
/* Broken as fuck early vbios does this. Wtf? */
|
||||
if (!nv3->nvbase.svga.hdisp)
|
||||
return;
|
||||
|
||||
nv3_coord_16_t size = {0};
|
||||
size.x = size.y = 1;
|
||||
|
||||
@@ -543,6 +545,10 @@ void nv3_render_current_bpp_dfb_8(uint32_t address)
|
||||
/* Blit to the monitor from DFB, 15/16bpp */
|
||||
void nv3_render_current_bpp_dfb_16(uint32_t address)
|
||||
{
|
||||
/* Broken as fuck early vbios does this. Wtf? */
|
||||
if (!nv3->nvbase.svga.hdisp)
|
||||
return;
|
||||
|
||||
nv3_coord_16_t size = {0};
|
||||
size.x = size.y = 1;
|
||||
|
||||
@@ -564,6 +570,10 @@ void nv3_render_current_bpp_dfb_16(uint32_t address)
|
||||
/* Blit to the monitor from DFB, 32bpp */
|
||||
void nv3_render_current_bpp_dfb_32(uint32_t address)
|
||||
{
|
||||
/* Broken as fuck early vbios does this. Wtf? */
|
||||
if (!nv3->nvbase.svga.hdisp)
|
||||
return;
|
||||
|
||||
nv3_coord_16_t size = {0};
|
||||
size.x = size.y = 1;
|
||||
|
||||
|
||||
@@ -96,14 +96,14 @@ uint16_t nv3_ramin_read16(uint32_t addr, void* priv)
|
||||
// Read 32-bit ramin
|
||||
uint32_t nv3_ramin_read32(uint32_t addr, void* priv)
|
||||
{
|
||||
if (!nv3) return 0x00;
|
||||
if (!nv3)
|
||||
return 0x00;
|
||||
|
||||
addr &= (nv3->nvbase.svga.vram_max - 1);
|
||||
|
||||
// why does this not work in one line
|
||||
svga_t* svga = &nv3->nvbase.svga;
|
||||
uint32_t* vram_32bit = (uint32_t*)svga->vram;
|
||||
uint32_t raw_addr = addr; // saved after and
|
||||
uint32_t* vram_32bit = (uint32_t*)nv3->nvbase.svga.vram;
|
||||
uint32_t raw_addr = addr; // saved after and logged
|
||||
|
||||
addr ^= (nv3->nvbase.svga.vram_max - 0x10);
|
||||
addr >>= 2; // what
|
||||
|
||||
Reference in New Issue
Block a user