mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
kaneko_grap2: add rle blitter dstaddress (fixes gals gfx issues on 100% clear) [dink]
This commit is contained in:
parent
21e1b48a01
commit
50e62d880f
@ -8,9 +8,6 @@
|
||||
// lots of unknowns, both here and in rendering / mixing 3 chips in gp3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "kaneko_grap2.h"
|
||||
|
||||
@ -83,7 +80,7 @@ uint16_t kaneko_grap2_device::regs1_r(offs_t offset, uint16_t mem_mask)
|
||||
|
||||
case 0xb:
|
||||
{
|
||||
m_regs1_i^=1;
|
||||
m_regs1_i ^= 1;
|
||||
if (m_regs1_i) return 0xfffe;
|
||||
else return 0xffff;
|
||||
}
|
||||
@ -91,7 +88,6 @@ uint16_t kaneko_grap2_device::regs1_r(offs_t offset, uint16_t mem_mask)
|
||||
default:
|
||||
logerror("%s: regs1_r %02x %04x\n", machine().describe_context(), offset, mem_mask);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return 0x0000;
|
||||
@ -99,63 +95,59 @@ uint16_t kaneko_grap2_device::regs1_r(offs_t offset, uint16_t mem_mask)
|
||||
|
||||
|
||||
|
||||
void kaneko_grap2_device::do_rle(uint32_t address)
|
||||
void kaneko_grap2_device::do_rle(uint32_t address, uint32_t dstaddress)
|
||||
{
|
||||
int rle_count = 0;
|
||||
int normal_count = 0;
|
||||
uint32_t dstaddress = 0;
|
||||
uint8_t data;
|
||||
|
||||
uint8_t thebyte;
|
||||
|
||||
while (dstaddress<0x40000)
|
||||
while (dstaddress < 0x40000)
|
||||
{
|
||||
if (rle_count==0 && normal_count==0) // we need a new code byte
|
||||
if (rle_count == 0 && normal_count == 0) // we need a new code byte
|
||||
{
|
||||
thebyte = read_byte(address);
|
||||
data = read_byte(address);
|
||||
|
||||
if ((thebyte & 0x80)) // stream of normal bytes follows
|
||||
if ((data & 0x80)) // stream of normal bytes follows
|
||||
{
|
||||
normal_count = (thebyte & 0x7f)+1;
|
||||
normal_count = (data & 0x7f) + 1;
|
||||
address++;
|
||||
}
|
||||
else // rle block
|
||||
{
|
||||
rle_count = (thebyte & 0x7f)+1;
|
||||
rle_count = (data & 0x7f) + 1;
|
||||
address++;
|
||||
}
|
||||
}
|
||||
else if (rle_count)
|
||||
{
|
||||
thebyte = read_byte(address);
|
||||
m_framebuffer[dstaddress] = thebyte;
|
||||
data = read_byte(address);
|
||||
m_framebuffer[dstaddress] = data;
|
||||
dstaddress++;
|
||||
rle_count--;
|
||||
|
||||
if (rle_count==0)
|
||||
if (rle_count == 0)
|
||||
{
|
||||
address++;
|
||||
}
|
||||
}
|
||||
else if (normal_count)
|
||||
{
|
||||
thebyte = read_byte(address);
|
||||
m_framebuffer[dstaddress] = thebyte;
|
||||
data = read_byte(address);
|
||||
m_framebuffer[dstaddress] = data;
|
||||
dstaddress++;
|
||||
normal_count--;
|
||||
address++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void kaneko_grap2_device::regs1_go_w(uint16_t data)
|
||||
{
|
||||
uint32_t address = m_regs1_address_regs[1]| (m_regs1_address_regs[0]<<16);
|
||||
uint32_t address = m_regs1_address_regs[1] | (m_regs1_address_regs[0] << 16);
|
||||
uint32_t dstaddress = (data & 0x1ff) | ((m_regs2 & 0x1ff) << 9);
|
||||
|
||||
// printf("regs1_go_w? %08x\n",address );
|
||||
if ((data==0x2000) || (data==0x3000)) do_rle(address);
|
||||
if ((data & 0xf000) == 0x3000) do_rle(address, dstaddress);
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
|
||||
void grap2_map(address_map &map) ATTR_COLD;
|
||||
|
||||
void do_rle(uint32_t address);
|
||||
void do_rle(uint32_t address, uint32_t dstaddress);
|
||||
void set_color_555(pen_t color, int rshift, int gshift, int bshift, uint16_t data);
|
||||
|
||||
uint16_t m_framebuffer_scrolly = 0;
|
||||
@ -40,11 +40,9 @@ public:
|
||||
void framebuffer1_scrolly_w(uint16_t data) { m_framebuffer_scrolly = data; }
|
||||
void framebuffer1_scrollx_w(uint16_t data) { m_framebuffer_scrollx = data; }
|
||||
|
||||
|
||||
uint16_t framebuffer1_fbbright1_r() { return m_framebuffer_bright1; }
|
||||
uint16_t framebuffer1_fbbright2_r() { return m_framebuffer_bright2; }
|
||||
|
||||
|
||||
void framebuffer1_fbbright1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { COMBINE_DATA(&m_framebuffer_bright1); }
|
||||
void framebuffer1_fbbright2_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { COMBINE_DATA(&m_framebuffer_bright2); }
|
||||
|
||||
|
@ -2798,7 +2798,7 @@ ROM_START( prolite286 ) // Initialises graphics card, then dies
|
||||
ROM_LOAD16_BYTE( "caf_prolite_odd.bin", 0x10001, 0x8000, CRC(7c2f6f9f) SHA1(6e72f1458308e521e5715cedb83f40ebe0cc4ad7))
|
||||
ROM_END
|
||||
|
||||
// AEG Olympia Olyport 40-21 aka Zenith SuperSport - CPU: AMD N80L286-12/8 - Chipset: Chips P82C2185, P82C211C, P82C206 F-1, P82C212B, P82C604, WD37C65BFM, Hitachi HD6305VOP
|
||||
// AEG Olympia Olyport 40-21 aka Zenith SuperSport - CPU: AMD N80L286-12/8 - Chipset: Chips P82C2185, P82C211C, P82C206 F-1, P82C212B, P82C604, WD37C65BFM, Hitachi HD6305V0P
|
||||
// OSC: 22.500, 24.000 - Video: CGA, LCD with 16 grey intensities - Connectors: CRT, Ext. Bus, RS232C, Printer, Ext.FDD - Mass storage: FDD 1.44MB, HD: Conner CP-323 (IDE with detached controller PCB)
|
||||
ROM_START( olyport40 ) // "+++ ERROR: Fatal Slushware RAM Error +++" / "--- Fatal Error: Cannot Continue! ---" - slushware is a ROM shadowing concept cropping up in Zenith brochures
|
||||
ROM_REGION16_LE(0x20000, "bios", 0)
|
||||
|
Loading…
Reference in New Issue
Block a user