-Filled out most of the Slovak translation. [Milan Galcik]

-Cleaned up various bits and pieces. [Vas Crabb]
This commit is contained in:
Vas Crabb 2021-11-30 23:57:04 +11:00
parent e8fbcd5000
commit c2a18887b0
24 changed files with 1288 additions and 3296 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2586,8 +2586,6 @@ files {
MAME_DIR .. "src/mame/drivers/nwk-tr.cpp",
MAME_DIR .. "src/mame/drivers/otomedius.cpp",
MAME_DIR .. "src/mame/drivers/overdriv.cpp",
MAME_DIR .. "src/mame/includes/overdriv.h",
MAME_DIR .. "src/mame/video/overdriv.cpp",
MAME_DIR .. "src/mame/drivers/pandoras.cpp",
MAME_DIR .. "src/mame/includes/pandoras.h",
MAME_DIR .. "src/mame/video/pandoras.cpp",

View File

@ -148,13 +148,13 @@ void albazc_state::out_2_w(uint8_t data)
void albazc_state::vregs_w(offs_t offset, uint8_t data)
{
#ifdef UNUSED_FUNCTION
#if 0
{
static uint8_t x[5];
x[offset] = data;
popmessage("%02x %02x %02x %02x %02x",x[0],x[1],x[2],x[3],x[4]);
}
#endif
#endif
if (offset == 0)
flip_screen_set((data & 0x40) >> 6);

View File

@ -985,11 +985,11 @@ INPUT_PORTS_END
#if 0
void nc_state::nc150_init_machine()
{
m_membank_internal_ram_mask = 7;
m_membank_internal_ram_mask = 7;
m_membank_card_ram_mask = 0x03f;
m_membank_card_ram_mask = 0x03f;
nc_state::machine_reset();
nc_state::machine_reset();
}
#endif
@ -998,18 +998,16 @@ void nc_state::nc150_init_machine()
/**********************************************************************************************************/
/* NC200 hardware */
#ifdef UNUSED_FUNCTION
void nc200_state::nc200_display_memory_start_w(uint8_t data)
{
/* bit 7: A15 */
/* bit 6: A14 */
/* bit 5: A13 */
/* bit 4-0: not used */
m_display_memory_start = (data & 0x0e0)<<(12-4);
m_display_memory_start = (data & 0x0e0) << (12 - 4);
LOG("disp memory w: %04x\n", m_display_memory_start);
}
#endif
WRITE_LINE_MEMBER(nc200_state::write_nc200_centronics_ack)
@ -1085,15 +1083,13 @@ WRITE_LINE_MEMBER(nc200_state::nc200_fdc_interrupt)
nc_update_interrupts();
}
#ifdef UNUSED_FUNCTION
void nc_state::nc200_floppy_drive_index_callback(int drive_id)
void nc200_state::nc200_floppy_drive_index_callback(int drive_id)
{
LOGDEBUG("nc200 index pulse\n");
// m_irq_status |= (1<<4);
// nc_update_interrupts(Machine);
}
#endif
void nc200_state::machine_reset()
{

View File

@ -27,7 +27,13 @@
***************************************************************************/
#include "emu.h"
#include "includes/overdriv.h"
#include "machine/k053252.h"
#include "machine/timer.h"
#include "video/k051316.h"
#include "video/k053246_k053247_k055673.h"
#include "video/k053251.h"
#include "video/konami_helper.h"
#include "cpu/m68000/m68000.h"
#include "cpu/m6809/m6809.h"
@ -37,11 +43,85 @@
#include "sound/k053260.h"
#include "sound/ymopm.h"
#include "video/k053250.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "overdriv.lh"
namespace {
class overdriv_state : public driver_device
{
public:
overdriv_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_subcpu(*this, "sub")
, m_audiocpu(*this, "audiocpu")
, m_k051316_1(*this, "k051316_1")
, m_k051316_2(*this, "k051316_2")
, m_k053246(*this, "k053246")
, m_k053251(*this, "k053251")
, m_k053252(*this, "k053252")
, m_screen(*this, "screen")
, m_led(*this, "led0")
{ }
void overdriv(machine_config &config);
private:
void eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void cpuA_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
uint16_t cpuB_ctrl_r();
void cpuB_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void overdriv_soundirq_w(uint16_t data);
void sound_ack_w(uint8_t data);
void slave_irq4_assert_w(uint16_t data);
void slave_irq5_assert_w(uint16_t data);
void objdma_w(uint8_t data);
TIMER_CALLBACK_MEMBER(objdma_end_cb);
uint32_t screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
[[maybe_unused]] INTERRUPT_GEN_MEMBER(cpuB_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(overdriv_cpuA_scanline);
K051316_CB_MEMBER(zoom_callback_1);
K051316_CB_MEMBER(zoom_callback_2);
K053246_CB_MEMBER(sprite_callback);
void overdriv_master_map(address_map &map);
void overdriv_slave_map(address_map &map);
void overdriv_sound_map(address_map &map);
virtual void machine_start() override;
virtual void machine_reset() override;
/* video-related */
int m_zoom_colorbase[2];
int m_road_colorbase[2];
int m_sprite_colorbase;
emu_timer *m_objdma_end_timer;
/* misc */
uint16_t m_cpuB_ctrl;
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
required_device<cpu_device> m_audiocpu;
required_device<k051316_device> m_k051316_1;
required_device<k051316_device> m_k051316_2;
required_device<k053247_device> m_k053246;
required_device<k053251_device> m_k053251;
required_device<k053252_device> m_k053252;
required_device<screen_device> m_screen;
output_finder<> m_led;
int m_fake_timer;
};
/***************************************************************************
EEPROM
@ -95,12 +175,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(overdriv_state::overdriv_cpuA_scanline)
}
}
#ifdef UNUSED_FUNCTION
INTERRUPT_GEN_MEMBER(overdriv_state::cpuB_interrupt)
{
// this doesn't get turned on until the irq has happened? wrong irq?
}
#endif
void overdriv_state::cpuA_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
@ -159,6 +237,70 @@ void overdriv_state::slave_irq5_assert_w(uint16_t data)
m_subcpu->set_input_line(5, HOLD_LINE);
}
/***************************************************************************
Callbacks for the K053247
***************************************************************************/
K053246_CB_MEMBER(overdriv_state::sprite_callback)
{
int pri = (*color & 0xffe0) >> 5; /* ??????? */
if (pri)
*priority_mask = 0x02;
else
*priority_mask = 0x00;
*color = m_sprite_colorbase + (*color & 0x001f);
}
/***************************************************************************
Callbacks for the K051316
***************************************************************************/
K051316_CB_MEMBER(overdriv_state::zoom_callback_1)
{
*flags = (*color & 0x40) ? TILE_FLIPX : 0;
*code |= ((*color & 0x03) << 8);
*color = m_zoom_colorbase[0] + ((*color & 0x3c) >> 2);
}
K051316_CB_MEMBER(overdriv_state::zoom_callback_2)
{
*flags = (*color & 0x40) ? TILE_FLIPX : 0;
*code |= ((*color & 0x03) << 8);
*color = m_zoom_colorbase[1] + ((*color & 0x3c) >> 2);
}
/***************************************************************************
Display refresh
***************************************************************************/
uint32_t overdriv_state::screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI0);
m_road_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI1);
m_road_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2);
m_zoom_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI3);
m_zoom_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI4);
screen.priority().fill(0, cliprect);
m_k051316_1->zoom_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
m_k051316_2->zoom_draw(screen, bitmap, cliprect, 0, 1);
m_k053246->k053247_sprites_draw( bitmap,cliprect);
return 0;
}
void overdriv_state::overdriv_master_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
@ -187,31 +329,6 @@ void overdriv_state::overdriv_master_map(address_map &map)
map(0x238000, 0x238001).w(FUNC(overdriv_state::slave_irq5_assert_w));
}
#ifdef UNUSED_FUNCTION
void overdriv_state::overdriv_k053246_w(offs_t offset, uint8_t data)
{
m_k053246->k053246_w(offset,data);
uint16_t *src, *dst;
m_k053246->k053247_get_ram(&dst);
src = m_sprram;
// this should be the sprite dma/irq bit...
// but it is already turned off by the time overdriv_state::cpuB_interrupt is executed?
// even now it rarely gets set, I imagine because the communication / irq is actually
// worse than we thought. (drive very slowly and things update..)
if (m_k053246->k053246_is_irq_enabled())
{
memcpy(dst,src,0x1000);
}
//printf("%02x %04x %04x\n", offset, data, mem_mask);
}
#endif
TIMER_CALLBACK_MEMBER(overdriv_state::objdma_end_cb )
{
m_subcpu->set_input_line(6, HOLD_LINE);
@ -519,6 +636,9 @@ ROM_START( overdrivb )
ROM_LOAD( "789e02.f1", 0x100000, 0x100000, CRC(bdd3b5c6) SHA1(412332d64052c0a3714f4002c944b0e7d32980a4) )
ROM_END
} // anonymous namespace
GAMEL( 1990, overdriv, 0, overdriv, overdriv, overdriv_state, empty_init, ROT90, "Konami", "Over Drive (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) // US version
GAMEL( 1990, overdriva, overdriv, overdriv, overdriv, overdriv_state, empty_init, ROT90, "Konami", "Over Drive (set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) // Overseas?
GAMEL( 1990, overdrivb, overdriv, overdriv, overdriv, overdriv_state, empty_init, ROT90, "Konami", "Over Drive (set 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) // Overseas?

View File

@ -398,9 +398,7 @@ void ssv_state::dsp_w(offs_t offset, uint16_t data)
***************************************************************************/
#ifdef UNUSED_FUNCTION
uint16_t ssv_state::fake_r(offs_t offset){ return ssv_scroll[offset]; }
#endif
uint16_t ssv_state::fake_r(offs_t offset) { return m_scroll[offset]; }
void ssv_state::ssv_map(address_map &map, u32 rom)
{

View File

@ -885,7 +885,7 @@ image_init_result tx0_magtape_image_device::call_load()
{
m_tx0->m_magtape.img = this;
m_tx0->m_magtape.irg_pos = MTIRGP_END;
m_tx0->m_magtape.irg_pos = tx0_state::MTIRGP_END;
/* restart IO when necessary */
/* note that this function may be called before tx0_init_machine, therefore
@ -893,7 +893,7 @@ image_init_result tx0_magtape_image_device::call_load()
nullptr parameter! */
if (m_tx0->m_magtape.timer)
{
if (m_tx0->m_magtape.state == MTS_SELECTING)
if (m_tx0->m_magtape.state == tx0_state::MTS_SELECTING)
m_tx0->schedule_select();
}
}
@ -909,12 +909,12 @@ void tx0_magtape_image_device::call_unload()
if (m_tx0->m_magtape.timer)
{
if (m_tx0->m_magtape.state == MTS_SELECTING)
if (m_tx0->m_magtape.state == tx0_state::MTS_SELECTING)
/* I/O has not actually started, we can cancel the selection */
m_tx0->m_tape_reader.timer->enable(0);
if ((m_tx0->m_magtape.state == MTS_SELECTED) || ((m_tx0->m_magtape.state == MTS_SELECTING) && (m_tx0->m_magtape.command == 2)))
if ((m_tx0->m_magtape.state == tx0_state::MTS_SELECTED) || ((m_tx0->m_magtape.state == tx0_state::MTS_SELECTING) && (m_tx0->m_magtape.command == 2)))
{ /* unit has become unavailable */
m_tx0->m_magtape.state = MTS_UNSELECTING;
m_tx0->m_magtape.state = tx0_state::MTS_UNSELECTING;
m_tx0->m_maincpu->set_state_int(TX0_PF, m_tx0->m_maincpu->state_int(TX0_PF) | PF_RWC);
m_tx0->schedule_unselect();
}

View File

@ -36,12 +36,10 @@ void zn_state::machine_start()
}
#ifdef UNUSED_FUNCTION
inline uint16_t zn_state::psxreadword( uint32_t *p_n_psxram, uint32_t n_address )
[[maybe_unused]] inline uint16_t zn_state::psxreadword( uint32_t *p_n_psxram, uint32_t n_address )
{
return *( (uint16_t *)( (uint8_t *)p_n_psxram + WORD_XOR_LE( n_address ) ) );
}
#endif
inline void zn_state::psxwriteword( uint32_t *p_n_psxram, uint32_t n_address, uint16_t n_data )
{

View File

@ -62,12 +62,12 @@ private:
tilemap_t *m_bg_tilemap[2][4];
int m_visible_page;
int m_priority;
uint8_t m_reikaids_which;
uint8_t m_reikaids_which;
int m_flipscreen;
uint8_t m_gfx_bank[2]; // pteacher only uses the first one
uint8_t m_blitter_bank;
uint8_t m_gfx_bank[2]; // pteacher only uses the first one
uint8_t m_blitter_bank;
int m_blitter_param_count;
uint8_t m_blitter_param[4]; /* buffers last 4 writes to 0x8006 */
uint8_t m_blitter_param[4]; /* buffers last 4 writes to 0x8006 */
/* misc */

View File

@ -1,5 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Takahiro Nogi
#ifndef MAME_INCLUDES_NBMJ8900_H
#define MAME_INCLUDES_NBMJ8900_H
#pragma once
#include "machine/nb1413m3.h"
#include "emupal.h"
#include "screen.h"
@ -7,14 +12,13 @@
class nbmj8900_state : public driver_device
{
public:
nbmj8900_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) ,
nbmj8900_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag) ,
m_maincpu(*this, "maincpu"),
m_nb1413m3(*this, "nb1413m3"),
m_screen(*this, "screen"),
m_palette(*this, "palette") { }
m_palette(*this, "palette")
{ }
void ohpaipee(machine_config &config);
void togenkyo(machine_config &config);
@ -61,6 +65,10 @@ private:
uint8_t palette_type1_r(offs_t offset);
void palette_type1_w(offs_t offset, uint8_t data);
[[maybe_unused]] uint8_t palette_type2_r(offs_t offset);
[[maybe_unused]] void palette_type2_w(offs_t offset, uint8_t data);
[[maybe_unused]] uint8_t palette_type3_r(offs_t offset);
[[maybe_unused]] void palette_type3_w(offs_t offset, uint8_t data);
void clutsel_w(uint8_t data);
uint8_t clut_r(offs_t offset);
void clut_w(offs_t offset, uint8_t data);
@ -84,3 +92,5 @@ private:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
#endif // MAME_INCLUDES_NBMJ8900_H

View File

@ -185,12 +185,15 @@ protected:
void nc200_uart_control_w(uint8_t data);
void nc200_memory_card_wait_state_w(uint8_t data);
void nc200_poweroff_control_w(uint8_t data);
[[maybe_unused]] void nc200_display_memory_start_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(write_nc200_centronics_ack);
DECLARE_WRITE_LINE_MEMBER(nc200_txrdy_callback);
DECLARE_WRITE_LINE_MEMBER(nc200_rxrdy_callback);
DECLARE_WRITE_LINE_MEMBER(nc200_fdc_interrupt);
[[maybe_unused]] void nc200_floppy_drive_index_callback(int drive_id);
virtual void machine_reset() override;
uint32_t screen_update_nc200(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

View File

@ -1,90 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
/*************************************************************************
Over Drive
*************************************************************************/
#ifndef MAME_INCLUDES_OVERDRIV_H
#define MAME_INCLUDES_OVERDRIV_H
#pragma once
#include "machine/k053252.h"
#include "machine/timer.h"
#include "video/k051316.h"
#include "video/k053246_k053247_k055673.h"
#include "video/k053251.h"
#include "video/konami_helper.h"
#include "screen.h"
class overdriv_state : public driver_device
{
public:
overdriv_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_subcpu(*this, "sub")
, m_audiocpu(*this, "audiocpu")
, m_k051316_1(*this, "k051316_1")
, m_k051316_2(*this, "k051316_2")
, m_k053246(*this, "k053246")
, m_k053251(*this, "k053251")
, m_k053252(*this, "k053252")
, m_screen(*this, "screen")
, m_led(*this, "led0")
{ }
void overdriv(machine_config &config);
private:
void eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void cpuA_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
uint16_t cpuB_ctrl_r();
void cpuB_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void overdriv_soundirq_w(uint16_t data);
void sound_ack_w(uint8_t data);
void slave_irq4_assert_w(uint16_t data);
void slave_irq5_assert_w(uint16_t data);
void objdma_w(uint8_t data);
TIMER_CALLBACK_MEMBER(objdma_end_cb);
uint32_t screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
//INTERRUPT_GEN_MEMBER(cpuB_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(overdriv_cpuA_scanline);
K051316_CB_MEMBER(zoom_callback_1);
K051316_CB_MEMBER(zoom_callback_2);
K053246_CB_MEMBER(sprite_callback);
void overdriv_master_map(address_map &map);
void overdriv_slave_map(address_map &map);
void overdriv_sound_map(address_map &map);
virtual void machine_start() override;
virtual void machine_reset() override;
/* video-related */
int m_zoom_colorbase[2];
int m_road_colorbase[2];
int m_sprite_colorbase;
emu_timer *m_objdma_end_timer;
/* misc */
uint16_t m_cpuB_ctrl;
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
required_device<cpu_device> m_audiocpu;
required_device<k051316_device> m_k051316_1;
required_device<k051316_device> m_k051316_2;
required_device<k053247_device> m_k053246;
required_device<k053251_device> m_k053251;
required_device<k053252_device> m_k053252;
required_device<screen_device> m_screen;
output_finder<> m_led;
int m_fake_timer;
};
#endif // MAME_INCLUDES_OVERDRIV_H

View File

@ -95,6 +95,7 @@ protected:
uint16_t dsp_dr_r();
void dsp_dr_w(uint16_t data);
uint16_t dsp_r(offs_t offset);
[[maybe_unused]] uint16_t fake_r(offs_t offset);
void dsp_w(offs_t offset, uint16_t data);
uint16_t drifto94_unknown_r();
uint16_t hypreact_input_r();

View File

@ -10,130 +10,129 @@
#pragma once
#include "video/crt.h"
#include "cpu/tx0/tx0.h"
#include "video/crt.h"
#include "emupal.h"
enum state_t
{
MTS_UNSELECTED,
MTS_SELECTING,
MTS_SELECTED,
MTS_UNSELECTING
};
enum backspace_state_t
{
MTBSS_STATE0,
MTBSS_STATE1,
MTBSS_STATE2,
MTBSS_STATE3,
MTBSS_STATE4,
MTBSS_STATE5,
MTBSS_STATE6
};
enum state_2_t
{
MTRDS_STATE0,
MTRDS_STATE1,
MTRDS_STATE2,
MTRDS_STATE3,
MTRDS_STATE4,
MTRDS_STATE5,
MTRDS_STATE6
};
enum state_3_t
{
MTWTS_STATE0,
MTWTS_STATE1,
MTWTS_STATE2,
MTWTS_STATE3
};
enum irg_pos_t
{
MTIRGP_START,
MTIRGP_ENDMINUS1,
MTIRGP_END
};
/* tape reader registers */
struct tx0_tape_reader_t
{
device_image_interface *fd; /* file descriptor of tape image */
int motor_on; /* 1-bit reader motor on */
int rcl; /* 1-bit reader clutch */
int rc; /* 2-bit reader counter */
emu_timer *timer; /* timer to simulate reader timing */
};
/* tape puncher registers */
struct tape_puncher_t
{
device_image_interface *fd; /* file descriptor of tape image */
emu_timer *timer; /* timer to generate completion pulses */
};
/* typewriter registers */
struct tx0_typewriter_t
{
device_image_interface *fd; /* file descriptor of output image */
emu_timer *prt_timer;/* timer to generate completion pulses */
};
/* magnetic tape unit registers */
struct magtape_t
{
device_image_interface *img; /* image descriptor */
state_t state;
int command;
int binary_flag;
union
{
backspace_state_t backspace_state;
struct
{
state_2_t state;
int space_flag;
} read;
struct
{
state_3_t state;
int counter;
} write;
} u;
int sel_pending;
int cpy_pending;
irg_pos_t irg_pos; /* position relative to inter-record gap */
int long_parity;
emu_timer *timer; /* timer to simulate reader timing */
};
class tx0_state : public driver_device
{
public:
enum state_t
{
MTS_UNSELECTED,
MTS_SELECTING,
MTS_SELECTED,
MTS_UNSELECTING
};
enum backspace_state_t
{
MTBSS_STATE0,
MTBSS_STATE1,
MTBSS_STATE2,
MTBSS_STATE3,
MTBSS_STATE4,
MTBSS_STATE5,
MTBSS_STATE6
};
enum state_2_t
{
MTRDS_STATE0,
MTRDS_STATE1,
MTRDS_STATE2,
MTRDS_STATE3,
MTRDS_STATE4,
MTRDS_STATE5,
MTRDS_STATE6
};
enum state_3_t
{
MTWTS_STATE0,
MTWTS_STATE1,
MTWTS_STATE2,
MTWTS_STATE3
};
enum irg_pos_t
{
MTIRGP_START,
MTIRGP_ENDMINUS1,
MTIRGP_END
};
/* tape reader registers */
struct tx0_tape_reader_t
{
device_image_interface *fd; /* file descriptor of tape image */
int motor_on; /* 1-bit reader motor on */
int rcl; /* 1-bit reader clutch */
int rc; /* 2-bit reader counter */
emu_timer *timer; /* timer to simulate reader timing */
};
/* tape puncher registers */
struct tape_puncher_t
{
device_image_interface *fd; /* file descriptor of tape image */
emu_timer *timer; /* timer to generate completion pulses */
};
/* typewriter registers */
struct tx0_typewriter_t
{
device_image_interface *fd; /* file descriptor of output image */
emu_timer *prt_timer;/* timer to generate completion pulses */
};
/* magnetic tape unit registers */
struct magtape_t
{
device_image_interface *img; /* image descriptor */
state_t state;
int command;
int binary_flag;
union
{
backspace_state_t backspace_state;
struct
{
state_2_t state;
int space_flag;
} read;
struct
{
state_3_t state;
int counter;
} write;
} u;
int sel_pending;
int cpy_pending;
irg_pos_t irg_pos; /* position relative to inter-record gap */
int long_parity;
emu_timer *timer; /* timer to simulate reader timing */
};
tx0_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
@ -191,6 +190,7 @@ protected:
void tx0_draw_char(bitmap_ind16 &bitmap, char character, int x, int y, int color);
void tx0_draw_string(bitmap_ind16 &bitmap, const char *buf, int x, int y, int color);
void tx0_draw_vline(bitmap_ind16 &bitmap, int x, int y, int height, int color);
[[maybe_unused]] void tx0_draw_hline(bitmap_ind16 &bitmap, int x, int y, int width, int color);
void tx0_draw_panel_backdrop(bitmap_ind16 &bitmap);
void tx0_draw_panel(bitmap_ind16 &bitmap);
void tx0_typewriter_linefeed();

View File

@ -78,8 +78,9 @@ protected:
virtual void machine_start() override;
inline void ATTR_PRINTF(3,4) verboselog( int n_level, const char *s_fmt, ... );
inline void psxwriteword( uint32_t *p_n_psxram, uint32_t n_address, uint16_t n_data );
void ATTR_PRINTF(3,4) verboselog( int n_level, const char *s_fmt, ... );
static uint16_t psxreadword( uint32_t *p_n_psxram, uint32_t n_address );
static void psxwriteword( uint32_t *p_n_psxram, uint32_t n_address, uint16_t n_data );
uint8_t m_n_znsecsel;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@ static uint16_t CX4_readw(uint16_t addr);
static uint32_t CX4_readl(uint16_t addr);
static void CX4_writew(address_space &space, uint16_t addr, uint16_t data);
//static void CX4_writel(address_space &space, uint16_t addr, uint32_t data);
[[maybe_unused]] static void CX4_writel(address_space &space, uint16_t addr, uint32_t data);
static void CX4_C4DrawLine(int32_t X1, int32_t Y1, int16_t Z1, int32_t X2, int32_t Y2, int16_t Z2, uint8_t Color);
@ -191,12 +191,10 @@ void CX4_write(address_space &space, uint32_t addr, uint8_t data)
}
}
#ifdef UNUSED_FUNCTION
void CX4_writeb(address_space &space, uint16_t addr, uint8_t data)
[[maybe_unused]] static void CX4_writeb(address_space &space, uint16_t addr, uint8_t data)
{
CX4_write(space, addr, data);
}
#endif
static void CX4_writew(address_space &space, uint16_t addr, uint16_t data)
{
@ -204,14 +202,12 @@ static void CX4_writew(address_space &space, uint16_t addr, uint16_t data)
CX4_write(space, addr + 1, data >> 8);
}
#ifdef UNUSED_FUNCTION
void CX4_writel(address_space &space, uint16_t addr, uint32_t data)
static void CX4_writel(address_space &space, uint16_t addr, uint32_t data)
{
CX4_write(space, addr + 0, data >> 0);
CX4_write(space, addr + 1, data >> 8);
CX4_write(space, addr + 2, data >> 16);
}
#endif
uint8_t CX4_read(uint32_t addr)
{
@ -230,12 +226,10 @@ uint8_t CX4_read(uint32_t addr)
return 0xff;
}
#ifdef UNUSED_FUNCTION
uint8_t CX4_readb(uint16_t addr)
[[maybe_unused]] static uint8_t CX4_readb(uint16_t addr)
{
return CX4_read(addr);
}
#endif
static uint16_t CX4_readw(uint16_t addr)
{
@ -247,10 +241,8 @@ static uint32_t CX4_readl(uint16_t addr)
return CX4_read(addr) | (CX4_read(addr + 1) << 8) | (CX4_read(addr + 2) << 16);
}
#ifdef UNUSED_FUNCTION
void CX4_reset()
[[maybe_unused]] void CX4_reset()
{
memset(cx4.ram, 0, 0x0c00);
memset(cx4.reg, 0, 0x0100);
}
#endif

View File

@ -233,6 +233,7 @@ uint8_t bfm_dm01_device::comm_r()
void bfm_dm01_device::comm_w(uint8_t data)
{
}
///////////////////////////////////////////////////////////////////////////
uint8_t bfm_dm01_device::unknown_r()

View File

@ -790,8 +790,6 @@ void homedata_state::pteacher_blitter_start_w(uint8_t data)
uint32_t homedata_state::screen_update_mrokumei(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int flags,width;
/* blank screen */
if (m_vreg[0x3] == 0xc1 && m_vreg[0x4] == 0xc0 && m_vreg[0x5] == 0xff)
{
@ -799,13 +797,14 @@ uint32_t homedata_state::screen_update_mrokumei(screen_device &screen, bitmap_in
return 0;
}
flags = (m_vreg[1] & 0x80) ? (TILE_FLIPX | TILE_FLIPY) : 0;
int const flags = (m_vreg[1] & 0x80) ? (TILE_FLIPX | TILE_FLIPY) : 0;
if (flags != m_flipscreen)
{
m_flipscreen = flags;
machine().tilemap().mark_all_dirty();
}
int width;
switch (m_vreg[0x3])
{
case 0xb7: width = 54; break; // mjclinic
@ -828,14 +827,14 @@ uint32_t homedata_state::screen_update_mrokumei(screen_device &screen, bitmap_in
m_bg_tilemap[m_visible_page][0]->draw(screen, bitmap, cliprect, 0, 0);
m_bg_tilemap[m_visible_page][1]->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
#ifdef UNUSED_FUNCTION
uint32_t homedata_state::screen_update_reikaids(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int flags;
static const int pritable[8][4] =
#if 0
static constexpr int pritable[8][4] =
{
{ 3,1,0,2 },
{ 1,3,0,2 },
@ -846,77 +845,56 @@ uint32_t homedata_state::screen_update_reikaids(screen_device &screen, bitmap_in
{ 2,3,1,0 }, // (bg color should be taken from 1)
{ 3,1,2,0 }, // (bg color should be taken from 1)
};
int pri, i;
flags = (m_vreg[1] & 0x80) ? (TILE_FLIPX | TILE_FLIPY) : 0;
if (flags != m_flipscreen)
#else
static constexpr int pritable[2][8][4] = /* table of priorities derived from the PROM */
{
m_flipscreen = flags;
machine().tilemap().mark_all_dirty();
}
bitmap.fill(m_palette->black_pen(), cliprect);
pri = (m_bank & 0x70) >> 4;
for (i = 0; i < 4; i++)
m_bg_tilemap[m_visible_page][pritable[pri][3 - i]]->draw(bitmap, cliprect, 0, 0);
return 0;
}
{
{ 3,1,0,2 },
{ 1,3,0,2 },
{ 0,3,1,2 },
{ 0,1,3,2 },
{ 3,0,1,2 },
{ 1,0,3,2 },
{ 2,3,1,0 }, // (bg color should be taken from 1)
{ 3,1,2,0 } // (bg color should be taken from 1)
},
{
{ 2,3,0,1 },
{ 2,0,3,1 },
{ 3,0,2,1 },
{ 0,3,2,1 },
{ 3,0,1,2 },
{ 2,1,3,0 },
{ 0,2,3,1 },
{ 3,2,0,1 }
}
};
#endif
uint32_t homedata_state::screen_update_reikaids(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int flags;
static const int pritable[2][8][4] = /* table of priorities derived from the PROM */
{
{
{ 3,1,0,2 },
{ 1,3,0,2 },
{ 0,3,1,2 },
{ 0,1,3,2 },
{ 3,0,1,2 },
{ 1,0,3,2 },
{ 2,3,1,0 }, // (bg color should be taken from 1)
{ 3,1,2,0 } // (bg color should be taken from 1)
},
{
{2,3,0,1},
{2,0,3,1},
{3,0,2,1},
{0,3,2,1},
{3,0,1,2},
{2,1,3,0},
{0,2,3,1},
{3,2,0,1}
},
};
int pri, i;
flags = (m_vreg[1] & 0x80) ? (TILE_FLIPX | TILE_FLIPY) : 0;
int const flags = (m_vreg[1] & 0x80) ? (TILE_FLIPX | TILE_FLIPY) : 0;
if (flags != m_flipscreen)
{
m_flipscreen = flags;
machine().tilemap().mark_all_dirty();
}
bitmap.fill(m_palette->black_pen(), cliprect);
pri = (m_blitter_bank & 0x70) >> 4;
for (i = 0; i < 4; i++)
int const pri = (m_blitter_bank & 0x70) >> 4;
#if 0
for (int i = 0; i < 4; i++)
m_bg_tilemap[m_visible_page][pritable[pri][3 - i]]->draw(bitmap, cliprect, 0, 0);
#else
for (int i = 0; i < 4; i++)
m_bg_tilemap[m_visible_page][pritable[m_priority][pri][3 - i]]->draw(screen, bitmap, cliprect, 0, 0);
#endif
return 0;
}
uint32_t homedata_state::screen_update_pteacher(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int flags, scroll_low, scroll_high;
/* blank screen */
if (m_vreg[0x3] == 0xc1 && m_vreg[0x4] == 0xc0 && m_vreg[0x5] == 0xff)
{
@ -924,7 +902,7 @@ uint32_t homedata_state::screen_update_pteacher(screen_device &screen, bitmap_in
return 0;
}
flags = (m_vreg[1] & 0x80) ? (TILE_FLIPX | TILE_FLIPY) : 0;
int const flags = (m_vreg[1] & 0x80) ? (TILE_FLIPX | TILE_FLIPY) : 0;
if (flags != m_flipscreen)
{
m_flipscreen = flags;
@ -957,6 +935,7 @@ uint32_t homedata_state::screen_update_pteacher(screen_device &screen, bitmap_in
blanked = c1 c0 ff --
*/
int scroll_low;
if (m_blitter_bank & 0x04)
{
if (m_vreg[0x4] == 0xae || m_vreg[0x4] == 0xb8)
@ -998,13 +977,14 @@ uint32_t homedata_state::screen_update_pteacher(screen_device &screen, bitmap_in
scroll_low = 7 - (m_vreg[0x4] & 0x0f);
}
}
scroll_high = m_vreg[0xb] >> 2;
int const scroll_high = m_vreg[0xb] >> 2;
m_bg_tilemap[m_visible_page][0]->set_scrollx(0, scroll_high * 8 + scroll_low);
m_bg_tilemap[m_visible_page][1]->set_scrollx(0, scroll_high * 8 + scroll_low);
m_bg_tilemap[m_visible_page][0]->draw(screen, bitmap, cliprect, 0, 0);
m_bg_tilemap[m_visible_page][1]->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}

View File

@ -69,16 +69,6 @@ void ladyfrog_state::ladyfrog_gfxctrl2_w(uint8_t data)
m_bg_tilemap->mark_all_dirty();
}
#ifdef UNUSED_FUNCTION
int gfxctrl;
uint8_t ladyfrog_state::ladyfrog_gfxctrl_r()
{
return gfxctrl;
}
#endif
uint8_t ladyfrog_state::ladyfrog_scrlram_r(offs_t offset)
{
return m_scrlram[offset];

View File

@ -37,7 +37,6 @@ void nbmj8900_state::palette_type1_w(offs_t offset, uint8_t data)
}
}
#ifdef UNUSED_FUNCTION
uint8_t nbmj8900_state::palette_type2_r(offs_t offset)
{
return m_palette_ptr[offset];
@ -81,7 +80,6 @@ void nbmj8900_state::palette_type3_w(offs_t offset, uint8_t data)
m_palette->set_pen_color((offset >> 1), pal4bit(r), pal4bit(g), pal4bit(b));
}
#endif
void nbmj8900_state::clutsel_w(uint8_t data)
{

View File

@ -1,66 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
#include "emu.h"
#include "includes/overdriv.h"
/***************************************************************************
Callbacks for the K053247
***************************************************************************/
K053246_CB_MEMBER(overdriv_state::sprite_callback)
{
int pri = (*color & 0xffe0) >> 5; /* ??????? */
if (pri)
*priority_mask = 0x02;
else
*priority_mask = 0x00;
*color = m_sprite_colorbase + (*color & 0x001f);
}
/***************************************************************************
Callbacks for the K051316
***************************************************************************/
K051316_CB_MEMBER(overdriv_state::zoom_callback_1)
{
*flags = (*color & 0x40) ? TILE_FLIPX : 0;
*code |= ((*color & 0x03) << 8);
*color = m_zoom_colorbase[0] + ((*color & 0x3c) >> 2);
}
K051316_CB_MEMBER(overdriv_state::zoom_callback_2)
{
*flags = (*color & 0x40) ? TILE_FLIPX : 0;
*code |= ((*color & 0x03) << 8);
*color = m_zoom_colorbase[1] + ((*color & 0x3c) >> 2);
}
/***************************************************************************
Display refresh
***************************************************************************/
uint32_t overdriv_state::screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI0);
m_road_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI1);
m_road_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2);
m_zoom_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI3);
m_zoom_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI4);
screen.priority().fill(0, cliprect);
m_k051316_1->zoom_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
m_k051316_2->zoom_draw(screen, bitmap, cliprect, 0, 1);
m_k053246->k053247_sprites_draw( bitmap,cliprect);
return 0;
}

View File

@ -7,8 +7,8 @@
*/
#include "emu.h"
#include "includes/tx0.h"
#include "video/crt.h"
#include <algorithm>
@ -222,14 +222,12 @@ void tx0_state::tx0_draw_vline(bitmap_ind16 &bitmap, int x, int y, int height, i
tx0_plot_pixel(bitmap, x, y++, color);
}
#ifdef UNUSED_FUNCTION
/* draw a horizontal line */
void tx0_state::tx0_draw_hline(bitmap_ind16 &bitmap, int x, int y, int width, int color)
{
while (width--)
tx0_plot_pixel(bitmap, x++, y, color);
}
#endif
/*
draw the operator control panel (fixed backdrop)