1 // license:BSD-3-Clause
2 // copyright-holders:Pierpaolo Prazzoli
3 /*
4 Jibun wo Migaku Culture School Mahjong Hen
5 (c)1994 Face
6
7 driver by Pierpaolo Prazzoli
8
9 thanks to David Haywood for some precious advice
10
11 */
12
13 #include "emu.h"
14 #include "cpu/z80/z80.h"
15 #include "machine/bankdev.h"
16 #include "sound/okim6295.h"
17 #include "emupal.h"
18 #include "screen.h"
19 #include "speaker.h"
20 #include "tilemap.h"
21
22 #define MCLK 16000000
23
24 class cultures_state : public driver_device
25 {
26 public:
cultures_state(const machine_config & mconfig,device_type type,const char * tag)27 cultures_state(const machine_config &mconfig, device_type type, const char *tag) :
28 driver_device(mconfig, type, tag),
29 m_maincpu(*this, "maincpu"),
30 m_gfxdecode(*this, "gfxdecode"),
31 m_vrambank(*this, "vrambank"),
32 m_prgbank(*this, "prgbank"),
33 m_okibank(*this, "okibank"),
34 m_bg1_rom(*this, "bg1"),
35 m_bg2_rom(*this, "bg2"),
36 m_bg0_videoram(*this, "bg0_videoram"),
37 m_bg0_regs_x(*this, "bg0_regs_x"),
38 m_bg0_regs_y(*this, "bg0_regs_y"),
39 m_bg1_regs_x(*this, "bg1_regs_x"),
40 m_bg1_regs_y(*this, "bg1_regs_y"),
41 m_bg2_regs_x(*this, "bg2_regs_x"),
42 m_bg2_regs_y(*this, "bg2_regs_y")
43 { }
44
45 /* devices */
46 required_device<cpu_device> m_maincpu;
47 required_device<gfxdecode_device> m_gfxdecode;
48 required_device<address_map_bank_device> m_vrambank;
49 required_memory_bank m_prgbank;
50 required_memory_bank m_okibank;
51
52 /* memory pointers */
53 required_region_ptr<uint16_t> m_bg1_rom;
54 required_region_ptr<uint16_t> m_bg2_rom;
55
56 required_shared_ptr<uint8_t> m_bg0_videoram;
57 required_shared_ptr<uint8_t> m_bg0_regs_x;
58 required_shared_ptr<uint8_t> m_bg0_regs_y;
59 required_shared_ptr<uint8_t> m_bg1_regs_x;
60 required_shared_ptr<uint8_t> m_bg1_regs_y;
61 required_shared_ptr<uint8_t> m_bg2_regs_x;
62 required_shared_ptr<uint8_t> m_bg2_regs_y;
63
64 /* video-related */
65 tilemap_t *m_bg0_tilemap;
66 tilemap_t *m_bg1_tilemap;
67 tilemap_t *m_bg2_tilemap;
68 int m_irq_enable;
69 int m_bg1_bank;
70 int m_bg2_bank;
71 void cpu_bankswitch_w(uint8_t data);
72 void bg0_videoram_w(offs_t offset, uint8_t data);
73 void misc_w(uint8_t data);
74 void bg_bank_w(uint8_t data);
75 TILE_GET_INFO_MEMBER(get_bg1_tile_info);
76 TILE_GET_INFO_MEMBER(get_bg2_tile_info);
77 TILE_GET_INFO_MEMBER(get_bg0_tile_info);
78 virtual void machine_start() override;
79 virtual void machine_reset() override;
80 virtual void video_start() override;
81 uint32_t screen_update_cultures(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
82 INTERRUPT_GEN_MEMBER(cultures_interrupt);
83 void cultures(machine_config &config);
84 void cultures_io_map(address_map &map);
85 void cultures_map(address_map &map);
86 void oki_map(address_map &map);
87 void vrambank_map(address_map &map);
88 };
89
90
91
TILE_GET_INFO_MEMBER(cultures_state::get_bg1_tile_info)92 TILE_GET_INFO_MEMBER(cultures_state::get_bg1_tile_info)
93 {
94 int const code = m_bg1_rom[0x200000/2 + m_bg1_bank * 0x80000/2 + tile_index];
95 tileinfo.set(1, code, code >> 12, 0);
96 }
97
TILE_GET_INFO_MEMBER(cultures_state::get_bg2_tile_info)98 TILE_GET_INFO_MEMBER(cultures_state::get_bg2_tile_info)
99 {
100 int const code = m_bg2_rom[0x200000/2 + m_bg2_bank * 0x80000/2 + tile_index];
101 tileinfo.set(2, code, code >> 12, 0);
102 }
103
TILE_GET_INFO_MEMBER(cultures_state::get_bg0_tile_info)104 TILE_GET_INFO_MEMBER(cultures_state::get_bg0_tile_info)
105 {
106 int const code = m_bg0_videoram[tile_index * 2] + (m_bg0_videoram[tile_index * 2 + 1] << 8);
107 tileinfo.set(0, code, code >> 12, 0);
108 }
109
video_start()110 void cultures_state::video_start()
111 {
112 m_bg0_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cultures_state::get_bg0_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 128);
113 m_bg1_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cultures_state::get_bg1_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 512, 512);
114 m_bg2_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cultures_state::get_bg2_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 512, 512);
115
116 m_bg1_tilemap->set_transparent_pen(0);
117 m_bg0_tilemap->set_transparent_pen(0);
118
119 m_bg0_tilemap->set_scrolldx(502, -118);
120 m_bg1_tilemap->set_scrolldx(502, -118);
121 m_bg2_tilemap->set_scrolldx(502, -118);
122
123 m_bg0_tilemap->set_scrolldy(255, -16);
124 m_bg1_tilemap->set_scrolldy(255, -16);
125 m_bg2_tilemap->set_scrolldy(255, -16);
126 }
127
screen_update_cultures(screen_device & screen,bitmap_ind16 & bitmap,const rectangle & cliprect)128 uint32_t cultures_state::screen_update_cultures(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
129 {
130 int attr;
131
132 // tilemaps attributes
133 attr = (m_bg0_regs_x[3] & 1 ? TILEMAP_FLIPX : 0) | (m_bg0_regs_y[3] & 1 ? TILEMAP_FLIPY : 0);
134 m_bg0_tilemap->set_flip(attr);
135
136 attr = (m_bg1_regs_x[3] & 1 ? TILEMAP_FLIPX : 0) | (m_bg1_regs_y[3] & 1 ? TILEMAP_FLIPY : 0);
137 m_bg1_tilemap->set_flip(attr);
138
139 attr = (m_bg2_regs_x[3] & 1 ? TILEMAP_FLIPX : 0) | (m_bg2_regs_y[3] & 1 ? TILEMAP_FLIPY : 0);
140 m_bg2_tilemap->set_flip(attr);
141
142 // tilemaps scrolls
143 m_bg0_tilemap->set_scrollx(0, (m_bg0_regs_x[2] << 8) + m_bg0_regs_x[0]);
144 m_bg1_tilemap->set_scrollx(0, (m_bg1_regs_x[2] << 8) + m_bg1_regs_x[0]);
145 m_bg2_tilemap->set_scrollx(0, (m_bg2_regs_x[2] << 8) + m_bg2_regs_x[0]);
146 m_bg0_tilemap->set_scrolly(0, (m_bg0_regs_y[2] << 8) + m_bg0_regs_y[0]);
147 m_bg1_tilemap->set_scrolly(0, (m_bg1_regs_y[2] << 8) + m_bg1_regs_y[0]);
148 m_bg2_tilemap->set_scrolly(0, (m_bg2_regs_y[2] << 8) + m_bg2_regs_y[0]);
149
150 m_bg2_tilemap->draw(screen, bitmap, cliprect, 0, 0);
151 m_bg0_tilemap->draw(screen, bitmap, cliprect, 0, 0);
152 m_bg1_tilemap->draw(screen, bitmap, cliprect, 0, 0);
153
154 return 0;
155 }
156
cpu_bankswitch_w(uint8_t data)157 void cultures_state::cpu_bankswitch_w(uint8_t data)
158 {
159 m_prgbank->set_entry(data & 0x0f);
160 m_vrambank->set_bank((data & 0x20)>>5);
161 }
162
163
bg0_videoram_w(offs_t offset,uint8_t data)164 void cultures_state::bg0_videoram_w(offs_t offset, uint8_t data)
165 {
166 m_bg0_videoram[offset] = data;
167 m_bg0_tilemap->mark_tile_dirty(offset >> 1);
168 }
169
misc_w(uint8_t data)170 void cultures_state::misc_w(uint8_t data)
171 {
172 m_okibank->set_entry(data&0x0f);
173 m_irq_enable = data & 0x80;
174 }
175
bg_bank_w(uint8_t data)176 void cultures_state::bg_bank_w(uint8_t data)
177 {
178 if (m_bg1_bank != (data & 3))
179 {
180 m_bg1_bank = data & 3;
181 m_bg1_tilemap->mark_all_dirty();
182 }
183
184 if (m_bg2_bank != ((data & 0xc) >> 2))
185 {
186 m_bg2_bank = (data & 0xc) >> 2;
187 m_bg2_tilemap->mark_all_dirty();
188 }
189 machine().bookkeeping().coin_counter_w(0, data & 0x10);
190 }
191
192
oki_map(address_map & map)193 void cultures_state::oki_map(address_map &map)
194 {
195 map(0x00000, 0x1ffff).rom();
196 map(0x20000, 0x3ffff).bankr("okibank");
197 }
198
vrambank_map(address_map & map)199 void cultures_state::vrambank_map(address_map &map)
200 {
201 map(0x0000, 0x3fff).ram().w(FUNC(cultures_state::bg0_videoram_w)).share("bg0_videoram");
202 map(0x4000, 0x6fff).ram().w("palette", FUNC(palette_device::write8)).share("palette");
203 }
204
cultures_map(address_map & map)205 void cultures_state::cultures_map(address_map &map)
206 {
207 map(0x0000, 0x3fff).rom();
208 map(0x4000, 0x7fff).bankr("prgbank");
209 map(0x8000, 0xbfff).m(m_vrambank, FUNC(address_map_bank_device::amap8));
210 map(0xc000, 0xdfff).ram();
211 map(0xf000, 0xffff).ram();
212 }
213
cultures_io_map(address_map & map)214 void cultures_state::cultures_io_map(address_map &map)
215 {
216 map.global_mask(0xff);
217 map(0x00, 0x03).ram();
218 map(0x10, 0x13).ram();
219 map(0x20, 0x23).ram().share("bg0_regs_x");
220 map(0x30, 0x33).ram().share("bg0_regs_y");
221 map(0x40, 0x43).ram().share("bg1_regs_x");
222 map(0x50, 0x53).ram().share("bg1_regs_y");
223 map(0x60, 0x63).ram().share("bg2_regs_x");
224 map(0x70, 0x73).ram().share("bg2_regs_y");
225 map(0x80, 0x80).w(FUNC(cultures_state::cpu_bankswitch_w));
226 map(0x90, 0x90).w(FUNC(cultures_state::misc_w));
227 map(0xa0, 0xa0).w(FUNC(cultures_state::bg_bank_w));
228 map(0xc0, 0xc0).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
229 map(0xd0, 0xd0).portr("SW1_A");
230 map(0xd1, 0xd1).portr("SW1_B");
231 map(0xd2, 0xd2).portr("SW2_A");
232 map(0xd3, 0xd3).portr("SW2_B");
233 map(0xe0, 0xe0).portr("KEY0");
234 map(0xe1, 0xe1).portr("KEY1");
235 map(0xe2, 0xe2).portr("KEY2");
236 map(0xe3, 0xe3).portr("KEY3");
237 map(0xe4, 0xe4).portr("KEY4");
238 map(0xe5, 0xe5).portr("START");
239 map(0xf0, 0xf0).portr("UNUSED1");
240 map(0xf1, 0xf1).portr("UNUSED2");
241 map(0xf2, 0xf2).portr("UNUSED3");
242 map(0xf3, 0xf3).portr("UNUSED4");
243 map(0xf7, 0xf7).portr("COINS");
244 }
245
246
247 static INPUT_PORTS_START( cultures )
248 PORT_START("SW1_A")
249 PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2,3")
250 PORT_DIPSETTING( 0x00, "10 Coins / 1 Credit" )
251 PORT_DIPSETTING( 0x01, DEF_STR( 5C_1C ) )
252 PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) )
253 PORT_DIPSETTING( 0x03, DEF_STR( 3C_1C ) )
254 PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
255 PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
256 PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
257 PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
258 PORT_DIPNAME( 0x08, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:4")
259 PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
260 PORT_DIPSETTING( 0x08, DEF_STR( On ) )
261 PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
262
263 PORT_START("SW1_B")
264 PORT_DIPNAME( 0x01, 0x01, "Auto Mode After Reach" ) PORT_DIPLOCATION("SW1:5")
265 PORT_DIPSETTING( 0x00, DEF_STR( No ) )
266 PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
267 PORT_DIPNAME( 0x02, 0x02, "Attract Mode" ) PORT_DIPLOCATION("SW1:6")
268 PORT_DIPSETTING( 0x02, "Partial" )
269 PORT_DIPSETTING( 0x00, "Full" )
270 PORT_DIPNAME( 0x04, 0x04, "Open Hands After Noten" ) PORT_DIPLOCATION("SW1:7")
271 PORT_DIPSETTING( 0x00, DEF_STR( No ) )
272 PORT_DIPSETTING( 0x04, DEF_STR( Yes ) )
273 PORT_DIPNAME( 0x08, 0x08, "Datsui Count After Continue" ) PORT_DIPLOCATION("SW1:8")
274 PORT_DIPSETTING( 0x08, "Not Cleared" )
275 PORT_DIPSETTING( 0x00, "Cleared" )
276 PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
277
278 PORT_START("SW2_A")
279 PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2")
280 PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
281 PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )
282 PORT_DIPSETTING( 0x03, DEF_STR( Normal ) )
283 PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )
284 PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3")
285 PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
286 PORT_DIPSETTING( 0x04, DEF_STR( On ) )
287 PORT_DIPNAME( 0x08, 0x08, "Game Background Music" ) PORT_DIPLOCATION("SW2:4")
288 PORT_DIPSETTING( 0x00, DEF_STR( No ) )
289 PORT_DIPSETTING( 0x08, DEF_STR( Yes ) )
290 PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
291
292 PORT_START("SW2_B")
293 PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:5")
294 PORT_DIPSETTING( 0x00, DEF_STR( No ) )
295 PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
296 PORT_DIPNAME( 0x02, 0x02, "Machihai Display" ) PORT_DIPLOCATION("SW2:6")
297 PORT_DIPSETTING( 0x00, DEF_STR( No ) )
298 PORT_DIPSETTING( 0x02, DEF_STR( Yes ) )
299 PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW2:7" ) // "always off"
300 PORT_SERVICE_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW2:8" )
301 PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
302
303 PORT_START("KEY0")
304 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
305 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_B )
306 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_C )
307 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_D )
308 PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
309
310 PORT_START("KEY1")
311 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_E )
312 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )
313 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_G )
314 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_H )
315 PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
316
317 PORT_START("KEY2")
318 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_I )
319 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_J )
320 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )
321 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_L )
322 PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
323
324 PORT_START("KEY3")
325 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_M )
326 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_N )
327 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
328 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
329 PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
330
331 PORT_START("KEY4")
332 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
333 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
334 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
335 PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED )
336
337 PORT_START("START")
338 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
339 PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
340
341 PORT_START("UNUSED1")
342 PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
343
344 PORT_START("UNUSED2")
345 PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
346
347 PORT_START("UNUSED3")
348 PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
349
350 PORT_START("UNUSED4")
351 PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
352
353 PORT_START("COINS")
354 PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED )
355 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
356 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE2 ) // "Test"
357 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
358 INPUT_PORTS_END
359
360 /*** GFX Decode ***/
361
362
363 static const gfx_layout gfxlayout =
364 {
365 8,8,
366 RGN_FRAC(1,1),
367 8,
368 { 0,1,2,3,4,5,6,7 },
369 { 1*8, 0*8, 3*8, 2*8, 5*8, 4*8, 7*8, 6*8 },
370 { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64 },
371 8*64,
372 };
373
374 static GFXDECODE_START( gfx_cultures )
375 GFXDECODE_ENTRY("bg0", 0, gfxlayout, 0x0000, 16 )
376 GFXDECODE_ENTRY("bg1", 0, gfxlayout, 0x1000, 8 )
377 GFXDECODE_ENTRY("bg2", 0, gfxlayout, 0x1000, 8 )
378 GFXDECODE_END
379
INTERRUPT_GEN_MEMBER(cultures_state::cultures_interrupt)380 INTERRUPT_GEN_MEMBER(cultures_state::cultures_interrupt)
381 {
382 if (m_irq_enable)
383 device.execute().set_input_line(0, HOLD_LINE);
384 }
385
machine_start()386 void cultures_state::machine_start()
387 {
388 m_prgbank->configure_entries(0, 16, memregion("maincpu")->base(), 0x4000);
389 m_okibank->configure_entries(0, 0x200000 / 0x20000, memregion("oki")->base(), 0x20000);
390 m_okibank->set_entry(0);
391
392 save_item(NAME(m_irq_enable));
393 save_item(NAME(m_bg1_bank));
394 save_item(NAME(m_bg2_bank));
395 }
396
machine_reset()397 void cultures_state::machine_reset()
398 {
399 m_okibank->set_entry(0);
400 m_vrambank->set_bank(1);
401 m_irq_enable = 0;
402 m_bg1_bank = 0;
403 m_bg2_bank = 0;
404 }
405
406
407
cultures(machine_config & config)408 void cultures_state::cultures(machine_config &config)
409 {
410 /* basic machine hardware */
411 Z80(config, m_maincpu, MCLK/2); /* 8.000 MHz */
412 m_maincpu->set_addrmap(AS_PROGRAM, &cultures_state::cultures_map);
413 m_maincpu->set_addrmap(AS_IO, &cultures_state::cultures_io_map);
414 m_maincpu->set_vblank_int("screen", FUNC(cultures_state::cultures_interrupt));
415
416 ADDRESS_MAP_BANK(config, "vrambank").set_map(&cultures_state::vrambank_map).set_options(ENDIANNESS_LITTLE, 8, 15, 0x4000);
417
418 /* video hardware */
419 screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
420 screen.set_refresh_hz(60);
421 screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
422 screen.set_size(64*8, 32*8);
423 screen.set_visarea(0*8, 48*8-1, 0*8, 30*8-1);
424 screen.set_screen_update(FUNC(cultures_state::screen_update_cultures));
425 screen.set_palette("palette");
426
427 GFXDECODE(config, m_gfxdecode, "palette", gfx_cultures);
428 PALETTE(config, "palette").set_format(palette_device::xRGBRRRRGGGGBBBB_bit0, 0x3000/2);
429
430 /* sound hardware */
431 SPEAKER(config, "mono").front_center();
432
433 okim6295_device &oki(OKIM6295(config, "oki", MCLK/8, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified
434 oki.add_route(ALL_OUTPUTS, "mono", 0.30);
435 oki.set_addrmap(0, &cultures_state::oki_map);
436 }
437
438 /*
439
440 Jibun wo Migaku Culture School Mahjong Hen
441 (c)1994 Face
442
443 CPU: Z80
444 Sound: M6295
445 OSC: 16.000MHz
446 EEPROM: 93C46
447 Custom: FACE AV44 4HA0G (x3)
448
449 ROMs:
450 MA01.U12
451 PCM.U87
452 BG0C.U45
453 BG0C2.U46
454 BG1C.U80
455 BG1T.U67
456 BG2C.U68
457 BG2T.U79
458
459 -----mahjong connector-----
460 empty
461 amp OSC BG0C
462 6295 GAL BG0C2
463 G PCM SS S
464 A MA01 G RR R
465 L A AA A
466 Z80 L MM custom M
467
468 D GGG
469 I AAA
470 P LLL
471 D
472 I custom BG2C BG1C
473 P custom custom
474 93C46 BG1T BG2T
475
476 */
477
478 ROM_START( cultures )
479 ROM_REGION( 0x40000, "maincpu", 0 )
480 ROM_LOAD( "ma01.u12", 0x000000, 0x040000, CRC(f57417b3) SHA1(9a2a50222f54e5da9bc5c66863b8be16e33b171f) )
481
482 ROM_REGION( 0x400000, "bg0", ROMREGION_ERASE00 )
483 ROM_LOAD( "bg0c.u45", 0x000000, 0x200000, CRC(ad2e1263) SHA1(b28a3d82aaa0421a7b4df837814147b109e7d1a5) )
484 ROM_LOAD( "bg0c2.u46", 0x200000, 0x100000, CRC(97c71c09) SHA1(ffbcee1d9cb39d0824f3aa652c3a24579113cf2e) )
485 /* 0x300000 - 0x3fffff empty */
486
487 ROM_REGION16_LE( 0x400000, "bg1", ROMREGION_ERASE00 )
488 ROM_LOAD( "bg2c.u68", 0x000000, 0x200000, CRC(fa598644) SHA1(532249e456c34f18a787d5a028df82f2170f604d) )
489 ROM_LOAD( "bg1t.u67", 0x200000, 0x100000, CRC(d2e594ee) SHA1(a84b5ab62dec1867d433ccaeb1381e7593958cf0) )
490 /* 0x300000 - 0x3fffff empty */
491
492 ROM_REGION16_LE( 0x400000, "bg2", ROMREGION_ERASE00 )
493 ROM_LOAD( "bg1c.u80", 0x000000, 0x200000, CRC(9ab99bd9) SHA1(bce41b6f5d83c8262ba8d37b2dfcd5d7a5e7ace7) )
494 ROM_LOAD( "bg2t.u79", 0x200000, 0x100000, CRC(0610a79f) SHA1(9fc6b2e5c573ed682b2f7fa462c8f42ff99da5ba) )
495 /* 0x300000 - 0x3fffff empty */
496
497 ROM_REGION( 0x200000, "oki", 0 )
498 ROM_LOAD( "pcm.u87", 0x000000, 0x200000, CRC(84206475) SHA1(d1423bd5c7425e121fb4e7845cf57801e9afa7b3) )
499 ROM_END
500
501
502 GAME( 1994, cultures, 0, cultures, cultures, cultures_state, empty_init, ROT0, "Face", "Jibun wo Migaku Culture School Mahjong Hen", MACHINE_SUPPORTS_SAVE )
503