mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
osborne1: show contents of main video memory in F4 tilemap viewer
intended for testing/debugging/curiosity purposes only doesn't honour underline and dim bits or scroll registers
This commit is contained in:
parent
8e75b5374b
commit
03050aab9e
@ -30,6 +30,7 @@ public:
|
||||
osborne1_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_speaker(*this, "speaker"),
|
||||
m_pia0(*this, "pia_0"),
|
||||
m_pia1(*this, "pia_1"),
|
||||
@ -54,6 +55,8 @@ public:
|
||||
m_bank_1xxx(*this, "bank_1xxx"),
|
||||
m_bank_fxxx(*this, "bank_fxxx"),
|
||||
m_video_timer(NULL),
|
||||
m_p_chargen(NULL),
|
||||
m_tilemap(NULL),
|
||||
m_acia_rxc_txc_timer(NULL)
|
||||
{ }
|
||||
|
||||
@ -84,6 +87,7 @@ public:
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<pia6821_device> m_pia0;
|
||||
required_device<pia6821_device> m_pia1;
|
||||
@ -98,6 +102,8 @@ protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
TIMER_CALLBACK_MEMBER(video_callback);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
|
||||
bool set_rom_mode(UINT8 value);
|
||||
bool set_bit_9(UINT8 value);
|
||||
void update_irq();
|
||||
@ -142,6 +148,7 @@ protected:
|
||||
emu_timer *m_video_timer;
|
||||
bitmap_ind16 m_bitmap;
|
||||
UINT8 *m_p_chargen;
|
||||
tilemap_t *m_tilemap;
|
||||
|
||||
// SCREEN-PAC registers
|
||||
UINT8 m_resolution;
|
||||
|
@ -96,7 +96,10 @@ WRITE8_MEMBER( osborne1_state::bank_2xxx_3xxx_w )
|
||||
WRITE8_MEMBER( osborne1_state::videoram_w )
|
||||
{
|
||||
// Attribute RAM is only one bit wide - low seven bits are discarded and read back high
|
||||
if (m_bit_9) data |= 0x7F;
|
||||
if (m_bit_9)
|
||||
data |= 0x7F;
|
||||
else
|
||||
m_tilemap->mark_tile_dirty(offset);
|
||||
reinterpret_cast<UINT8 *>(m_bank_fxxx->base())[offset] = data;
|
||||
}
|
||||
|
||||
@ -255,6 +258,10 @@ DRIVER_INIT_MEMBER( osborne1_state, osborne1 )
|
||||
|
||||
m_p_chargen = memregion("chargen")->base();
|
||||
m_video_timer = timer_alloc(TIMER_VIDEO);
|
||||
m_tilemap = &machine().tilemap().create(
|
||||
m_gfxdecode,
|
||||
tilemap_get_info_delegate(FUNC(osborne1_state::get_tile_info), this), TILEMAP_SCAN_ROWS,
|
||||
8, 10, 128, 32);
|
||||
|
||||
m_acia_rxc_txc_timer = timer_alloc(TIMER_ACIA_RXC_TXC);
|
||||
|
||||
@ -437,6 +444,13 @@ TIMER_CALLBACK_MEMBER(osborne1_state::video_callback)
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(osborne1_state::get_tile_info)
|
||||
{
|
||||
// The gfxdecode and tilemap aren't actually used for drawing, they just look nice in the F4 GFX viewer
|
||||
tileinfo.set(0, m_ram->pointer()[0xF000 | tile_index] & 0x7F, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
bool osborne1_state::set_rom_mode(UINT8 value)
|
||||
{
|
||||
if (value != m_rom_mode)
|
||||
|
Loading…
Reference in New Issue
Block a user