Previous 199869 Revisions Next

r20361 Sunday 20th January, 2013 at 06:28:32 UTC by Roberto Fresca
New preliminary driver for 8bit San Remo Games. [Roberto Fresca]


New games marked as GAME_NOT_WORKING
------------------------------------
Unknown San Remo poker game [Roberto Fresca, Any, The Dumping Union]
[src/mame]mame.lst mame.mak
[src/mame/drivers]sanremo.c*

trunk/src/mame/drivers/sanremo.c
r0r20361
1/******************************************************************************
2
3  San Remo Games.
4  8bit gambling hardware.
5
6  Driver by Roberto Fresca.
7
8
9*******************************************************************************
10
11  *** Hardware notes ***
12
13  - CPU:  1x TMPZ84C00AP-6.
14  - CRTC: 1x MC6845.
15  - SND:  1x WF19054 (AY-3-8910).
16  - CLK:  1x crystal @ 18.000 MHz.
17
18  - PLDs: 3x PALCE (read protected).
19
20
21*******************************************************************************
22
23  Game Notes
24  ----------
25
26  Nothing yet...
27
28
29*******************************************************************************
30
31  Driver updates:
32
33  [2012/01/19]    Preliminary driver...
34
35
36  TODO:
37
38  - Fix video RAM
39  - Interrupts.
40  - Hook inputs.
41  - Hook AY-8910.
42
43
44*******************************************************************************/
45
46
47#define MASTER_CLOCK   XTAL_18MHz
48
49#include "emu.h"
50#include "cpu/z80/z80.h"
51#include "video/mc6845.h"
52#include "sound/ay8910.h"
53#include "machine/nvram.h"
54
55
56class sanremo_state : public driver_device
57{
58public:
59   sanremo_state(const machine_config &mconfig, device_type type, const char *tag)
60      : driver_device(mconfig, type, tag) ,
61      m_videoram(*this, "videoram"),
62      m_colorram(*this, "colorram"){ }
63
64   required_shared_ptr<UINT8> m_videoram;
65   required_shared_ptr<UINT8> m_colorram;
66   tilemap_t *m_bg_tilemap;
67   DECLARE_WRITE8_MEMBER(sanremo_videoram_w);
68   DECLARE_WRITE8_MEMBER(sanremo_colorram_w);
69   TILE_GET_INFO_MEMBER(get_sanremo_tile_info);
70   DECLARE_READ8_MEMBER(testa_r);
71   DECLARE_WRITE8_MEMBER(testa_w);
72   virtual void video_start();
73   UINT32 screen_update_sanremo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
74};
75
76
77/*************************
78*     Video Hardware     *
79*************************/
80
81
82WRITE8_MEMBER(sanremo_state::sanremo_videoram_w)
83{
84   m_videoram[offset] = data;
85   m_bg_tilemap->mark_tile_dirty(offset);
86}
87
88WRITE8_MEMBER(sanremo_state::sanremo_colorram_w)
89{
90   m_colorram[offset] = data;
91   m_bg_tilemap->mark_tile_dirty(offset);
92}
93
94TILE_GET_INFO_MEMBER(sanremo_state::get_sanremo_tile_info)
95{
96   int attr = m_colorram[tile_index];
97   int code = m_videoram[tile_index];
98
99   SET_TILE_INFO_MEMBER( 0, code, attr, 0);
100
101}
102
103void sanremo_state::video_start()
104{
105   m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(sanremo_state::get_sanremo_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
106}
107
108
109UINT32 sanremo_state::screen_update_sanremo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
110{
111   m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
112   return 0;
113}
114
115
116
117/******************************
118*         R/W Handlers        *
119******************************/
120
121READ8_MEMBER(sanremo_state::testa_r)
122{
123   return machine().rand() & 0xff;
124}
125
126WRITE8_MEMBER(sanremo_state::testa_w)
127{
128//   printf("%02x TESTA\n", data);
129}
130
131
132
133/*************************
134* Memory map information *
135*************************/
136
137static ADDRESS_MAP_START( sanremo_map, AS_PROGRAM, 8, sanremo_state )
138   AM_RANGE(0x0000, 0x7fff) AM_ROM
139   AM_RANGE(0xc000, 0xc7ff) AM_RAM // seems to be working RAM
140   AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(sanremo_videoram_w) AM_SHARE("videoram")   // filling 8000-87ff with 0x0b ???
141   AM_RANGE(0x8800, 0x8fff) AM_RAM_WRITE(sanremo_colorram_w) AM_SHARE("colorram")   // filling 8000-87ff with 0x0b ???
142   AM_RANGE(0xf800, 0xffff) AM_RAM // dunno.. writting at very end.
143
144ADDRESS_MAP_END
145
146static ADDRESS_MAP_START( sanremo_portmap, AS_IO, 8, sanremo_state )
147   ADDRESS_MAP_GLOBAL_MASK(0xff)
148   AM_RANGE(0x01, 0x01) AM_READ(testa_r)
149   AM_RANGE(0x03, 0x03) AM_WRITE(testa_w)
150   AM_RANGE(0x04, 0x04) AM_DEVWRITE("crtc", mc6845_device, address_w)
151   AM_RANGE(0x14, 0x14) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
152
153/*
154
155  00 W
156  01 R -- read and xor to 03
157  02 R
158  03 W
159  04 W -- CRTC address
160  06 W
161  14 W -- CRTC register
162  15 W
163  17 W
164  24 W -- sequence 05 05 05 05 05 05 05 05 05 06 07 0A 0B 0C 0D
165  27 R
166  37 W
167
168*/
169
170ADDRESS_MAP_END
171
172
173/*************************
174*      Input ports       *
175*************************/
176
177static INPUT_PORTS_START( sanremo )
178INPUT_PORTS_END
179
180
181/*************************
182*    Graphics Layouts    *
183*************************/
184
185static const gfx_layout charlayout =
186{
187   8, 8,
188   RGN_FRAC(1,1),
189   1,
190   { 0 },
191   { 0, 1, 2, 3, 4, 5, 6, 7 },
192   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
193   8*8
194};
195
196static const gfx_layout tilelayout =
197{
198   8, 8,
199   RGN_FRAC(1,3),
200   3,
201   { 0, RGN_FRAC(1,3), RGN_FRAC(2,3) },
202   { 0, 1, 2, 3, 4, 5, 6, 7 },
203   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
204   8*8
205};
206
207
208/******************************
209* Graphics Decode Information *
210******************************/
211
212static GFXDECODE_START( sanremo )
213   GFXDECODE_ENTRY( "gfxbnk1", 0, tilelayout, 0, 1 )
214   GFXDECODE_ENTRY( "gfxbnk0", 0, charlayout, 0, 8 )
215GFXDECODE_END
216
217
218/************************
219*    CRTC Interface    *
220************************/
221
222static MC6845_INTERFACE( mc6845_intf )
223{
224   "screen",   /* screen we are acting on */
225   false,      /* show border area */
226   8,          /* number of pixels per video memory address */
227   NULL,       /* before pixel update callback */
228   NULL,       /* row update callback */
229   NULL,       /* after pixel update callback */
230   DEVCB_NULL, /* callback for display state changes */
231   DEVCB_NULL, /* callback for cursor state changes */
232   DEVCB_NULL, /* HSYNC callback */
233   DEVCB_NULL, /* VSYNC callback */
234   NULL        /* update address callback */
235};
236
237
238/*************************
239*    Sound Interfaces    *
240*************************/
241
242static const ay8910_interface ay8910_config =
243{
244   AY8910_LEGACY_OUTPUT,
245   AY8910_DEFAULT_LOADS,
246   DEVCB_NULL,
247   DEVCB_NULL,
248   DEVCB_NULL,
249   DEVCB_NULL
250};
251
252
253/*************************
254*    Machine Drivers     *
255*************************/
256
257static MACHINE_CONFIG_START( sanremo, sanremo_state )
258
259   /* basic machine hardware */
260   MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/3)
261   MCFG_CPU_PROGRAM_MAP(sanremo_map)
262   MCFG_CPU_IO_MAP(sanremo_portmap)
263//   MCFG_CPU_VBLANK_INT_DRIVER("screen", sanremo_state,  nmi_line_pulse)
264
265//  MCFG_NVRAM_ADD_0FILL("nvram")
266
267   /* video hardware */
268   MCFG_SCREEN_ADD("screen", RASTER)
269   MCFG_SCREEN_REFRESH_RATE(60)
270   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
271   MCFG_SCREEN_SIZE(70*8, 41*8)
272   MCFG_SCREEN_VISIBLE_AREA(0, 48*8-1, 0, 38*8-1)
273   MCFG_SCREEN_UPDATE_DRIVER(sanremo_state, screen_update_sanremo)
274
275   MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/12, mc6845_intf)
276
277   MCFG_GFXDECODE(sanremo)
278   MCFG_PALETTE_LENGTH(0x200)
279
280   /* sound hardware */
281   MCFG_SPEAKER_STANDARD_MONO("mono")
282   MCFG_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/12)
283   MCFG_SOUND_CONFIG(ay8910_config)
284   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
285MACHINE_CONFIG_END
286
287
288/*************************
289*        Rom Load        *
290*************************/
291
292ROM_START( sanremo )
293   ROM_REGION( 0x10000, "maincpu", 0 )
294   ROM_LOAD( "no_g0.ic26",   0x0000, 0x8000, CRC(2d83646f) SHA1(d1fafcce44ed3ec3dd53d84338c42244ebfca820) )
295
296   ROM_REGION( 0x10000, "gfxbnk0", 0 )
297   ROM_LOAD( "no_i4.ic30",   0x00000, 0x10000, CRC(55b351a4) SHA1(b0c8a30dde076520234281da051f21f1b7cb3166) )   // i?
298
299   ROM_REGION( 0x30000, "gfxbnk1", 0 )
300   ROM_LOAD( "no_b4.ic27",   0x00000, 0x10000, CRC(e48b1c8a) SHA1(88f60268fd43c06e146d936a1bdc078c44e2a213) )   // b
301   ROM_LOAD( "no_g4.ic28",   0x10000, 0x10000, CRC(4eea9a9b) SHA1(c86c083ccf08c3c310028920f9a0fe809fd7ccbe) )   // g
302   ROM_LOAD( "no_r4.ic29",   0x20000, 0x10000, CRC(ab08cdaf) SHA1(e0518403039b6bada79ffe4c6bc22fbb64d16e43) )   // r
303
304   ROM_REGION( 0x0600, "plds", 0 )
305   ROM_LOAD( "palce1.bin",   0x0000, 0x0104, NO_DUMP )   /* PALCE is read protected */
306   ROM_LOAD( "palce2.bin",   0x0200, 0x0104, NO_DUMP )   /* PALCE is read protected */
307   ROM_LOAD( "palce3.bin",   0x0400, 0x0104, NO_DUMP )   /* PALCE is read protected */
308ROM_END
309
310
311/*************************
312*      Game Drivers      *
313*************************/
314
315/*    YEAR  NAME     PARENT  MACHINE  INPUT    STATE          INIT   ROT    COMPANY           FULLNAME                      FLAGS... */
316GAME( 198?, sanremo, 0,      sanremo, sanremo, driver_device, 0,     ROT0, "San Remo Games", "Unknown San Remo poker game", GAME_NOT_WORKING )
Property changes on: trunk/src/mame/drivers/sanremo.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mame/mame.lst
r20360r20361
3041730417// HP Automaten
3041830418bingoman
3041930419bingomana
30420
30421sanremo
trunk/src/mame/mame.mak
r20360r20361
18981898   $(DRIVERS)/rgum.o \
18991899   $(DRIVERS)/roul.o \
19001900   $(DRIVERS)/savquest.o \
1901   $(DRIVERS)/sanremo.o \
19011902   $(DRIVERS)/sfbonus.o \
19021903   $(DRIVERS)/shangkid.o $(VIDEO)/shangkid.o \
19031904   $(DRIVERS)/skeetsht.o \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team