mirror of
https://github.com/holub/mame
synced 2025-06-06 12:53:46 +03:00
pmac6100: fix boot video [R. Belmont]
This commit is contained in:
parent
5df0d9a59c
commit
bca7fead9f
@ -646,7 +646,7 @@ void mac_state::maciifx_map(address_map &map)
|
||||
|
||||
void mac_state::pwrmac_map(address_map &map)
|
||||
{
|
||||
map(0x00000000, 0x007fffff).ram(); // 8 MB standard
|
||||
map(0x00000000, 0x007fffff).ram().share("vram64"); // 8 MB standard
|
||||
|
||||
map(0x40000000, 0x403fffff).rom().region("bootrom", 0).mirror(0x0fc00000);
|
||||
|
||||
@ -1244,7 +1244,7 @@ void mac_state::pwrmac(machine_config &config)
|
||||
m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
|
||||
m_screen->set_size(1024, 768);
|
||||
m_screen->set_visarea(0, 640-1, 0, 480-1);
|
||||
m_screen->set_screen_update(FUNC(mac_state::screen_update_macrbv));
|
||||
m_screen->set_screen_update(FUNC(mac_state::screen_update_pwrmac));
|
||||
|
||||
PALETTE(config, m_palette).set_entries(256);
|
||||
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
m_main_buffer(true),
|
||||
m_vram(*this,"vram"),
|
||||
m_vram16(*this,"vram16"),
|
||||
m_vram64(*this,"vram64"),
|
||||
m_via2_ca1_hack(0),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette")
|
||||
@ -291,6 +292,7 @@ private:
|
||||
// this is shared among all video setups with vram
|
||||
optional_shared_ptr<uint32_t> m_vram;
|
||||
optional_shared_ptr<uint16_t> m_vram16;
|
||||
optional_shared_ptr<uint64_t> m_vram64;
|
||||
|
||||
// interrupts
|
||||
int m_scc_interrupt, m_via_interrupt, m_via2_interrupt, m_scsi_interrupt, m_asc_interrupt, m_last_taken_interrupt;
|
||||
@ -415,6 +417,7 @@ private:
|
||||
uint32_t screen_update_mac(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_macse30(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_macrbv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_pwrmac(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_macrbvvram(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_macv8(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_macsonora(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
@ -367,6 +367,35 @@ uint32_t mac_state::screen_update_macrbv(screen_device &screen, bitmap_rgb32 &bi
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t mac_state::screen_update_pwrmac(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
uint8_t const *const vram8 = (uint8_t *)m_vram64.target();
|
||||
int hres, vres;
|
||||
|
||||
hres = 640;
|
||||
vres = 480;
|
||||
|
||||
for (int y = 0; y < vres; y++)
|
||||
{
|
||||
uint32_t *scanline = &bitmap.pix(y);
|
||||
for (int x = 0; x < hres; x += 8)
|
||||
{
|
||||
uint8_t const pixels = vram8[(y * (hres / 8)) + ((x / 8) ^ 3)];
|
||||
|
||||
*scanline++ = m_rbv_palette[0x7f | (pixels & 0x80)];
|
||||
*scanline++ = m_rbv_palette[0x7f | ((pixels << 1) & 0x80)];
|
||||
*scanline++ = m_rbv_palette[0x7f | ((pixels << 2) & 0x80)];
|
||||
*scanline++ = m_rbv_palette[0x7f | ((pixels << 3) & 0x80)];
|
||||
*scanline++ = m_rbv_palette[0x7f | ((pixels << 4) & 0x80)];
|
||||
*scanline++ = m_rbv_palette[0x7f | ((pixels << 5) & 0x80)];
|
||||
*scanline++ = m_rbv_palette[0x7f | ((pixels << 6) & 0x80)];
|
||||
*scanline++ = m_rbv_palette[0x7f | ((pixels << 7) & 0x80)];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t mac_state::screen_update_macrbvvram(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int hres, vres;
|
||||
|
Loading…
Reference in New Issue
Block a user