mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
msx1_cart.xml: Added fs_sr002 mapper based on internal bunsetsu mapper (nw)
This commit is contained in:
parent
6bcb2f4406
commit
a2c4291690
@ -13823,30 +13823,28 @@ legacy FM implementations cannot find it.
|
||||
</software>
|
||||
-->
|
||||
|
||||
<!-- Dictionary ROMs? -->
|
||||
<software name="natjis" supported="no">
|
||||
<description>National FS-SR022 MSX-Jisho (Jpn)</description>
|
||||
<!-- Dictionary ROMs -->
|
||||
<software name="natjis" supported="partial">
|
||||
<description>National FS-SR022 Bunsetsu Henkan Jisho (Jpn)</description>
|
||||
<year>1985</year>
|
||||
<publisher>Matsushita</publisher>
|
||||
<info name="alt_title" value="文節変換熟語ユニット" />
|
||||
<part name="cart" interface="msx_cart">
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="jisyo data (japan) (program).rom" size="131072" crc="46e90b77" sha1="765413bb6b03bc3bb888ee8fe00b99ef69c1317a" offset="0" />
|
||||
<feature name="slot" value="fs_sr022" />
|
||||
<feature name="pcb" value="DFUP0058ZAJ" />
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="PRO ROM V1.0 DASR022A1.ic16" size="32768" crc="381b3431" sha1="8c7ae1a1720b1dae9af9904e638b868f56d905c2" offset="0" />
|
||||
<!-- The dictionary is in 4 32KB EEPROMs instead of one 128KB rom:
|
||||
- DIC1 ROM V1.0 DASR022B1.ic15
|
||||
- DIC2 ROM V1.0 DASR022C1.ic14
|
||||
- DIC3 ROM V1.0 DASR022D1.ic13
|
||||
- DIC4 ROM V1.0 DASR022E1.ic12
|
||||
-->
|
||||
<rom name="jisyo data (japan) (program).rom" size="131072" crc="46e90b77" sha1="765413bb6b03bc3bb888ee8fe00b99ef69c1317a" flags="baddump" offset="0x20000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="natbhjis" supported="no">
|
||||
<description>National FS-SR022 MSX Bunsetsu Henkan Jisho (Jpn)</description>
|
||||
<year>1985</year>
|
||||
<publisher>Matsushita</publisher>
|
||||
<part name="cart" interface="msx_cart">
|
||||
<dataarea name="rom" size="32768">
|
||||
<rom name="msx bunsetsu henkan jisyo (japan) (program).rom" size="32768" crc="381b3431" sha1="8c7ae1a1720b1dae9af9904e638b868f56d905c2" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- ARABIC SOFTWARE -->
|
||||
|
@ -886,6 +886,8 @@ if (BUSES["MSX_SLOT"]~=null) then
|
||||
MAME_DIR .. "src/emu/bus/msx_cart/dooly.h",
|
||||
MAME_DIR .. "src/emu/bus/msx_cart/fmpac.c",
|
||||
MAME_DIR .. "src/emu/bus/msx_cart/fmpac.h",
|
||||
MAME_DIR .. "src/emu/bus/msx_cart/fs_sr022.c",
|
||||
MAME_DIR .. "src/emu/bus/msx_cart/fs_sr022.h",
|
||||
MAME_DIR .. "src/emu/bus/msx_cart/halnote.c",
|
||||
MAME_DIR .. "src/emu/bus/msx_cart/halnote.h",
|
||||
MAME_DIR .. "src/emu/bus/msx_cart/hfox.c",
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "disk.h"
|
||||
#include "dooly.h"
|
||||
#include "fmpac.h"
|
||||
#include "fs_sr022.h"
|
||||
#include "halnote.h"
|
||||
#include "hfox.h"
|
||||
#include "holy_quran.h"
|
||||
@ -39,6 +40,7 @@ SLOT_INTERFACE_START(msx_cart)
|
||||
SLOT_INTERFACE_INTERNAL("rtype", MSX_CART_RTYPE)
|
||||
SLOT_INTERFACE_INTERNAL("majutsushi", MSX_CART_MAJUTSUSHI)
|
||||
SLOT_INTERFACE_INTERNAL("fmpac", MSX_CART_FMPAC)
|
||||
SLOT_INTERFACE_INTERNAL("fs_sr022", MSX_CART_FS_SR022)
|
||||
SLOT_INTERFACE_INTERNAL("superloderunner", MSX_CART_SUPERLODERUNNER)
|
||||
SLOT_INTERFACE_INTERNAL("synthesizer", MSX_CART_SYNTHESIZER)
|
||||
SLOT_INTERFACE_INTERNAL("cross_blaim", MSX_CART_CROSSBLAIM)
|
||||
|
72
src/emu/bus/msx_cart/fs_sr022.c
Normal file
72
src/emu/bus/msx_cart/fs_sr022.c
Normal file
@ -0,0 +1,72 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Wilbert Pol
|
||||
#include "emu.h"
|
||||
#include "fs_sr022.h"
|
||||
|
||||
|
||||
const device_type MSX_CART_FS_SR022 = &device_creator<msx_cart_fs_sr022>;
|
||||
|
||||
|
||||
msx_cart_fs_sr022::msx_cart_fs_sr022(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, MSX_CART_FS_SR022, "MSX Cartridge - FS-SR022", tag, owner, clock, "msx_cart_fs_sr022", __FILE__)
|
||||
, msx_cart_interface(mconfig, *this)
|
||||
, m_bunsetsu_rom(NULL)
|
||||
, m_bunsetsu_address(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void msx_cart_fs_sr022::device_start()
|
||||
{
|
||||
save_item(NAME(m_bunsetsu_address));
|
||||
}
|
||||
|
||||
|
||||
void msx_cart_fs_sr022::device_reset()
|
||||
{
|
||||
m_bunsetsu_address = 0;
|
||||
}
|
||||
|
||||
|
||||
void msx_cart_fs_sr022::initialize_cartridge()
|
||||
{
|
||||
if (get_rom_size() != 0x40000)
|
||||
{
|
||||
fatalerror("fs_sr022: Invalid ROM size\n");
|
||||
}
|
||||
m_bunsetsu_rom = get_rom_base() + 0x20000;
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(msx_cart_fs_sr022::read_cart)
|
||||
{
|
||||
if (offset >= 0x4000 && offset < 0xc000)
|
||||
{
|
||||
if (offset == 0xbfff) {
|
||||
return m_bunsetsu_rom[m_bunsetsu_address++ & 0x1ffff];
|
||||
}
|
||||
|
||||
return get_rom_base()[offset - 0x4000];
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(msx_cart_fs_sr022::write_cart)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0xbffc:
|
||||
m_bunsetsu_address = (m_bunsetsu_address & 0xffff00) | data;
|
||||
break;
|
||||
|
||||
case 0xbffd:
|
||||
m_bunsetsu_address = (m_bunsetsu_address & 0xff00ff) | (data << 8);
|
||||
break;
|
||||
|
||||
case 0xbffe:
|
||||
m_bunsetsu_address = (m_bunsetsu_address & 0x00ffff) | (data << 16);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
33
src/emu/bus/msx_cart/fs_sr022.h
Normal file
33
src/emu/bus/msx_cart/fs_sr022.h
Normal file
@ -0,0 +1,33 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Wilbert Pol
|
||||
#ifndef __MSX_CART_FS_SR022_H
|
||||
#define __MSX_CART_FS_SR022_H
|
||||
|
||||
#include "bus/msx_cart/cartridge.h"
|
||||
|
||||
|
||||
extern const device_type MSX_CART_FS_SR022;
|
||||
|
||||
|
||||
class msx_cart_fs_sr022 : public device_t
|
||||
, public msx_cart_interface
|
||||
{
|
||||
public:
|
||||
msx_cart_fs_sr022(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
virtual void initialize_cartridge();
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read_cart);
|
||||
virtual DECLARE_WRITE8_MEMBER(write_cart);
|
||||
|
||||
private:
|
||||
const UINT8 *m_bunsetsu_rom;
|
||||
UINT32 m_bunsetsu_address;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user