mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
misc/policetr: Use BT481 device
This commit is contained in:
parent
ee01ec6aa3
commit
bd65f40587
@ -244,11 +244,6 @@ void policetr_state::speedup_w(offs_t offset, uint32_t data, uint32_t mem_mask)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void policetr_state::ramdac_map(address_map &map)
|
||||
{
|
||||
map(0x000, 0x2ff).rw(m_ramdac, FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb888_w));
|
||||
}
|
||||
|
||||
void policetr_state::mem(address_map &map)
|
||||
{
|
||||
map.global_mask(0x3fffffff);
|
||||
@ -260,8 +255,9 @@ void policetr_state::mem(address_map &map)
|
||||
map(0x00600002, 0x00600002).r(FUNC(policetr_state::bsmt2000_data_r));
|
||||
map(0x00700000, 0x00700003).w(FUNC(policetr_state::bsmt2000_reg_w));
|
||||
map(0x00800000, 0x00800003).w(FUNC(policetr_state::bsmt2000_data_w));
|
||||
map(0x00900001, 0x00900001).w(m_ramdac, FUNC(ramdac_device::index_w));
|
||||
map(0x00920001, 0x00920001).w(m_ramdac, FUNC(ramdac_device::pal_w));
|
||||
map(0x00900001, 0x00900001).w(m_ramdac, FUNC(bt481_device::address_w));
|
||||
map(0x00920001, 0x00920001).w(m_ramdac, FUNC(bt481_device::palette_w));
|
||||
map(0x00940001, 0x00940001).w(m_ramdac, FUNC(bt481_device::mask_w));
|
||||
map(0x00a00000, 0x00a00003).w(FUNC(policetr_state::control_w));
|
||||
map(0x00a00000, 0x00a00003).portr("IN0");
|
||||
map(0x00a20000, 0x00a20003).portr("IN1");
|
||||
@ -277,8 +273,9 @@ void sshooter_state::mem(address_map &map)
|
||||
|
||||
map(0x00000000, 0x0001ffff).ram().share(m_rambase);
|
||||
map(0x00200000, 0x00200003).w(FUNC(sshooter_state::bsmt2000_data_w));
|
||||
map(0x00300001, 0x00300001).w(m_ramdac, FUNC(ramdac_device::index_w));
|
||||
map(0x00320001, 0x00320001).w(m_ramdac, FUNC(ramdac_device::pal_w));
|
||||
map(0x00300001, 0x00300001).w(m_ramdac, FUNC(bt481_device::address_w));
|
||||
map(0x00320001, 0x00320001).w(m_ramdac, FUNC(bt481_device::palette_w));
|
||||
map(0x00340001, 0x00340001).w(m_ramdac, FUNC(bt481_device::mask_w));
|
||||
map(0x00400000, 0x00400003).r(FUNC(sshooter_state::video_r));
|
||||
map(0x00500000, 0x00500003).nopw(); // copies ROM here at startup, plus checksum
|
||||
map(0x00600002, 0x00600002).r(FUNC(sshooter_state::bsmt2000_data_r));
|
||||
@ -452,10 +449,7 @@ void policetr_state::policetr(machine_config &config)
|
||||
m_screen->set_screen_update(FUNC(policetr_state::screen_update));
|
||||
m_screen->screen_vblank().set(FUNC(policetr_state::vblank));
|
||||
|
||||
PALETTE(config, m_palette).set_entries(256);
|
||||
|
||||
RAMDAC(config, m_ramdac, 0, m_palette); // BT481A Palette RAMDAC
|
||||
m_ramdac->set_addrmap(0, &policetr_state::ramdac_map);
|
||||
BT481(config, m_ramdac, 0); // Bt481AKPJ110
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, m_lspeaker).front_left();
|
||||
|
@ -9,8 +9,7 @@
|
||||
#include "cpu/mips/mips1.h"
|
||||
#include "machine/eepromser.h"
|
||||
#include "sound/bsmt2000.h"
|
||||
#include "video/ramdac.h"
|
||||
#include "emupal.h"
|
||||
#include "video/bt48x.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
@ -37,7 +36,6 @@ protected:
|
||||
m_rspeaker(*this, "rspeaker"),
|
||||
m_eeprom(*this, "eeprom"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_ramdac(*this, "ramdac"),
|
||||
m_leds(*this, "leds%u", 0U),
|
||||
m_gun_x_io(*this, "GUNX%u", 1U),
|
||||
@ -51,8 +49,6 @@ protected:
|
||||
|
||||
void mem(address_map &map) ATTR_COLD;
|
||||
|
||||
void ramdac_map(address_map &map) ATTR_COLD;
|
||||
|
||||
void control_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
|
||||
void speedup_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
|
||||
|
||||
@ -75,8 +71,7 @@ protected:
|
||||
required_device<speaker_device> m_rspeaker;
|
||||
required_device<eeprom_serial_93cxx_device> m_eeprom;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<ramdac_device> m_ramdac;
|
||||
required_device<bt481_device> m_ramdac;
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -306,16 +306,15 @@ uint32_t policetr_state::video_r()
|
||||
uint32_t policetr_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
const int width = cliprect.width();
|
||||
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
|
||||
|
||||
/* render all the scanlines from the dstbitmap to MAME's bitmap */
|
||||
for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
|
||||
{
|
||||
uint8_t const *src = &m_dstbitmap->pix(y,cliprect.min_x);
|
||||
uint32_t *dst = &bitmap.pix(y,cliprect.min_x);
|
||||
uint8_t const *src = &m_dstbitmap->pix(y, cliprect.min_x);
|
||||
uint32_t *dst = &bitmap.pix(y, cliprect.min_x);
|
||||
//draw_scanline8(bitmap, cliprect.min_x, y, width, src, nullptr);
|
||||
for (int x = 0; x < width; x++, dst++, src++)
|
||||
*dst = palette[*src];
|
||||
*dst = m_ramdac->pixel_select(*src);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user