New systems marked not working

------------------------------
Zhongguo Majiang [little0]

- misc/norautp.cpp: updated decryption tables for norautua / norautub. Also srccleaned
This commit is contained in:
Ivan Vangelista 2025-03-31 20:27:59 +02:00
parent a4bfb636b4
commit b6e44ca5e6
3 changed files with 253 additions and 68 deletions

View File

@ -42860,6 +42860,9 @@ poemzet2
@source:skeleton/i7000.cpp
i7000
@source:skeleton/iam2.cpp
zhonggmj
@source:skeleton/icatel.cpp
icatel

View File

@ -4946,7 +4946,7 @@ void norautp_state::init_enc()
static const uint8_t data_sub_table_01[0x100] =
{// 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f
unkn, unkn, 0x52, unkn, unkn, 0x85, 0x34, 0x60, unkn, unkn, 0x56, unkn, unkn, 0x0b, unkn, 0x7f, // 0x0x
unkn, unkn, 0x9e, 0x1d, 0x63, 0x2a, 0xb0, unkn, unkn, unkn, unkn, 0x4e, unkn, 0x35, 0xea, unkn, // 0x1x
unkn, 0x27, 0x9e, 0x1d, 0x63, 0x2a, 0xb0, unkn, unkn, unkn, unkn, 0x4e, unkn, 0x35, 0xea, unkn, // 0x1x
0x0d, 0xe2, 0x40, 0x45, unkn, unkn, unkn, unkn, 0x08, 0xef, 0x21, unkn, 0x7e, 0x10, unkn, 0x2d, // 0x2x
0x19, 0x0a, unkn, 0x0f, unkn, unkn, 0x50, 0xf4, unkn, unkn, 0x06, unkn, unkn, 0x4d, unkn, unkn, // 0x3x
0x30, 0xb4, unkn, 0xf8, unkn, 0xad, 0x1c, 0x3b, unkn, 0x2b, 0x93, 0xe4, unkn, unkn, unkn, unkn, // 0x4x
@ -4974,7 +4974,7 @@ void norautp_state::init_enc()
0xa5, unkn, 0x4c, unkn, 0x23, 0x54, unkn, unkn, unkn, 0x0a, unkn, unkn, unkn, unkn, unkn, unkn, // 0x6x
0x2b, 0xdd, 0x6b, unkn, 0x5c, unkn, 0x00, unkn, unkn, unkn, unkn, 0x36, unkn, 0x57, 0xce, unkn, // 0x7x
0x1d, unkn, unkn, unkn, 0xbf, 0x32, 0xf0, 0x4f, 0x16, 0x35, 0x63, 0x21, 0x0c, 0x1b, unkn, unkn, // 0x8x
0x56, unkn, 0xef, unkn, 0x06, unkn, 0x59, 0x04, 0x41, unkn, unkn, unkn, 0x4b, unkn, unkn, unkn, // 0x9x
0x56, unkn, 0xef, unkn, 0x06, unkn, 0x59, 0x04, 0x41, 0xe8, unkn, unkn, 0x4b, unkn, unkn, unkn, // 0x9x
0x28, 0x7b, 0x3d, unkn, unkn, 0x12, 0xb6, unkn, 0x44, 0xb4, unkn, unkn, unkn, 0x09, unkn, unkn, // 0xax
0xd2, unkn, 0xff, 0x3c, 0x6a, 0x20, 0xab, unkn, unkn, 0x40, 0xee, 0xa0, unkn, 0xbb, 0x68, 0x1e, // 0xbx
0xc5, 0x49, 0x6d, unkn, 0x5f, 0x17, 0xfc, unkn, unkn, 0xb0, unkn, unkn, 0x2f, unkn, 0xbe, unkn, // 0xcx
@ -4992,7 +4992,7 @@ void norautp_state::init_enc()
0x40, unkn, 0x04, 0x3c, 0x12, 0xe3, 0x4c, unkn, unkn, 0xf8, unkn, 0xc5, 0x4e, unkn, unkn, 0x15, // 0x4x
0xf1, 0x20, unkn, 0x93, unkn, 0x94, unkn, 0x16, 0xa5, unkn, unkn, 0xdc, 0x5a, unkn, 0x19, unkn, // 0x5x
0xff, unkn, 0x3b, unkn, 0x55, 0x4b, unkn, unkn, 0x54, 0x47, unkn, 0x50, unkn, unkn, 0x46, unkn, // 0x6x
unkn, unkn, unkn, 0x13, unkn, 0x6e, unkn, unkn, unkn, 0xb0, unkn, 0xb3, 0x90, 0x7a, unkn, unkn, // 0x7x
unkn, unkn, unkn, 0x13, unkn, 0x6e, unkn, unkn, unkn, 0xb0, unkn, 0xb3, 0x90, 0x6c, unkn, unkn, // 0x7x
0xd7, 0xf0, unkn, 0x42, unkn, unkn, 0xc3, unkn, unkn, 0xd5, unkn, 0x22, 0x4a, unkn, 0x4f, unkn, // 0x8x
unkn, 0x6a, 0xdb, 0xf7, unkn, 0x37, unkn, unkn, 0xfc, 0x02, unkn, unkn, 0xbd, unkn, unkn, unkn, // 0x9x
0x11, 0x53, unkn, unkn, unkn, 0x1c, unkn, 0x52, 0x63, 0xbc, 0x41, 0xf9, unkn, unkn, 0xc4, unkn, // 0xax
@ -5267,20 +5267,6 @@ void norautp_state::init_enc()
case 0x0f: rom[i] = data_sub_table_0f[x]; break;
}
}
uint8_t *ROM = memregion("maincpu")->base();
// fix table for bin to bcd conversion
ROM[0x1da0] = 0x10; // 10.000
ROM[0x1da1] = 0x27;
ROM[0x1da2] = 0xe8; // 1.000
ROM[0x1da3] = 0x03;
ROM[0x1da4] = 0x64; // 100
ROM[0x1da5] = 0x00;
ROM[0x1da6] = 0x0a; // 10
ROM[0x1da7] = 0x00;
// fix jump
ROM[0x0b53] = 0x6c;
}

196
src/mame/skeleton/iam2.cpp Normal file
View File

@ -0,0 +1,196 @@
// license:BSD-3-Clause
// copyright-holders:
/*
Mahjongs running on IAM2 custom CPU
IAMPCB0007-02
1184003B
The main components are:
IAM2 F99130265 custom CPU (?)
2 IS61C1024-20K RAMs (near IAM2)
N3412256P-15 SRAM (near IAM2)
UT6264PC-70LL RAM (near GFX (?) ROM)
U6295 (Oki M6295 clone)
4 banks of 8 DIP switches
TODO:
- identify CPU arch
*/
#include "emu.h"
#include "cpu/arm7/arm7.h"
#include "sound/okim6295.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
namespace {
class iam2_state : public driver_device
{
public:
iam2_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu")
{ }
void iam2(machine_config &config) ATTR_COLD;
protected:
virtual void video_start() override ATTR_COLD;
private:
required_device<cpu_device> m_maincpu;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void program_map(address_map &map) ATTR_COLD;
};
uint32_t iam2_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
return 0;
}
void iam2_state::video_start()
{
}
void iam2_state::program_map(address_map &map)
{
map(0x00000000, 0x0003ffff).rom();
}
static INPUT_PORTS_START( zhonggmj )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW1")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW1:3")
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW1:4")
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW1:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW1:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW1:7")
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW1:8")
PORT_START("DSW2")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW2:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW2:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW2:3")
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW2:4")
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW2:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW2:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW2:7")
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW2:8")
PORT_START("DSW3")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW3:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW3:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW3:3")
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW3:4")
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW3:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW3:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW3:7")
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW3:8")
PORT_START("DSW4")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW4:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW4:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW4:3")
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW4:4")
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW4:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW4:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW4:7")
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW4:8")
INPUT_PORTS_END
static GFXDECODE_START( gfx_iam2 )
// TODO
GFXDECODE_END
void iam2_state::iam2(machine_config &config)
{
ARM7(config, m_maincpu, 24'000'000); // TODO: unidentified CPU arch and clock not verified
m_maincpu->set_addrmap(AS_PROGRAM, &iam2_state::program_map);
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); // TODO
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(64*8, 64*8);
screen.set_visarea(0, 64*8-1, 0, 32*8-1);
screen.set_screen_update(FUNC(iam2_state::screen_update));
GFXDECODE(config, "gfxdecode", "palette", gfx_iam2);
PALETTE(config, "palette").set_entries(0x100); // TODO
// sound hardware
SPEAKER(config, "mono").front_center();
OKIM6295(config, "oki", 24'000'000 / 24, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // pin 7 and clock not verified
}
ROM_START( zhonggmj )
ROM_REGION( 0x40000, "maincpu", 0 )
ROM_LOAD( "zhonggmjmajiang_p28f020.u21", 0x00000, 0x40000, CRC(b6dda141) SHA1(bdaa88d5802226a252bbb222ae37cbc1a9bf0461) )
ROM_REGION( 0x400000, "gfx", 0 )
ROM_LOAD( "zhonggmjmajiang_p28f020.u6", 0x000000, 0x400000, CRC(156eca53) SHA1(7b044048b23b3472a27e32aa05a604a3a4bacd7b) ) // FIXED BITS (xxxxxxxx0xxxxxxx)
ROM_REGION( 0x80000, "oki", 0 )
ROM_LOAD( "zhonggmjmajiang_data.u15", 0x00000, 0x80000, CRC(99cb835d) SHA1(3f74e9dcfb9dfcc798fb9abb93afd865a1c6e200) )
ROM_END
} // anonymous namespace
GAME( 200?, zhonggmj, 0, iam2, zhonggmj, iam2_state, empty_init, ROT0, "I.A.M.", "Zhongguo Majiang", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )