mame/src/devices/bus/cbus/pc9801_26.h
Angelo Salese 0e4ba6d49a
Major state refactoring of pc98 based HW (#8475)
First major step in splitting up machine classes in NEC PC98 family tree:
* Splits up derivative HWs into own state machine and files (pc98ha.cpp, pc9821.cpp and pc9801_epson.cpp);
* Adds a preliminary uPD4991a parallel RTC, used by pc98ha;
* Fix -26, -86, -118 C-bus sound board dips or jumper settings;
* Fix default sound card for pc9821 (-86) and pc9821ce2 / pc9821cx3 (-118);
* Adds preliminary MAD Factory Otomichan-kai C-bus sound board;
* Adds boilerplate code for C-bus installing board I/Os, avoiding the possible inconvenience of board(s) getting silently unmapped by other installed boards;
* Major refactoring of HW dip switches readouts, using required_ioports instead of scattering things around in PPI hooks;
* Extensive QA rundown, including research on missing features and undumped machines.
 
pc9801.cpp: Don't passthrough mouse irq frequency when cycle setting is setup too, fixes jastrike mouse input on options menu.
pc9801.cpp: Fix kanji RAM window LR readback, makes telenetm to properly display 8x16 chars on RS and derivative machines.
pc8801.cpp: fixed OPNA RAM readback, allowing SWs to playback ADPCMs properly.

New machines marked as NOT_WORKING
----------------------------------
PC-98LT [anonymous]
PC-98HA "Handy98" [anonymous]
PC-9821Nr15 (98NOTE Lavie) [flyingharuka]
PC-9821Nr166 (98NOTE Lavie) [flyingharuka]
PC-9821Nw150 (98NOTE Lavie) [flyingharuka]
PC-9821Ra266 (98MATE R) [flyingharuka]
PC-9821Cx3 (98MULTi CanBe) [flyingharuka]
PC-9801VX [qazmko1029]
PC-9801US [CoolMod]
2021-08-24 10:22:03 +02:00

65 lines
1.8 KiB
C++

// license:BSD-3-Clause
// copyright-holders:Angelo Salese
/***************************************************************************
NEC PC-9801-26 sound card
***************************************************************************/
#ifndef MAME_BUS_CBUS_PC9801_26_H
#define MAME_BUS_CBUS_PC9801_26_H
#pragma once
#include "bus/cbus/pc9801_cbus.h"
#include "sound/ymopn.h"
#include "pc9801_snd.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> pc9801_26_device
class pc9801_26_device : public pc9801_snd_device
{
public:
// construction/destruction
pc9801_26_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
uint8_t opn_r(offs_t offset);
void opn_w(offs_t offset, uint8_t data);
protected:
// device-level overrides
virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_start() override;
virtual void device_reset() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual u16 read_io_base() override;
private:
required_device<pc9801_slot_device> m_bus;
required_device<ym2203_device> m_opn;
DECLARE_WRITE_LINE_MEMBER(sound_irq);
u32 m_rom_base;
};
// device type definition
DECLARE_DEVICE_TYPE(PC9801_26, pc9801_26_device)
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
#endif // MAME_BUS_CBUS_PC9801_26_H