1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
// license:BSD-3-Clause
// copyright-holders:Angelo Salese
/*************************************************************************************************
(Hologram) Time Traveler (c) 1991 Virtual Image Productions / Sega
preliminary driver by Angelo Salese
TODO:
- unemulated Pioneer LDV-4200 and Sony LDP-1450 players, needs a dump of the BIOSes and proper
hook-up;
- ICM7243B 14-segment alphanumeric LED display driver
==================================================================================================
Time Traveler ROM image
warren@dragons-lair-project.com
6/25/01
ROM is a 27C020 (256kbit x 8 = 256 KB)
ROM sticker says 6/18/91
CPU is an Intel 80188
*************************************************************************************************/
#include "emu.h"
#include "cpu/i86/i186.h"
#include "machine/eeprompar.h"
#include "machine/i8255.h"
#include "machine/ins8250.h"
#include "emupal.h"
#include "screen.h"
class timetrv_state : public driver_device
{
public:
timetrv_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_led_vram_lo(*this, "led_vralo"),
m_led_vram_hi(*this, "led_vrahi"),
m_maincpu(*this, "maincpu") { }
void timetrv(machine_config &config);
private:
required_shared_ptr<uint8_t> m_led_vram_lo;
required_shared_ptr<uint8_t> m_led_vram_hi;
uint8_t test1_r();
uint8_t test2_r();
uint8_t in_r();
virtual void video_start() override;
uint32_t screen_update_timetrv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
void timetrv_io(address_map &map);
void timetrv_map(address_map &map);
};
void timetrv_state::video_start()
{
}
uint32_t timetrv_state::screen_update_timetrv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
popmessage("%s%s",reinterpret_cast<char *>(m_led_vram_lo.target()),reinterpret_cast<char *>(m_led_vram_hi.target()));
return 0;
}
uint8_t timetrv_state::test1_r()
{
return ioport("IN0")->read();//machine().rand();
}
uint8_t timetrv_state::test2_r()
{
/*bit 7,eeprom read bit*/
return (ioport("IN1")->read() & 0x7f);//machine().rand();
}
uint8_t timetrv_state::in_r()
{
return 0xff;
}
void timetrv_state::timetrv_map(address_map &map)
{
map(0x00000, 0x0ffff).ram(); //irq vectors + work ram
map(0x10000, 0x107ff).rw("eeprom", FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write));
map(0xc0000, 0xfffff).rom();
}
void timetrv_state::timetrv_io(address_map &map)
{
map(0x0122, 0x0123).nopw(); //eeprom write bits
map(0x1000, 0x1003).rw("ppi1", FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0x1080, 0x1083).rw("ppi2", FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0x1100, 0x1107).rw("uart", FUNC(ins8250_device::ins8250_r), FUNC(ins8250_device::ins8250_w));
map(0x1180, 0x1187).ram().share("led_vralo");//led string,part 1
map(0x1200, 0x1207).ram().share("led_vrahi");//led string,part 2
map(0xff80, 0xffff).ram(); //am80188-em-like cpu internal regs?
}
static INPUT_PORTS_START( timetrv )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_START("IN1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Service_Mode ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
// 0x80 eeprom read bit
INPUT_PORTS_END
void timetrv_state::timetrv(machine_config &config)
{
/* basic machine hardware */
I80188(config, m_maincpu, 20000000); //???
m_maincpu->set_addrmap(AS_PROGRAM, &timetrv_state::timetrv_map);
m_maincpu->set_addrmap(AS_IO, &timetrv_state::timetrv_io);
// interrupts are generated by internally-driven timers
EEPROM_2816(config, "eeprom");
i8255_device &ppi1(I8255(config, "ppi1"));
ppi1.in_pa_callback().set(FUNC(timetrv_state::test1_r)); //inputs
ppi1.in_pb_callback().set(FUNC(timetrv_state::test2_r)); //eeprom read bit + inputs
i8255_device &ppi2(I8255(config, "ppi2"));
ppi2.in_pa_callback().set(FUNC(timetrv_state::in_r)); //dsw
ppi2.in_pb_callback().set(FUNC(timetrv_state::in_r)); //dsw
ppi2.in_pc_callback().set(FUNC(timetrv_state::in_r)); //dsw
NS16450(config, "uart", 1843200); // P82050 (serial interface for laserdisc)
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(512, 512);
screen.set_visarea(0*8, 512-1, 0*8, 512-1);
screen.set_screen_update(FUNC(timetrv_state::screen_update_timetrv));
PALETTE(config, "palette").set_entries(512);
/* sound hardware */
}
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( timetrv )
ROM_REGION( 0x100000, "maincpu", 0 )
ROM_LOAD( "tt061891.bin", 0xc0000, 0x40000, CRC(a3d44219) SHA1(7c5003b6d3df1e472db45abd725e7d3d43f0dfb4) )
DISK_REGION( "laserdisc" )
DISK_IMAGE_READONLY( "timetrv", 0, NO_DUMP )
ROM_END
ROM_START( timetrv2 )
ROM_REGION( 0x100000, "maincpu", 0 )
ROM_LOAD( "epr-72491.u9", 0xc0000, 0x40000, CRC(c7998e2f) SHA1(26060653b2368f52c304e6433b4f447f99a36839) )
DISK_REGION( "laserdisc" )
DISK_IMAGE_READONLY( "timetrv", 0, NO_DUMP )
ROM_END
GAME( 1991, timetrv, 0, timetrv, timetrv, timetrv_state, empty_init, ROT0, "Virtual Image Productions (Sega license)", "Time Traveler (set 1)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
GAME( 1991, timetrv2, timetrv, timetrv, timetrv, timetrv_state, empty_init, ROT0, "Virtual Image Productions (Sega license)", "Time Traveler (set 2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // Europe?
|