Compare commits

...

25 commits

Author SHA1 Message Date
ywy cc000cac1a
Merge 2105732645 into ebe764fb03 2024-05-16 18:04:28 +08:00
Patrick Mackinlay ebe764fb03 sgi/ip20: re-add accidentally omitted firmware version [smf] 2024-05-16 09:26:51 +07:00
Vas Crabb ed77088c17 Tidied up some recent changes. 2024-05-16 05:48:07 +10:00
cam900 d7d37c03fe
seta/seta2.cpp: Cleanups (#12364)
* Move mj4simai-specific stuff into derived mj4simai_state class.
* Reduced literal tags and run-time tag lookups.
* Suppress side effects for debugger reads.
* Use logmacro.h logging utilities, made more variables const.
* Use C++ line comments for single line comments, fixed spacing.
2024-05-16 04:59:18 +10:00
ClawGrip d693b3f8d9
Add a new Jump Bug bootleg on Galaxian hardware (#12350)
New working clones
-----------------------
Jump Bug (bootleg, set 2) [Arcadedealer aka Edgar Solé aka Dios, Recreativas.org]
2024-05-15 20:31:29 +02:00
Ivan Vangelista a0120b3e05 mame.lst: added missing entry 2024-05-15 18:29:45 +02:00
Vas Crabb a49035cc72 -namco/sweetland4.cpp: Changed short name of Tairyo-Daiko 337 Byoshi to better mnemonic.
-bus/mackbd/keyboard.cpp: Updated comment listing known part numbers.
2024-05-16 01:52:04 +10:00
Curt Coder 20c88890c0 luxor/abc80x: Added skeleton for Luxor Teletex 800. [robcfg, Curt Coder] 2024-05-15 15:40:35 +03:00
Vas Crabb 9587878d34 -casio/fp1100.cpp: Fixed key labels and default assignments.
-bus/mackbd/keyboard.cpp: Confirmed existence of M0110J original
 Macintosh keybord with Japanese key labels.

-bus/mackbd/pluskbd.cpp: Fixed a comment.

-namco/sweetland4.cpp: Be consistent about whether long vowels are
 indicated.

-skeleton/itc4.cpp: Use proper names for D-subminiature connector
 backshells.
2024-05-15 18:33:58 +10:00
y 2105732645 address sprite group compile-time type check review 2024-05-01 21:39:38 -07:00
y be4ad7e305 -static cast 🦀🦀 2024-05-01 20:14:30 -07:00
y 971ac71dcc pivot usage lookup also needs to respect flipscreen (gseeker, rayforce etc.)
because we are translating from pre-flipped tilemap coordinates to non-flipped memory coordinates.
(in general, this handling of flipscreen is bug-prone and should be given more thought...)
2024-04-30 17:55:03 -07:00
y 2f2a6a6e49 ! fix bg palette contribution level 2024-04-28 09:32:59 -07:00
y 3c085c28cd Merge branch 'performance' into perf-merge 2024-04-27 16:48:36 -07:00
y 53d541de9b either strategic unsigned use or just layout jostling 2024-04-27 15:26:45 -07:00
y 15d2656ea6 fix savestates with tile usage + minor reorganization 2024-04-25 23:26:32 -07:00
y 8412c51272 fix savestates with tile usage + minor reorganization 2024-04-25 23:23:09 -07:00
y 7fce16a974 fix nonsense command war extend mode alt tilemap use
Co-authored-by: 12Me21 <12Me21.mc@gmail.com>
2024-04-25 23:11:20 -07:00
y 7241a37e76 textram row count 2024-04-25 23:11:20 -07:00
y 49e45bdf87 more ref param, textram used row optimization 2024-04-25 23:11:19 -07:00
y 734879ea38 used tile row optimization + store blend mode 2024-04-25 23:03:23 -07:00
y cbc92f34b8 consolidate sprite framebuffers 2024-04-25 22:54:05 -07:00
y 7dcaecd91d fix pri mode SoA 2024-04-25 22:51:05 -07:00
y 8f1aa2736d add 12's comments to the blend decomposition 2024-04-25 22:49:54 -07:00
y e5e3bd8875 initial vectorization and messy rgb op decomposition [rebased] 2024-04-25 22:49:22 -07:00
30 changed files with 1166 additions and 767 deletions

View file

@ -3274,6 +3274,8 @@ if (BUSES["RS232"]~=null) then
MAME_DIR .. "src/devices/bus/rs232/sun_kbd.h",
MAME_DIR .. "src/devices/bus/rs232/swtpc8212.cpp",
MAME_DIR .. "src/devices/bus/rs232/swtpc8212.h",
MAME_DIR .. "src/devices/bus/rs232/teletex800.cpp",
MAME_DIR .. "src/devices/bus/rs232/teletex800.h",
MAME_DIR .. "src/devices/bus/rs232/terminal.cpp",
MAME_DIR .. "src/devices/bus/rs232/terminal.h",
MAME_DIR .. "src/devices/bus/rs232/xvd701.cpp",

View file

@ -189,6 +189,7 @@
* M0110 (U.S. - ANSI)
* M0110B (British - ISO)
* M0110F (French - ISO)
* M0110J (Japanese - ANSI)
* M0110T (Italian - ISO)
* M0120 (keypad - English)
* M0120P (keypad - European)
@ -198,9 +199,6 @@
Enter and Clear (all variants use icons for command and the cursor
arrows).
Also known to exist:
* Japanese - ANSI (U.S. with different key caps)
TODO:
* Determine whether P00 or P01 actually feeds the keypad watchdog
* Find more model numbers and implement more layouts
@ -717,6 +715,75 @@ INPUT_PORTS_START(keyboard_it)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
INPUT_PORTS_END
INPUT_PORTS_START(keyboard_jp)
PORT_INCLUDE(keyboard_us)
PORT_MODIFY("ROW0")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_NAME(u8"A \u30c1") // チ
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_NAME(u8"S \u30c8") // ト
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_NAME(u8"D \u30b7") // シ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_NAME(u8"F \u30cf") // ハ
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_NAME(u8"H \u30af") // ク
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_NAME(u8"G \u30ad") // キ
PORT_MODIFY("ROW1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_NAME(u8"Z \u30c4 \u30c3") // ツ ッ
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_NAME(u8"X \u30b5") // サ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_NAME(u8"C \u30bd") // ソ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_NAME(u8"V \u30d2") // ヒ
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_NAME(u8"B \u30b3") // コ
PORT_MODIFY("ROW2")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_NAME(u8"Q \u30bf") // タ
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_NAME(u8"W \u30c6") // テ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_NAME(u8"E \u30a4 \u30a3") // イ ィ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_NAME(u8"R \u30b9") // ス
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_NAME(u8"Y \u30f3") // ン
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_NAME(u8"T \u30ab") // カ
PORT_MODIFY("ROW3")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') PORT_NAME(u8"1 ! \u30cc") // ヌ
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') PORT_NAME(u8"2 @ \u30d5") // フ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_NAME(u8"3 # \u30a2 \u30a1") // ア ァ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') PORT_NAME(u8"4 $ \u30a6 \u30a5") // ウ ゥ
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') PORT_NAME(u8"6 ^ \u30aa \u30a9") // オ ォ
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') PORT_NAME(u8"5 % \u30a8 \u30a7") // エ ェ
PORT_MODIFY("ROW4")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') PORT_NAME(u8"= + \u309c \u300c") // ゜ 「
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_NAME(u8"9 ( \u30e8 \u30e7") // ヨ ョ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') PORT_NAME(u8"7 & \u30e4 \u30e3") // ヤ ャ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') PORT_NAME(u8"- _ \u30db") // ホ
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_NAME(u8"8 * \u30e6 \u30e5") // ユ ュ
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_NAME(u8"0 ) \u30ef \u30f2") // ワ ヲ
PORT_MODIFY("ROW5")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') PORT_NAME(u8"] } \u30e0 \u30fc") // ム ー
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_NAME(u8"O \u30e9") // ラ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_NAME(u8"U \u30ca") // ナ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_NAME(u8"[ { \u309b \u300d") // ゛ 」
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_NAME(u8"I \u30cb") // ニ
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_NAME(u8"P \u30bb") // セ
PORT_MODIFY("ROW6")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_NAME(u8"L \u30ea") // リ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_NAME(u8"J \u30de") // マ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') PORT_NAME(u8"' \" \u30b1 \u30ed") // ケ ロ
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') PORT_NAME(u8"K \u30ce") //
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') PORT_NAME(u8"; : \u30ec") // レ
PORT_MODIFY("ROW7")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(U'¥') PORT_CHAR('|') PORT_NAME(u8"¥ | \u30d8") // ヘ
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') PORT_NAME(u8", < \u30cd \u3001") // ネ 、
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') PORT_NAME(u8"/ ? \u30e1 \u30fb") // メ ・
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_NAME(u8"N \u30df") // ミ
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_NAME(u8"M \u30e2") // モ
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') PORT_NAME(u8". > \u30eb \u3002") // ル 。
PORT_MODIFY("P0")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_NAME(u8"\u30ab\u30ca (Kana)") PORT_TOGGLE // カナ
INPUT_PORTS_END
class m0110_device : public keyboard_base
{
@ -784,6 +851,23 @@ protected:
}
};
class m0110j_device : public keyboard_base
{
public:
m0110j_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
: keyboard_base(mconfig, MACKBD_M0110J, tag, owner, clock)
{
}
static auto parent_rom_device_type() { return &MACKBD_M0110; }
protected:
virtual ioport_constructor device_input_ports() const override
{
return INPUT_PORTS_NAME(keyboard_jp);
}
};
INPUT_PORTS_START(keypad)
PORT_START("ROW0")
@ -884,6 +968,7 @@ DEFINE_DEVICE_TYPE_PRIVATE(MACKBD_M0110, device_mac_keyboard_interface, m0110_d
DEFINE_DEVICE_TYPE_PRIVATE(MACKBD_M0110B, device_mac_keyboard_interface, m0110b_device, "mackbd_m0110b", "Macintosh Keyboard (British - M0110B)")
DEFINE_DEVICE_TYPE_PRIVATE(MACKBD_M0110F, device_mac_keyboard_interface, m0110f_device, "mackbd_m0110f", "Macintosh Keyboard (French - M0110F)")
DEFINE_DEVICE_TYPE_PRIVATE(MACKBD_M0110T, device_mac_keyboard_interface, m0110t_device, "mackbd_m0110t", "Macintosh Keyboard (Italian - M0110T)")
DEFINE_DEVICE_TYPE_PRIVATE(MACKBD_M0110J, device_mac_keyboard_interface, m0110j_device, "mackbd_m0110j", "Macintosh Keyboard (Japanese - M0110J)")
DEFINE_DEVICE_TYPE_PRIVATE(MACKBD_M0120, device_mac_keyboard_interface, m0120_device, "mackbd_m0120", "Macintosh Numeric Keypad (English - M0120)")
DEFINE_DEVICE_TYPE_PRIVATE(MACKBD_M0120P, device_mac_keyboard_interface, m0120p_device, "mackbd_m0120p", "Macintosh Numeric Keypad (European - M0120P)")

View file

@ -16,6 +16,7 @@ DECLARE_DEVICE_TYPE(MACKBD_M0110, device_mac_keyboard_interface)
DECLARE_DEVICE_TYPE(MACKBD_M0110B, device_mac_keyboard_interface)
DECLARE_DEVICE_TYPE(MACKBD_M0110F, device_mac_keyboard_interface)
DECLARE_DEVICE_TYPE(MACKBD_M0110T, device_mac_keyboard_interface)
DECLARE_DEVICE_TYPE(MACKBD_M0110J, device_mac_keyboard_interface)
DECLARE_DEVICE_TYPE(MACKBD_M0120, device_mac_keyboard_interface)
DECLARE_DEVICE_TYPE(MACKBD_M0120P, device_mac_keyboard_interface)

View file

@ -165,6 +165,7 @@ void mac_keyboard_devices(device_slot_interface &device)
device.option_add("gb", MACKBD_M0110B);
device.option_add("fr", MACKBD_M0110F);
device.option_add("it", MACKBD_M0110T);
device.option_add("jp", MACKBD_M0110J);
device.option_add("pad", MACKBD_M0120);
device.option_add("eupad", MACKBD_M0120P);

View file

@ -427,7 +427,7 @@ INPUT_PORTS_START(keyboard_jp)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_NAME(u8"L \u30ea") // リ
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_NAME(u8"I \u30cb") // ニ
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_NAME(u8"8 * \u30e6 \u30e5") // ユ ュ
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') PORT_NAME(u8"/ ? \u30e1 \u30fb") //
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') PORT_NAME(u8"/ ? \u30e1 \u30fb") //
PORT_MODIFY("ROW7")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_NAME(u8"0 ) \u30ef \u30f2") // ワ ヲ

View file

@ -0,0 +1,103 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
#include "emu.h"
#include "printer.h"
#include "teletex800.h"
#include "cpu/z80/z80.h"
#include "machine/6821pia.h"
#include "machine/6850acia.h"
#include "machine/z80ctc.h"
#include "machine/z80daisy.h"
#include "machine/z80sio.h"
namespace {
ROM_START( teletex800 )
ROM_REGION( 0x1000, "z80", 0 )
ROM_LOAD( "ix44_ver1.1.u57", 0x0000, 0x1000, CRC(5c11b89c) SHA1(4911332709a8dcda12e72bcdf7a0acd58d65cbfd) )
ROM_END
static const z80_daisy_config z80_daisy_chain[] =
{
{ nullptr }
};
static void printer_devices(device_slot_interface &device)
{
device.option_add("printer", SERIAL_PRINTER);
}
static INPUT_PORTS_START( teletex800 )
INPUT_PORTS_END
class teletex_800_device : public device_t, public device_rs232_port_interface
{
public:
teletex_800_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, TELETEX_800, tag, owner, clock),
device_rs232_port_interface(mconfig, *this),
m_maincpu(*this, "z80"),
m_ctc(*this, "ctc"),
m_sio(*this, "sio"),
m_acia(*this, "acia"),
m_pia(*this, "pia"),
m_pia_cp(*this, "pia_cp")
{
}
protected:
virtual const tiny_rom_entry *device_rom_region() const override
{
return ROM_NAME( teletex800 );
}
virtual void device_add_mconfig(machine_config &config) override
{
// main board
Z80(config, m_maincpu, XTAL(4'915'200));
m_maincpu->set_daisy_config(z80_daisy_chain);
m_maincpu->set_addrmap(AS_PROGRAM, &teletex_800_device::program_map);
m_maincpu->set_addrmap(AS_IO, &teletex_800_device::io_map);
Z80CTC(config, m_ctc, XTAL(4'915'200));
Z80SIO(config, m_sio, XTAL(4'915'200));
ACIA6850(config, m_acia);
PIA6821(config, m_pia);
RS232_PORT(config, "printer", printer_devices, "printer");
// control panel
PIA6821(config, m_pia_cp);
}
virtual ioport_constructor device_input_ports() const override
{
return INPUT_PORTS_NAME( teletex800 );
}
virtual void device_start() override
{
}
private:
required_device<z80_device> m_maincpu;
required_device<z80ctc_device> m_ctc;
required_device<z80sio_device> m_sio;
required_device<acia6850_device> m_acia;
required_device<pia6821_device> m_pia;
required_device<pia6821_device> m_pia_cp;
void program_map(address_map &map)
{
map(0x0000, 0x0fff).rom().region("z80", 0);
}
void io_map(address_map &map)
{
}
};
} // anonymous namespace
DEFINE_DEVICE_TYPE_PRIVATE(TELETEX_800, device_rs232_port_interface, teletex_800_device, "teletex800", "Luxor Teletex 800")

View file

@ -0,0 +1,13 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
#ifndef MAME_BUS_RS232_TELETEX800_H
#define MAME_BUS_RS232_TELETEX800_H
#pragma once
#include "rs232.h"
DECLARE_DEVICE_TYPE(TELETEX_800, device_rs232_port_interface)
#endif // MAME_BUS_RS232_TELETEX800_H

View file

@ -18,7 +18,7 @@
Processors: Z80 @ 4MHz, uPD7801G @ 2MHz
Came with Basic built in, and you could run CP/M 2.2 from the floppy disk.
Came with BASIC built in, and you could run CP/M 2.2 from the floppy disk.
The keyboard is a separate unit. It contains a beeper.
@ -35,14 +35,16 @@
****************************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "bus/centronics/ctronics.h"
#include "cpu/upd7810/upd7810.h"
#include "cpu/z80/z80.h"
#include "imagedev/cassette.h"
#include "machine/gen_latch.h"
#include "machine/timer.h"
#include "video/mc6845.h"
#include "sound/beep.h"
#include "bus/centronics/ctronics.h"
#include "imagedev/cassette.h"
#include "video/mc6845.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@ -383,129 +385,129 @@ static INPUT_PORTS_START( fp1100 )
PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("KEY.1")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Break")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_END) PORT_NAME("BREAK")
PORT_BIT(0x60, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("Kanji") // guess, it's in Japanese
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_NAME("Caps")
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_NAME("Graph")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_NAME("Ctrl")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("Shift") PORT_CHAR(UCHAR_SHIFT_1)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_NAME("\u30ab\u30ca (KANA)") // カナ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_NAME("CAPS") PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RALT) PORT_NAME("GRAPH")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_NAME("CTRL")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("SHIFT") PORT_CHAR(UCHAR_SHIFT_1)
PORT_START("KEY.2")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("PF0")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") PORT_CHAR(13)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("*")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME("Z") PORT_CHAR('Z') PORT_CHAR('z')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Q") PORT_CHAR('Q') PORT_CHAR('q')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP-") PORT_CODE(KEYCODE_MINUS_PAD)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_NAME("Esc") PORT_CHAR(27)
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME("A") PORT_CHAR('A') PORT_CHAR('a')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("PF0")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("ENTER") PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD))
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("KP*")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME(u8"Z \u30c4 \u30c3") PORT_CHAR('Z') PORT_CHAR('z') // ツ ッ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME(u8"Q \u30bf") PORT_CHAR('Q') PORT_CHAR('q') // タ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("KP-")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_NAME("ESC") PORT_CHAR(27)
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME(u8"A \u30c1") PORT_CHAR('A') PORT_CHAR('a') // チ
PORT_START("KEY.3")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("PF1")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_NAME(",")
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME("/")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME("X") PORT_CHAR('X') PORT_CHAR('x')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("W") PORT_CHAR('W') PORT_CHAR('w')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP+") PORT_CODE(KEYCODE_PLUS_PAD)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("1") PORT_CHAR('1') PORT_CHAR('!')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("S") PORT_CHAR('S') PORT_CHAR('s')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("PF1") PORT_CHAR(UCHAR_MAMEKEY(F1))
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA_PAD) PORT_NAME("KP,")
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME("KP/") PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD))
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME(u8"X \u30b5") PORT_CHAR('X') PORT_CHAR('x')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME(u8"W \u30c6") PORT_CHAR('W') PORT_CHAR('w')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("KP+") PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD))
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME(u8"1 ! \u30cc") PORT_CHAR('1') PORT_CHAR('!')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME(u8"S \u30c8") PORT_CHAR('S') PORT_CHAR('s')
PORT_START("KEY.4")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("PF2")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME(".")
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("Del")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME("C") PORT_CHAR('C') PORT_CHAR('c')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("E") PORT_CHAR('E') PORT_CHAR('e')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP3") PORT_CODE(KEYCODE_3_PAD)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("2") PORT_CHAR('2') PORT_CHAR('@')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME("D") PORT_CHAR('D') PORT_CHAR('d')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("PF2") PORT_CHAR(UCHAR_MAMEKEY(F2))
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("KP.") PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD))
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("DEL") PORT_CHAR(UCHAR_MAMEKEY(DEL))
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME(u8"C \u30bd") PORT_CHAR('C') PORT_CHAR('c') // ソ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME(u8"E \u30a4 \u30a3") PORT_CHAR('E') PORT_CHAR('e') // イ ィ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("KP3") PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME(u8"2 \" \u30d5") PORT_CHAR('2') PORT_CHAR('"') // フ
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME(u8"D \u30b7") PORT_CHAR('D') PORT_CHAR('d') // シ
PORT_START("KEY.5")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_NAME("PF3")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("000")
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_NAME("V") PORT_CHAR('V') PORT_CHAR('v')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_NAME("R") PORT_CHAR('R') PORT_CHAR('r')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP6") PORT_CODE(KEYCODE_6_PAD)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("3") PORT_CHAR('3') PORT_CHAR('#')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME("F") PORT_CHAR('F') PORT_CHAR('f')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_NAME("PF3") PORT_CHAR(UCHAR_MAMEKEY(F3))
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_000_PAD) PORT_NAME("KP000")
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right") PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_NAME(u8"V \u30d2") PORT_CHAR('V') PORT_CHAR('v') // ヒ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_NAME(u8"R \u30b9") PORT_CHAR('R') PORT_CHAR('r') // ス
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("KP6") PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME(u8"3 # \u30a2 \u30a1") PORT_CHAR('3') PORT_CHAR('#') // ア ァ
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME(u8"F \u30cf") PORT_CHAR('F') PORT_CHAR('f') // ハ
PORT_START("KEY.6")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("PF4")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Space") PORT_CHAR(32)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Ins")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME("B") PORT_CHAR('B') PORT_CHAR('b')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_NAME("T") PORT_CHAR('T') PORT_CHAR('t')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP9") PORT_CODE(KEYCODE_9_PAD)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_NAME("4") PORT_CHAR('4') PORT_CHAR('$')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_NAME("G") PORT_CHAR('G') PORT_CHAR('g')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("PF4") PORT_CHAR(UCHAR_MAMEKEY(F4))
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Space") PORT_CHAR(' ')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGDN) PORT_NAME("INS") PORT_CHAR(UCHAR_MAMEKEY(INSERT))
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME(u8"B \u30b3") PORT_CHAR('B') PORT_CHAR('b') // コ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_NAME(u8"T \u30ab") PORT_CHAR('T') PORT_CHAR('t') // カ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("KP9") PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_NAME(u8"4 $ \u30a6 \u30a5") PORT_CHAR('4') PORT_CHAR('$') // ウ ゥ
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_NAME(u8"G \u30ad") PORT_CHAR('G') PORT_CHAR('g') // キ
PORT_START("KEY.7")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("PF5")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP0") PORT_CODE(KEYCODE_0_PAD)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Down")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_NAME("N") PORT_CHAR('N') PORT_CHAR('n')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_NAME("Y") PORT_CHAR('Y') PORT_CHAR('y')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP8") PORT_CODE(KEYCODE_8_PAD)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_NAME("5") PORT_CHAR('5') PORT_CHAR('^')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_NAME("H") PORT_CHAR('H') PORT_CHAR('h')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("PF5") PORT_CHAR(UCHAR_MAMEKEY(F5))
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("KP0") PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Down") PORT_CHAR(UCHAR_MAMEKEY(DOWN))
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_NAME(u8"N \u30df") PORT_CHAR('N') PORT_CHAR('n') // ミ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_NAME(u8"Y \u30f3") PORT_CHAR('Y') PORT_CHAR('y') // ン
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("KP8") PORT_CHAR(UCHAR_MAMEKEY(8_PAD))
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_NAME(u8"5 % \u30a8 \u30a7") PORT_CHAR('5') PORT_CHAR('%') // エ ェ
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_NAME(u8"H \u30af") PORT_CHAR('H') PORT_CHAR('h') // ク
PORT_START("KEY.8")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("PF6")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP2") PORT_CODE(KEYCODE_2_PAD)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_NAME("Up")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME("M") PORT_CHAR('M') PORT_CHAR('m')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_NAME("U") PORT_CHAR('U') PORT_CHAR('u')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP5") PORT_CODE(KEYCODE_5_PAD)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_NAME("6") PORT_CHAR('6') PORT_CHAR('&')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_NAME("J") PORT_CHAR('J') PORT_CHAR('j')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("PF6") PORT_CHAR(UCHAR_MAMEKEY(F6))
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("KP2") PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_NAME("Up") PORT_CHAR(UCHAR_MAMEKEY(UP))
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME(u8"M \u30e2") PORT_CHAR('M') PORT_CHAR('m') // モ
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_NAME(u8"U \u30ca") PORT_CHAR('U') PORT_CHAR('u') // ナ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("KP5") PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_NAME(u8"6 & \u30aa \u30a9") PORT_CHAR('6') PORT_CHAR('&') // オ ォ
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_NAME(u8"J \u30de") PORT_CHAR('J') PORT_CHAR('j') // マ
PORT_START("KEY.9")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_NAME("PF7")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP1") PORT_CODE(KEYCODE_1_PAD)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_NAME("Home")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_NAME(",") PORT_CHAR(',') PORT_CHAR('<')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_NAME("I") PORT_CHAR('I') PORT_CHAR('i')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP4") PORT_CODE(KEYCODE_4_PAD)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_NAME("7") PORT_CHAR('7') PORT_CHAR('%')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_NAME("K") PORT_CHAR('K') PORT_CHAR('k')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_NAME("PF7") PORT_CHAR(UCHAR_MAMEKEY(F7))
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("KP1") PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("HOME CLS") PORT_CHAR(UCHAR_MAMEKEY(HOME))
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_NAME(u8", < \u30cd \u3001") PORT_CHAR(',') PORT_CHAR('<') // ネ 、
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_NAME(u8"I \u30cb") PORT_CHAR('I') PORT_CHAR('i') // ニ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("KP4") PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_NAME(u8"7 ' \u30e4 \u30e3") PORT_CHAR('7') PORT_CHAR('\'') // ヤ ャ
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_NAME(u8"K \u30ce") PORT_CHAR('K') PORT_CHAR('k') //
PORT_START("KEY.10")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_NAME("PF8")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME("]") PORT_CHAR(']') PORT_CHAR('}')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_NAME(".") PORT_CHAR('.') PORT_CHAR('>')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_NAME("O") PORT_CHAR('O') PORT_CHAR('o')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP7") PORT_CODE(KEYCODE_7_PAD)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_NAME("8") PORT_CHAR('8') PORT_CHAR('*')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_NAME("L") PORT_CHAR('L') PORT_CHAR('l')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_NAME("PF8") PORT_CHAR(UCHAR_MAMEKEY(F8))
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_NAME(u8"] } \u30e0 \u300d") PORT_CHAR(']') PORT_CHAR('}') // ム 」
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left") PORT_CHAR(UCHAR_MAMEKEY(LEFT))
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_NAME(u8". > \u30eb \u3002") PORT_CHAR('.') PORT_CHAR('>') // ル 。
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_NAME(u8"O \u30e9") PORT_CHAR('O') PORT_CHAR('o') // ラ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("KP7") PORT_CHAR(UCHAR_MAMEKEY(7_PAD))
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_NAME(u8"8 ( \u30e6 \u30e5") PORT_CHAR('8') PORT_CHAR('(') // ユ ュ
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_NAME(u8"L \u30ea") PORT_CHAR('L') PORT_CHAR('l') // リ
PORT_START("KEY.11")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("PF9")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("[") PORT_CHAR('[') PORT_CHAR('{')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Rubout") PORT_CHAR(8)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_NAME("/") PORT_CHAR('/') PORT_CHAR('?')
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_NAME("P") PORT_CHAR('P') PORT_CHAR('p')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Return") PORT_CHAR(13)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_NAME("9") PORT_CHAR('9') PORT_CHAR('(')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_NAME(";") PORT_CHAR(';') PORT_CHAR('+')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("PF9") PORT_CHAR(UCHAR_MAMEKEY(F9))
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME(u8"[ { \u309c \u300c") PORT_CHAR('[') PORT_CHAR('{') // ゜ 「
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BS") PORT_CHAR(8)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_NAME(u8"/ ? \u30e1 \u30fb") PORT_CHAR('/') PORT_CHAR('?') // メ ・
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_NAME(u8"P \u30bb") PORT_CHAR('P') PORT_CHAR('p') // セ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("RETURN") PORT_CHAR(13)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_NAME(u8"9 ) \u30e8 \u30e7") PORT_CHAR('9') PORT_CHAR(')') // ヨ ョ
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_NAME(u8"; + \u30ec") PORT_CHAR(';') PORT_CHAR('+') // レ
PORT_START("KEY.12")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Stop/Cont")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_NAME("-") PORT_CHAR('-') PORT_CHAR('_')
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_NAME("Yen") PORT_CHAR('\\') PORT_CHAR('|')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(c)")
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("|")
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("^") PORT_CHAR('^') PORT_CHAR('+')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_NAME("0") PORT_CHAR('0') PORT_CHAR(')')
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_NAME(":") PORT_CHAR(':') PORT_CHAR('*')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_NUMLOCK) PORT_NAME("STOP/CONT")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_NAME(u8"- = \u30db") PORT_CHAR('-') PORT_CHAR('=') // ホ
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_NAME(u8"¥ | \u30fc") PORT_CHAR(U'¥') PORT_CHAR('|') // ー
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME(u8"@ ` \u309b") PORT_CHAR('@') PORT_CHAR('`') // ゛
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_NAME(u8"_ \u30ed") PORT_CHAR('_') // ロ
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_NAME(u8"^ ~ \u30d8") PORT_CHAR('^') PORT_CHAR('~') // ヘ
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_NAME(u8"0 \u30ef \u30f2") PORT_CHAR('0') // ワ ヲ
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_NAME(u8": * \u30b1") PORT_CHAR(':') PORT_CHAR('*') // ケ
PORT_START("KEY.13")
PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) // Capslock LED on
PORT_START("KEY.14")
PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) // Kanji LED on
PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) // Kana LED on
PORT_START("KEY.15")
PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) // LEDs off

View file

@ -2531,21 +2531,18 @@ void monsterz_state::monsterz_map(address_map &map)
/* changes from galaxian map:
galaxian sound removed
$4800-$57ff: contains video and object RAM (normally at $5000-$5fff)
$5800-$5fff: AY-8910 access added
$6002-$6006: graphics banking controls replace coin lockout, coin counter, and lfo
$7002: coin counter (moved from $6003)
$8000-$afff: additional ROM area
$b000-$bfff: protection (T00 custom chip)
*/
void galaxian_state::jumpbug_map(address_map &map)
void galaxian_state::jumpbugbrf_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x3fff).rom();
map(0x4000, 0x47ff).ram();
map(0x4800, 0x4bff).mirror(0x0400).ram().w(FUNC(galaxian_state::galaxian_videoram_w)).share("videoram");
map(0x5000, 0x50ff).mirror(0x0700).ram().w(FUNC(galaxian_state::galaxian_objram_w)).share("spriteram");
map(0x5800, 0x5800).mirror(0x00ff).w("8910.0", FUNC(ay8910_device::data_w));
map(0x5900, 0x5900).mirror(0x00ff).w("8910.0", FUNC(ay8910_device::address_w));
map(0x6000, 0x6000).mirror(0x07ff).portr("IN0");
map(0x6002, 0x6006).mirror(0x07f8).w(FUNC(galaxian_state::galaxian_gfxbank_w));
map(0x6800, 0x6800).mirror(0x07ff).portr("IN1");
@ -2559,6 +2556,16 @@ void galaxian_state::jumpbug_map(address_map &map)
map(0xb000, 0xbfff).r(FUNC(galaxian_state::jumpbug_protection_r));
}
/* changes from jumpbugbrf map:
$5800-$5fff: AY-8910 access added
*/
void galaxian_state::jumpbug_map(address_map &map)
{
jumpbugbrf_map(map);
map(0x5800, 0x5800).mirror(0x00ff).w("8910.0", FUNC(ay8910_device::data_w));
map(0x5900, 0x5900).mirror(0x00ff).w("8910.0", FUNC(ay8910_device::address_w));
}
void galaxian_state::frogf_map(address_map &map)
{
@ -7482,7 +7489,6 @@ void galaxian_state::sidam_bootleg_base(machine_config &config)
m_screen->set_raw(12_MHz_XTAL, SIDAM_HTOTAL, SIDAM_HBEND, SIDAM_HBSTART, GALAXIAN_VTOTAL, GALAXIAN_VBEND, GALAXIAN_VBSTART);
set_x_scale(SIDAM_XSCALE);
set_h0_start(SIDAM_H0START);
}
@ -7913,12 +7919,20 @@ void guttangt_state::guttangts3(machine_config &config)
void galaxian_state::jumpbug(machine_config &config)
void galaxian_state::jumpbugbrf(machine_config &config)
{
galaxian_base(config);
config.device_remove("watchdog");
// basic machine hardware
m_maincpu->set_addrmap(AS_PROGRAM, &galaxian_state::jumpbugbrf_map);
}
void galaxian_state::jumpbug(machine_config &config)
{
jumpbugbrf(config);
// basic machine hardware
m_maincpu->set_addrmap(AS_PROGRAM, &galaxian_state::jumpbug_map);
@ -13549,6 +13563,29 @@ ROM_START( jumpbugb )
ROM_LOAD( "l06_prom.bin", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) )
ROM_END
// Recreativos Franco PCB. There is no AY-8910, although the AY-8910 routines are still on the code.
ROM_START( jumpbugbrf )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "bg1-2732.bin", 0x0000, 0x1000, CRC(415aa1b7) SHA1(4f9edd7e9720acf085dd8910849c2f2fac5cb547) )
ROM_LOAD( "bg2-2732.bin", 0x1000, 0x1000, CRC(b1c27510) SHA1(66fbe0b94b6c101cb50d7a3ff78160110415dff9) )
ROM_LOAD( "bg3-2732.bin", 0x2000, 0x1000, CRC(cb8b8a0f) SHA1(9e8591471dda2cb964ba2a866d4a5a3ef65d8707) )
ROM_LOAD( "bg4-2732.bin", 0x3000, 0x1000, CRC(66751d12) SHA1(26c68cfb59596ae164ee9ae4a24ddf8dc7a923a7) )
ROM_LOAD( "bg5-2732.bin", 0x8000, 0x1000, CRC(7553b5e2) SHA1(6439585e713581dd36cea6324414f803d683216f) )
ROM_LOAD( "bg6-2732.bin", 0x9000, 0x1000, CRC(47be9843) SHA1(495d6fc732267bfd19a953b0b70df3f94b3c1e38) )
ROM_LOAD( "bg7-2732.bin", 0xa000, 0x1000, CRC(2c4b37aa) SHA1(14dea66b083a421623e7be8deb9fee8ed5e7ee28) )
ROM_REGION( 0x3000, "gfx1", 0 )
ROM_LOAD( "jbl", 0x0000, 0x0800, BAD_DUMP CRC(9a091b0a) SHA1(19b88f802ee80ff8901ef99e3688f2869f1a69c5) ) // Missing on this PCB, borrowed from 'jumpbugb'
ROM_LOAD( "jbm", 0x0800, 0x0800, BAD_DUMP CRC(8a0fc082) SHA1(58b72a3161950a2fb71cdab3f30bb3abb19c7978) ) // Missing on this PCB, borrowed from 'jumpbugb'
ROM_LOAD( "jbn", 0x1000, 0x0800, BAD_DUMP CRC(155186e0) SHA1(717ddaecc52a4ef03a01fcddb520acdbfb0d722a) ) // Missing on this PCB, borrowed from 'jumpbugb'
ROM_LOAD( "jbi", 0x1800, 0x0800, BAD_DUMP CRC(7749b111) SHA1(55071ce04708bd52177644298f76ae79d23f6ac9) ) // Missing on this PCB, borrowed from 'jumpbugb'
ROM_LOAD( "jbj", 0x2000, 0x0800, BAD_DUMP CRC(06e8d7df) SHA1(d04f1503d9fde5aae92652cb9d2eb16bd6a0fe9c) ) // Missing on this PCB, borrowed from 'jumpbugb'
ROM_LOAD( "jbk", 0x2800, 0x0800, BAD_DUMP CRC(b8dbddf3) SHA1(043de444890a93459789dc99c43ef88ff66b79e4) ) // Missing on this PCB, borrowed from 'jumpbugb'
ROM_REGION( 0x0020, "proms", 0 )
ROM_LOAD( "82s123.bin", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) )
ROM_END
ROM_START( olibug ) // bootleg on an original Midway Galaxian PCB
ROM_REGION( 0x10000, "maincpu", 0 ) // b6 and b7 differ from jumpbugb
ROM_LOAD( "b1.bin", 0x0000, 0x1000, CRC(415aa1b7) SHA1(4f9edd7e9720acf085dd8910849c2f2fac5cb547) )
@ -16647,10 +16684,11 @@ GAME( 198?, fantastc, 0, fantastc, fantastc, galaxian_state, init_
GAME( 198?, timefgtr, 0, timefgtr, timefgtr, galaxian_state, init_timefgtr, ROT90, "Taito do Brasil", "Time Fighter (Time Pilot conversion on Galaxian hardware)", MACHINE_SUPPORTS_SAVE | MACHINE_WRONG_COLORS ) // rewrite of Time Pilot (!) not a clone
// Extra ROMs, protection, and sound hardware replaced with AY8910
GAME( 1981, jumpbug, 0, jumpbug, jumpbug, galaxian_state, init_jumpbug, ROT90, "Hoei (Rock-Ola license)", "Jump Bug", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // or by Alpha Denshi Co. under contract from Hoei?
GAME( 1981, jumpbugb, jumpbug, jumpbug, jumpbug, galaxian_state, init_jumpbug, ROT90, "bootleg", "Jump Bug (bootleg)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // bootleg of Sega license
GAME( 1982, olibug, jumpbug, jumpbug, jumpbug, galaxian_state, init_jumpbug, ROT90, "bootleg", "Oli Bug (bootleg of Jump Bug)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_WRONG_COLORS | MACHINE_NOT_WORKING ) // one bad GFX ROM, uses Galaxian color PROM?
GAME( 1983, levers, 0, jumpbug, levers, galaxian_state, init_jumpbug, ROT90, "Rock-Ola", "Levers", MACHINE_SUPPORTS_SAVE )
GAME( 1981, jumpbug, 0, jumpbug, jumpbug, galaxian_state, init_jumpbug, ROT90, "Hoei (Rock-Ola license)", "Jump Bug", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // or by Alpha Denshi Co. under contract from Hoei?
GAME( 1981, jumpbugb, jumpbug, jumpbug, jumpbug, galaxian_state, init_jumpbug, ROT90, "bootleg", "Jump Bug (bootleg, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // bootleg of Sega license
GAME( 1982, jumpbugbrf, jumpbug, jumpbugbrf, jumpbug, galaxian_state, init_jumpbug, ROT90, "bootleg (Recreativos Franco)", "Jump Bug (bootleg, set 2)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // bootleg from Recreativos Franco, without AY-8910
GAME( 1982, olibug, jumpbug, jumpbug, jumpbug, galaxian_state, init_jumpbug, ROT90, "bootleg", "Oli Bug (bootleg of Jump Bug)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_WRONG_COLORS | MACHINE_NOT_WORKING ) // one bad GFX ROM, uses Galaxian color PROM?
GAME( 1983, levers, 0, jumpbug, levers, galaxian_state, init_jumpbug, ROT90, "Rock-Ola", "Levers", MACHINE_SUPPORTS_SAVE )
// 2nd CPU driving AY8910 for sound
GAME( 1982, checkman, 0, checkman, checkman, galaxian_state, init_checkman, ROT90, "Zilec-Zenitone", "Check Man", MACHINE_SUPPORTS_SAVE )

View file

@ -279,6 +279,7 @@ public:
void turtles(machine_config &config);
void fantastc(machine_config &config);
void jumpbug(machine_config &config);
void jumpbugbrf(machine_config &config);
void checkmaj(machine_config &config);
void pacmanbl(machine_config &config);
void quaak(machine_config &config);
@ -367,6 +368,7 @@ protected:
void galaxian_map_discrete(address_map &map);
void highroll_map(address_map &map);
void jumpbug_map(address_map &map);
void jumpbugbrf_map(address_map &map);
void jungsub_map(address_map &map);
void jungsub_io_map(address_map &map);
void konami_sound_map(address_map &map);

View file

@ -2019,6 +2019,12 @@ QUICKLOAD_LOAD_MEMBER(abc800_state::quickload_cb)
return std::make_pair(std::error_condition(), std::string());
}
static void printer_devices(device_slot_interface &device)
{
device.option_add("printer", SERIAL_PRINTER);
device.option_add("teletex800", TELETEX_800);
}
//**************************************************************************
@ -2071,7 +2077,7 @@ void abc800_state::common(machine_config &config)
m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05);
TIMER(config, TIMER_CASSETTE_TAG).configure_periodic(FUNC(abc800_state::cassette_input_tick), attotime::from_hz(44100));
rs232_port_device &rs232a(RS232_PORT(config, RS232_A_TAG, default_rs232_devices, nullptr));
rs232_port_device &rs232a(RS232_PORT(config, RS232_A_TAG, printer_devices, nullptr));
rs232a.rxd_handler().set(m_dart, FUNC(z80dart_device::rxa_w));
rs232a.dcd_handler().set(m_dart, FUNC(z80dart_device::dcda_w));
rs232a.cts_handler().set(m_dart, FUNC(z80dart_device::ctsa_w));

View file

@ -5,27 +5,31 @@
#pragma once
#include "bus/abcbus/abcbus.h"
#include "bus/rs232/rs232.h"
#include "cpu/z80/z80.h"
#include "machine/z80daisy.h"
#include "cpu/mcs48/mcs48.h"
#include "imagedev/cassette.h"
#include "imagedev/snapquik.h"
#include "bus/abckb/abckb.h"
#include "bus/abckb/abc800kb.h"
#include "machine/74259.h"
#include "machine/e0516.h"
#include "machine/z80ctc.h"
#include "machine/z80sio.h"
#include "machine/ram.h"
#include "machine/timer.h"
#include "sound/discrete.h"
#include "video/mc6845.h"
#include "video/saa5050.h"
#include "emupal.h"
#include "softlist.h"
#include "speaker.h"
#include "bus/abcbus/abcbus.h"
#include "bus/abckb/abc800kb.h"
#include "bus/abckb/abckb.h"
#include "bus/rs232/printer.h"
#include "bus/rs232/rs232.h"
#include "bus/rs232/teletex800.h"
#include "cpu/mcs48/mcs48.h"
#include "cpu/z80/z80.h"
#include "imagedev/cassette.h"
#include "imagedev/snapquik.h"
#include "machine/74259.h"
#include "machine/e0516.h"
#include "machine/ram.h"
#include "machine/timer.h"
#include "machine/z80ctc.h"
#include "machine/z80daisy.h"
#include "machine/z80sio.h"
#include "sound/discrete.h"
#include "video/mc6845.h"
#include "video/saa5050.h"
//**************************************************************************
// MACROS / CONSTANTS

View file

@ -18576,6 +18576,7 @@ guttangts3 //
highroll //
jumpbug // (c) 1981 Rock-ola
jumpbugb // (c) 1981 Sega
jumpbugbrf // bootleg
jungsub // bootleg
kamakazi3 // Video Games (UK) Ltd., hack or bootleg?
kamikazesp // bootleg (Euromatic S.A.)
@ -33300,7 +33301,7 @@ sweetlnd //
@source:namco/sweetland4.cpp
sweetld4 //
tairyouda // (c) 2000 Namco
tairyodk // (c) 2000 Namco
@source:namco/tankbatt.cpp
tankbatt // (c) 1980 Namco
@ -36751,6 +36752,7 @@ brvteam //
canasta //
corsario //
ind250cc //
indunkgam //
lapbylap //
larana //
mundial //

View file

@ -119,7 +119,7 @@ protected:
optional_memory_bank m_mainbank;
private:
static constexpr XTAL MIDZEUS_VIDEO_CLOCK = XTAL(66'666'700);
static inline constexpr XTAL MIDZEUS_VIDEO_CLOCK = 66.6667_MHz_XTAL;
void exit_handler();
void zeus_pointer_w(uint32_t which, uint32_t data, bool logit);

View file

@ -346,26 +346,26 @@ uint32_t midzeus_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
uint32_t midzeus_state::zeus_r(offs_t offset)
{
bool logit = ((!machine().side_effects_disabled()) && (offset < 0xb0 || offset > 0xb7));
bool logit = !machine().side_effects_disabled() && ((offset < 0xb0) || (offset > 0xb7));
uint32_t result = m_zeusbase[offset & ~1];
switch (offset & ~1)
{
case 0xf0:
result = m_screen->hpos();
logit = 0;
logit = false;
break;
case 0xf2:
result = m_screen->vpos();
logit = 0;
logit = false;
break;
case 0xf4:
result = 6;
if (m_screen->vblank())
result |= 0x800;
logit = 0;
logit = false;
break;
case 0xf6: // status -- they wait for this & 9 == 0
@ -373,13 +373,13 @@ uint32_t midzeus_state::zeus_r(offs_t offset)
result = 0x9600;
if (m_zeusbase[0xb6] == 0x80040000)
result |= 1;
logit = 0;
logit = false;
break;
}
// 32-bit mode
if (m_zeusbase[0x80] & 0x00020000)
{
// 32-bit mode
if (offset & 1)
result >>= 16;
if (logit)
@ -392,10 +392,9 @@ uint32_t midzeus_state::zeus_r(offs_t offset)
LOGZEUS("%06X:zeus32_r(%02X) = %08X\n", m_maincpu->pc(), offset, result);
}
}
// 16-bit mode
else
{
// 16-bit mode
if (offset & 1)
result >>= 16;
else
@ -421,13 +420,10 @@ void midzeus_state::zeus_w(offs_t offset, uint32_t data)
if (logit)
LOGZEUS("%06X:zeus_w", m_maincpu->pc());
// 32-bit mode
if (m_zeusbase[0x80] & 0x00020000)
zeus_register32_w(offset, data, logit);
// 16-bit mode
zeus_register32_w(offset, data, logit); // 32-bit mode
else
zeus_register16_w(offset, data, logit);
zeus_register16_w(offset, data, logit); // 16-bit mode
}

View file

@ -75,8 +75,8 @@ void micro3d_sound_device::lp_filter::init(double fsval)
static void prewarp(double &a0, double &a1, double &a2, double fc, double fs)
{
double pi = 4.0 * atan(1.0);
double wp = 2.0 * fs * tan(pi * fc / fs);
double const pi = 4.0 * atan(1.0);
double const wp = 2.0 * fs * tan(pi * fc / fs);
a2 = a2 / (wp * wp);
a1 = a1 / wp;
@ -86,8 +86,8 @@ static void bilinear(double a0, double a1, double a2,
double b0, double b1, double b2,
double &k, double fs, float *coef)
{
double ad = 4. * a2 * fs * fs + 2. * a1 * fs + a0;
double bd = 4. * b2 * fs * fs + 2. * b1* fs + b0;
double const ad = 4. * a2 * fs * fs + 2. * a1 * fs + a0;
double const bd = 4. * b2 * fs * fs + 2. * b1* fs + b0;
k *= ad / bd;
@ -137,8 +137,8 @@ void micro3d_sound_device::noise_sh_w(u8 data)
else
m_gain = expf(-(float)(m_dac[VCA]) / 25.0f) * 10.0f;
double q = 0.75/255 * (255 - m_dac[VCQ]) + 0.1;
double fc = 4500.0/255 * (255 - m_dac[VCF]) + 100;
double const q = 0.75/255 * (255 - m_dac[VCQ]) + 0.1;
double const fc = 4500.0/255 * (255 - m_dac[VCF]) + 100;
m_filter.recompute(m_gain, q, fc);
}
@ -195,15 +195,12 @@ void micro3d_sound_device::device_start()
save_item(NAME(m_filter.history));
save_item(NAME(m_filter.coef));
save_item(NAME(m_filter.fs));
for (int i = 0; i < 2; i++)
{
save_item(NAME(m_filter.proto_coef[i].a0), i);
save_item(NAME(m_filter.proto_coef[i].a1), i);
save_item(NAME(m_filter.proto_coef[i].a2), i);
save_item(NAME(m_filter.proto_coef[i].b0), i);
save_item(NAME(m_filter.proto_coef[i].b1), i);
save_item(NAME(m_filter.proto_coef[i].b2), i);
}
save_item(STRUCT_MEMBER(m_filter.proto_coef, a0));
save_item(STRUCT_MEMBER(m_filter.proto_coef, a1));
save_item(STRUCT_MEMBER(m_filter.proto_coef, a2));
save_item(STRUCT_MEMBER(m_filter.proto_coef, b0));
save_item(STRUCT_MEMBER(m_filter.proto_coef, b1));
save_item(STRUCT_MEMBER(m_filter.proto_coef, b2));
save_item(STRUCT_MEMBER(m_noise_filters, capval));
save_item(STRUCT_MEMBER(m_noise_filters, exponent));
}
@ -239,8 +236,8 @@ void micro3d_sound_device::sound_stream_update(sound_stream &stream, std::vector
if (m_gain == 0)
return;
float pan_l = (float)(255 - m_dac[PAN]) / 255.0f;
float pan_r = (float)(m_dac[PAN]) / 255.0f;
float const pan_l = float(255 - m_dac[PAN]) / 255.0f;
float const pan_r = float(m_dac[PAN]) / 255.0f;
for (int sampindex = 0; sampindex < fl.samples(); sampindex++)
{
@ -254,7 +251,7 @@ void micro3d_sound_device::sound_stream_update(sound_stream &stream, std::vector
m_noise_subcount = 2000000 / MM5837_CLOCK;
}
m_noise_subcount -= step;
float input = (float)m_noise_value - 0.5f;
float input = float(m_noise_value) - 0.5f;
float white = input;
// Pink noise filtering

View file

@ -27,7 +27,8 @@ protected:
virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
private:
enum dac_registers {
enum dac_registers
{
VCF,
VCQ,
VCA,

View file

@ -297,8 +297,9 @@ void micro3d_state::draw_line(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2
if (x2 < x1)
{
std::swap<uint32_t>(x1, x2);
std::swap<uint32_t>(y1, y2);
using std::swap;
swap(x1, x2);
swap(y1, y2);
}
dx = x2 - x1;

View file

@ -47,7 +47,7 @@ public:
{}
void sweetland4(machine_config &config);
void tairyouda(machine_config &config);
void tairyodk(machine_config &config);
private:
required_device<h8h_device> m_maincpu;
@ -110,7 +110,7 @@ static INPUT_PORTS_START( sweetld4 )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( tairyouda )
static INPUT_PORTS_START( tairyodk )
PORT_START("DSW1") // only one bank of 4 dip switches on PCB
PORT_DIPNAME( 0x01, 0x01, "DSW1-01" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
@ -142,7 +142,7 @@ void sweetland4_state::sweetland4(machine_config &config)
oki.add_route(1, "rspeaker", 1.00);
}
void sweetland4_state::tairyouda(machine_config &config)
void sweetland4_state::tairyodk(machine_config &config)
{
H83002(config, m_maincpu, 14.746_MHz_XTAL); // H8/3002 6413002F17
@ -163,7 +163,7 @@ ROM_START( sweetld4 )
ROM_LOAD( "swb 1 snd0.19d", 0x000000, 0x200000, CRC(39294dc7) SHA1(6094a53f10f220d1df8c3e35df11e0566e9c099c) ) // 11xxxxxxxxxxxxxxxxx = 0x00
ROM_END
/* Tairyou-Daiko 337 Byoshi (大漁太鼓337拍子, https://bandainamco-am.co.jp/am/english/aa/tairyodaiko337byoshi/) runs on Namco M151 PCB:
/* Tairyo-Daiko 337 Byoshi (大漁太鼓337拍子, https://bandainamco-am.co.jp/am/english/aa/tairyodaiko337byoshi/) runs on Namco M151 PCB:
_________________________________________________________________________
| ___ ___ NAMCO |
| |··| ______ ____ | | M151 MAIN |
@ -201,7 +201,7 @@ ROM_END
|________________________________________________________________________|
*/
ROM_START( tairyouda ) // 大漁太鼓337拍子
ROM_START( tairyodk ) // 大漁太鼓337拍子
ROM_REGION( 0x80000, "maincpu", 0 )
ROM_LOAD( "t3b1_prg0.5f", 0x00000, 0x80000, CRC(d09dcb0c) SHA1(dbb66f5d548079f19b06dd98d3a44ee6b42b470a) )
@ -212,5 +212,5 @@ ROM_END
} // anonymous namespace
GAME( 2004, sweetld4, 0, sweetland4, sweetld4, sweetland4_state, empty_init, ROT0, "Namco", "Sweet Land 4 Bright (ver 2004.9.29)", MACHINE_IS_SKELETON_MECHANICAL )
GAME( 2000, tairyouda, 0, tairyouda, tairyouda, sweetland4_state, empty_init, ROT0, "Namco", "Tairyou-Daiko 337 Byoshi", MACHINE_IS_SKELETON_MECHANICAL )
GAME( 2004, sweetld4, 0, sweetland4, sweetld4, sweetland4_state, empty_init, ROT0, "Namco", "Sweet Land 4 Bright (ver 2004.9.29)", MACHINE_IS_SKELETON_MECHANICAL )
GAME( 2000, tairyodk, 0, tairyodk, tairyodk, sweetland4_state, empty_init, ROT0, "Namco", "Tairyo-Daiko 337 Byoshi", MACHINE_IS_SKELETON_MECHANICAL )

View file

@ -1709,4 +1709,4 @@ GAME(1991, larana, 0, inder, larana, inder_state, init_0, ROT0, "Inder",
GAME(1992, ind250cc, 0, inder, ind250cc, inder_state, init_1, ROT0, "Inder", "250 CC", MACHINE_MECHANICAL | MACHINE_SUPPORTS_SAVE )
// Unknown sound hardware, unknown machine (using 'larana' inputs until proper ones are figured out).
GAME(1991, indunkgam, 0, inder, larana, inder_state, init_0, ROT0, "Inder", "Unknown gambling game on Inder pinball hardware", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME(1991, indunkgam, 0, inder, larana, inder_state, init_0, ROT0, "Inder", "unknown gambling game on Inder pinball hardware", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )

View file

@ -82,17 +82,17 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
// screen updates
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
// video-related
tilemap_t *m_tilemap[3] = {nullptr, nullptr, nullptr};
template<unsigned Which> TILE_GET_INFO_MEMBER(get_tile_info);
int m_oki_bank = 0;
uint16_t m_gfx_control = 0;
// screen updates
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
template <unsigned Which> TILE_GET_INFO_MEMBER(get_tile_info);
void gfx_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void tilemap1_scrollx_w(uint16_t data);
void tilemap1_scrolly_w(uint16_t data);
@ -101,7 +101,7 @@ private:
};
template<unsigned Which>
template <unsigned Which>
TILE_GET_INFO_MEMBER(_3x3puzzle_state::get_tile_info)
{
tileinfo.set(Which,
@ -294,10 +294,10 @@ static INPUT_PORTS_START( casanova )
PORT_MODIFY("DSW01") // Do NOT trust "DIP INFO" for correct settings! At least Coinage is WRONG!
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x0002, DEF_STR( 1C_2C ) ) // Dip info shows 2 Coins / Credit
PORT_DIPSETTING( 0x0002, DEF_STR( 1C_2C ) ) // DIP switch info shows 2 Coins / Credit
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) // Dip info shows 3 Coins / Credit
PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) // Dip info shows 5 Coins / Credit
PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) // DIP switch info shows 3 Coins / Credit
PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) // DIP switch info shows 5 Coins / Credit
PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x0008, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x000c, DEF_STR( Normal ) )

File diff suppressed because it is too large Load diff

View file

@ -37,12 +37,12 @@ public:
m_x1_bank(*this, "x1_bank_%u", 1U),
m_spriteram(*this, "spriteram", 0x40000, ENDIANNESS_BIG),
m_vregs(*this, "vregs", 0x40, ENDIANNESS_BIG),
m_in_system(*this, "SYSTEM"),
m_leds(*this, "led%u", 0U),
m_lamps(*this, "lamp%u", 0U)
{ }
void seta2(machine_config &config);
void seta2_32m(machine_config &config);
void grdians(machine_config &config);
void grdiansa(machine_config &config);
void myangel(machine_config &config);
@ -64,9 +64,6 @@ protected:
void grdians_lockout_w(uint8_t data);
uint16_t mj4simai_p1_r();
uint16_t mj4simai_p2_r();
uint16_t pzlbowl_protection_r(address_space &space);
uint8_t pzlbowl_coins_r();
void pzlbowl_coin_counter_w(uint8_t data);
@ -88,8 +85,8 @@ protected:
uint16_t spriteram_r(offs_t offset);
void spriteram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
int calculate_global_xoffset(int nozoom_fixedpalette_fixedposition);
int calculate_global_yoffset(int nozoom_fixedpalette_fixedposition);
int calculate_global_xoffset(bool nozoom_fixedpalette_fixedposition);
int calculate_global_yoffset(bool nozoom_fixedpalette_fixedposition);
void draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int scanline, int realscanline, int xoffset, uint32_t xzoom, bool xzoominverted);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -101,7 +98,6 @@ protected:
void ablastb_map(address_map &map);
void grdians_map(address_map &map);
void gundamex_map(address_map &map);
void mj4simai_map(address_map &map);
void myangel2_map(address_map &map);
void myangel_map(address_map &map);
void namcostr_map(address_map &map);
@ -113,6 +109,9 @@ protected:
void telpacfl_map(address_map &map);
void x1_map(address_map &map);
void seta2(machine_config &config);
void seta2_32m(machine_config &config);
required_device<cpu_device> m_maincpu;
optional_device<h83007_device> m_sub;
required_device<gfxdecode_device> m_gfxdecode;
@ -127,57 +126,70 @@ protected:
optional_memory_bank_array<8> m_x1_bank;
memory_share_creator<uint16_t> m_spriteram;
memory_share_creator<uint16_t> m_vregs;
optional_ioport m_in_system;
output_finder<7> m_leds;
output_finder<11> m_lamps;
int m_keyboard_row;
std::unique_ptr<uint16_t[]> m_private_spriteram;
private:
void drawgfx_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int gfx, const uint8_t* const addr, const uint32_t realcolor, int flipx, int flipy, int base_sx, uint32_t xzoom, int shadow, int screenline, int line, int opaque);
inline void get_tile(uint16_t* spriteram, int is_16x16, int x, int y, int page, int& code, int& attr, int& flipx, int& flipy, int& color);
void drawgfx_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int gfx, uint8_t const *const addr, uint32_t realcolor, bool flipx, bool flipy, int base_sx, uint32_t xzoom, bool shadow, int screenline, int line, bool opaque);
inline void get_tile(uint16_t const *spriteram, bool is_16x16, int x, int y, int page, int &code, int &attr, bool &flipx, bool &flipy, int &color);
TIMER_CALLBACK_MEMBER(raster_timer_done);
std::unique_ptr<uint32_t[]> m_realtilenumber;
gfx_element *m_spritegfx;
uint16_t m_rasterposition;
uint16_t m_rasterenabled;
TIMER_CALLBACK_MEMBER(raster_timer_done);
emu_timer *m_raster_timer;
uint16_t m_rasterposition = 0;
uint16_t m_rasterenabled = 0;
emu_timer *m_raster_timer = nullptr;
};
class mj4simai_state : public seta2_state
{
public:
mj4simai_state(const machine_config &mconfig, device_type type, const char *tag)
: seta2_state(mconfig, type, tag)
mj4simai_state(const machine_config &mconfig, device_type type, const char *tag) :
seta2_state(mconfig, type, tag),
m_keys{ { *this, "P1_KEY%u", 0U }, { *this, "P2_KEY%u", 0U } }
{ }
void mj4simai(machine_config &config);
protected:
virtual void machine_start() override;
private:
template <unsigned Which> uint16_t mj4simai_key_r();
void mj4simai_map(address_map &map);
required_ioport_array<5> m_keys[2];
uint8_t m_keyboard_row = 0;
};
class funcube_state : public seta2_state
{
public:
funcube_state(const machine_config &mconfig, device_type type, const char *tag)
: seta2_state(mconfig, type, tag)
, m_nvram(*this, "nvram", 0x180, ENDIANNESS_BIG)
funcube_state(const machine_config &mconfig, device_type type, const char *tag) :
seta2_state(mconfig, type, tag),
m_nvram(*this, "nvram", 0x180, ENDIANNESS_BIG),
m_in_debug(*this, "DEBUG"),
m_in_switch(*this, "SWITCH"),
m_in_battery(*this, "BATTERY")
{ }
void funcube(machine_config &config);
void funcube3(machine_config &config);
void funcube2(machine_config &config);
void init_funcube3();
void init_funcube();
void init_funcube2();
void init_funcube3();
private:
memory_share_creator<uint8_t> m_nvram;
virtual void machine_start() override;
virtual void machine_reset() override;
@ -199,7 +211,13 @@ private:
void funcube_debug_outputs();
uint8_t m_outputs, m_funcube_leds;
memory_share_creator<uint8_t> m_nvram;
required_ioport m_in_debug;
required_ioport m_in_switch;
required_ioport m_in_battery;
uint8_t m_outputs = 0, m_funcube_leds = 0;
uint64_t m_coin_start_cycles = 0;
uint8_t m_hopper_motor = 0;
};

View file

@ -89,6 +89,22 @@
#include "emu.h"
#include "seta2.h"
#define LOG_VREG (1U << 1)
#define LOG_VIDEO (1U << 2)
#define LOG_SPRITE (1U << 3)
#define LOG_OFFSET (1U << 4)
#define LOG_ALL (LOG_IO)
#define VERBOSE (0)
#include "logmacro.h"
#define LOGVREG(...) LOGMASKED(LOG_VREG, __VA_ARGS__)
#define LOGVIDEO(...) LOGMASKED(LOG_VIDEO, __VA_ARGS__)
#define LOGSPRITE(...) LOGMASKED(LOG_SPRITE, __VA_ARGS__)
#define LOGOFFSET(...) LOGMASKED(LOG_OFFSET, __VA_ARGS__)
/***************************************************************************
Video Registers
@ -170,35 +186,34 @@ void seta2_state::vregs_w(offs_t offset, uint16_t data, uint16_t mem_mask)
grdians = 019a
*/
uint16_t olddata = m_vregs[offset];
const uint16_t olddata = m_vregs[offset];
COMBINE_DATA(&m_vregs[offset]);
if (m_vregs[offset] != olddata)
logerror("CPU #0 PC %06X: Video Reg %02X <- %04X\n", m_maincpu->pc(), offset * 2, data);
LOGVREG("CPU #0 PC %06X: Video Reg %02X <- %04X\n", m_maincpu->pc(), offset * 2, data);
switch (offset * 2)
{
case 0x1a:
logerror("%s: Register 1a write (vertical offset?) %04X (%04x)\n", machine().describe_context(), data, mem_mask);
LOGVREG("%s: Register 1a write (vertical offset?) %04X (%04x)\n", machine().describe_context(), data, mem_mask);
break;
case 0x1c: // FLIP SCREEN (myangel) <- this is actually zoom
flip_screen_set(data & 1);
if (data & ~1) logerror("CPU #0 PC %06X: flip screen unknown bits %04X\n", m_maincpu->pc(), data);
flip_screen_set(BIT(data, 0));
if (data & ~1) LOGVREG("CPU #0 PC %06X: flip screen unknown bits %04X\n", m_maincpu->pc(), data);
break;
case 0x2a: // FLIP X (pzlbowl)
flip_screen_x_set(data & 1);
if (data & ~1) logerror("CPU #0 PC %06X: flipx unknown bits %04X\n", m_maincpu->pc(), data);
flip_screen_x_set(BIT(data, 0));
if (data & ~1) LOGVREG("CPU #0 PC %06X: flipx unknown bits %04X\n", m_maincpu->pc(), data);
break;
case 0x2c: // FLIP Y (pzlbowl)
flip_screen_y_set(data & 1);
if (data & ~1) logerror("CPU #0 PC %06X: flipy unknown bits %04X\n", m_maincpu->pc(), data);
flip_screen_y_set(BIT(data, 0));
if (data & ~1) LOGVREG("CPU #0 PC %06X: flipy unknown bits %04X\n", m_maincpu->pc(), data);
break;
case 0x30: // BLANK SCREEN (pzlbowl, myangel)
if (data & ~1) logerror("CPU #0 PC %06X: blank unknown bits %04X\n", m_maincpu->pc(), data);
if (data & ~1) LOGVREG("CPU #0 PC %06X: blank unknown bits %04X\n", m_maincpu->pc(), data);
break;
case 0x24: // funcube3 and staraudi write here instead, why? mirror or different meaning?
@ -218,12 +233,12 @@ void seta2_state::vregs_w(offs_t offset, uint16_t data, uint16_t mem_mask)
m_private_spriteram[i + 1] = m_spriteram[(0x3000 / 2) + i + 1];
m_private_spriteram[i + 2] = m_spriteram[(0x3000 / 2) + i + 2];
int sprite = m_spriteram[(0x3000 / 2) + i + 3];
const int sprite = m_spriteram[(0x3000 / 2) + i + 3];
m_private_spriteram[i + 3] = ((current_sprite_entry / 4) & 0x7fff) | (sprite & 0x8000);
int list2addr = (sprite & 0x7fff) * 4;
const int list2addr = (sprite & 0x7fff) * 4;
num &=0xff;
num &= 0xff;
for (int j = 0; j <= num; j++)
{
@ -237,14 +252,12 @@ void seta2_state::vregs_w(offs_t offset, uint16_t data, uint16_t mem_mask)
}
}
if (m_private_spriteram[i + 0] & 0x8000) // end of list marker, mj4simai must draw the sprite this covers for the company logo, title screen etc.
if (BIT(m_private_spriteram[i + 0], 15)) // end of list marker, mj4simai must draw the sprite this covers for the company logo, title screen etc.
{
// HACK: however penbros has a dummy sprite entry there which points to 0x0000 as the tile source, and causes garbage with the rearranged format,
// so change it to something that's invalid where we can filter it later. This strongly indicates that the current approach is incorrect however.
if (sprite == 0x00)
{
m_private_spriteram[i + 3] |= 0x4000;
}
break;
}
@ -254,24 +267,24 @@ void seta2_state::vregs_w(offs_t offset, uint16_t data, uint16_t mem_mask)
break;
case 0x3c: // Raster IRQ related
//logerror("%s: Register 3c write (raster enable?) current vpos is %d : %04X (%04x)\n",machine().describe_context(),m_screen->vpos(), data, mem_mask);
//LOGVREG("%s: Register 3c write (raster enable?) current vpos is %d : %04X (%04x)\n",machine().describe_context(),m_screen->vpos(), data, mem_mask);
COMBINE_DATA(&m_rasterenabled);
//if (m_rasterenabled & 1)
//if (BIT(m_rasterenabled, 0))
{
int hpos = 0;
int vpos = m_rasterposition;
const int vpos = m_rasterposition;
// in the vblank it specifies line 0, the first raster interrupt then specifies line 0 again before the subsequent ones use the real line numbers?
// It seems more likely that the raster IRQ stays asserted for the entire line, thus triggering a second interrupt unless the line number is changed?
if (m_rasterposition == m_screen->vpos()) hpos = m_screen->hpos() + 0x100;
//logerror("setting raster to %d %d\n", vpos, hpos);
//LOGVREG("setting raster to %d %d\n", vpos, hpos);
m_raster_timer->adjust(m_screen->time_until_pos(vpos, hpos), 0);
}
break;
case 0x3e: // Raster IRQ related
//logerror("%s: Register 3e write (raster position?) %04X (%04x)\n",machine().describe_context(),data, mem_mask);
//LOGVREG("%s: Register 3e write (raster position?) %04X (%04x)\n",machine().describe_context(),data, mem_mask);
COMBINE_DATA(&m_rasterposition);
break;
}
@ -295,7 +308,20 @@ void seta2_state::spriteram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
***************************************************************************/
inline void seta2_state::drawgfx_line(bitmap_ind16& bitmap, const rectangle& cliprect, int which_gfx, const uint8_t* const addr, const uint32_t realcolor, int flipx, int flipy, int base_sx, uint32_t xzoom, int use_shadow, int screenline, int line, int opaque)
inline void seta2_state::drawgfx_line(
bitmap_ind16 &bitmap,
const rectangle &cliprect,
int which_gfx,
uint8_t const *const addr,
uint32_t realcolor,
bool flipx,
bool flipy,
int base_sx,
uint32_t xzoom,
bool use_shadow,
int screenline,
int line,
bool opaque)
{
struct drawmodes
{
@ -317,21 +343,21 @@ inline void seta2_state::drawgfx_line(bitmap_ind16& bitmap, const rectangle& cli
};
int shadow = BPP_MASK_TABLE[(which_gfx & 0x0700) >> 8].shadow;
int gfx_mask = BPP_MASK_TABLE[(which_gfx & 0x0700) >> 8].gfx_mask;
int gfx_shift = BPP_MASK_TABLE[(which_gfx & 0x0700) >> 8].gfx_shift;
const int gfx_mask = BPP_MASK_TABLE[(which_gfx & 0x0700) >> 8].gfx_mask;
const int gfx_shift = BPP_MASK_TABLE[(which_gfx & 0x0700) >> 8].gfx_shift;
if (!use_shadow)
shadow = 0;
uint16_t *const dest = &bitmap.pix(screenline);
int minx = cliprect.min_x << 16;
int maxx = (cliprect.max_x + 1) << 16;
const int minx = cliprect.min_x << 16;
const int maxx = (cliprect.max_x + 1) << 16;
if (xzoom < 0x10000) // shrink
{
int x0 = flipx ? (base_sx + (8 * xzoom) - xzoom) : (base_sx);
int x1 = flipx ? (base_sx - xzoom) : (x0 + (8 * xzoom));
const int x0 = flipx ? (base_sx + (8 * xzoom) - xzoom) : (base_sx);
const int x1 = flipx ? (base_sx - xzoom) : (x0 + (8 * xzoom));
const int dx = flipx ? (-xzoom) : (xzoom);
const uint8_t* const source = flipy ? addr + (7 - line) * 8 : addr + line * 8;
@ -339,23 +365,20 @@ inline void seta2_state::drawgfx_line(bitmap_ind16& bitmap, const rectangle& cli
for (int sx = x0; sx != x1; sx += dx)
{
uint8_t pen = (source[column++] & gfx_mask) >> gfx_shift;
const uint8_t pen = (source[column++] & gfx_mask) >> gfx_shift;
if (sx >= minx && sx < maxx)
{
int realsx = sx >> 16;
const int realsx = sx >> 16;
if (pen || opaque)
{
if (!shadow)
{
dest[realsx] = (realcolor + pen) & 0x7fff;
}
else
{
int pen_shift = 15 - shadow;
int pen_mask = (1 << pen_shift) - 1;
const int pen_shift = 15 - shadow;
const int pen_mask = (1 << pen_shift) - 1;
dest[realsx] = ((dest[realsx] & pen_mask) | (pen << pen_shift)) & 0x7fff;
}
}
@ -366,27 +389,23 @@ inline void seta2_state::drawgfx_line(bitmap_ind16& bitmap, const rectangle& cli
{
const uint8_t* const source = flipy ? addr + (7 - line) * 8 : addr + line * 8;
int x0 = (base_sx);
int x1 = (x0 + (8 * xzoom));
const int x0 = (base_sx);
const int x1 = (x0 + (8 * xzoom));
int column;
if (!flipx)
{
column = 0;
}
else
{
column = 7;
}
uint32_t countx = 0;
for (int sx = x0; sx < x1; sx += 0x10000)
{
uint8_t pen = (source[column] & gfx_mask) >> gfx_shift;
const uint8_t pen = (source[column] & gfx_mask) >> gfx_shift;
if (sx >= minx && sx < maxx)
{
int realsx = sx >> 16;
const int realsx = sx >> 16;
if (pen || opaque)
{
@ -396,8 +415,8 @@ inline void seta2_state::drawgfx_line(bitmap_ind16& bitmap, const rectangle& cli
}
else
{
int pen_shift = 15 - shadow;
int pen_mask = (1 << pen_shift) - 1;
const int pen_shift = 15 - shadow;
const int pen_mask = (1 << pen_shift) - 1;
dest[realsx] = ((dest[realsx] & pen_mask) | (pen << pen_shift)) & 0x7fff;
}
}
@ -407,13 +426,9 @@ inline void seta2_state::drawgfx_line(bitmap_ind16& bitmap, const rectangle& cli
if (countx >= xzoom)
{
if (!flipx)
{
column++;
}
else
{
column--;
}
countx -= xzoom;
}
@ -423,19 +438,29 @@ inline void seta2_state::drawgfx_line(bitmap_ind16& bitmap, const rectangle& cli
// takes an x/y pixel position in the virtual tilemap and returns the code + attributes etc. for it
inline void seta2_state::get_tile(uint16_t* spriteram, int is_16x16, int x, int y, int page, int& code, int& attr, int& flipx, int& flipy, int& color)
inline void seta2_state::get_tile(
uint16_t const *const spriteram,
bool is_16x16,
int x,
int y,
int page,
int &code,
int &attr,
bool &flipx,
bool &flipy,
int &color)
{
int xtile = x >> (is_16x16 ? 4 : 3);
const int xtile = x >> (is_16x16 ? 4 : 3);
int ytile = y >> (is_16x16 ? 4 : 3);
// yes the tilemap in RAM is flipped?!
ytile ^= 0x1f;
uint16_t *s3 = &spriteram[2 * ((page * 0x2000 / 4) + ((ytile & 0x1f) << 6) + ((xtile) & 0x03f))];
uint16_t const *const s3 = &spriteram[2 * ((page * 0x2000 / 4) + ((ytile & 0x1f) << 6) + (xtile & 0x03f))];
attr = s3[0];
code = s3[1] + ((attr & 0x0007) << 16);
flipx = (attr & 0x0010);
flipy = (attr & 0x0008);
flipx = BIT(attr, 4);
flipy = BIT(attr, 3);
color = (attr & 0xffe0) >> 5;
if (is_16x16)
{
@ -443,37 +468,29 @@ inline void seta2_state::get_tile(uint16_t* spriteram, int is_16x16, int x, int
if (!flipx)
{
if (x & 8)
{
if (BIT(x, 3))
code += 1;
}
}
else
{
if (!(x & 8))
{
if (BIT(~x, 3))
code += 1;
}
}
if (!flipy)
{
if (y & 8)
{
if (BIT(y, 3))
code += 2;
}
}
else
{
if (!(y & 8))
{
if (BIT(~y, 3))
code += 2;
}
}
}
}
int seta2_state::calculate_global_xoffset(int nozoom_fixedpalette_fixedposition)
int seta2_state::calculate_global_xoffset(bool nozoom_fixedpalette_fixedposition)
{
/*
int global_xoffset = (m_vregs[0x12/2] & 0x7ff); // and 0x10/2 for low bits
@ -501,7 +518,7 @@ int seta2_state::calculate_global_xoffset(int nozoom_fixedpalette_fixedposition)
return global_xoffset;
}
int seta2_state::calculate_global_yoffset(int nozoom_fixedpalette_fixedposition)
int seta2_state::calculate_global_yoffset(bool nozoom_fixedpalette_fixedposition)
{
// Sprites list
//int global_yoffset = (m_vregs[0x1a / 2] & 0x7ff); // and 0x18/2 for low bits
@ -520,51 +537,46 @@ int seta2_state::calculate_global_yoffset(int nozoom_fixedpalette_fixedposition)
void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int scanline, int realscanline, int xoffset, uint32_t xzoom, bool xzoominverted)
{
uint16_t* spriteram = m_spriteram;
uint16_t *s1 = m_private_spriteram.get();
const uint16_t *s1 = m_private_spriteram.get();
int sprite_debug_count = 0;
for (; s1 < &m_private_spriteram[0x1000 / 2]; s1 += 4,sprite_debug_count++)
for (; s1 < &m_private_spriteram[0x1000 / 2]; s1 += 4, sprite_debug_count++)
{
int num = s1[0];
int xoffs = s1[1];
int yoffs = s1[2];
int sprite = s1[3];
const int sprite = s1[3];
// Single-sprite address
uint16_t *s2 = &spriteram[(sprite & 0x7fff) * 4];
uint16_t *end = &spriteram[m_spriteram.bytes() / 2];
uint16_t const *s2 = &m_spriteram[(sprite & 0x7fff) * 4];
uint16_t const *const end = &m_spriteram[m_spriteram.bytes() / 2];
// Single-sprite size
int global_sizex = xoffs & 0xfc00;
int global_sizey = yoffs & 0xfc00;
const int global_sizex = xoffs & 0xfc00;
const int global_sizey = yoffs & 0xfc00;
int nozoom_fixedpalette_fixedposition = num & 0x4000; // ignore various things including global offsets, zoom. different palette selection too?
bool opaque = num & 0x2000;
int use_global_size = num & 0x1000;
int use_shadow = num & 0x0800;
int which_gfx = num & 0x0700;
const bool nozoom_fixedpalette_fixedposition = BIT(num, 14); // ignore various things including global offsets, zoom. different palette selection too?
const bool opaque = BIT(num, 13);
const bool use_global_size = BIT(num, 12);
bool use_shadow = BIT(num, 11);
const int which_gfx = num & 0x0700;
xoffs &= 0x3ff;
yoffs &= 0x3ff;
if (yoffs & 0x200)
yoffs -= 0x400;
int global_xoffset = calculate_global_xoffset(nozoom_fixedpalette_fixedposition);
int global_yoffset = calculate_global_yoffset(nozoom_fixedpalette_fixedposition);
const int global_xoffset = calculate_global_xoffset(nozoom_fixedpalette_fixedposition);
const int global_yoffset = calculate_global_yoffset(nozoom_fixedpalette_fixedposition);
int usedscanline;
int usedxoffset;
uint32_t usedxzoom;
if (nozoom_fixedpalette_fixedposition)
{
use_shadow = 0;
use_shadow = false;
//which_gfx = 4 << 8;
usedscanline = realscanline; // no zooming?
usedxzoom = 0x10000;
@ -581,15 +593,14 @@ void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &clipr
num = (num & 0x00ff) + 1;
// all sprites, except invalid ones should have a pointer <0x3000 in the reformatted list
if ((sprite&0x7fff) < 0x3000 / 2 / 4)
if ((sprite & 0x7fff) < 0x3000 / 2 / 4)
{
for (; num > 0; num--, s2 += 4)
{
if (s2 >= end) break;
if (sprite & 0x8000)
if (BIT(sprite, 15))
{
// "floating tilemap" sprite
// the 'floating tilemap sprites' are just a window into the tilemap, the position of the sprite does not change the scroll values
@ -600,7 +611,7 @@ void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &clipr
if (sy & 0x200)
sy -= 0x400;
int local_sizey = s2[1] & 0xfc00;
const int local_sizey = s2[1] & 0xfc00;
int height = use_global_size ? global_sizey : local_sizey;
height = ((height & 0xfc00) >> 10) + 1;
@ -631,7 +642,7 @@ void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &clipr
// get everything we need to calculate if sprite is actually within the x co-ordinates of the screen
int sx = s2[0];
int local_sizex = sx & 0xfc00;
const int local_sizex = sx & 0xfc00;
sx &= 0x3ff;
sx -= global_xoffset;
@ -642,43 +653,54 @@ void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &clipr
int firstcolumn = (sx + xoffs);
firstcolumn = (firstcolumn & 0x1ff) - (firstcolumn & 0x200);
int lastcolumn = firstcolumn + width * 0x10 - 1;
const int lastcolumn = firstcolumn + width * 0x10 - 1;
// if the sprite isn't within the x-coordinates of the screen, bail
if (firstcolumn > cliprect.max_x) continue;
if (lastcolumn < cliprect.min_x) continue;
// otherwise get the rest of the things we need to draw
int scrolly = s2[3];
scrolly &= 0x1ff;
scrolly += global_yoffset;
int sourceline = (usedscanline - scrolly) & 0x1ff;
const int sourceline = (usedscanline - scrolly) & 0x1ff;
int scrollx = s2[2];
int is_16x16 = (scrollx & 0x8000) >> 15;
int page = (scrollx & 0x7c00) >> 10;
const bool is_16x16 = BIT(scrollx, 15);
const int page = (scrollx & 0x7c00) >> 10;
scrollx &= 0x3ff;
// we treat 16x16 tiles as 4 8x8 tiles, so while the tilemap is 0x40 tiles wide in memory, that becomes 0x80 tiles in 16x16 mode, with the data wrapping in 8x8 mode
for (int x = 0; x < 0x80; x++)
{
int code, attr, flipx, flipy, color;
int code, attr, color;
bool flipx, flipy;
// tilemap data is NOT buffered?
get_tile(spriteram, is_16x16, x * 8, sourceline, page, code, attr, flipx, flipy, color);
get_tile(
m_spriteram, is_16x16, x * 8, sourceline, page,
code, attr, flipx, flipy, color);
int tileline = sourceline & 0x07;
int dx = sx + (scrollx & 0x3ff) + xoffs + 0x10;
int px = (((dx + x * 8) + 0x10) & 0x3ff) - 0x10;
const int tileline = sourceline & 0x07;
const int dx = sx + (scrollx & 0x3ff) + xoffs + 0x10;
const int px = (((dx + x * 8) + 0x10) & 0x3ff) - 0x10;
int dst_x = px & 0x3ff;
dst_x = (dst_x & 0x1ff) - (dst_x & 0x200);
if ((dst_x >= firstcolumn - 8) && (dst_x <= lastcolumn)) // reelnquak reels are heavily glitched without this check
{
uint32_t realsx = dst_x;
realsx -= usedxoffset>>16; // need to refactor, this causes loss of lower 16 bits of offset which are important in zoomed cases for precision
realsx -= usedxoffset >> 16; // need to refactor, this causes loss of lower 16 bits of offset which are important in zoomed cases for precision
realsx = realsx * usedxzoom;
drawgfx_line(bitmap, cliprect, which_gfx, m_spritegfx->get_data(m_realtilenumber[code]), color << 4, flipx, flipy, realsx, usedxzoom, use_shadow, realscanline, tileline, opaque);
drawgfx_line(
bitmap, cliprect,
which_gfx,
m_spritegfx->get_data(m_realtilenumber[code]),
color << 4,
flipx, flipy,
realsx,
usedxzoom, use_shadow,
realscanline, tileline,
opaque);
}
}
}
@ -693,10 +715,9 @@ void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &clipr
sy += global_yoffset;
sy &= 0x3ff;
if (realscanline == 128)
{
// printf("%04x %02x %d %d\n", sprite_debug_count, num, yoffs, sy);
//LOGSPRITE("%04x %02x %d %d\n", sprite_debug_count, num, yoffs, sy);
}
int sizey = use_global_size ? global_sizey : s2[1] & 0xfc00;
@ -715,12 +736,11 @@ void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &clipr
if (endline & 0x200)
endline -= 0x400;
// if the sprite doesn't cover this scanline, bail now
if (endline >= firstline)
{
if (firstline > usedscanline) continue;
if (endline < usedscanline) continue;
if ((firstline > usedscanline) || (endline < usedscanline))
continue;
}
else
{
@ -730,10 +750,10 @@ void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &clipr
}
// otherwise get the rest of the things we need to draw
int attr = s2[2];
const int attr = s2[2];
int code = s2[3] + ((attr & 0x0007) << 16);
int flipx = (attr & 0x0010);
int flipy = (attr & 0x0008);
const bool flipx = BIT(attr, 4);
const bool flipy = BIT(attr, 3);
int color = (attr & 0xffe0) >> 5;
int sx = s2[0];
@ -744,11 +764,10 @@ void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &clipr
sx = (sx & 0x1ff) - (sx & 0x200);
sx -= global_xoffset;
int basecode = code &= ~((sizex + 1) * (sizey + 1) - 1); // see myangel, myangel2 and grdians
const int basecode = code &= ~((sizex + 1) * (sizey + 1) - 1); // see myangel, myangel2 and grdians
int line = usedscanline - firstline;
int y = (line >> 3);
const int y = (line >> 3);
line &= 0x7;
if (nozoom_fixedpalette_fixedposition)
@ -759,17 +778,26 @@ void seta2_state::draw_sprites_line(bitmap_ind16 &bitmap, const rectangle &clipr
for (int x = 0; x <= sizex; x++)
{
int realcode = (basecode + (flipy ? sizey - y : y)*(sizex + 1)) + (flipx ? sizex - x : x);
const int realcode = (basecode + (flipy ? sizey - y : y)*(sizex + 1)) + (flipx ? sizex - x : x);
uint32_t realsx = (sx + x * 8);
realsx -= usedxoffset>>16; // need to refactor, this causes loss of lower 16 bits of offset which are important in zoomed cases for precision
realsx -= usedxoffset >> 16; // need to refactor, this causes loss of lower 16 bits of offset which are important in zoomed cases for precision
realsx = realsx * usedxzoom;
drawgfx_line(bitmap, cliprect, which_gfx, m_spritegfx->get_data(m_realtilenumber[realcode]), color << 4, flipx, flipy, realsx, usedxzoom, use_shadow, realscanline, line, opaque);
drawgfx_line(
bitmap, cliprect,
which_gfx,
m_spritegfx->get_data(m_realtilenumber[realcode]),
color << 4,
flipx, flipy,
realsx,
usedxzoom, use_shadow,
realscanline, line,
opaque);
}
}
}
}
if (s1[0] & 0x8000) break; // end of list marker
if (BIT(s1[0], 15)) break; // end of list marker
} // sprite list
}
@ -779,10 +807,10 @@ TIMER_CALLBACK_MEMBER(seta2_state::raster_timer_done)
auto *tmp68301 = dynamic_cast<tmp68301_device *>(m_maincpu.target());
if (tmp68301)
{
if (m_rasterenabled & 1)
if (BIT(m_rasterenabled, 0))
{
tmp68301->set_input_line(1, HOLD_LINE);
logerror("external int (vpos is %d)\n", m_screen->vpos());
LOGVIDEO("external int (vpos is %d)\n", m_screen->vpos());
m_screen->update_partial(m_screen->vpos() - 1);
}
}
@ -791,7 +819,7 @@ TIMER_CALLBACK_MEMBER(seta2_state::raster_timer_done)
void seta2_state::draw_sprites(bitmap_ind16& bitmap, const rectangle& cliprect)
{
//printf("yoffset: %04x%04x yzoom: %04x%04x | xoffset: %04x%04x xzoom: %04x%04x \n", m_vregs[0x1a/2], m_vregs[0x18/2], m_vregs[0x1e/2], m_vregs[0x1c/2] , m_vregs[0x12/2], m_vregs[0x10/2], m_vregs[0x16/2], m_vregs[0x14/2]);
//LOGOFFSET("yoffset: %04x%04x yzoom: %04x%04x | xoffset: %04x%04x xzoom: %04x%04x \n", m_vregs[0x1a/2], m_vregs[0x18/2], m_vregs[0x1e/2], m_vregs[0x1c/2] , m_vregs[0x12/2], m_vregs[0x10/2], m_vregs[0x16/2], m_vregs[0x14/2]);
uint32_t yoffset = (m_vregs[0x1a / 2] << 16) | m_vregs[0x18 / 2];
yoffset &= 0x07ffffff;
@ -808,7 +836,6 @@ void seta2_state::draw_sprites(bitmap_ind16& bitmap, const rectangle& cliprect)
yzoominverted = true;
}
int xoffset = (m_vregs[0x12 / 2] << 16) | m_vregs[0x10 / 2];
xoffset &= 0x07ffffff;
@ -825,15 +852,14 @@ void seta2_state::draw_sprites(bitmap_ind16& bitmap, const rectangle& cliprect)
xzoominverted = true;
}
if (!xzoom)
return;
uint64_t inc = 0x100000000ULL;
const uint64_t inc = 0x100000000ULL;
uint32_t inc2 = inc / xzoom;
const uint32_t inc2 = inc / xzoom;
//printf("xinc is %04x xoom %04x xoffset is %4x\n", inc2, xzoom, xoffset);
//LOGOFFSET("xinc is %04x xoom %04x xoffset is %4x\n", inc2, xzoom, xoffset);
for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
{
@ -844,9 +870,7 @@ void seta2_state::draw_sprites(bitmap_ind16& bitmap, const rectangle& cliprect)
int yy;
if (!yzoominverted)
{
yy = y; // not handled yet (this is using negative yzoom to do flipscreen...)
}
else
{
yy = y * yzoom;
@ -854,11 +878,10 @@ void seta2_state::draw_sprites(bitmap_ind16& bitmap, const rectangle& cliprect)
yy &= 0x07ffffff;
yy >>= 16;
//printf("line %04x yline requested %04x\n", y, yy);
//LOGOFFSET("line %04x yline requested %04x\n", y, yy);
if (yy & 0x400)
yy -= 0x800;
}
draw_sprites_line(bitmap, tempcliprect, yy, y, xoffset, inc2, xzoominverted);
@ -885,9 +908,7 @@ void seta2_state::video_start()
m_spritegfx = m_gfxdecode->gfx(0);
for (int i = 0; i < 0x80000; i++)
{
m_realtilenumber[i] = i % m_spritegfx->elements();
}
m_raster_timer = timer_alloc(FUNC(seta2_state::raster_timer_done), this);
@ -899,7 +920,7 @@ uint32_t seta2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
// Black or pen 0?
bitmap.fill(m_palette->pen(0), cliprect);
if ((m_vregs[0x30/2] & 1) == 0) // 1 = BLANK SCREEN
if (BIT(~m_vregs[0x30/2], 0)) // 1 = BLANK SCREEN
draw_sprites(bitmap, cliprect);
return 0;
@ -907,7 +928,7 @@ uint32_t seta2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
void seta2_state::screen_vblank(int state)
{
//popmessage("yoffset: %04x%04x yzoom: %04x%04x | xoffset: %04x%04x xzoom: %04x%04x \n", m_vregs[0x1a/2], m_vregs[0x18/2], m_vregs[0x1e/2], m_vregs[0x1c/2] , m_vregs[0x12/2], m_vregs[0x10/2], m_vregs[0x16/2], m_vregs[0x14/2]);
//LOGVIDEO("yoffset: %04x%04x yzoom: %04x%04x | xoffset: %04x%04x xzoom: %04x%04x \n", m_vregs[0x1a/2], m_vregs[0x18/2], m_vregs[0x1e/2], m_vregs[0x1c/2], m_vregs[0x12/2], m_vregs[0x10/2], m_vregs[0x16/2], m_vregs[0x14/2]);
}
// staraudi
@ -920,12 +941,13 @@ void staraudi_state::draw_rgbram(bitmap_ind16 &bitmap)
{
for (int x = 0; x < 0x200; ++x)
{
int offs = x * 2/2 + y * 0x400/2;
uint32_t data = ((m_rgbram[offs + 0x40000/2] & 0xff) << 16) | m_rgbram[offs];
const int offs = x * 2/2 + y * 0x400/2;
const uint32_t data = ((m_rgbram[offs + 0x40000/2] & 0xff) << 16) | m_rgbram[offs];
bitmap.pix(y, x) = (data & 0x7fff);
}
}
}
uint32_t staraudi_state::staraudi_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
screen_update(screen, bitmap, cliprect);

View file

@ -282,7 +282,11 @@ void ip20_state::ip20(machine_config &config)
ROM_START(indigo_r4000)
ROM_REGION64_BE(0x80000, "prom", 0)
ROMX_LOAD("ip20prom.070-8116-004.bin", 0x000000, 0x080000, CRC(940d960e) SHA1(596aba530b53a147985ff3f6f853471ce48c866c), ROM_GROUPDWORD | ROM_REVERSE)
ROM_SYSTEM_BIOS(0, "405g-rev-b", "SGI Version 4.0.5G Rev B IP20, Nov 10, 1992") // dumped over serial connection from boot monitor and swapped
ROMX_LOAD("ip20prom.070-8116-005.bin", 0x000000, 0x080000, CRC(1875b645) SHA1(52f5d7baea3d1bc720eb2164104c177e23504345), ROM_GROUPDWORD | ROM_REVERSE | ROM_BIOS(0))
ROM_SYSTEM_BIOS(1, "405d-rev-a", "SGI Version 4.0.5D Rev A IP20, Aug 19, 1992")
ROMX_LOAD("ip20prom.070-8116-004.bin", 0x000000, 0x080000, CRC(940d960e) SHA1(596aba530b53a147985ff3f6f853471ce48c866c), ROM_GROUPDWORD | ROM_REVERSE | ROM_BIOS(1))
// hand-made content sets eaddr 08:00:69:12:34:56 and netaddr 192.168.137.2
ROM_REGION16_LE(0x100, "nvram", 0)

View file

@ -62,8 +62,8 @@ FRONT CONTROL PANEL (o=LED, SW=switch)
BACK PANEL
-RS-232
-AUXILIARY (DB15)
-SENSOR 1 (DB9)
-AUXILIARY (DA15)
-SENSOR 1 (DE9)
************************************************************************************************************/

View file

@ -26,10 +26,10 @@ namespace {
class clie_db_state : public driver_device
{
public:
clie_db_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
clie_db_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu")
{ }
{ }
void t650c(machine_config &config);

View file

@ -242,10 +242,10 @@ protected:
};
struct mix_pix { // per-pixel information for the blending circuit
u16 src_pal{0};
u16 dst_pal{0};
u8 src_blend{0x00};
u8 dst_blend{0xff};
u16 src_pal[H_TOTAL];
u16 dst_pal[H_TOTAL];
u8 src_blend[H_TOTAL];
u8 dst_blend[H_TOTAL];
};
struct f3_line_inf;
@ -255,16 +255,17 @@ protected:
bool x_sample_enable{false};
u16 mix_value{0};
u8 prio{0};
u8 blend_mode;
u8 debug_index{0};
u8 index{0};
void set_mix(u16 v) { mix_value = v; prio = v & 0xf; }
void set_prio(u8 p) { mix_value = (mix_value & 0xfff0) | p; prio = p; }
void set_mix(u16 v) { mix_value = v; prio = v & 0xf; blend_mode = BIT(mix_value, 14, 2); };
void set_prio(u8 p) { mix_value = (mix_value & 0xfff0) | p; prio = p; };
void set_blend(u8 b) { mix_value = (mix_value & 0x3fff) | (b << 14); blend_mode = b; };
auto clip_inv() const { return std::bitset<4>(mix_value >> 4); }
auto clip_enable() const { return std::bitset<4>(mix_value >> 8); }
bool clip_inv_mode() const { return mix_value & 0x1000; }
bool layer_enable() const;
u8 blend_mask() const { return BIT(mix_value, 14, 2); }
bool blend_a() const { return mix_value & 0x4000; }
bool blend_b() const { return mix_value & 0x8000; }
@ -275,8 +276,8 @@ protected:
int y_index(int y) const;
int x_index(int x) const;
bool blend_select(const u8 *line_flags, int x) const { return false; }
bool inactive_group(u16 color) const { return false; }
bool used(int y) const { return true; }
static const char *debug_name() { return "MX"; }
};
@ -290,8 +291,8 @@ protected:
bool blend_select(const u8 *line_flags, int x) const { return blend_select_v; }
bool layer_enable() const;
bool inactive_group(u16 color) const { return BIT(color, 10, 2) != index; }
bool used(int y) const { return BIT((*sprite_pri_usage)[y], debug_index); }
static const char *debug_name() { return "SP"; };
};
@ -337,16 +338,16 @@ protected:
};
struct pri_mode {
u8 src_prio{0};
u8 dst_prio{0};
u8 src_blendmode{0xff};
u8 dst_blendmode{0xff};
u8 src_prio[H_TOTAL]{};
u8 dst_prio[H_TOTAL]{};
u8 src_blendmode[H_TOTAL]{};
u8 dst_blendmode[H_TOTAL]{};
};
struct f3_line_inf {
int y{0};
int screen_y{0};
pri_mode pri_alp[432]{};
pri_mode pri_alp{};
// 5000/4000
clip_plane_inf clip[NUM_CLIPPLANES];
// 6000 - pivot_control, sprite alpha
@ -376,16 +377,18 @@ protected:
bool m_sprite_trails = false;
u16 *m_pf_data[8]{};
int m_sprite_lag = 0;
u8 m_textram_row_usage[64]{};
u8 m_sprite_pri_row_usage[256]{};
u8 m_tilemap_row_usage[32][8]{};
bitmap_ind8 m_pri_alp_bitmap;
bitmap_ind16 m_sprite_framebuffers[NUM_SPRITEGROUPS]{};
bitmap_ind16 m_sprite_framebuffer{};
u16 m_width_mask = 0;
u8 m_twidth_mask = 0;
u8 m_twidth_mask_bit = 0;
std::unique_ptr<tempsprite[]> m_spritelist;
const tempsprite *m_sprite_end = nullptr;
bool m_sprite_bank = 0;
//f3_line_inf m_line_inf;
//f3_line_inf m_line_data{};
const F3config *m_game_config = nullptr;
u16 spriteram_r(offs_t offset);
@ -421,12 +424,15 @@ protected:
void draw_sprites(const rectangle &cliprect);
void get_pf_scroll(int pf_num, fixed8 &reg_sx, fixed8 &reg_sy);
void read_line_ram(f3_line_inf &line, int y);
void render_line(pen_t *dst, const mix_pix (&z)[432]);
void render_line(pen_t *dst, const mix_pix &z);
void scanline_draw(bitmap_rgb32 &bitmap, const rectangle &cliprect);
template<typename Mix>
std::vector<clip_plane_inf> calc_clip(const clip_plane_inf (&clip)[NUM_CLIPPLANES], const Mix line);
std::vector<clip_plane_inf> calc_clip(const clip_plane_inf (&clip)[NUM_CLIPPLANES], const Mix &layer);
inline bool used(const pivot_inf &layer, int y) const;
inline bool used(const sprite_inf &layer, int y) const;
inline bool used(const playfield_inf &layer, int y) const;
template<typename Mix>
bool mix_line(Mix &gfx, mix_pix *z, pri_mode *pri, const f3_line_inf &line, const clip_plane_inf &range);
bool mix_line(const Mix &gfx, mix_pix &z, pri_mode &pri, const f3_line_inf &line, const clip_plane_inf &range);
private:
optional_device<taito_en_device> m_taito_en;

View file

@ -352,9 +352,27 @@ const taito_f3_state::F3config taito_f3_state::f3_config_table[] = {
void taito_f3_state::device_post_load()
{
/* force a reread of the dynamic tiles in the pixel layer */
// force a reread of the dynamic tiles in the pixel layer
m_gfxdecode->gfx(0)->mark_all_dirty();
m_gfxdecode->gfx(1)->mark_all_dirty();
// refresh tile usage indexes
std::fill_n(*m_tilemap_row_usage, 32 * 8, 0);
std::fill_n(m_textram_row_usage, 64, 0);
// playfield blank tiles
for (int offset = 1; offset < 0x4000; offset += 2) {
const int row = m_extend ? BIT(offset, 7, 5) : BIT(offset, 6, 5);
const int tmap = m_extend ? offset >> 12 : offset >> 11;
if (m_pf_ram[offset] != 0)
m_tilemap_row_usage[row][tmap] += 1;
}
// textram blank tiles
for (int offset = 0; offset < 0x1000; offset++) {
const u8 tile = BIT(m_textram[offset], 0, 8);
const int row = BIT(offset, 6, 6);
if (tile != 0)
m_textram_row_usage[row] += 1;
}
}
/******************************************************************************/
@ -471,6 +489,7 @@ void taito_f3_state::create_tilemaps(bool extend)
if (m_tilemap[i])
m_tilemap[i]->set_transparent_pen(0);
}
std::fill_n(*m_tilemap_row_usage, 32 * 8, 0);
if (m_extend) {
m_width_mask = 0x3ff; // 10 bits
@ -505,11 +524,9 @@ void taito_f3_state::video_start()
m_sprite_end = &m_spritelist[0];
m_vram_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(taito_f3_state::get_tile_info_text)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
m_pixel_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(taito_f3_state::get_tile_info_pixel)), TILEMAP_SCAN_COLS, 8, 8, 64, 32);
std::fill_n(m_textram_row_usage, 64, 0);
m_screen->register_screen_bitmap(m_pri_alp_bitmap);
for (auto &sp_bitmap : m_sprite_framebuffers) {
m_screen->register_screen_bitmap(sp_bitmap);
}
m_screen->register_screen_bitmap(m_sprite_framebuffer);
m_vram_layer->set_transparent_pen(0);
m_pixel_layer->set_transparent_pen(0);
@ -541,15 +558,27 @@ u16 taito_f3_state::pf_ram_r(offs_t offset)
void taito_f3_state::pf_ram_w(offs_t offset, u16 data, u16 mem_mask)
{
// [.ttt yyyy yxxx xxa|h] non-extend
// [.tty yyyy xxxx xxa|h] extend
const u16 prev_tile = m_pf_ram[offset];
COMBINE_DATA(&m_pf_ram[offset]);
if (m_game_config->extend) {
if (offset < 0x4000) {
m_tilemap[offset >> 12]->mark_tile_dirty((offset & 0xfff) >> 1);
if (offset < 0x4000) {
if (offset & 1) {
const int row = m_extend ? BIT(offset, 7, 5) : BIT(offset, 6, 5);
const int tmap = m_extend ? offset >> 12 : offset >> 11;
if ((prev_tile == 0) && (m_pf_ram[offset] != 0))
m_tilemap_row_usage[row][tmap] += 1;
else if ((prev_tile != 0) && (m_pf_ram[offset] == 0))
m_tilemap_row_usage[row][tmap] -= 1;
}
} else {
if (offset < 0x4000)
if (m_game_config->extend) {
m_tilemap[offset >> 12]->mark_tile_dirty((offset & 0xfff) >> 1);
} else {
m_tilemap[offset >> 11]->mark_tile_dirty((offset & 0x7ff) >> 1);
}
}
}
@ -580,8 +609,17 @@ u16 taito_f3_state::textram_r(offs_t offset)
void taito_f3_state::textram_w(offs_t offset, u16 data, u16 mem_mask)
{
const u8 prev_tile = BIT(m_textram[offset], 0, 8);
COMBINE_DATA(&m_textram[offset]);
const int row = BIT(offset, 6, 6);
const u8 tile = BIT(m_textram[offset], 0, 8);
if (prev_tile == 0 && tile != 0)
m_textram_row_usage[row] += 1;
else if (prev_tile != 0 && tile == 0)
m_textram_row_usage[row] -= 1;
m_vram_layer->mark_tile_dirty(offset);
// dirty the pixel layer too, since it uses palette etc. from text layer
@ -669,7 +707,7 @@ void taito_f3_state::read_line_ram(f3_line_inf &line, int y)
if (const offs_t where = latched_addr(0, i)) {
const u16 colscroll = m_line_ram[where];
line.pf[i].colscroll = colscroll & 0x1ff;
line.pf[i].alt_tilemap = colscroll & 0x200;
line.pf[i].alt_tilemap = !m_extend && colscroll & 0x200;
line.clip[2*(i-2) + 0].set_upper(BIT(colscroll, 12), BIT(colscroll, 13));
line.clip[2*(i-2) + 1].set_upper(BIT(colscroll, 14), BIT(colscroll, 15));
}
@ -698,15 +736,14 @@ void taito_f3_state::read_line_ram(f3_line_inf &line, int y)
}
for (int sp_group = 0; sp_group < NUM_SPRITEGROUPS; sp_group++) {
line.sp[sp_group].mix_value &= 0x3fff;
line.sp[sp_group].mix_value |= BIT(line_6000, sp_group * 2, 2) << 14;
line.sp[sp_group].set_blend(BIT(line_6000, sp_group * 2, 2));
}
}
if (const offs_t where = latched_addr(2, 1)) { // blend values
const u16 blend_vals = m_line_ram[where];
for (int idx = 0; idx < 4; idx++) {
const u8 alpha = BIT(blend_vals, 4 * idx, 4);
line.blend[idx] = std::min(255, (0xf - alpha) * 32);
line.blend[idx] = std::min(8, (0xf - alpha));
}
}
if (const offs_t where = latched_addr(2, 2)) { // mosaic, palette depth effects
@ -764,8 +801,8 @@ void taito_f3_state::read_line_ram(f3_line_inf &line, int y)
}
for (int group = 0; group < NUM_SPRITEGROUPS; group++) {
line.sp[group].mix_value = (line.sp[group].mix_value & 0xc00f)
| BIT(sprite_mix, 0, 10) << 4;
line.sp[group].set_mix((line.sp[group].mix_value & 0xc00f)
| BIT(sprite_mix, 0, 10) << 4);
line.sp[group].blend_select_v = BIT(sprite_mix, 12 + group, 1);
}
}
@ -856,14 +893,14 @@ template<typename Mix>
std::vector<taito_f3_state::clip_plane_inf>
taito_f3_state::calc_clip(
const clip_plane_inf (&clip)[NUM_CLIPPLANES],
const Mix line)
const Mix &layer)
{
constexpr s16 INF_L = H_START;
constexpr s16 INF_R = H_START + H_VIS;
std::bitset<4> normal_planes = line->clip_enable() & ~line->clip_inv();
std::bitset<4> invert_planes = line->clip_enable() & line->clip_inv();
if (!line->clip_inv_mode())
std::bitset<4> normal_planes = layer.clip_enable() & ~layer.clip_inv();
std::bitset<4> invert_planes = layer.clip_enable() & layer.clip_inv();
if (!layer.clip_inv_mode())
std::swap(normal_planes, invert_planes);
// start with a visible region spanning the entire space
@ -922,7 +959,7 @@ static int mosaic(int x, u8 sample)
inline bool taito_f3_state::mixable::layer_enable() const
{
return (mix_value & 0x2000) && blend_mask() != 0b11;
return (mix_value & 0x2000) && blend_mode != 0b11;
}
inline int taito_f3_state::mixable::x_index(int x) const
{
@ -934,7 +971,7 @@ inline int taito_f3_state::mixable::y_index(int y) const
}
inline bool taito_f3_state::sprite_inf::layer_enable() const
{
return (mix_value & 0x2000) && blend_mask() != 0b00;
return (mix_value & 0x2000) && blend_mode != 0b00;
}
inline u16 taito_f3_state::playfield_inf::palette_adjust(u16 pal) const
{
@ -958,68 +995,75 @@ inline int taito_f3_state::pivot_inf::y_index(int y) const
}
template<typename Mix>
bool taito_f3_state::mix_line(Mix &gfx, mix_pix *z, pri_mode *pri, const f3_line_inf &line, const clip_plane_inf &range)
bool taito_f3_state::mix_line(const Mix &gfx, mix_pix &z, pri_mode &pri, const f3_line_inf &line, const clip_plane_inf &range)
{
const int y = gfx.y_index(line.y);
const u16 *src = &gfx.bitmap.src->pix(y);
const u8 *flags = gfx.bitmap.flags ? &gfx.bitmap.flags->pix(y) : nullptr;
for (int x = range.l; x < range.r; x++) {
if (gfx.blend_mask() == pri[x].src_blendmode)
if (gfx.blend_mode == pri.src_blendmode[x])
continue; // note that layers cannot blend against the same blend mode
const int real_x = gfx.x_sample_enable ? mosaic(x, line.x_sample) : x;
const int gfx_x = gfx.x_index(real_x);
// this check is for ensuring sprite group draw ordering
// (benchmarked: do not combine with color 0 check)
const u16 color = src[gfx_x];
if (gfx.inactive_group(color))
continue;
// tilemap transparent flag
if (flags && !(flags[gfx_x] & 0xf0))
continue;
if (gfx.prio > pri[x].src_prio) {
if (gfx.prio > pri.src_prio[x]) {
// submit src pix
if (const u16 pal = gfx.palette_adjust(src[gfx_x])) {
if (color) {
const u16 pal = gfx.palette_adjust(color);
// could be pulled out of loop for pivot and sprite
u8 sel = gfx.blend_select(flags, gfx_x);
switch (gfx.blend_mask()) {
switch (gfx.blend_mode) {
case 0b01: // normal blend
sel = 2 + sel;
[[fallthrough]];
case 0b10: // reverse blend
if (line.blend[sel] == 0)
continue; // could be early return for pivot and sprite
z[x].src_blend = line.blend[sel];
z.src_blend[x] = line.blend[sel];
break;
case 0b00: case 0b11: default: // opaque layer
if (line.blend[sel] + line.blend[2 + sel] == 0)
continue; // could be early return for pivot and sprite
z[x].src_blend = line.blend[2 + sel];
z[x].dst_blend = line.blend[sel];
pri[x].dst_prio = gfx.prio;
z[x].dst_pal = pal;
z.src_blend[x] = line.blend[2 + sel];
z.dst_blend[x] = line.blend[sel];
pri.dst_prio[x] = gfx.prio;
z.dst_pal[x] = pal;
break;
}
// lock in source color for blending and update the prio test buffer
z[x].src_pal = pal;
pri[x].src_blendmode = gfx.blend_mask();
pri[x].src_prio = gfx.prio;
z.src_pal[x] = pal;
pri.src_blendmode[x] = gfx.blend_mode;
pri.src_prio[x] = gfx.prio;
}
} else if (gfx.prio >= pri[x].dst_prio) {
} else if (gfx.prio >= pri.dst_prio[x]) {
// submit dest pix
if (const u16 pal = gfx.palette_adjust(src[gfx_x])) {
if (gfx.prio != pri[x].dst_prio)
z[x].dst_pal = pal;
if (color) {
const u16 pal = gfx.palette_adjust(color);
if (gfx.prio != pri.dst_prio[x])
z.dst_pal[x] = pal;
else // prio conflict = color line conflict? (dariusg, bubblem)
z[x].dst_pal = 0;
pri[x].dst_prio = gfx.prio;
z.dst_pal[x] = 0;
pri.dst_prio[x] = gfx.prio;
const bool sel = gfx.blend_select(flags, gfx_x);
switch (pri[x].src_blendmode) {
switch (pri.src_blendmode[x]) {
case 0b01:
z[x].dst_blend = line.blend[sel];
z.dst_blend[x] = line.blend[sel];
break;
case 0b10: case 0b00: case 0b11: default:
z[x].dst_blend = line.blend[2 + sel];
z.dst_blend[x] = line.blend[2 + sel];
break;
}
}
@ -1030,27 +1074,67 @@ bool taito_f3_state::mix_line(Mix &gfx, mix_pix *z, pri_mode *pri, const f3_line
constexpr int DEBUG_Y = 180 + V_START;
if (TAITOF3_VIDEO_DEBUG && line.y == DEBUG_Y) {
logerror("[%X] %s%d: %d,%d (%d)\n {pal: %x/%x, blend: %x/%x, prio: %x/%x}\n",
gfx.prio, gfx.debug_name(), gfx.debug_index,
gfx.prio, gfx.debug_name(), gfx.index,
gfx.blend_b(), gfx.blend_a(), gfx.blend_select(flags, 82),
z[DEBUG_X].src_pal, z[DEBUG_X].dst_pal,
z[DEBUG_X].src_blend, z[DEBUG_X].dst_blend,
pri[DEBUG_X].src_prio, pri[DEBUG_X].dst_prio);
z.src_pal[DEBUG_X], z.dst_pal[DEBUG_X],
z.src_blend[DEBUG_X], z.dst_blend[DEBUG_X],
pri.src_prio[DEBUG_X], pri.dst_prio[DEBUG_X]);
}
return false; // TODO: determine when we can stop drawing?
}
void taito_f3_state::render_line(pen_t *dst, const mix_pix (&z)[H_TOTAL])
void taito_f3_state::render_line(pen_t *RESTRICT dst, const mix_pix &z)
{
const pen_t *clut = &m_palette->pen(0);
for (int x = H_START; x < H_START + H_VIS; x++) {
const mix_pix mix = z[x];
rgb_t s_rgb = clut[mix.src_pal];
rgb_t d_rgb = clut[mix.dst_pal];
dst[x] = (s_rgb.scale8(mix.src_blend) + d_rgb.scale8(mix.dst_blend)).set_a(255);
const pen_t *clut = m_palette->pens();
for (unsigned int x = H_START; x < H_START + H_VIS; x++) {
rgb_t s_rgb = clut[z.src_pal[x]];
rgb_t d_rgb = clut[z.dst_pal[x]];
// source_color * src_blend + dest_color * dst_blend
u16 r1 = s_rgb.r();
u16 g1 = s_rgb.g();
u16 b1 = s_rgb.b();
u16 r2 = d_rgb.r();
u16 g2 = d_rgb.g();
u16 b2 = d_rgb.b();
r1 *= z.src_blend[x]; // these blend contributions have fixed3 precision
g1 *= z.src_blend[x]; // i.e. 0 (b0'000) to 8 (b1'000) represents 0.0 to 1.0
b1 *= z.src_blend[x];
r2 *= z.dst_blend[x];
g2 *= z.dst_blend[x];
b2 *= z.dst_blend[x];
r1 += r2;
g1 += g2;
b1 += b2;
r1 >>= 3;
g1 >>= 3;
b1 >>= 3;
r1 = std::min<u16>(r1, 255);
g1 = std::min<u16>(g1, 255);
b1 = std::min<u16>(b1, 255);
dst[x] = rgb_t(r1, g1, b1);
}
}
inline bool taito_f3_state::used(const pivot_inf &layer, int y) const
{
const int y_adj = m_flipscreen ? 0x1ff - layer.y_index(y) : layer.y_index(y);
return layer.use_pix() || (m_textram_row_usage[y_adj >> 3] > 0);
}
inline bool taito_f3_state::used(const sprite_inf &layer, int y) const
{
return m_sprite_pri_row_usage[y] & (1 << layer.index);
}
inline bool taito_f3_state::used(const playfield_inf &layer, int y) const
{
const int y_adj = m_flipscreen ? 0x1ff - layer.y_index(y) : layer.y_index(y);
return m_tilemap_row_usage[y_adj >> 4][layer.index + (2 * layer.alt_tilemap)] > 0;
}
void taito_f3_state::scanline_draw(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
auto prio = [] (const auto &obj) -> u8 { return obj->prio; };
@ -1058,16 +1142,15 @@ void taito_f3_state::scanline_draw(bitmap_rgb32 &bitmap, const rectangle &clipre
// acquire sprite rendering layers, playfield tilemaps, playfield scroll
f3_line_inf line_data{};
for (int i=0; i < NUM_SPRITEGROUPS; i++) {
line_data.sp[i].bitmap = draw_source(&m_sprite_framebuffers[i]);
line_data.sp[i].sprite_pri_usage = &m_sprite_pri_row_usage;
line_data.sp[i].debug_index = i;
line_data.sp[i].bitmap = draw_source(&m_sprite_framebuffer);
line_data.sp[i].index = i;
}
for (int pf = 0; pf < NUM_PLAYFIELDS; ++pf) {
get_pf_scroll(pf, line_data.pf[pf].reg_sx, line_data.pf[pf].reg_sy);
line_data.pf[pf].reg_fx_y = line_data.pf[pf].reg_sy;
line_data.pf[pf].width_mask = m_width_mask;
line_data.pf[pf].debug_index = pf;
line_data.pf[pf].index = pf;
}
if (m_flipscreen) {
line_data.pivot.reg_sx = m_control_1[4] - 12;
@ -1077,7 +1160,7 @@ void taito_f3_state::scanline_draw(bitmap_rgb32 &bitmap, const rectangle &clipre
line_data.pivot.reg_sy = -m_control_1[5];
}
for (int screen_y = 0; screen_y != 256; screen_y += 1) {
for (unsigned int screen_y = 0; screen_y != 256; screen_y += 1) {
const int y = m_flipscreen ? (255 - screen_y) : screen_y;
read_line_ram(line_data, y);
line_data.y = screen_y;
@ -1099,10 +1182,15 @@ void taito_f3_state::scanline_draw(bitmap_rgb32 &bitmap, const rectangle &clipre
line_data.pivot.bitmap = draw_source(m_vram_layer);
}
mix_pix line_buf[H_TOTAL]{};
pri_mode line_pri[H_TOTAL]{};
// set up line blend pixel and priority buffers
mix_pix line_buf{};
pri_mode line_pri{};
// background palette -- what contributions should this default to?
std::fill_n(line_buf, H_TOTAL, mix_pix{0, line_data.bg_palette, 0x0, 0xff});
std::fill_n(line_buf.dst_pal, H_TOTAL, line_data.bg_palette);
std::fill_n(line_buf.dst_blend, H_TOTAL, 8); // 100%
// set an invalid blend mode as it affects mixing
std::fill_n(line_pri.src_blendmode, H_TOTAL, 0xff);
std::fill_n(line_pri.dst_blendmode, H_TOTAL, 0xff);
// sort layers
std::array<std::variant<pivot_inf*, sprite_inf*, playfield_inf*>,
@ -1123,10 +1211,11 @@ void taito_f3_state::scanline_draw(bitmap_rgb32 &bitmap, const rectangle &clipre
for (auto gfx : layers) {
std::visit(
[this, &line_data, &line_buf, &line_pri] (auto &&arg) {
if (arg->layer_enable() && arg->used(line_data.y)) {
const auto clip_ranges = calc_clip(line_data.clip, arg);
const auto &layer = *arg;
if (layer.layer_enable() && used(layer, line_data.y)) {
const auto clip_ranges = calc_clip(line_data.clip, layer);
for (const auto &clip : clip_ranges) {
mix_line(*arg, &line_buf[0], &line_pri[0], line_data, clip);
mix_line(layer, line_buf, line_pri, line_data, clip);
}
}
},
@ -1135,9 +1224,9 @@ void taito_f3_state::scanline_draw(bitmap_rgb32 &bitmap, const rectangle &clipre
if (TAITOF3_VIDEO_DEBUG == 1) {
if (y == 100) {
logerror("{pal: %x/%x, blend: %x/%x, prio: %x/%x}\n",
line_buf[180].src_pal, line_buf[180].dst_pal,
line_buf[180].src_blend, line_buf[180].dst_blend,
line_pri[180].src_prio, line_pri[180].dst_prio);
line_buf.src_pal[180], line_buf.dst_pal[180],
line_buf.src_blend[180], line_buf.dst_blend[180],
line_pri.src_prio[180], line_pri.dst_prio[180]);
logerror("-' [%hhu,%hhu,%hhu,%hhu] '------------------------- 100\n", line_data.blend[0],
line_data.blend[1], line_data.blend[2], line_data.blend[3]);
}
@ -1159,7 +1248,7 @@ void taito_f3_state::scanline_draw(bitmap_rgb32 &bitmap, const rectangle &clipre
inline void taito_f3_state::f3_drawgfx(const tempsprite &sprite, const rectangle &cliprect)
{
bitmap_ind16 &dest_bmp = m_sprite_framebuffers[sprite.pri];
bitmap_ind16 &dest_bmp = m_sprite_framebuffer;
gfx_element *gfx = m_gfxdecode->gfx(2);
const u8 *code_base = gfx->get_data(sprite.code % gfx->elements());
@ -1178,7 +1267,6 @@ inline void taito_f3_state::f3_drawgfx(const tempsprite &sprite, const rectangle
dy8 += sprite.scale_y;
if (dy < cliprect.min_y || dy > cliprect.max_y)
continue;
u8 *pri = &m_pri_alp_bitmap.pix(dy);
u16 *dest = &dest_bmp.pix(dy);
auto &usage = m_sprite_pri_row_usage[dy];
const u8 *src = &code_base[(y ^ flipy) * 16];
@ -1193,9 +1281,8 @@ inline void taito_f3_state::f3_drawgfx(const tempsprite &sprite, const rectangle
if (dx == dx8 >> 8) // if the next pixel would be in the same column, skip this one
continue;
const u8 c = src[(x ^ flipx)] & m_sprite_pen_mask;
if (c && !pri[dx]) {
if (c && !dest[dx]) {
dest[dx] = gfx->colorbase() + (sprite.color<<4 | c);
pri[dx] = 1;
usage |= 1<<sprite.pri;
}
}
@ -1348,11 +1435,8 @@ void taito_f3_state::get_sprite_info()
void taito_f3_state::draw_sprites(const rectangle &cliprect)
{
if (!m_sprite_trails) {
m_pri_alp_bitmap.fill(0);
std::fill_n(m_sprite_pri_row_usage, 256, 0);
for (auto &sp_bitmap : m_sprite_framebuffers) {
sp_bitmap.fill(0);
}
m_sprite_framebuffer.fill(0);
}
for (const auto *spr = m_sprite_end; spr-- != &m_spritelist[0]; ) {

View file

@ -12,35 +12,44 @@
#include "screen.h"
#include "speaker.h"
#include "utf8.h"
namespace {
class qs300_state : public driver_device {
public:
qs300_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "subcpu"),
m_swp00(*this, "swp00"),
m_lcdc(*this, "vs254300"),
m_nvram(*this, "ram"),
m_inputs(*this, "DR%u", 0U),
m_is_eos(false)
{ }
qs300_state(const machine_config &mconfig, device_type type, const char *tag) :
qs300_state(mconfig, type, tag, false)
{
}
void qs300(machine_config &config);
protected:
qs300_state(const machine_config &mconfig, device_type type, const char *tag, bool is_eos) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "subcpu"),
m_swp00(*this, "swp00"),
m_lcdc(*this, "vs254300"),
m_nvram(*this, "ram"),
m_inputs(*this, "DR%u", 0U),
m_is_eos(is_eos)
{
}
required_device<h83002_device> m_maincpu;
required_device<h83002_device> m_subcpu;
required_device<swp00_device> m_swp00;
required_device<t6963c_device> m_lcdc;
required_device<nvram_device> m_nvram;
required_ioport_array<7> m_inputs;
// required_ioport m_sustain;
// required_ioport m_pitch_bend;
//required_ioport m_sustain;
//required_ioport m_pitch_bend;
bool const m_is_eos;
bool m_is_eos;
u8 m_mlatch, m_slatch;
bool m_mlatch_full, m_slatch_full;
@ -73,10 +82,9 @@ protected:
class eos_b900_state : public qs300_state
{
public:
eos_b900_state(const machine_config &mconfig, device_type type, const char *tag)
: qs300_state(mconfig, type, tag)
eos_b900_state(const machine_config &mconfig, device_type type, const char *tag) :
qs300_state(mconfig, type, tag, true)
{
m_is_eos = true;
}
};
@ -370,5 +378,7 @@ ROM_START( eosb900 )
// This t6963c_0101 internal CG ROM is similar to lm24014w_0101.bin which may be used as a replacement
ROM_END
} // anonymous namespace
SYST( 1999, qs300, 0, 0, qs300, qs300, qs300_state, empty_init, "Yamaha", "QS300", MACHINE_NOT_WORKING )
SYST( 1999, eosb900, qs300, 0, qs300, qs300, eos_b900_state, empty_init, "Yamaha", "EOS B900", MACHINE_NOT_WORKING )