mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
act/victor9k.cpp: Fixed several bugs in display logic: (#10374)
* Fixed the resolution. * Hide elements outside the overscan area. * Correctly return from high resolution to low resolution mode. * Cleaned up logging code.
This commit is contained in:
parent
616e11aeb9
commit
c025f1f159
@ -44,6 +44,30 @@
|
||||
#include "softlist_dev.h"
|
||||
#include "speaker.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
//**************************************************************************
|
||||
// LOGGING
|
||||
//**************************************************************************
|
||||
|
||||
#define LOG_CONF (1 << 1U)
|
||||
#define LOG_KEYBOARD (1 << 2U)
|
||||
#define LOG_DISPLAY (1 << 3U)
|
||||
|
||||
//#define VERBOSE (LOG_CONF|LOG_DISPLAY|LOG_KEYBOARD)
|
||||
//#define LOG_OUTPUT_STREAM std::cout
|
||||
|
||||
#include "logmacro.h"
|
||||
|
||||
#define LOGCONF(...) LOGMASKED(LOG_CONF, __VA_ARGS__)
|
||||
#define LOGKEYBOARD(...) LOGMASKED(LOG_KEYBOARD, __VA_ARGS__)
|
||||
#define LOGDISPLAY(...) LOGMASKED(LOG_DISPLAY, __VA_ARGS__)
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define I8088_TAG "8l"
|
||||
#define I8253_TAG "13h"
|
||||
#define I8259A_TAG "7l"
|
||||
@ -61,6 +85,9 @@
|
||||
#define SCREEN_TAG "screen"
|
||||
#define KB_TAG "kb"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class victor9k_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -83,6 +110,7 @@ public:
|
||||
m_rs232a(*this, RS232_A_TAG),
|
||||
m_rs232b(*this, RS232_B_TAG),
|
||||
m_palette(*this, "palette"),
|
||||
m_screen(*this, SCREEN_TAG),
|
||||
m_rom(*this, I8088_TAG),
|
||||
m_video_ram(*this, "video_ram"),
|
||||
m_brt(0),
|
||||
@ -116,6 +144,7 @@ private:
|
||||
required_device<rs232_port_device> m_rs232a;
|
||||
required_device<rs232_port_device> m_rs232b;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<screen_device> m_screen;
|
||||
required_memory_region m_rom;
|
||||
required_shared_ptr<uint8_t> m_video_ram;
|
||||
|
||||
@ -145,13 +174,15 @@ private:
|
||||
DECLARE_WRITE_LINE_MEMBER( kbdata_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( vert_w );
|
||||
|
||||
|
||||
MC6845_UPDATE_ROW( crtc_update_row );
|
||||
MC6845_BEGIN_UPDATE( crtc_begin_update );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( mux_serial_b_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( mux_serial_a_w );
|
||||
|
||||
void victor9k_palette(palette_device &palette) const;
|
||||
|
||||
|
||||
// video state
|
||||
int m_brt;
|
||||
int m_cont;
|
||||
@ -174,15 +205,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACROS / CONSTANTS
|
||||
//**************************************************************************
|
||||
|
||||
#define LOG 0
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// ADDRESS MAPS
|
||||
//**************************************************************************
|
||||
@ -245,14 +267,7 @@ MC6845_UPDATE_ROW( victor9k_state::crtc_update_row )
|
||||
int hires = BIT(ma, 13);
|
||||
int dot_addr = BIT(ma, 12);
|
||||
int width = hires ? 16 : 10;
|
||||
|
||||
if (m_hires != hires)
|
||||
{
|
||||
m_hires = hires;
|
||||
m_crtc->set_unscaled_clock(XTAL(30'000'000) / width);
|
||||
m_crtc->set_hpixels_per_column(width);
|
||||
}
|
||||
|
||||
|
||||
address_space &program = m_maincpu->space(AS_PROGRAM);
|
||||
const rgb_t *palette = m_palette->palette()->entry_list_raw();
|
||||
|
||||
@ -312,14 +327,27 @@ MC6845_UPDATE_ROW( victor9k_state::crtc_update_row )
|
||||
}
|
||||
}
|
||||
|
||||
MC6845_BEGIN_UPDATE( victor9k_state::crtc_begin_update )
|
||||
{
|
||||
uint16_t ma = m_crtc->get_ma();
|
||||
int hires = BIT(ma, 13);
|
||||
int width = hires ? 16 : 10;
|
||||
if (hires != m_hires)
|
||||
{
|
||||
//LOGDISPLAY("mc6845 begin update change resolution: %s\n", hires ? "high" : "low");
|
||||
m_crtc->set_hpixels_per_column(width);
|
||||
m_crtc->set_char_width(width);
|
||||
//m_crtc->set_visarea_adjust(0, 0, 0, 10); //show line 25
|
||||
m_hires = hires;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(victor9k_state::vert_w)
|
||||
{
|
||||
m_via2->write_pa7(state);
|
||||
m_pic->ir7_w(state);
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER(victor9k_state::mux_serial_b_w)
|
||||
{
|
||||
}
|
||||
@ -504,7 +532,7 @@ void victor9k_state::via2_pb_w(uint8_t data)
|
||||
// contrast
|
||||
m_cont = data >> 5;
|
||||
|
||||
if (LOG) logerror("BRT %u CONT %u\n", m_brt, m_cont);
|
||||
LOGDISPLAY("BRT %u CONT %u\n", m_brt, m_cont);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( victor9k_state::via2_irq_w )
|
||||
@ -563,7 +591,7 @@ WRITE_LINE_MEMBER( victor9k_state::via3_irq_w )
|
||||
|
||||
WRITE_LINE_MEMBER( victor9k_state::kbrdy_w )
|
||||
{
|
||||
if (LOG) logerror("KBRDY %u\n", state);
|
||||
LOGKEYBOARD("KBRDY %u\n", state);
|
||||
|
||||
m_via2->write_cb1(state);
|
||||
|
||||
@ -573,7 +601,7 @@ WRITE_LINE_MEMBER( victor9k_state::kbrdy_w )
|
||||
|
||||
WRITE_LINE_MEMBER( victor9k_state::kbdata_w )
|
||||
{
|
||||
if (LOG) logerror("KBDATA %u\n", state);
|
||||
LOGKEYBOARD("KBDATA %u\n", state);
|
||||
|
||||
m_via2->write_cb2(state);
|
||||
m_via2->write_pa6(state);
|
||||
@ -587,7 +615,6 @@ WRITE_LINE_MEMBER( victor9k_state::fdc_irq_w )
|
||||
m_pic->ir3_w(m_ssda_irq || m_via1_irq || m_via3_irq || m_fdc_irq);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACHINE INITIALIZATION
|
||||
//**************************************************************************
|
||||
@ -600,20 +627,20 @@ void victor9k_state::victor9k_palette(palette_device &palette) const
|
||||
// BRT1 39K
|
||||
// BRT2 20K
|
||||
// 12V 220K pullup
|
||||
palette.set_pen_color(1, rgb_t(0x00, 0x10, 0x00));
|
||||
palette.set_pen_color(2, rgb_t(0x00, 0x20, 0x00));
|
||||
palette.set_pen_color(3, rgb_t(0x00, 0x40, 0x00));
|
||||
palette.set_pen_color(4, rgb_t(0x00, 0x60, 0x00));
|
||||
palette.set_pen_color(5, rgb_t(0x00, 0x80, 0x00));
|
||||
palette.set_pen_color(6, rgb_t(0x00, 0xa0, 0x00));
|
||||
palette.set_pen_color(7, rgb_t(0x00, 0xc0, 0x00));
|
||||
palette.set_pen_color(8, rgb_t(0x00, 0xff, 0x00));
|
||||
palette.set_pen_color(1, rgb_t(0x00, 0x10, 0x04));
|
||||
palette.set_pen_color(2, rgb_t(0x00, 0x20, 0x09));
|
||||
palette.set_pen_color(3, rgb_t(0x00, 0x40, 0x11));
|
||||
palette.set_pen_color(4, rgb_t(0x00, 0x60, 0x1a));
|
||||
palette.set_pen_color(5, rgb_t(0x00, 0x80, 0x23));
|
||||
palette.set_pen_color(6, rgb_t(0x00, 0xa0, 0x2c));
|
||||
palette.set_pen_color(7, rgb_t(0x00, 0xc0, 0x34));
|
||||
palette.set_pen_color(8, rgb_t(0x00, 0xff, 0x45));
|
||||
|
||||
// CONT0 620R
|
||||
// CONT1 332R
|
||||
// CONT2 162R
|
||||
// 12V 110R pullup
|
||||
palette.set_pen_color(9, rgb_t(0xff, 0x00, 0x00));
|
||||
palette.set_pen_color(9, rgb_t(0x00, 0xff, 0x45));
|
||||
}
|
||||
|
||||
void victor9k_state::machine_start()
|
||||
@ -631,6 +658,7 @@ void victor9k_state::machine_start()
|
||||
|
||||
#ifndef USE_SCP
|
||||
// patch out SCP self test
|
||||
LOGCONF("patch out SCP self test");
|
||||
m_rom->base()[0x11ab] = 0xc3;
|
||||
|
||||
// patch out ROM checksum error
|
||||
@ -644,12 +672,13 @@ void victor9k_state::machine_start()
|
||||
int m_ram_size = m_ram->size();
|
||||
u8 *m_ram_ptr = m_ram->pointer();
|
||||
|
||||
int ramsize = m_ram_size;
|
||||
if (ramsize > 0) {
|
||||
int ramsize = m_ram_size;
|
||||
if (ramsize > 0)
|
||||
{
|
||||
address_space& space = m_maincpu->space(AS_PROGRAM);
|
||||
if (ramsize > 0xdffff) //the 896KB option overlaps 1 bit with
|
||||
ramsize = 0xdffff; //the I/O memory space, truncating
|
||||
if (LOG) logerror("install_ram ramsize %x\n", ramsize);
|
||||
LOGCONF("install_ram ramsize %x\n", ramsize);
|
||||
space.install_ram(0x0, ramsize, m_ram_ptr);
|
||||
}
|
||||
}
|
||||
@ -679,28 +708,30 @@ void victor9k_state::machine_reset()
|
||||
void victor9k_state::victor9k(machine_config &config)
|
||||
{
|
||||
// basic machine hardware
|
||||
I8088(config, m_maincpu, XTAL(30'000'000)/6);
|
||||
I8088(config, m_maincpu, 15_MHz_XTAL / 3);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &victor9k_state::victor9k_mem);
|
||||
m_maincpu->set_irq_acknowledge_callback(I8259A_TAG, FUNC(pic8259_device::inta_cb));
|
||||
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
|
||||
screen.set_color(rgb_t::green());
|
||||
screen.set_refresh_hz(50);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate
|
||||
screen.set_screen_update(HD46505S_TAG, FUNC(hd6845s_device::screen_update));
|
||||
screen.set_size(640, 480);
|
||||
screen.set_visarea(0, 640-1, 0, 480-1);
|
||||
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
||||
m_screen->set_color(rgb_t::green());
|
||||
m_screen->set_refresh_hz(72);
|
||||
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(1200));
|
||||
m_screen->set_size(800, 400);
|
||||
m_screen->set_visarea(0, 799, 0, 399);
|
||||
m_screen->set_screen_update(HD46505S_TAG, FUNC(hd6845s_device::screen_update));
|
||||
|
||||
PALETTE(config, m_palette, FUNC(victor9k_state::victor9k_palette), 16);
|
||||
|
||||
HD6845S(config, m_crtc, XTAL(30'000'000)/10); // HD6845 == HD46505S
|
||||
HD6845S(config, m_crtc, 15_MHz_XTAL / 10); // HD6845 == HD46505S
|
||||
m_crtc->set_screen(SCREEN_TAG);
|
||||
m_crtc->set_show_border_area(true);
|
||||
m_crtc->set_show_border_area(false);
|
||||
m_crtc->set_char_width(10);
|
||||
m_crtc->set_visarea_adjust(0, 0, 0, 10); //show line 25
|
||||
|
||||
m_crtc->set_update_row_callback(FUNC(victor9k_state::crtc_update_row));
|
||||
m_crtc->out_vsync_callback().set(FUNC(victor9k_state::vert_w));
|
||||
|
||||
m_crtc->set_begin_update_callback(FUNC(victor9k_state::crtc_begin_update));
|
||||
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
HC55516(config, m_cvsd, 0);
|
||||
@ -730,7 +761,7 @@ void victor9k_state::victor9k(machine_config &config)
|
||||
pit.set_clk<2>(100000);
|
||||
pit.out_handler<2>().set(I8259A_TAG, FUNC(pic8259_device::ir2_w));
|
||||
|
||||
UPD7201(config, m_upd7201, XTAL(30'000'000)/30);
|
||||
UPD7201(config, m_upd7201, 15_MHz_XTAL / 6);
|
||||
m_upd7201->out_txda_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd));
|
||||
m_upd7201->out_dtra_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr));
|
||||
m_upd7201->out_rtsa_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_rts));
|
||||
@ -739,24 +770,24 @@ void victor9k_state::victor9k(machine_config &config)
|
||||
m_upd7201->out_rtsb_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_rts));
|
||||
m_upd7201->out_int_callback().set(I8259A_TAG, FUNC(pic8259_device::ir1_w));
|
||||
|
||||
MC6852(config, m_ssda, XTAL(30'000'000)/30);
|
||||
MC6852(config, m_ssda, 15_MHz_XTAL / 15);
|
||||
m_ssda->tx_data_callback().set(HC55516_TAG, FUNC(hc55516_device::digit_w));
|
||||
m_ssda->sm_dtr_callback().set(FUNC(victor9k_state::ssda_sm_dtr_w));
|
||||
m_ssda->irq_callback().set(FUNC(victor9k_state::ssda_irq_w));
|
||||
|
||||
MOS6522(config, m_via1, XTAL(30'000'000)/30);
|
||||
MOS6522(config, m_via1, 15_MHz_XTAL / 15);
|
||||
m_via1->readpa_handler().set(IEEE488_TAG, FUNC(ieee488_device::dio_r));
|
||||
m_via1->writepa_handler().set(FUNC(victor9k_state::via1_pa_w));
|
||||
m_via1->writepb_handler().set(FUNC(victor9k_state::via1_pb_w));
|
||||
m_via1->cb2_handler().set(FUNC(victor9k_state::codec_vol_w));
|
||||
m_via1->irq_handler().set(FUNC(victor9k_state::via1_irq_w));
|
||||
|
||||
MOS6522(config, m_via2, XTAL(30'000'000)/30);
|
||||
MOS6522(config, m_via2, 15_MHz_XTAL / 15);
|
||||
m_via2->writepa_handler().set(FUNC(victor9k_state::via2_pa_w));
|
||||
m_via2->writepb_handler().set(FUNC(victor9k_state::via2_pb_w));
|
||||
m_via2->irq_handler().set(FUNC(victor9k_state::via2_irq_w));
|
||||
|
||||
MOS6522(config, m_via3, XTAL(30'000'000)/30);
|
||||
MOS6522(config, m_via3, 15_MHz_XTAL / 15);
|
||||
m_via3->writepb_handler().set(FUNC(victor9k_state::via3_pb_w));
|
||||
m_via3->irq_handler().set(FUNC(victor9k_state::via3_irq_w));
|
||||
|
||||
@ -814,6 +845,7 @@ ROM_START( victor9k )
|
||||
ROMX_LOAD( "v9000 univ. ff f3f7 39fe.8j", 0x1000, 0x1000, CRC(496c7467) SHA1(eccf428f62ef94ab85f4a43ba59ae6a066244a66), ROM_BIOS(1) )
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -42,22 +42,30 @@
|
||||
#include "victor9k_fdc.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACROS / CONSTANTS
|
||||
// LOGGING
|
||||
//**************************************************************************
|
||||
|
||||
#define LOG_VIA (1U << 1)
|
||||
#define LOG_SCP (1U << 2)
|
||||
#define LOG_BITS (1U << 3)
|
||||
#define LOG_DISK (1U << 3)
|
||||
#define LOG_BITS (1U << 4)
|
||||
|
||||
//#define VERBOSE (LOG_VIA | LOG_SCP | LOG_DISK | LOG_BITS)
|
||||
//#define LOG_OUTPUT_STREAM std::cout
|
||||
|
||||
#ifdef USE_SCP
|
||||
#define VERBOSE (LOG_SCP)
|
||||
#else
|
||||
#define VERBOSE (0)
|
||||
#endif
|
||||
#include "logmacro.h"
|
||||
|
||||
#define LOGVIA(...) LOGMASKED(LOG_VIA, __VA_ARGS__)
|
||||
#define LOGDISK(...) LOGMASKED(LOG_DISK, __VA_ARGS__)
|
||||
#define LOGBITS(...) LOGMASKED(LOG_BITS, __VA_ARGS__)
|
||||
#define LOGSCP(...) LOGMASKED(LOG_SCP, __VA_ARGS__)
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACROS / CONSTANTS
|
||||
//**************************************************************************
|
||||
|
||||
#define I8048_TAG "5d"
|
||||
#define M6522_4_TAG "1f"
|
||||
#define M6522_5_TAG "1k"
|
||||
@ -350,13 +358,13 @@ TIMER_CALLBACK_MEMBER(victor_9000_fdc_device::gen_tick)
|
||||
TIMER_CALLBACK_MEMBER(victor_9000_fdc_device::tach0_tick)
|
||||
{
|
||||
m_tach0 = !m_tach0;
|
||||
LOGMASKED(LOG_SCP, "%s TACH0 %u\n", machine().time().as_string(), m_tach0);
|
||||
LOGSCP("%s TACH0 %u\n", machine().time().as_string(), m_tach0);
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(victor_9000_fdc_device::tach1_tick)
|
||||
{
|
||||
m_tach1 = !m_tach1;
|
||||
LOGMASKED(LOG_SCP, "%s TACH1 %u\n", machine().time().as_string(), m_tach1);
|
||||
LOGSCP("%s TACH1 %u\n", machine().time().as_string(), m_tach1);
|
||||
}
|
||||
|
||||
|
||||
@ -488,7 +496,7 @@ void victor_9000_fdc_device::floppy_p2_w(uint8_t data)
|
||||
m_scp_rdy1 = BIT(data, 7);
|
||||
update_rdy();
|
||||
|
||||
LOGMASKED(LOG_SCP, "%s %s START0/STOP0/SEL0/RDY0 %u/%u/%u/%u START1/STOP1/SEL1/RDY1 %u/%u/%u/%u\n", machine().time().as_string(), machine().describe_context(), start0, stop0, sel0, m_rdy0, start1, stop1, sel1, m_rdy1);
|
||||
LOGSCP("%s %s START0/STOP0/SEL0/RDY0 %u/%u/%u/%u START1/STOP1/SEL1/RDY1 %u/%u/%u/%u\n", machine().time().as_string(), machine().describe_context(), start0, stop0, sel0, m_rdy0, start1, stop1, sel1, m_rdy1);
|
||||
|
||||
if (sync)
|
||||
{
|
||||
@ -531,7 +539,7 @@ void victor_9000_fdc_device::floppy_p2_w(uint8_t data)
|
||||
|
||||
READ_LINE_MEMBER(victor_9000_fdc_device::tach0_r)
|
||||
{
|
||||
LOGMASKED(LOG_SCP, "%s %s Read TACH0 %u\n", machine().time().as_string(), machine().describe_context(), m_tach0);
|
||||
LOGSCP("%s %s Read TACH0 %u\n", machine().time().as_string(), machine().describe_context(), m_tach0);
|
||||
return m_tach0;
|
||||
}
|
||||
|
||||
@ -542,7 +550,7 @@ READ_LINE_MEMBER(victor_9000_fdc_device::tach0_r)
|
||||
|
||||
READ_LINE_MEMBER(victor_9000_fdc_device::tach1_r)
|
||||
{
|
||||
LOGMASKED(LOG_SCP, "%s %s Read TACH1 %u\n", machine().time().as_string(), machine().describe_context(), m_tach1);
|
||||
LOGSCP("%s %s Read TACH1 %u\n", machine().time().as_string(), machine().describe_context(), m_tach1);
|
||||
return m_tach1;
|
||||
}
|
||||
|
||||
@ -582,13 +590,13 @@ void victor_9000_fdc_device::update_spindle_motor(floppy_image_device *floppy, e
|
||||
#ifdef USE_SCP
|
||||
if (start && !stop && floppy->mon_r())
|
||||
{
|
||||
LOGMASKED(LOG_SCP, "%s: motor start\n", floppy->tag());
|
||||
LOGSCP("%s: motor start\n", floppy->tag());
|
||||
floppy->mon_w(0);
|
||||
t_tach->enable(true);
|
||||
}
|
||||
else if (stop && !floppy->mon_r())
|
||||
{
|
||||
LOGMASKED(LOG_SCP, "%s: motor stop\n", floppy->tag());
|
||||
LOGSCP("%s: motor stop\n", floppy->tag());
|
||||
floppy->mon_w(1);
|
||||
t_tach->enable(false);
|
||||
}
|
||||
@ -604,7 +612,7 @@ void victor_9000_fdc_device::update_rpm(floppy_image_device *floppy, emu_timer *
|
||||
|
||||
float tach = rpm[da] / 60.0 * SPINDLE_RATIO * MOTOR_POLES;
|
||||
|
||||
LOGMASKED(LOG_SCP, "%s: motor speed %u rpm / tach %0.1f hz %0.9f s (DA %02x)\n", floppy->tag(), rpm[da], (double) tach, 1.0/(double)tach, da);
|
||||
LOGSCP("%s: motor speed %u rpm / tach %0.1f hz %0.9f s (DA %02x)\n", floppy->tag(), rpm[da], (double) tach, 1.0/(double)tach, da);
|
||||
|
||||
floppy->set_rpm(rpm[da]);
|
||||
|
||||
@ -628,7 +636,7 @@ void victor_9000_fdc_device::update_rdy()
|
||||
|
||||
void victor_9000_fdc_device::da_w(uint8_t data)
|
||||
{
|
||||
LOGMASKED(LOG_SCP, "%s %s DA %02x SEL0 %u SEL1 %u\n", machine().time().as_string(), machine().describe_context(), data, m_sel0, m_sel1);
|
||||
LOGSCP("%s %s DA %02x SEL0 %u SEL1 %u\n", machine().time().as_string(), machine().describe_context(), data, m_sel0, m_sel1);
|
||||
|
||||
live_sync();
|
||||
m_da = data;
|
||||
@ -690,7 +698,7 @@ void victor_9000_fdc_device::via4_pa_w(uint8_t data)
|
||||
|
||||
uint8_t st0 = data >> 4;
|
||||
|
||||
LOGMASKED(LOG_VIA, "%s %s L0MS %01x ST0 %01x\n", machine().time().as_string(), machine().describe_context(), m_via_l0ms, st0);
|
||||
LOGVIA("%s %s L0MS %01x ST0 %01x\n", machine().time().as_string(), machine().describe_context(), m_via_l0ms, st0);
|
||||
|
||||
if (m_st0 != st0)
|
||||
{
|
||||
@ -754,7 +762,7 @@ void victor_9000_fdc_device::via4_pb_w(uint8_t data)
|
||||
|
||||
uint8_t st1 = data >> 4;
|
||||
|
||||
LOGMASKED(LOG_VIA, "%s %s L1MS %01x ST1 %01x\n", machine().time().as_string(), machine().describe_context(), m_via_l1ms, st1);
|
||||
LOGVIA("%s %s L1MS %01x ST1 %01x\n", machine().time().as_string(), machine().describe_context(), m_via_l1ms, st1);
|
||||
|
||||
if (m_st1 != st1)
|
||||
{
|
||||
@ -774,7 +782,7 @@ WRITE_LINE_MEMBER( victor_9000_fdc_device::wrsync_w )
|
||||
m_wrsync = state;
|
||||
cur_live.wrsync = state;
|
||||
checkpoint();
|
||||
LOGMASKED(LOG_VIA, "%s %s WRSYNC %u\n", machine().time().as_string(), machine().describe_context(), state);
|
||||
LOGVIA("%s %s WRSYNC %u\n", machine().time().as_string(), machine().describe_context(), state);
|
||||
live_run();
|
||||
}
|
||||
}
|
||||
@ -823,7 +831,7 @@ void victor_9000_fdc_device::via5_pb_w(uint8_t data)
|
||||
|
||||
*/
|
||||
|
||||
LOGMASKED(LOG_VIA, "%s %s WD %02x\n", machine().time().as_string(), machine().describe_context(), data);
|
||||
LOGVIA("%s %s WD %02x\n", machine().time().as_string(), machine().describe_context(), data);
|
||||
|
||||
m_via5->write_cb1(BIT(data, 7));
|
||||
|
||||
@ -861,7 +869,7 @@ uint8_t victor_9000_fdc_device::via6_pa_r()
|
||||
|
||||
*/
|
||||
|
||||
LOGMASKED(LOG_VIA, "%s %s TRK0D0 %u TRK0D1 %u SYNC %u\n", machine().time().as_string(), machine().describe_context(), m_floppy0->get_device() ? m_floppy0->get_device()->trk00_r() : 0, m_floppy1->get_device() ? m_floppy1->get_device()->trk00_r() : 0, checkpoint_live.sync);
|
||||
LOGVIA("%s %s TRK0D0 %u TRK0D1 %u SYNC %u\n", machine().time().as_string(), machine().describe_context(), m_floppy0->get_device() ? m_floppy0->get_device()->trk00_r() : 0, m_floppy1->get_device() ? m_floppy1->get_device()->trk00_r() : 0, checkpoint_live.sync);
|
||||
|
||||
uint8_t data = 0;
|
||||
|
||||
@ -929,7 +937,7 @@ void victor_9000_fdc_device::via6_pa_w(uint8_t data)
|
||||
m_drive = drive;
|
||||
cur_live.drive = drive;
|
||||
|
||||
LOGMASKED(LOG_VIA, "%s %s SIDE %u DRIVE %u\n", machine().time().as_string(), machine().describe_context(), side, drive);
|
||||
LOGVIA("%s %s SIDE %u DRIVE %u\n", machine().time().as_string(), machine().describe_context(), side, drive);
|
||||
|
||||
checkpoint();
|
||||
live_run();
|
||||
@ -1023,7 +1031,7 @@ void victor_9000_fdc_device::via6_pb_w(uint8_t data)
|
||||
if (m_floppy1->get_device())
|
||||
update_stepper_motor(m_floppy1->get_device(), m_stp1, m_st1, m_st1);
|
||||
|
||||
LOGMASKED(LOG_VIA, "%s %s STP0 %u STP1 %u\n", machine().time().as_string(), machine().describe_context(), stp0, stp1);
|
||||
LOGVIA("%s %s STP0 %u STP1 %u\n", machine().time().as_string(), machine().describe_context(), stp0, stp1);
|
||||
|
||||
checkpoint();
|
||||
live_run();
|
||||
@ -1037,7 +1045,7 @@ WRITE_LINE_MEMBER( victor_9000_fdc_device::drw_w )
|
||||
live_sync();
|
||||
m_drw = cur_live.drw = state;
|
||||
checkpoint();
|
||||
LOGMASKED(LOG_VIA, "%s %s DRW %u\n", machine().time().as_string(), machine().describe_context(), state);
|
||||
LOGVIA("%s %s DRW %u\n", machine().time().as_string(), machine().describe_context(), state);
|
||||
if (state)
|
||||
{
|
||||
pll_stop_writing(get_floppy(), machine().time());
|
||||
@ -1057,7 +1065,7 @@ WRITE_LINE_MEMBER( victor_9000_fdc_device::erase_w )
|
||||
live_sync();
|
||||
m_erase = cur_live.erase = state;
|
||||
checkpoint();
|
||||
LOGMASKED(LOG_VIA, "%s %s ERASE %u\n", machine().time().as_string(), machine().describe_context(), state);
|
||||
LOGVIA("%s %s ERASE %u\n", machine().time().as_string(), machine().describe_context(), state);
|
||||
live_run();
|
||||
}
|
||||
}
|
||||
@ -1073,7 +1081,7 @@ uint8_t victor_9000_fdc_device::cs7_r(offs_t offset)
|
||||
{
|
||||
m_lbrdy_cb(1);
|
||||
|
||||
LOGMASKED(LOG_VIA, "%s %s LBRDY 1 : %02x\n", machine().time().as_string(), machine().describe_context(), m_via5->read(offset));
|
||||
LOGVIA("%s %s LBRDY 1 : %02x\n", machine().time().as_string(), machine().describe_context(), m_via5->read(offset));
|
||||
|
||||
return m_via5->read(offset);
|
||||
}
|
||||
@ -1082,7 +1090,7 @@ void victor_9000_fdc_device::cs7_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_lbrdy_cb(1);
|
||||
|
||||
LOGMASKED(LOG_VIA, "%s %s LBRDY 1\n", machine().time().as_string(), machine().describe_context());
|
||||
LOGVIA("%s %s LBRDY 1\n", machine().time().as_string(), machine().describe_context());
|
||||
|
||||
m_via5->write(offset, data);
|
||||
}
|
||||
@ -1337,7 +1345,7 @@ void victor_9000_fdc_device::live_run(const attotime &limit)
|
||||
cur_live.e = m_gcr_rom->base()[cur_live.i];
|
||||
|
||||
attotime next = cur_live.tm + m_period;
|
||||
LOGMASKED(LOG_GENERAL, "%s:%s cyl %u bit %u sync %u bc %u sr %03x sbc %u sBC %u syn %u i %03x e %02x\n",cur_live.tm.as_string(),next.as_string(),get_floppy()->get_cyl(),bit,sync,cur_live.bit_counter,cur_live.shift_reg,cur_live.sync_bit_counter,cur_live.sync_byte_counter,syn,cur_live.i,cur_live.e);
|
||||
LOGDISK("%s:%s cyl %u bit %u sync %u bc %u sr %03x sbc %u sBC %u syn %u i %03x e %02x\n",cur_live.tm.as_string(),next.as_string(),get_floppy()->get_cyl(),bit,sync,cur_live.bit_counter,cur_live.shift_reg,cur_live.sync_bit_counter,cur_live.sync_byte_counter,syn,cur_live.i,cur_live.e);
|
||||
|
||||
// byte ready
|
||||
int brdy = !(cur_live.bit_counter == 9);
|
||||
@ -1346,16 +1354,16 @@ void victor_9000_fdc_device::live_run(const attotime &limit)
|
||||
int gcr_err = !(brdy || BIT(cur_live.e, 3));
|
||||
|
||||
if (cur_live.drw)
|
||||
LOGMASKED(LOG_BITS, "%s cyl %u bit %u sync %u bc %u sr %03x i %03x e %02x\n",cur_live.tm.as_string(),get_floppy()->get_cyl(),bit,sync,cur_live.bit_counter,cur_live.shift_reg,cur_live.i,cur_live.e);
|
||||
LOGBITS("%s cyl %u bit %u sync %u bc %u sr %03x i %03x e %02x\n",cur_live.tm.as_string(),get_floppy()->get_cyl(),bit,sync,cur_live.bit_counter,cur_live.shift_reg,cur_live.i,cur_live.e);
|
||||
else
|
||||
LOGMASKED(LOG_BITS, "%s cyl %u writing bit %u bc %u sr %03x i %03x e %02x\n",cur_live.tm.as_string(),get_floppy()->get_cyl(),write_bit,cur_live.bit_counter,cur_live.shift_reg_write,cur_live.i,cur_live.e);
|
||||
LOGBITS("%s cyl %u writing bit %u bc %u sr %03x i %03x e %02x\n",cur_live.tm.as_string(),get_floppy()->get_cyl(),write_bit,cur_live.bit_counter,cur_live.shift_reg_write,cur_live.i,cur_live.e);
|
||||
|
||||
if (!brdy)
|
||||
{
|
||||
// load write shift register
|
||||
cur_live.shift_reg_write = GCR_ENCODE(cur_live.e, cur_live.i);
|
||||
|
||||
LOGMASKED(LOG_GENERAL, "%s load write shift register %03x\n",cur_live.tm.as_string(),cur_live.shift_reg_write);
|
||||
LOGDISK("%s load write shift register %03x\n",cur_live.tm.as_string(),cur_live.shift_reg_write);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1366,11 +1374,11 @@ void victor_9000_fdc_device::live_run(const attotime &limit)
|
||||
|
||||
if (brdy != cur_live.brdy)
|
||||
{
|
||||
LOGMASKED(LOG_GENERAL, "%s BRDY %u\n", cur_live.tm.as_string(),brdy);
|
||||
LOGDISK("%s BRDY %u\n", cur_live.tm.as_string(),brdy);
|
||||
if (!brdy)
|
||||
{
|
||||
cur_live.lbrdy_changed = true;
|
||||
LOGMASKED(LOG_VIA, "%s LBRDY 0 : %02x\n", cur_live.tm.as_string(), GCR_DECODE(cur_live.e, cur_live.i));
|
||||
LOGDISK("%s LBRDY 0 : %02x\n", cur_live.tm.as_string(), GCR_DECODE(cur_live.e, cur_live.i));
|
||||
}
|
||||
cur_live.brdy = brdy;
|
||||
syncpoint = true;
|
||||
@ -1378,14 +1386,14 @@ void victor_9000_fdc_device::live_run(const attotime &limit)
|
||||
|
||||
if (sync != cur_live.sync)
|
||||
{
|
||||
LOGMASKED(LOG_GENERAL, "%s SYNC %u\n", cur_live.tm.as_string(),sync);
|
||||
LOGDISK("%s SYNC %u\n", cur_live.tm.as_string(),sync);
|
||||
cur_live.sync = sync;
|
||||
syncpoint = true;
|
||||
}
|
||||
|
||||
if (syn != cur_live.syn)
|
||||
{
|
||||
LOGMASKED(LOG_GENERAL, "%s SYN %u\n", cur_live.tm.as_string(),syn);
|
||||
LOGDISK("%s SYN %u\n", cur_live.tm.as_string(),syn);
|
||||
cur_live.syn = syn;
|
||||
cur_live.syn_changed = true;
|
||||
syncpoint = true;
|
||||
@ -1393,7 +1401,7 @@ void victor_9000_fdc_device::live_run(const attotime &limit)
|
||||
|
||||
if (gcr_err != cur_live.gcr_err)
|
||||
{
|
||||
LOGMASKED(LOG_GENERAL, "%s GCR ERR %u\n", cur_live.tm.as_string(),gcr_err);
|
||||
LOGDISK("%s GCR ERR %u\n", cur_live.tm.as_string(),gcr_err);
|
||||
cur_live.gcr_err = gcr_err;
|
||||
syncpoint = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user