mirror of
https://github.com/holub/mame
synced 2025-05-31 18:11:50 +03:00
Osborne-1 cleanup:
* Use an extra ROM region for the additional Nuevo Video chargen ROM * Use required_region_ptr rather than doing a tagmap lookup on start * Make Alpha Lock a toggling key rather than a fake DIP switch * Add hacky vertical scrolling support to Nuevo Video board
This commit is contained in:
parent
b66f8a83b0
commit
383e5ab7c7
@ -84,7 +84,10 @@ TODO:
|
||||
tested, too.
|
||||
|
||||
* Fix emulation of the Nuevo Video board (scrolling, interrupts, CRTC video
|
||||
RAM updates). It would be nice to get a schematic for this.
|
||||
RAM updates). It would be nice to get a schematic for this. The board
|
||||
doesn't appear to have adders necessary to combine the MA output of the
|
||||
CRTC with the PIA outputs, and without additional connections to the
|
||||
mainboard it would be pretty hard to actually get the PIA output at all.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -207,9 +210,7 @@ static INPUT_PORTS_START( osborne1 )
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_DIPNAME( 0x08, 0, "Alpha Lock" ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_TOGGLE PORT_NAME("Alpha Lock")
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
@ -382,8 +383,11 @@ ROM_START( osborne1nv )
|
||||
|
||||
ROM_REGION( 0x0800, "chargen", 0 )
|
||||
ROM_LOAD( "7a3007-00.ud15", 0x0000, 0x800, CRC(6c1eab0d) SHA1(b04459d377a70abc9155a5486003cb795342c801) )
|
||||
|
||||
ROM_REGION( 0x0800, "nuevo", 0 )
|
||||
ROM_LOAD( "character_generator_6-29-84.14", 0x0000, 0x800, CRC(6c1eab0d) SHA1(b04459d377a70abc9155a5486003cb795342c801) )
|
||||
ROM_END
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
|
||||
COMP( 1981, osborne1, 0, 0, osborne1, osborne1, osborne1_state, osborne1, "Osborne", "Osborne-1", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1984, osborne1nv, osborne1, 0, osborne1nv, osborne1nv, osborne1_state, osborne1, "Osborne/Nuevo", "Osborne-1 (Nuevo Video)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1984, osborne1nv, osborne1, 0, osborne1nv, osborne1nv, osborne1_state, osborne1, "Osborne/Nuevo", "Osborne-1 (Nuevo Video)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -59,11 +59,12 @@ public:
|
||||
m_bank_0xxx(*this, "bank_0xxx"),
|
||||
m_bank_1xxx(*this, "bank_1xxx"),
|
||||
m_bank_fxxx(*this, "bank_fxxx"),
|
||||
m_p_chargen(*this, "chargen"),
|
||||
m_video_timer(nullptr),
|
||||
m_p_chargen(nullptr),
|
||||
m_tilemap(nullptr),
|
||||
m_acia_rxc_txc_timer(nullptr)
|
||||
{ }
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
DECLARE_WRITE8_MEMBER(bank_0xxx_w);
|
||||
@ -91,7 +92,7 @@ public:
|
||||
DECLARE_DRIVER_INIT(osborne1);
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
@ -111,8 +112,8 @@ protected:
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
|
||||
bool set_rom_mode(uint8_t value);
|
||||
bool set_bit_9(uint8_t value);
|
||||
bool set_rom_mode(u8 value);
|
||||
bool set_bit_9(u8 value);
|
||||
void update_irq();
|
||||
void update_acia_rxc_txc();
|
||||
|
||||
@ -135,35 +136,35 @@ protected:
|
||||
required_memory_bank m_bank_0xxx;
|
||||
required_memory_bank m_bank_1xxx;
|
||||
required_memory_bank m_bank_fxxx;
|
||||
required_region_ptr<u8> m_p_chargen;
|
||||
|
||||
// configuration (reloaded on reset)
|
||||
uint8_t m_screen_pac;
|
||||
uint8_t m_acia_rxc_txc_div;
|
||||
uint8_t m_acia_rxc_txc_p_low;
|
||||
uint8_t m_acia_rxc_txc_p_high;
|
||||
u8 m_screen_pac;
|
||||
u8 m_acia_rxc_txc_div;
|
||||
u8 m_acia_rxc_txc_p_low;
|
||||
u8 m_acia_rxc_txc_p_high;
|
||||
|
||||
// bank switch control bits
|
||||
uint8_t m_ub4a_q;
|
||||
uint8_t m_ub6a_q;
|
||||
uint8_t m_rom_mode;
|
||||
uint8_t m_bit_9;
|
||||
u8 m_ub4a_q;
|
||||
u8 m_ub6a_q;
|
||||
u8 m_rom_mode;
|
||||
u8 m_bit_9;
|
||||
|
||||
// onboard video state
|
||||
uint8_t m_scroll_x;
|
||||
uint8_t m_scroll_y;
|
||||
uint8_t m_beep_state;
|
||||
u8 m_scroll_x;
|
||||
u8 m_scroll_y;
|
||||
u8 m_beep_state;
|
||||
emu_timer *m_video_timer;
|
||||
bitmap_ind16 m_bitmap;
|
||||
uint8_t *m_p_chargen;
|
||||
tilemap_t *m_tilemap;
|
||||
|
||||
// SCREEN-PAC registers
|
||||
uint8_t m_resolution;
|
||||
uint8_t m_hc_left;
|
||||
u8 m_resolution;
|
||||
u8 m_hc_left;
|
||||
|
||||
// serial state
|
||||
uint8_t m_acia_irq_state;
|
||||
uint8_t m_acia_rxc_txc_state;
|
||||
u8 m_acia_irq_state;
|
||||
u8 m_acia_rxc_txc_state;
|
||||
emu_timer *m_acia_rxc_txc_timer;
|
||||
};
|
||||
|
||||
@ -173,14 +174,17 @@ class osborne1nv_state : public osborne1_state
|
||||
public:
|
||||
osborne1nv_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
osborne1_state(mconfig, type, tag),
|
||||
m_palette(*this, "palette")
|
||||
{ }
|
||||
m_palette(*this, "palette"),
|
||||
m_p_nuevo(*this, "nuevo")
|
||||
{
|
||||
}
|
||||
|
||||
MC6845_UPDATE_ROW(crtc_update_row);
|
||||
MC6845_ON_UPDATE_ADDR_CHANGED(crtc_update_addr_changed);
|
||||
|
||||
protected:
|
||||
required_device<palette_device> m_palette;
|
||||
required_region_ptr<u8> m_p_nuevo;
|
||||
};
|
||||
|
||||
#endif /* OSBORNE1_H_ */
|
||||
|
@ -270,7 +270,6 @@ DRIVER_INIT_MEMBER( osborne1_state, osborne1 )
|
||||
m_bank_fxxx->configure_entries(0, 1, m_ram->pointer() + 0xF000, 0);
|
||||
m_bank_fxxx->configure_entries(1, 1, m_ram->pointer() + 0x10000, 0);
|
||||
|
||||
m_p_chargen = memregion("chargen")->base();
|
||||
m_video_timer = timer_alloc(TIMER_VIDEO);
|
||||
m_tilemap = &machine().tilemap().create(
|
||||
*m_gfxdecode,
|
||||
@ -516,15 +515,16 @@ void osborne1_state::update_acia_rxc_txc()
|
||||
|
||||
MC6845_UPDATE_ROW(osborne1nv_state::crtc_update_row)
|
||||
{
|
||||
// TODO: work out how scrolling works - it doesn't seem to be using the same PIA output bits
|
||||
// TODO: work out how the scroll offset actually gets here
|
||||
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
|
||||
uint16_t const base = (((m_pia1->b_output() & 0x1F) << 7) + ((ma & 0x3F00) >> 1)) & 0xF80;
|
||||
uint32_t *p = &bitmap.pix32(y);
|
||||
for (uint8_t x = 0; x < x_count; ++x)
|
||||
{
|
||||
uint8_t const chr = m_ram->pointer()[0xF000 + (ma >> 1) + x];
|
||||
uint8_t const clr = (m_ram->pointer()[0x10000 + (ma >> 1) + x] & 0x80) ? 2 : 1;
|
||||
uint8_t const chr = m_ram->pointer()[0xF000 | base | ((ma + x) & 0x7f)];
|
||||
uint8_t const clr = (m_ram->pointer()[0x10000 | base | ((ma + x) & 0x7f)] & 0x80) ? 2 : 1;
|
||||
|
||||
uint8_t const gfx = ((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_chargen[(ra << 7) | (chr & 0x7F)];
|
||||
uint8_t const gfx = ((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_nuevo[(ra << 7) | (chr & 0x7F)];
|
||||
|
||||
for (unsigned bit = 0; 8 > bit; ++bit)
|
||||
*p++ = palette[BIT(gfx, 7 - bit) ? clr : 0];
|
||||
|
Loading…
Reference in New Issue
Block a user