mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
Williams: set the videoram as a single 48k block (which it is), derive everything from it
This commit is contained in:
parent
d8eef5bfa2
commit
fe09cd8170
@ -554,8 +554,8 @@ void mayday_state::main_map(address_map &map)
|
||||
|
||||
void williams_state::base_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x8fff).bankr("mainbank").writeonly().share("videoram");
|
||||
map(0x9000, 0xbfff).ram();
|
||||
map(0x0000, 0xbfff).ram().share("videoram");
|
||||
map(0x0000, 0x8fff).bankr("mainbank");
|
||||
map(0xc000, 0xc00f).mirror(0x03f0).writeonly().share("paletteram");
|
||||
map(0xc804, 0xc807).mirror(0x00f0).rw(m_pia[0], FUNC(pia6821_device::read), FUNC(pia6821_device::write));
|
||||
map(0xc80c, 0xc80f).mirror(0x00f0).rw(m_pia[1], FUNC(pia6821_device::read), FUNC(pia6821_device::write));
|
||||
@ -625,12 +625,9 @@ void spdball_state::main_map(address_map &map)
|
||||
|
||||
void blaster_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x3fff).bankr("mainbank").writeonly().share("videoram");
|
||||
map(0x4000, 0x8fff).bankr("blaster_bankb").writeonly().share("bankb");
|
||||
map(0x9000, 0xbaff).ram();
|
||||
map(0xbb00, 0xbbff).ram().share("blaster_pal0");
|
||||
map(0xbc00, 0xbcff).ram().share("blaster_scan");
|
||||
map(0xbd00, 0xbfff).ram();
|
||||
map(0x0000, 0xbfff).ram().share("videoram");
|
||||
map(0x0000, 0x3fff).bankr("mainbank");
|
||||
map(0x4000, 0x8fff).bankr("blaster_bankb");
|
||||
map(0xc000, 0xc00f).mirror(0x03f0).writeonly().share("paletteram");
|
||||
map(0xc804, 0xc807).mirror(0x00f0).rw(m_pia[0], FUNC(pia6821_device::read), FUNC(pia6821_device::write));
|
||||
map(0xc80c, 0xc80f).mirror(0x00f0).rw(m_pia[1], FUNC(pia6821_device::read), FUNC(pia6821_device::write));
|
||||
|
@ -266,8 +266,6 @@ public:
|
||||
blaster_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
williams_state(mconfig, type, tag),
|
||||
m_soundcpu_b(*this, "soundcpu_b"),
|
||||
m_palette_0(*this, "blaster_pal0"),
|
||||
m_scanline_control(*this, "blaster_scan"),
|
||||
m_bankb(*this, "blaster_bankb"),
|
||||
m_muxa(*this, "mux_a"),
|
||||
m_muxb(*this, "mux_b")
|
||||
@ -282,8 +280,6 @@ private:
|
||||
virtual void driver_init() override;
|
||||
|
||||
optional_device<cpu_device> m_soundcpu_b;
|
||||
required_shared_ptr<uint8_t> m_palette_0;
|
||||
required_shared_ptr<uint8_t> m_scanline_control;
|
||||
optional_memory_bank m_bankb;
|
||||
required_device<ls157_x2_device> m_muxa;
|
||||
optional_device<ls157_device> m_muxb;
|
||||
|
@ -234,6 +234,8 @@ uint32_t williams_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
|
||||
|
||||
uint32_t blaster_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
uint8_t *palette_0 = &m_videoram[0xbb00];
|
||||
uint8_t *scanline_control = &m_videoram[0xbc00];
|
||||
rgb_t pens[16];
|
||||
|
||||
/* precompute the palette */
|
||||
@ -242,18 +244,18 @@ uint32_t blaster_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma
|
||||
|
||||
/* if we're blitting from the top, start with a 0 for color 0 */
|
||||
if (cliprect.min_y == screen.visible_area().min_y || !(m_video_control & 1))
|
||||
m_color0 = m_palette->pen_color(m_palette_0[0] ^ 0xff);
|
||||
m_color0 = m_palette->pen_color(palette_0[0] ^ 0xff);
|
||||
|
||||
/* loop over rows */
|
||||
for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
|
||||
{
|
||||
int erase_behind = m_video_control & m_scanline_control[y] & 2;
|
||||
int erase_behind = m_video_control & scanline_control[y] & 2;
|
||||
uint8_t *const source = &m_videoram[y];
|
||||
uint32_t *const dest = &bitmap.pix(y);
|
||||
|
||||
/* latch a new color0 pen? */
|
||||
if (m_video_control & m_scanline_control[y] & 1)
|
||||
m_color0 = m_palette->pen_color(m_palette_0[y] ^ 0xff);
|
||||
if (m_video_control & scanline_control[y] & 1)
|
||||
m_color0 = m_palette->pen_color(palette_0[y] ^ 0xff);
|
||||
|
||||
/* loop over columns */
|
||||
for (int x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
|
||||
|
Loading…
Reference in New Issue
Block a user