minor code changes, formatting, comments (#9209)

This commit is contained in:
shattered 2022-02-01 12:14:37 +00:00 committed by GitHub
parent 158a55fc59
commit 42b7a90d57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 220 additions and 226 deletions

View File

@ -454,7 +454,7 @@ void hle_hp_ipc_device::device_reset()
void hle_hp_ipc_device::hil_idd()
{
m_hp_hil_mlc->hil_write(0x0100 | ioport("COL0")->read());
m_hp_hil_mlc->hil_write(0x0100 | ioport("COL0")->read());
m_hp_hil_mlc->hil_write(m_device_id16 | 0);
}
@ -509,7 +509,7 @@ void hle_hp_ipc_device::will_scan_row(u8 row)
attotime hle_hp_ipc_device::typematic_delay() const
{
return attotime::from_msec(250); // XXX
return attotime::from_msec(250); // FIXME
}
attotime hle_hp_ipc_device::typematic_period() const
@ -606,7 +606,7 @@ ioport_constructor hle_hp_itf_device::device_input_ports() const
void hle_hp_itf_device::hil_idd()
{
m_hp_hil_mlc->hil_write(m_device_id16 | ioport("COL0")->read());
m_hp_hil_mlc->hil_write(m_device_id16 | ioport("COL0")->read());
m_hp_hil_mlc->hil_write(m_device_id16 | 0x04);
}

View File

@ -677,7 +677,7 @@ GFXDECODE_END
void ie15_device::ie15core(machine_config &config)
{
/* Basic machine hardware */
IE15_CPU(config, m_maincpu, XTAL(30'800'000)/10);
IE15_CPU(config, m_maincpu, XTAL(30'800'000) / 10);
m_maincpu->set_addrmap(AS_PROGRAM, &ie15_device::ie15_mem);
m_maincpu->set_addrmap(AS_IO, &ie15_device::ie15_io);

View File

@ -49,9 +49,9 @@ void ie15_keyboard_device::key_make(uint8_t row, uint8_t column)
row += 8;
if (column < 16)
key_code = m_rom [(row << 4) + column];
key_code = m_rom[(row << 4) + column];
else
key_code = m_rom [(row << 4) + (column - 16) * 2 + 256];
key_code = m_rom[(row << 4) + (column - 16) * 2 + 256];
if (ctrl)
key_code &= 0x1f;
@ -76,7 +76,7 @@ ROM_END
const tiny_rom_entry *ie15_keyboard_device::device_rom_region() const
{
return ROM_NAME( ie15_keyboard );
return ROM_NAME(ie15_keyboard);
}
@ -85,7 +85,7 @@ void ie15_keyboard_device::device_start()
m_keyboard_cb.resolve_safe();
m_sdv_cb.resolve_safe();
m_rom = (uint8_t*)memregion("ie15kbd")->base();
m_rom = (uint8_t *)memregion("ie15kbd")->base();
}
void ie15_keyboard_device::device_reset()

View File

@ -22,14 +22,14 @@ DEFINE_DEVICE_TYPE(MM58167, mm58167_device, "mm58167", "National Semiconductor M
// registers (0-7 are the live data, 8-f are the setting for the compare IRQ)
typedef enum
{
R_CNT_MILLISECONDS = 0, // 0 = milliseconds
R_CNT_HUNDTENTHS, // 1 = hundreds and tenths of seconds
R_CNT_SECONDS, // 2 = seconds
R_CNT_MINUTES, // 3 = minutes
R_CNT_HOURS, // 4 = hours
R_CNT_DAYOFWEEK, // 5 = day of the week
R_CNT_DAYOFMONTH, // 6 = day of the month
R_CNT_MONTH, // 7 = month
R_CNT_MILLISECONDS = 0, // 0 = milliseconds [0..9]
R_CNT_HUNDTENTHS, // 1 = hundreds and tenths of seconds [0..99]
R_CNT_SECONDS, // 2 = seconds [0..59]
R_CNT_MINUTES, // 3 = minutes [0..59]
R_CNT_HOURS, // 4 = hours [0..23]
R_CNT_DAYOFWEEK, // 5 = day of the week [1..7, Sunday = 1]
R_CNT_DAYOFMONTH, // 6 = day of the month [1..31; but Feb 29 = Mar 0]
R_CNT_MONTH, // 7 = month [1..12]
R_RAM_MILLISECONDS, // 8 = milliseconds
R_RAM_HUNDTENTHS, // 9 = hundreds and tenths of seconds
R_RAM_SECONDS, // a = seconds

View File

@ -24,22 +24,20 @@ To do:
#include "emu.h"
#include "bus/rs232/rs232.h"
#include "cpu/i86/i86.h"
#include "cpu/z80/z80.h"
#include "machine/bankdev.h"
#include "machine/i8087.h"
#include "machine/i8251.h"
#include "machine/i8255.h"
#include "machine/pit8253.h"
#include "machine/pic8259.h"
#include "machine/bankdev.h"
#include "machine/input_merger.h"
#include "cpu/z80/z80.h"
#include "machine/z80ctc.h"
#include "machine/z80sio.h"
#include "bus/rs232/rs232.h"
#include "machine/isbc_215g.h"
#include "machine/keyboard.h"
#include "machine/pic8259.h"
#include "machine/pit8253.h"
#include "machine/z80ctc.h"
#include "machine/z80sio.h"
#include "emupal.h"
#include "screen.h"
@ -475,14 +473,14 @@ static const z80_daisy_config k7070_daisy_chain[] =
*/
void a7150_state::a7150(machine_config &config)
{
I8086(config, m_maincpu, XTAL(9'832'000)/2);
I8086(config, m_maincpu, XTAL(9'832'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &a7150_state::mem_map);
m_maincpu->set_addrmap(AS_IO, &a7150_state::io_map);
m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
m_maincpu->esc_opcode_handler().set("i8087", FUNC(i8087_device::insn_w));
m_maincpu->esc_data_handler().set("i8087", FUNC(i8087_device::addr_w));
i8087_device &i8087(I8087(config, "i8087", XTAL(9'832'000)/2));
i8087_device &i8087(I8087(config, "i8087", XTAL(9'832'000) / 2));
i8087.set_space_86(m_maincpu, AS_PROGRAM);
i8087.irq().set(m_pic8259, FUNC(pic8259_device::ir0_w));
i8087.busy().set_inputline("maincpu", INPUT_LINE_TEST);
@ -497,10 +495,10 @@ void a7150_state::a7150(machine_config &config)
ppi.out_pc_callback().set(FUNC(a7150_state::ppi_c_w));
PIT8253(config, m_pit8253, 0);
m_pit8253->set_clk<0>(14.7456_MHz_XTAL/4);
m_pit8253->set_clk<0>(14.7456_MHz_XTAL / 4);
m_pit8253->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir2_w));
m_pit8253->set_clk<1>(14.7456_MHz_XTAL/4);
m_pit8253->set_clk<2>(14.7456_MHz_XTAL/4);
m_pit8253->set_clk<1>(14.7456_MHz_XTAL / 4);
m_pit8253->set_clk<2>(14.7456_MHz_XTAL / 4);
m_pit8253->out_handler<2>().set(FUNC(a7150_state::a7150_tmr2_w));
INPUT_MERGER_ANY_HIGH(config, "uart_irq").output_handler().set(m_pic8259, FUNC(pic8259_device::ir4_w));
@ -522,7 +520,7 @@ void a7150_state::a7150(machine_config &config)
ISBC_215G(config, "isbc_215g", 0, 0x4a, m_maincpu).irq_callback().set(m_pic8259, FUNC(pic8259_device::ir5_w));
// KGS K7070 graphics terminal controlling ABG K7072 framebuffer
Z80(config, m_gfxcpu, XTAL(16'000'000)/4);
Z80(config, m_gfxcpu, XTAL(16'000'000) / 4);
m_gfxcpu->set_addrmap(AS_PROGRAM, &a7150_state::k7070_cpu_mem);
m_gfxcpu->set_addrmap(AS_IO, &a7150_state::k7070_cpu_io);
m_gfxcpu->set_daisy_config(k7070_daisy_chain);
@ -534,7 +532,7 @@ void a7150_state::a7150(machine_config &config)
m_video_bankdev->set_data_width(8);
m_video_bankdev->set_stride(0x10000);
Z80CTC(config, m_ctc, 16_MHz_XTAL/3);
Z80CTC(config, m_ctc, 16_MHz_XTAL / 3);
m_ctc->intr_callback().set_inputline(m_gfxcpu, INPUT_LINE_IRQ0);
m_ctc->set_clk<0>(1230750);
m_ctc->set_clk<1>(1230750);
@ -544,7 +542,7 @@ void a7150_state::a7150(machine_config &config)
m_ctc->zc_callback<0>().append(Z80SIO_TAG, FUNC(z80sio_device::txca_w));
m_ctc->zc_callback<1>().set(Z80SIO_TAG, FUNC(z80sio_device::rxtxcb_w));
z80sio_device& sio(Z80SIO(config, Z80SIO_TAG, XTAL(16'000'000)/4));
z80sio_device &sio(Z80SIO(config, Z80SIO_TAG, XTAL(16'000'000) / 4));
sio.out_int_callback().set_inputline(m_gfxcpu, INPUT_LINE_IRQ0);
sio.out_txda_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd));
sio.out_dtra_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr));
@ -565,7 +563,7 @@ void a7150_state::a7150(machine_config &config)
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_color(rgb_t::green());
screen.set_raw(XTAL(16'000'000), 737,0,640, 431,0,400);
screen.set_raw(XTAL(16'000'000), 737, 0, 640, 431, 0, 400);
screen.set_screen_update(FUNC(a7150_state::screen_update_k7072));
screen.set_palette(m_palette);

View File

@ -69,17 +69,6 @@
************************************************************************/
#include "emu.h"
#include "video/agat7.h"
#include "video/agat9.h"
#include "cpu/m6502/m6502.h"
#include "imagedev/cassette.h"
#include "machine/bankdev.h"
#include "machine/agatkeyb.h"
#include "machine/timer.h"
#include "sound/spkrdev.h"
#include "bus/a2bus/a2diskii.h"
#include "bus/a2bus/agat7langcard.h"
@ -88,7 +77,15 @@
#include "bus/a2bus/agat840k_hle.h"
#include "bus/a2bus/agat_fdc.h"
#include "bus/a2bus/nippelclock.h"
#include "cpu/m6502/m6502.h"
#include "cpu/m6502/r65c02.h"
#include "imagedev/cassette.h"
#include "machine/agatkeyb.h"
#include "machine/bankdev.h"
#include "machine/timer.h"
#include "sound/spkrdev.h"
#include "video/agat7.h"
#include "video/agat9.h"
#include "screen.h"
#include "softlist.h"
@ -154,7 +151,7 @@ public:
void controller_strobe_w(uint8_t data);
void kbd_put(u8 data);
DECLARE_WRITE_LINE_MEMBER( kbd_meta );
DECLARE_WRITE_LINE_MEMBER(kbd_meta);
protected:
required_device<cpu_device> m_maincpu;
@ -746,7 +743,7 @@ void agat9_state::apple_w(offs_t offset, uint8_t data)
logerror("%s: c0f0_w %04X <- %02X (apple mode set)\n", machine().describe_context(), offset + 0xc0f0, data);
m_apple = true;
m_upperbank->set_bank(5); // XXX get current bank
m_upperbank->set_bank(5); // FIXME: get current bank
}
uint8_t agat_base_state::inh_r(offs_t offset)

View File

@ -1,16 +1,16 @@
// license:BSD-3-Clause
// copyright-holders:Sergey Svishchev
#include "emu.h"
#include "machine/genpc.h"
#include "cpu/i86/i86.h"
#include "emu.h"
#include "bus/pc_joy/pc_joy.h"
#include "bus/pc_kbd/keyboards.h"
#include "bus/pc_kbd/pc_kbdc.h"
#include "imagedev/floppy.h"
#include "machine/pc_fdc.h"
#include "cpu/i86/i86.h"
#include "formats/asst128_dsk.h"
#include "imagedev/floppy.h"
#include "machine/genpc.h"
#include "machine/pc_fdc.h"
DECLARE_DEVICE_TYPE(ASST128_MOTHERBOARD, asst128_mb_device)
@ -21,8 +21,7 @@ public:
// construction/destruction
asst128_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0)
: ibm5150_mb_device(mconfig, ASST128_MOTHERBOARD, tag, owner, clock)
{
}
{ }
void map(address_map &map);
};
@ -146,7 +145,6 @@ ROM_START( asst128 )
ROM_LOAD( "basic.bin", 0x6000, 0x8000, CRC(a4ec66f6) SHA1(80e934986022681ccde180e92aa108e716c4f19b))
ROM_LOAD( "mainbios.bin", 0xe000, 0x2000, CRC(8426cbf5) SHA1(41d14137ffa651977041da22aa8071c0f7854158))
// XXX needs dumping
ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00)
ROM_LOAD( "asst128cg.bin", 0, 0x2000, NO_DUMP )
ROM_END

View File

@ -16,16 +16,15 @@
#include "emu.h"
#include "bus/rs232/rs232.h"
#include "cpu/z80/z80.h"
#include "machine/clock.h"
#include "machine/i8251.h"
#include "machine/keyboard.h"
#include "machine/ram.h"
#include "machine/z80ctc.h"
#include "machine/z80sio.h"
#include "bus/rs232/rs232.h"
#include "machine/keyboard.h"
#include "emupal.h"
#include "screen.h"
@ -38,6 +37,7 @@
#define RS232_B_TAG "siob"
#define I8251_TAG "i8251"
class att4425_state : public driver_device
{
public:
@ -65,7 +65,6 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void machine_start() override;
virtual void video_start() override;
void att4425_io(address_map &map);
void att4425_mem(address_map &map);
@ -125,10 +124,6 @@ INPUT_PORTS_END
/* Video */
void att4425_state::video_start()
{
}
uint32_t att4425_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
uint16_t sy = 0;
@ -225,7 +220,6 @@ WRITE_LINE_MEMBER(att4425_state::write_keyboard_clock)
static const z80_daisy_config att4425_daisy_chain[] =
{
// XXX order is unknown
{ Z80SIO_TAG },
{ Z80CTC_TAG },
{ nullptr }
@ -234,7 +228,7 @@ static const z80_daisy_config att4425_daisy_chain[] =
void att4425_state::att4425(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(32'000'000)/8); // XXX
Z80(config, m_maincpu, XTAL(32'000'000) / 8);
m_maincpu->set_addrmap(AS_PROGRAM, &att4425_state::att4425_mem);
m_maincpu->set_addrmap(AS_IO, &att4425_state::att4425_io);
m_maincpu->set_daisy_config(att4425_daisy_chain);
@ -246,12 +240,12 @@ void att4425_state::att4425(machine_config &config)
m_screen->set_screen_update(FUNC(att4425_state::screen_update));
m_screen->set_palette("palette");
m_screen->set_size(720, 351);
m_screen->set_visarea(0, 720-1, 0, 351-1);
m_screen->set_visarea(0, 720 - 1, 0, 351 - 1);
GFXDECODE(config, "gfxdecode", "palette", gfx_att4425);
PALETTE(config, "palette", palette_device::MONOCHROME_HIGHLIGHT);
// ch.3 -- timer?
z80ctc_device& ctc(Z80CTC(config, Z80CTC_TAG, XTAL(32'000'000))); // XXX;
z80ctc_device &ctc(Z80CTC(config, Z80CTC_TAG, XTAL(32'000'000)));
ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
#ifdef notdef
ctc.zc_callback<0>().set(m_sio, FUNC(z80sio_device::rxca_w));
@ -259,7 +253,7 @@ void att4425_state::att4425(machine_config &config)
ctc.zc_callback<2>().set(m_sio, FUNC(z80sio_device::rxtxcb_w));
#endif
Z80SIO(config, m_sio, 4800); // XXX
Z80SIO(config, m_sio, 4800);
m_sio->out_int_callback().set_inputline(Z80_TAG, INPUT_LINE_IRQ0);
m_sio->out_txda_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd));
m_sio->out_dtra_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr));
@ -276,8 +270,7 @@ void att4425_state::att4425(machine_config &config)
rs232_port_device &rs232b(RS232_PORT(config, RS232_B_TAG, default_rs232_devices, "printer"));
rs232b.rxd_handler().set(m_sio, FUNC(z80sio_device::rxb_w));
// XXX
clock_device &line_clock(CLOCK(config, "line_clock", 9600*64));
clock_device &line_clock(CLOCK(config, "line_clock", 9600 * 64));
line_clock.signal_handler().set(FUNC(att4425_state::write_line_clock));
I8251(config, m_i8251, 0);
@ -290,8 +283,7 @@ void att4425_state::att4425(machine_config &config)
rs232.cts_handler().set(m_i8251, FUNC(i8251_device::write_cts));
rs232.dsr_handler().set(m_i8251, FUNC(i8251_device::write_dsr));
// XXX
clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", 4800*64));
clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", 4800 * 64));
keyboard_clock.signal_handler().set(FUNC(att4425_state::write_keyboard_clock));
RAM(config, RAM_TAG).set_default_size("32K").set_default_value(0);

View File

@ -13,7 +13,7 @@
- 32K ROM
- 128K RAM (includes frame buffer)
- 3 serial ports, each driven by 6850 ACIA
- some kind of baud rate generator, possibly COM8016
- unknown baud rate generator (possibly COM8016)
- sync serial port, driven by 6854 but apparently never supported by ROM
- 682x PIA
- AY-3-891x PSG
@ -59,6 +59,7 @@
#include "screen.h"
#include "speaker.h"
#define M68K_TAG "maincpu"
#define PPU_TAG "ppu"
@ -87,6 +88,7 @@
#define LOGPIA(...) LOGMASKED(LOG_PIA, __VA_ARGS__)
#define LOGDBG(...) LOGMASKED(LOG_DEBUG, __VA_ARGS__)
namespace {
class bitgraph_state : public driver_device
@ -245,7 +247,7 @@ READ_LINE_MEMBER(bitgraph_state::pia_ca1_r)
WRITE_LINE_MEMBER(bitgraph_state::pia_cb2_w)
{
// XXX shut up verbose log
// no-op to shut up verbose log
}
uint8_t bitgraph_state::pia_pa_r()
@ -525,7 +527,6 @@ void bitgraph_state::bg_motherboard(machine_config &config)
rs232d.dcd_handler().set(m_acia2, FUNC(acia6850_device::write_dcd));
rs232d.cts_handler().set(m_acia2, FUNC(acia6850_device::write_cts));
// XXX actual part may be something else
COM8116(config, m_dbrga, 5.0688_MHz_XTAL);
m_dbrga->fr_handler().set(FUNC(bitgraph_state::com8116_a_fr_w));
m_dbrga->ft_handler().set(FUNC(bitgraph_state::com8116_a_ft_w));

View File

@ -60,22 +60,23 @@ ksm|DVK KSM,
#include "machine/ms7004.h"
#include "machine/pic8259.h"
#include "machine/timer.h"
#include "emupal.h"
#include "screen.h"
#define SCREEN_PAGE (80*48)
static constexpr int SCREEN_PAGE = 80 * 48;
#define KSM_TOTAL_HORZ 1000
#define KSM_DISP_HORZ 800
#define KSM_HORZ_START 200
static constexpr int KSM_TOTAL_HORZ = 1000;
static constexpr int KSM_DISP_HORZ = 800;
static constexpr int KSM_HORZ_START = 200;
#define KSM_TOTAL_VERT (28 * 11)
#define KSM_DISP_VERT (25 * 11)
#define KSM_VERT_START (2 * 11)
static constexpr int KSM_TOTAL_VERT = (28 * 11);
static constexpr int KSM_DISP_VERT = (25 * 11);
static constexpr int KSM_VERT_START = (2 * 11);
#define KSM_STATUSLINE_TOTAL 11
#define KSM_STATUSLINE_VRAM 0xF8B0
static constexpr int KSM_STATUSLINE_TOTAL = 11;
static constexpr int KSM_STATUSLINE_VRAM = 0xF8B0;
//#define LOG_GENERAL (1U << 0) //defined in logmacro.h already
@ -109,10 +110,10 @@ public:
void ksm(machine_config &config);
private:
TIMER_DEVICE_CALLBACK_MEMBER( scanline_callback );
TIMER_DEVICE_CALLBACK_MEMBER(scanline_callback);
virtual void machine_reset() override;
virtual void video_start() override;
virtual void machine_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override;
@ -239,7 +240,7 @@ void ksm_state::machine_reset()
brg_state = 0;
}
void ksm_state::video_start()
void ksm_state::machine_start()
{
m_tmpclip = rectangle(0, KSM_DISP_HORZ - 1, 0, KSM_DISP_VERT - 1);
m_tmpbmp.allocate(KSM_DISP_HORZ, KSM_DISP_VERT);
@ -413,7 +414,7 @@ GFXDECODE_END
void ksm_state::ksm(machine_config &config)
{
I8080(config, m_maincpu, XTAL(15'400'000)/10);
I8080(config, m_maincpu, XTAL(15'400'000) / 10);
m_maincpu->set_addrmap(AS_PROGRAM, &ksm_state::ksm_mem);
m_maincpu->set_addrmap(AS_IO, &ksm_state::ksm_io);
m_maincpu->in_inta_func().set("pic8259", FUNC(pic8259_device::acknowledge));
@ -460,7 +461,7 @@ void ksm_state::ksm(machine_config &config)
m_ms7004->tx_handler().set(m_i8251kbd, FUNC(i8251_device::write_rxd));
// baud rate is supposed to be 4800 but keyboard is slightly faster
clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", 4960*16));
clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", 4960 * 16));
keyboard_clock.signal_handler().set(FUNC(ksm_state::write_keyboard_clock));
}

View File

@ -6,16 +6,20 @@
Driver file for EC-184x series
To do:
- verify ec1840 clocks etc.
- did 640KB memory board exist or it's 512+128 boards?
***************************************************************************/
#include "emu.h"
#include "machine/genpc.h"
#include "bus/isa/xsu_cards.h"
#include "bus/pc_kbd/keyboards.h"
#include "bus/pc_kbd/pc_kbdc.h"
#include "cpu/i86/i86.h"
#include "machine/genpc.h"
#include "machine/ram.h"
#include "softlist_dev.h"
@ -32,7 +36,7 @@
#define LOGDBG(...) LOGMASKED(LOG_DEBUG, __VA_ARGS__)
#define EC1841_MEMBOARD_SIZE (512*1024)
static constexpr int EC1841_MEMBOARD_SIZE = 512 * 1024;
class ec184x_state : public driver_device
@ -154,7 +158,7 @@ void ec184x_state::init_ec1840()
{
address_space &program = m_maincpu->space(AS_PROGRAM);
program.install_ram(0, m_ram->size()-1, m_ram->pointer());
program.install_ram(0, m_ram->size() - 1, m_ram->pointer());
}
void ec184x_state::init_ec1841()
@ -164,10 +168,9 @@ void ec184x_state::init_ec1841()
m_memory.boards = m_ram->size() / EC1841_MEMBOARD_SIZE;
if (m_memory.boards > 4) m_memory.boards = 4;
program.install_ram(0, EC1841_MEMBOARD_SIZE-1, m_ram->pointer());
program.install_ram(0, EC1841_MEMBOARD_SIZE - 1, m_ram->pointer());
// 640K configuration is special -- 512K board mapped at 0 + 128K board mapped at 512K
// XXX verify this was actually the case
if (m_ram->size() == 640 * 1024)
{
program.install_ram(EC1841_MEMBOARD_SIZE, m_ram->size() - 1, m_ram->pointer() + EC1841_MEMBOARD_SIZE);
@ -208,7 +211,6 @@ void ec184x_state::ec1841_io(address_map &map)
}
// XXX verify everything
void ec184x_state::ec1840(machine_config &config)
{
I8086(config, m_maincpu, 4096000);
@ -257,9 +259,9 @@ void ec184x_state::ec1841(machine_config &config)
mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb));
// FIXME: determine ISA bus clock
ISA8_SLOT(config, "isa1", 0, "mb:isa", ec184x_isa8_cards, "ec1841.0002", false); // cga
ISA8_SLOT(config, "isa2", 0, "mb:isa", ec184x_isa8_cards, "ec1841.0003", false); // fdc (IRQ6) + mouse port (IRQ2..5)
ISA8_SLOT(config, "isa3", 0, "mb:isa", ec184x_isa8_cards, "ec1840.0004", false); // lpt (IRQ7||5) [+ serial (IRQx)]
ISA8_SLOT(config, "isa1", 0, "mb:isa", ec184x_isa8_cards, "ec1841.0002", false); // cga
ISA8_SLOT(config, "isa2", 0, "mb:isa", ec184x_isa8_cards, "ec1841.0003", false); // fdc (IRQ6) + mouse port (IRQ2..5)
ISA8_SLOT(config, "isa3", 0, "mb:isa", ec184x_isa8_cards, "ec1840.0004", false); // lpt (IRQ7||5) [+ serial (IRQx)]
ISA8_SLOT(config, "isa4", 0, "mb:isa", ec184x_isa8_cards, "hdc", false);
ISA8_SLOT(config, "isa5", 0, "mb:isa", ec184x_isa8_cards, nullptr, false);
ISA8_SLOT(config, "isa6", 0, "mb:isa", ec184x_isa8_cards, nullptr, false);

View File

@ -45,11 +45,11 @@
#include "screen.h"
#define VC_TOTAL_HORZ 678
#define VC_DISP_HORZ 512
static constexpr int VC_TOTAL_HORZ = 678;
static constexpr int VC_DISP_HORZ = 512;
#define VC_TOTAL_VERT 312
#define VC_DISP_VERT 256
static constexpr int VC_TOTAL_VERT = 312;
static constexpr int VC_DISP_VERT = 256;
//#define LOG_GENERAL (1U << 0) //defined in logmacro.h already
@ -78,8 +78,7 @@ public:
, m_fdc(*this, "fdc")
, m_p_videoram(*this, "videoram")
, m_screen(*this, "screen")
{
}
{ }
void eurocom2(machine_config &config);
void microtrol(machine_config &config);
@ -302,7 +301,7 @@ void waveterm_state::pia3_pb_w(uint8_t data)
uint8_t waveterm_state::waveterm_adc()
{
return m_screen->frame_number() % 255; // XXX
return m_screen->frame_number() % 255; // FIXME
}

View File

@ -25,6 +25,9 @@
- native keyboard
- 1MB model
- identify RTC core
- variable refresh rate?
When the AC adapter is plugged in, the LCD refresh rate is 73.14 Hz.
When the AC adapter is not plugged in (ie, running off of batteries) the refresh rate is 56.8 Hz.
- everything else
Technical info:
@ -55,15 +58,15 @@
#include "emu.h"
#include "machine/nvram.h"
#include "machine/pic8259.h"
#include "machine/pit8253.h"
#include "bus/isa/isa.h"
#include "bus/isa/isa_cards.h"
#include "bus/pc_kbd/keyboards.h"
#include "bus/pc_kbd/pc_kbdc.h"
#include "cpu/nec/nec.h"
#include "machine/bankdev.h"
#include "machine/nvram.h"
#include "machine/pic8259.h"
#include "machine/pit8253.h"
#include "machine/ram.h"
#include "sound/dac.h"
@ -117,6 +120,7 @@ public:
uint8_t f300_r(offs_t offset);
void hp95lx(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
@ -559,7 +563,7 @@ WRITE_LINE_MEMBER(hp95lx_state::keyboard_clock_w)
{
m_scancode >>= 1;
m_scancode |= m_kdata;
// XXX map F2..F10 to blue function keys
// FIXME: workaround, map F2..F10 to blue function keys
if (m_scancode > 0x3B && m_scancode < 0x45) m_scancode += 0x36;
LOGKBD("kbd: scancode %02x\n", m_scancode);
m_kbit = 0;
@ -725,9 +729,9 @@ void hp95lx_state::hp95lx(machine_config &config)
ADDRESS_MAP_BANK(config, "bankdev_ec00").set_map(&hp95lx_state::hp95lx_romdos).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
PIT8254(config, m_pit8254, 0);
m_pit8254->set_clk<0>(XTAL(14'318'181)/12); /* heartbeat IRQ */
m_pit8254->set_clk<0>(XTAL(14'318'181) / 12); /* heartbeat IRQ */
m_pit8254->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir0_w));
m_pit8254->set_clk<1>(XTAL(14'318'181)/12); /* misc IRQ */
m_pit8254->set_clk<1>(XTAL(14'318'181) / 12); /* misc IRQ */
m_pit8254->out_handler<1>().set(m_pic8259, FUNC(pic8259_device::ir2_w));
PIC8259(config, m_pic8259, 0);
@ -749,8 +753,6 @@ void hp95lx_state::hp95lx(machine_config &config)
SPEAKER(config, "speaker").front_center();
DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
// XXX When the AC adapter is plugged in, the LCD refresh rate is 73.14 Hz.
// XXX When the AC adapter is not plugged in (ie, running off of batteries) the refresh rate is 56.8 Hz.
SCREEN(config, m_screen, SCREEN_TYPE_LCD, rgb_t::white());
m_screen->set_screen_update(FUNC(hp95lx_state::screen_update));
m_screen->set_raw(XTAL(5'370'000) / 2, 300, 0, 240, 180, 0, 128);

View File

@ -357,25 +357,25 @@ Software to look for
#include "emu.h"
#include "bus/hp_hil/hp_hil.h"
#include "bus/hp_hil/hil_devices.h"
#include "bus/hp_hil/hp_hil.h"
#include "bus/hp_ipc_io/hp_ipc_io.h"
#include "bus/ieee488/ieee488.h"
#include "cpu/m68000/m68000.h"
#include "formats/hp_ipc_dsk.h"
#include "imagedev/floppy.h"
#include "machine/bankdev.h"
#include "machine/cop452.h"
#include "machine/hp_ipc_optrom.h"
#include "machine/input_merger.h"
#include "machine/mm58167.h"
#include "machine/ram.h"
#include "machine/wd_fdc.h"
#include "video/hp1ll3.h"
#include "machine/tms9914.h"
#include "bus/ieee488/ieee488.h"
#include "machine/cop452.h"
#include "machine/wd_fdc.h"
#include "softlist_dev.h"
#include "speaker.h"
#include "sound/dac.h"
#include "machine/input_merger.h"
#include "bus/hp_ipc_io/hp_ipc_io.h"
#include "machine/hp_ipc_optrom.h"
#include "speaker.h"
#include "video/hp1ll3.h"
#include "emupal.h"
#include "screen.h"
@ -793,8 +793,8 @@ void hp_ipc_state::hp_ipc_base(machine_config &config)
HP1LL3(config , m_gpu , 24_MHz_XTAL / 8).set_screen("screen");
// XXX actual clock is 1MHz; remove this workaround (and change 2000 to 100 in hp_ipc_dsk.cpp)
// XXX when floppy code correctly handles 600 rpm drives.
// FIXME: actual clock is 1MHz; remove this workaround (and change 2000 to 1000 in hp_ipc_dsk.cpp)
// when floppy code correctly handles 600 rpm drives.
WD2797(config, m_fdc, 2_MHz_XTAL);
m_fdc->intrq_wr_callback().set(FUNC(hp_ipc_state::irq_5));
FLOPPY_CONNECTOR(config, "fdc:0", hp_ipc_floppies, "35dd", hp_ipc_state::floppy_formats);
@ -881,11 +881,11 @@ void hp_ipc_state::hp_ipc(machine_config &config)
// horizontal time = 60 us (min)
// ver.refresh period = ~300 us
// ver.period = 16.7ms (~60 hz)
SCREEN(config , m_screen , SCREEN_TYPE_LCD);
m_screen->set_color(rgb_t::amber()); // actually a kind of EL display
SCREEN(config , m_screen , SCREEN_TYPE_LCD); // actually an EL display
m_screen->set_color(rgb_t::amber());
m_screen->set_screen_update("gpu" , FUNC(hp1ll3_device::screen_update));
m_screen->set_raw(6_MHz_XTAL * 2 , 720 , 0 , 512 , 261 , 0 , 255);
m_screen->screen_vblank().set("mlc", FUNC(hp_hil_mlc_device::ap_w)); // XXX actually it's driven by 555 (U59)
m_screen->screen_vblank().set("mlc", FUNC(hp_hil_mlc_device::ap_w)); // this signal is actually driven by a 555 (U59)
m_screen->set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
@ -904,7 +904,7 @@ void hp_ipc_state::hp9808a(machine_config &config)
m_screen->set_color(rgb_t::amber()); // actually a kind of EL display
m_screen->set_screen_update("gpu" , FUNC(hp1ll3_device::screen_update));
m_screen->set_raw(6_MHz_XTAL * 2 , 880 , 0 , 640 , 425 , 0 , 400);
m_screen->screen_vblank().set("mlc", FUNC(hp_hil_mlc_device::ap_w)); // XXX actually it's driven by 555 (U59)
m_screen->screen_vblank().set("mlc", FUNC(hp_hil_mlc_device::ap_w));
m_screen->set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);

View File

@ -13,16 +13,17 @@
#include "emu.h"
#include "machine/ie15_kbd.h"
#include "machine/ie15.h"
#include "bus/rs232/rs232.h"
#include "machine/ie15.h"
#include "machine/ie15_kbd.h"
class ie15_state : public driver_device
{
public:
ie15_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag)
ie15_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_ie15(*this, "ie15")
, m_rs232(*this, "rs232")
{ }

View File

@ -16,14 +16,15 @@
#include "emu.h"
#include "machine/genpc.h"
#include "cpu/i86/i86.h"
#include "cpu/nec/nec.h"
#include "bus/isa/xsu_cards.h"
#include "bus/pc_kbd/keyboards.h"
#include "bus/pc_kbd/pc_kbdc.h"
#include "cpu/i86/i86.h"
#include "machine/genpc.h"
#include "machine/pc_lpt.h"
#include "machine/ram.h"
#include "softlist.h"
@ -67,7 +68,7 @@ static DEVICE_INPUT_DEFAULTS_START(iskr1031)
DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x20)
DEVICE_INPUT_DEFAULTS_END
// XXX
void iskr103x_state::iskr1030m(machine_config &config)
{
/* basic machine hardware */

View File

@ -15,10 +15,10 @@
***************************************************************************/
#include "emu.h"
#include "includes/mc1502.h"
#include "bus/rs232/rs232.h"
#include "cpu/i86/i86.h"
#include "includes/mc1502.h"
#include "machine/kb_7007_3.h"
#include "softlist_dev.h"
@ -95,7 +95,7 @@ void mc1502_state::mc1502_ppi_portc_w(uint8_t data)
m_ppi_portc = data & 15;
}
// 0x80 -- serial RxD
// 0x80 -- serial RxD (not emulated)
// 0x40 -- CASS IN, also loops back T2OUT (gated by CASWR)
// 0x20 -- T2OUT
// 0x10 -- SNDOUT
@ -210,7 +210,7 @@ void mc1502_state::machine_reset()
void mc1502_state::fdc_config(device_t *device)
{
mc1502_fdc_device &fdc = *downcast<mc1502_fdc_device*>(device);
mc1502_fdc_device &fdc = *downcast<mc1502_fdc_device *>(device);
fdc.set_cpu(m_maincpu);
}
@ -226,7 +226,7 @@ void mc1502_state::mc1502_io(address_map &map)
map(0x0028, 0x0029).rw(m_upd8251, FUNC(i8251_device::read), FUNC(i8251_device::write));
map(0x0040, 0x0043).rw(m_pit8253, FUNC(pit8253_device::read), FUNC(pit8253_device::write));
map(0x0060, 0x0063).rw(m_ppi8255n1, FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0x0068, 0x006B).rw(m_ppi8255n2, FUNC(i8255_device::read), FUNC(i8255_device::write)); // keyboard poll
map(0x0068, 0x006B).rw(m_ppi8255n2, FUNC(i8255_device::read), FUNC(i8255_device::write)); // keyboard poll
}
static INPUT_PORTS_START( mc1502 )
@ -235,17 +235,17 @@ INPUT_PORTS_END
void mc1502_state::mc1502(machine_config &config)
{
I8088(config, m_maincpu, XTAL(16'000'000)/3);
I8088(config, m_maincpu, XTAL(16'000'000) / 3);
m_maincpu->set_addrmap(AS_PROGRAM, &mc1502_state::mc1502_map);
m_maincpu->set_addrmap(AS_IO, &mc1502_state::mc1502_io);
m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
PIT8253(config, m_pit8253);
m_pit8253->set_clk<0>(XTAL(16'000'000)/12); /* heartbeat IRQ */
m_pit8253->set_clk<0>(XTAL(16'000'000) / 12); /* heartbeat IRQ */
m_pit8253->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir0_w));
m_pit8253->set_clk<1>(XTAL(16'000'000)/12); /* serial port */
m_pit8253->set_clk<1>(XTAL(16'000'000) / 12); /* serial port */
m_pit8253->out_handler<1>().set(FUNC(mc1502_state::mc1502_pit8253_out1_changed));
m_pit8253->set_clk<2>(XTAL(16'000'000)/12); /* pio port c pin 4, and speaker polling enough */
m_pit8253->set_clk<2>(XTAL(16'000'000) / 12); /* pio port c pin 4, and speaker polling enough */
m_pit8253->out_handler<2>().set(FUNC(mc1502_state::mc1502_pit8253_out2_changed));
PIC8259(config, m_pic8259);
@ -267,7 +267,6 @@ void mc1502_state::mc1502(machine_config &config)
m_upd8251->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd));
m_upd8251->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr));
m_upd8251->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts));
/* XXX RxD data are accessible via PPI port C, bit 7 */
m_upd8251->rxrdy_handler().set(m_pic8259, FUNC(pic8259_device::ir7_w)); /* default handler does nothing */
m_upd8251->txrdy_handler().set(m_pic8259, FUNC(pic8259_device::ir7_w));
m_upd8251->syndet_handler().set(FUNC(mc1502_state::mc1502_i8251_syndet));

View File

@ -29,6 +29,7 @@
#include "bus/rs232/rs232.h"
#include "cpu/t11/t11.h"
#include "formats/ms0515_dsk.h"
#include "imagedev/floppy.h"
#include "machine/clock.h"
#include "machine/i8251.h"
@ -43,8 +44,6 @@
#include "screen.h"
#include "speaker.h"
#include "formats/ms0515_dsk.h"
#include "ms0515.lh"
@ -547,7 +546,7 @@ void ms0515_state::ms0515(machine_config &config)
/* video hardware -- 50 Hz refresh rate */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw( XTAL(15'000'000), 958,0,640, 313,0,200 );
screen.set_raw(XTAL(15'000'000), 958, 0, 640, 313, 0, 200);
screen.set_screen_update(FUNC(ms0515_state::screen_update_ms0515));
screen.screen_vblank().set(FUNC(ms0515_state::screen_vblank));
screen.set_palette("palette");

View File

@ -13,6 +13,7 @@
To do:
- character attributes
- improve keyboard response and add LED layout (MS7002)
- verify CRTC clock
Chips:
- DD5 - KR580WM80A (8080 clone) - CPU
@ -47,7 +48,6 @@
#include "emupal.h"
#include "screen.h"
#define LOG_GENERAL (1U << 0)
#define VERBOSE (LOG_GENERAL)
//#define LOG_OUTPUT_FUNC printf
@ -163,10 +163,10 @@ GFXDECODE_END
WRITE_LINE_MEMBER(ms6102_state::hrq_w)
{
/* HACK - this should be connected to the HOLD line of 8080 */
/* FIXME: this should be connected to the HOLD line of 8080 */
m_maincpu->set_input_line(INPUT_LINE_HALT, state);
/* HACK - this should be connected to the HLDA line of 8080 */
/* FIXME: this should be connected to the HLDA line of 8080 */
m_dma8257->hlda_w(state);
}
@ -329,13 +329,13 @@ void ms6102_state::ms6102(machine_config &config)
m_dma8257->in_memr_cb().set(FUNC(ms6102_state::memory_read_byte));
m_dma8257->out_iow_cb<2>().set(FUNC(ms6102_state::vdack_w));
I8275(config, m_crtc1, XTAL(16'400'000) / 8); // XXX
I8275(config, m_crtc1, XTAL(16'400'000) / 8);
m_crtc1->set_character_width(8);
m_crtc1->set_display_callback(FUNC(ms6102_state::display_pixels));
m_crtc1->drq_wr_callback().set("dma8257", FUNC(i8257_device::dreq2_w));
m_crtc1->set_screen(m_screen);
I8275(config, m_crtc2, XTAL(16'400'000) / 8); // XXX
I8275(config, m_crtc2, XTAL(16'400'000) / 8);
m_crtc2->set_character_width(8);
m_crtc2->set_display_callback(FUNC(ms6102_state::display_attr));
m_crtc2->irq_wr_callback().set(FUNC(ms6102_state::irq<5>));

View File

@ -24,12 +24,10 @@
#include "emu.h"
#include "machine/netlist.h"
#include "video/fixfreq.h"
#include "netlist/devices/net_lib.h"
#include "machine/nl_palestra.h"
#include "video/fixfreq.h"
#include "screen.h"
@ -47,8 +45,7 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_video(*this, "fixfreq")
{
}
{ }
// devices
required_device<netlist_mame_device> m_maincpu;
@ -61,8 +58,6 @@ protected:
virtual void machine_start() override { };
virtual void machine_reset() override { };
virtual void video_start() override { };
private:
};

View File

@ -25,6 +25,7 @@
#include "machine/kb_poisk1.h"
#include "bus/isa/isa.h"
#include "bus/isa/p1_fdc.h"
#include "bus/isa/xsu_cards.h"
#include "cpu/i86/i86.h"
#include "imagedev/cassette.h"
@ -35,7 +36,6 @@
#include "machine/timer.h"
#include "sound/spkrdev.h"
#include "video/cgapal.h"
#include "bus/isa/p1_fdc.h"
#include "emupal.h"
#include "screen.h"

View File

@ -21,19 +21,19 @@
****************************************************************************/
#include "emu.h"
#include "bus/rs232/rs232.h"
#include "cpu/z80/z80.h"
#include "imagedev/floppy.h"
#include "machine/keyboard.h"
#include "machine/ram.h"
#include "machine/upd765.h"
#include "machine/z80ctc.h"
#include "machine/z80sio.h"
#include "machine/z80dma.h"
#include "machine/z80pio.h"
#include "machine/z80sio.h"
#include "video/i8275.h"
#include "bus/rs232/rs232.h"
#include "machine/keyboard.h"
#include "emupal.h"
#include "screen.h"
@ -68,8 +68,7 @@ public:
, m_p_chargen(*this, "gfx")
, m_videoram(*this, "videoram")
, m_p_cas(*this, "prom")
{
}
{ }
void rt1715(machine_config &config);
void rt1715w(machine_config &config);
@ -523,7 +522,7 @@ void rt1715_state::rt1715w_io(address_map &map)
map(0x34, 0x37).portr("S8"); // KON -- Konfigurations-schalter FD (config switch -- A114, DIP S8)
// map(0x38, 0x3b) // SR (RST1) -- Ru:cksetzen von Flip-Flops im FD
// map(0x3c, 0x3f) // RST (RST2) -- Ru:cksetzen von Flip-Flops in V.24 (Pru:ftechnik)
// used via DMA only
// these two ports are accessed only via DMA
map(0x40, 0x40).r(m_fdc, FUNC(i8272a_device::msr_r));
map(0x41, 0x41).rw(m_fdc, FUNC(i8272a_device::dma_r), FUNC(i8272a_device::dma_w));
}

View File

@ -16,13 +16,11 @@ Radio, 1985, N6
#include "emu.h"
#include "machine/netlist.h"
#include "video/fixfreq.h"
#include "netlist/devices/net_lib.h"
#include "machine/nl_tp1983.h"
#include "machine/nl_tp1985.h"
#include "video/fixfreq.h"
#include "screen.h"
@ -56,8 +54,6 @@ protected:
virtual void machine_start() override { }
virtual void machine_reset() override { }
virtual void video_start() override { }
private:
};
@ -69,8 +65,7 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_video(*this, "fixfreq")
{
}
{ }
// devices
required_device<netlist_mame_device> m_maincpu;
@ -83,8 +78,6 @@ protected:
virtual void machine_start() override { }
virtual void machine_reset() override { }
virtual void video_start() override { }
private:
NETDEV_ANALOG_CALLBACK_MEMBER(video_out_cb);
};

View File

@ -39,15 +39,16 @@
#include "emu.h"
#include "machine/genpc.h"
#include "bus/isa/isa_cards.h"
#include "bus/pc_kbd/keyboards.h"
#include "bus/pc_kbd/pc_kbdc.h"
#include "cpu/i86/i86.h"
#include "machine/bankdev.h"
#include "machine/genpc.h"
#include "machine/ram.h"
#include "machine/rp5c01.h"
#include "machine/tosh1000_bram.h"
#include "softlist.h"

View File

@ -13,11 +13,11 @@
***************************************************************************/
#include "emu.h"
#include "kr1601rr1.h"
#include <algorithm>
#define LOG_GENERAL (1U << 0)
#define VERBOSE (LOG_GENERAL)
//#define LOG_OUTPUT_FUNC printf

View File

@ -77,7 +77,7 @@ void ms7004_device::device_add_mconfig(machine_config &config)
const tiny_rom_entry *ms7004_device::device_rom_region() const
{
return ROM_NAME( ms7004 );
return ROM_NAME(ms7004);
}
//-------------------------------------------------
@ -339,7 +339,7 @@ INPUT_PORTS_END
ioport_constructor ms7004_device::device_input_ports() const
{
return INPUT_PORTS_NAME( ms7004 );
return INPUT_PORTS_NAME(ms7004);
}
//**************************************************************************
@ -351,13 +351,13 @@ ioport_constructor ms7004_device::device_input_ports() const
//-------------------------------------------------
ms7004_device::ms7004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MS7004, tag, owner, clock),
m_maincpu(*this, MS7004_CPU_TAG),
m_speaker(*this, MS7004_SPK_TAG),
m_i8243(*this, "i8243"),
m_kbd(*this, "KBD%u", 0),
m_tx_handler(*this),
m_rts_handler(*this)
: device_t(mconfig, MS7004, tag, owner, clock)
, m_maincpu(*this, MS7004_CPU_TAG)
, m_speaker(*this, MS7004_SPK_TAG)
, m_i8243(*this, "i8243")
, m_kbd(*this, "KBD%u", 0)
, m_tx_handler(*this)
, m_rts_handler(*this)
{
}
@ -382,7 +382,7 @@ void ms7004_device::device_reset()
}
WRITE_LINE_MEMBER( ms7004_device::write_rxd )
WRITE_LINE_MEMBER(ms7004_device::write_rxd)
{
m_maincpu->set_input_line(MCS48_INPUT_IRQ, state ? CLEAR_LINE : ASSERT_LINE);
}
@ -467,9 +467,9 @@ void ms7004_device::i8243_port_w(uint8_t data)
// t1_r -
//-------------------------------------------------
READ_LINE_MEMBER( ms7004_device::t1_r )
READ_LINE_MEMBER(ms7004_device::t1_r)
{
if (!BIT(m_p1,4))
if (!BIT(m_p1, 4))
return m_keylatch;
else
return 0;

View File

@ -20,6 +20,7 @@
*********************************************************************/
#include "emu.h"
#include "video/agat7.h"
#include "screen.h"
@ -52,14 +53,14 @@ void agat7video_device::device_add_mconfig(machine_config &config)
// LIVE DEVICE
//**************************************************************************
agat7video_device::agat7video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, AGAT7VIDEO, tag, owner, clock),
device_palette_interface(mconfig, *this),
m_ram_dev(*this, finder_base::DUMMY_TAG),
m_char_region(*this, finder_base::DUMMY_TAG),
m_char_ptr(nullptr),
m_char_size(0),
m_start_address(0)
agat7video_device::agat7video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AGAT7VIDEO, tag, owner, clock)
, device_palette_interface(mconfig, *this)
, m_ram_dev(*this, finder_base::DUMMY_TAG)
, m_char_region(*this, finder_base::DUMMY_TAG)
, m_char_ptr(nullptr)
, m_char_size(0)
, m_start_address(0)
{
}
@ -123,11 +124,14 @@ void agat7video_device::do_io(int offset)
break;
case 2:
if (offset > 0x80) {
if (offset > 0x80)
{
m_video_mode = TEXT_HIRES;
m_start_address = (offset - 0x82) << 9;
logerror("offset %02X -> %04X, video mode 2 (TEXT_HIRES)\n", offset, m_start_address);
} else {
}
else
{
m_video_mode = TEXT_LORES;
m_start_address = (offset - 0x02) << 9;
logerror("offset %02X -> %04X, video mode 2 (TEXT_LORES)\n", offset, m_start_address);
@ -153,7 +157,7 @@ void agat7video_device::plot_text_character(bitmap_ind16 &bitmap, int xpos, int
{
for (int x = 0; x < 8; x++)
{
uint16_t const color = (chardata[y] & (1 << (7-x))) ? fg : bg;
uint16_t const color = (chardata[y] & (1 << (7 - x))) ? fg : bg;
for (int i = 0; i < xscale; i++)
{
@ -182,10 +186,13 @@ void agat7video_device::text_update_lores(screen_device &screen, bitmap_ind16 &b
address = m_start_address + (col * 2) + (row * 8);
ch = m_ram_dev->read(address);
attr = m_ram_dev->read(address + 1);
fg = bitswap<8>(attr,7,6,5,3,4,2,1,0) & 15;
if (BIT(attr, 5)) {
fg = bitswap<8>(attr, 7, 6, 5, 3, 4, 2, 1, 0) & 15;
if (BIT(attr, 5))
{
plot_text_character(bitmap, col * 16, row, 2, ch, m_char_ptr, m_char_size, fg, bg);
} else {
}
else
{
plot_text_character(bitmap, col * 16, row, 2, ch, m_char_ptr, m_char_size, bg, fg);
}
}
@ -202,10 +209,15 @@ void agat7video_device::text_update_hires(screen_device &screen, bitmap_ind16 &b
beginrow = std::max(beginrow, cliprect.top() - (cliprect.top() % 8));
endrow = std::min(endrow, cliprect.bottom() - (cliprect.bottom() % 8) + 7);
if (m_start_address & 0x800) {
fg = 7; bg = 0;
} else {
fg = 0; bg = 7;
if (m_start_address & 0x800)
{
fg = 7;
bg = 0;
}
else
{
fg = 0;
bg = 7;
}
for (row = beginrow; row <= endrow; row += 8)
@ -256,7 +268,7 @@ void agat7video_device::graph_update_hires(screen_device &screen, bitmap_ind16 &
uint16_t *p = &bitmap.pix(row);
for (int col = 0; col < 0x40; col++)
{
uint32_t const address = m_start_address + col + ((row/2) * 0x40);
uint32_t const address = m_start_address + col + ((row / 2) * 0x40);
uint8_t gfx = m_ram_dev->read(address);
for (int b = 0; b < 2; b++)
@ -282,7 +294,7 @@ void agat7video_device::graph_update_lores(screen_device &screen, bitmap_ind16 &
uint16_t *p = &bitmap.pix(row);
for (int col = 0; col < 0x20; col++)
{
uint32_t const address = m_start_address + col + ((row/4) * 0x20);
uint32_t const address = m_start_address + col + ((row / 4) * 0x20);
uint8_t gfx = m_ram_dev->read(address);
for (int b = 0; b < 2; b++)

View File

@ -20,6 +20,7 @@
*********************************************************************/
#include "emu.h"
#include "video/agat9.h"
#include "screen.h"
@ -62,15 +63,15 @@ void agat9video_device::device_add_mconfig(machine_config &config)
// LIVE DEVICE
//**************************************************************************
agat9video_device::agat9video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, AGAT9VIDEO, tag, owner, clock),
device_palette_interface(mconfig, *this),
m_screen(*this, "a9screen"),
m_ram_dev(*this, finder_base::DUMMY_TAG),
m_char_region(*this, finder_base::DUMMY_TAG),
m_char_ptr(nullptr),
m_char_size(0),
m_start_address(0)
agat9video_device::agat9video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AGAT9VIDEO, tag, owner, clock)
, device_palette_interface(mconfig, *this)
, m_screen(*this, "a9screen")
, m_ram_dev(*this, finder_base::DUMMY_TAG)
, m_char_region(*this, finder_base::DUMMY_TAG)
, m_char_ptr(nullptr)
, m_char_size(0)
, m_start_address(0)
{
}
@ -182,7 +183,7 @@ void agat9video_device::do_apple_io(int offset)
if (offset < 0x8)
{
m_video_mode = APPLE;
m_screen->set_visible_area(0, 280-1, 0, 192-1);
m_screen->set_visible_area(0, 280 - 1, 0, 192 - 1);
}
switch (offset)
@ -235,7 +236,7 @@ void agat9video_device::do_io(int offset)
m_mode = offset;
m_screen->set_visible_area(0, 2*256-1, 0, 256-1);
m_screen->set_visible_area(0, 2 * 256 - 1, 0, 256 - 1);
switch (offset & 3)
{
@ -343,10 +344,13 @@ void agat9video_device::text_update_lores(screen_device &screen, bitmap_ind16 &b
address = m_start_address + (col * 2) + (row * 8);
ch = m_ram_dev->read(address);
attr = m_ram_dev->read(address + 1);
fg = bitswap<8>(attr,7,6,5,3,4,2,1,0) & 15;
if (BIT(attr, 5)) {
fg = bitswap<8>(attr, 7, 6, 5, 3, 4, 2, 1, 0) & 15;
if (BIT(attr, 5))
{
plot_text_character(bitmap, col * 16, row, 2, ch, m_char_ptr, m_char_size, fg, bg);
} else {
}
else
{
plot_text_character(bitmap, col * 16, row, 2, ch, m_char_ptr, m_char_size, bg, fg);
}
}