~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/mame/drivers/subsino.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
 
213
213
#include "emu.h"
214
214
#include "cpu/z180/z180.h"
215
 
#include "machine/8255ppi.h"
 
215
#include "machine/i8255.h"
216
216
#include "machine/subsino.h"
217
217
#include "sound/okim6295.h"
218
218
#include "sound/2413intf.h"
232
232
{
233
233
public:
234
234
        subsino_state(const machine_config &mconfig, device_type type, const char *tag)
235
 
                : driver_device(mconfig, type, tag) { }
236
 
 
237
 
        UINT8 *m_videoram;
238
 
        UINT8 *m_colorram;
 
235
                : driver_device(mconfig, type, tag) ,
 
236
                m_colorram(*this, "colorram"),
 
237
                m_videoram(*this, "videoram"),
 
238
                m_reel3_scroll(*this, "reel3_scroll"),
 
239
                m_reel2_scroll(*this, "reel2_scroll"),
 
240
                m_reel1_scroll(*this, "reel1_scroll"),
 
241
                m_reel1_ram(*this, "reel1_ram"),
 
242
                m_reel2_ram(*this, "reel2_ram"),
 
243
                m_reel3_ram(*this, "reel3_ram"){ }
 
244
 
 
245
        required_shared_ptr<UINT8> m_colorram;
 
246
        required_shared_ptr<UINT8> m_videoram;
 
247
        optional_shared_ptr<UINT8> m_reel3_scroll;
 
248
        optional_shared_ptr<UINT8> m_reel2_scroll;
 
249
        optional_shared_ptr<UINT8> m_reel1_scroll;
 
250
        optional_shared_ptr<UINT8> m_reel1_ram;
 
251
        optional_shared_ptr<UINT8> m_reel2_ram;
 
252
        optional_shared_ptr<UINT8> m_reel3_ram;
 
253
 
239
254
        tilemap_t *m_tmap;
240
255
        tilemap_t *m_reel1_tilemap;
241
256
        tilemap_t *m_reel2_tilemap;
242
257
        tilemap_t *m_reel3_tilemap;
243
258
        int m_tiles_offset;
244
 
        UINT8* m_reel1_ram;
245
 
        UINT8* m_reel2_ram;
246
 
        UINT8* m_reel3_ram;
247
 
        UINT8* m_reel1_scroll;
248
 
        UINT8* m_reel2_scroll;
249
 
        UINT8* m_reel3_scroll;
250
259
        UINT8 m_out_c;
251
260
        UINT8* m_reel1_attr;
252
261
        UINT8* m_reel2_attr;
257
266
        int m_colordac_offs;
258
267
        UINT8* m_stisub_colorram;
259
268
        UINT8 m_stisub_outc;
 
269
        DECLARE_WRITE8_MEMBER(subsino_tiles_offset_w);
 
270
        DECLARE_WRITE8_MEMBER(subsino_videoram_w);
 
271
        DECLARE_WRITE8_MEMBER(subsino_colorram_w);
 
272
        DECLARE_WRITE8_MEMBER(subsino_reel1_ram_w);
 
273
        DECLARE_WRITE8_MEMBER(subsino_reel2_ram_w);
 
274
        DECLARE_WRITE8_MEMBER(subsino_reel3_ram_w);
 
275
        DECLARE_WRITE8_MEMBER(subsino_out_a_w);
 
276
        DECLARE_WRITE8_MEMBER(subsino_out_b_w);
 
277
        DECLARE_READ8_MEMBER(flash_r);
 
278
        DECLARE_WRITE8_MEMBER(flash_w);
 
279
        DECLARE_READ8_MEMBER(hwcheck_r);
 
280
        DECLARE_WRITE8_MEMBER(subsino_out_c_w);
 
281
        DECLARE_WRITE8_MEMBER(colordac_w);
 
282
        DECLARE_WRITE8_MEMBER(stisub_out_c_w);
 
283
        DECLARE_WRITE8_MEMBER(reel_scrollattr_w);
 
284
        DECLARE_READ8_MEMBER(reel_scrollattr_r);
260
285
};
261
286
 
262
287
 
266
291
***************************************************************************/
267
292
 
268
293
 
269
 
static WRITE8_HANDLER( subsino_tiles_offset_w )
 
294
WRITE8_MEMBER(subsino_state::subsino_tiles_offset_w)
270
295
{
271
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
272
 
        state->m_tiles_offset = (data & 1) ? 0x1000: 0;
273
 
        state->m_tmap->mark_tile_dirty(offset);
 
296
        m_tiles_offset = (data & 1) ? 0x1000: 0;
 
297
        m_tmap->mark_tile_dirty(offset);
274
298
//  popmessage("gfx %02x",data);
275
299
}
276
300
 
277
 
static WRITE8_HANDLER( subsino_videoram_w )
 
301
WRITE8_MEMBER(subsino_state::subsino_videoram_w)
278
302
{
279
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
280
 
        state->m_videoram[offset] = data;
281
 
        state->m_tmap->mark_tile_dirty(offset);
 
303
        m_videoram[offset] = data;
 
304
        m_tmap->mark_tile_dirty(offset);
282
305
}
283
306
 
284
 
static WRITE8_HANDLER( subsino_colorram_w )
 
307
WRITE8_MEMBER(subsino_state::subsino_colorram_w)
285
308
{
286
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
287
 
        state->m_colorram[offset] = data;
288
 
        state->m_tmap->mark_tile_dirty(offset);
 
309
        m_colorram[offset] = data;
 
310
        m_tmap->mark_tile_dirty(offset);
289
311
}
290
312
 
291
313
static TILE_GET_INFO( get_tile_info )
317
339
 
318
340
 
319
341
 
320
 
static WRITE8_HANDLER( subsino_reel1_ram_w )
 
342
WRITE8_MEMBER(subsino_state::subsino_reel1_ram_w)
321
343
{
322
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
323
 
        state->m_reel1_ram[offset] = data;
324
 
        state->m_reel1_tilemap->mark_tile_dirty(offset);
 
344
        m_reel1_ram[offset] = data;
 
345
        m_reel1_tilemap->mark_tile_dirty(offset);
325
346
}
326
347
 
327
348
static TILE_GET_INFO( get_subsino_reel1_tile_info )
351
372
}
352
373
 
353
374
 
354
 
static WRITE8_HANDLER( subsino_reel2_ram_w )
 
375
WRITE8_MEMBER(subsino_state::subsino_reel2_ram_w)
355
376
{
356
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
357
 
        state->m_reel2_ram[offset] = data;
358
 
        state->m_reel2_tilemap->mark_tile_dirty(offset);
 
377
        m_reel2_ram[offset] = data;
 
378
        m_reel2_tilemap->mark_tile_dirty(offset);
359
379
}
360
380
 
361
381
static TILE_GET_INFO( get_subsino_reel2_tile_info )
384
404
                        0);
385
405
}
386
406
 
387
 
static WRITE8_HANDLER( subsino_reel3_ram_w )
 
407
WRITE8_MEMBER(subsino_state::subsino_reel3_ram_w)
388
408
{
389
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
390
 
        state->m_reel3_ram[offset] = data;
391
 
        state->m_reel3_tilemap->mark_tile_dirty(offset);
 
409
        m_reel3_ram[offset] = data;
 
410
        m_reel3_tilemap->mark_tile_dirty(offset);
392
411
}
393
412
 
394
413
static TILE_GET_INFO( get_subsino_reel3_tile_info )
529
548
 
530
549
static PALETTE_INIT( subsino_2proms )
531
550
{
 
551
        const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
532
552
        int i,r,g,b,val;
533
553
        int bit0,bit1,bit2;
534
554
 
555
575
 
556
576
static PALETTE_INIT( subsino_3proms )
557
577
{
 
578
        const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
558
579
        int i,r,g,b,val;
559
580
        int bit0,bit1,bit2;
560
581
 
584
605
*                          Lamps & other outputs.                          *
585
606
***************************************************************************/
586
607
 
587
 
static WRITE8_HANDLER( subsino_out_a_w )
 
608
WRITE8_MEMBER(subsino_state::subsino_out_a_w)
588
609
{
589
 
 
590
610
/***** COIN PULSE: *****
591
611
 
592
612
 
625
645
        output_set_lamp_value(14, (data >> 6) & 1);     /* Lamp 14 */
626
646
        output_set_lamp_value(15, (data >> 7) & 1);     /* Lamp 15 */
627
647
 
628
 
        coin_counter_w( space->machine(), 0, data & 0x01 );     /* coin / keyin */
629
 
        coin_counter_w( space->machine(), 1, data & 0x02 );     /* keyin / coin */
630
 
        coin_counter_w( space->machine(), 2, data & 0x10 );     /* keyout */
631
 
        coin_counter_w( space->machine(), 3, data & 0x20 );     /* payout */
 
648
        coin_counter_w( machine(), 0, data & 0x01 );    /* coin / keyin */
 
649
        coin_counter_w( machine(), 1, data & 0x02 );    /* keyin / coin */
 
650
        coin_counter_w( machine(), 2, data & 0x10 );    /* keyout */
 
651
        coin_counter_w( machine(), 3, data & 0x20 );    /* payout */
632
652
 
633
653
//  popmessage("Out A %02x",data);
634
654
 
635
655
}
636
656
 
637
 
static WRITE8_HANDLER( subsino_out_b_w )
 
657
WRITE8_MEMBER(subsino_state::subsino_out_b_w)
638
658
{
639
659
/***** LAMPS: *****
640
660
 
774
794
*                              Memory Maps                                 *
775
795
***************************************************************************/
776
796
 
777
 
static ADDRESS_MAP_START( srider_map, AS_PROGRAM, 8 )
 
797
static ADDRESS_MAP_START( srider_map, AS_PROGRAM, 8, subsino_state )
778
798
        AM_RANGE( 0x00000, 0x0bfff ) AM_ROM
779
799
 
780
800
        AM_RANGE( 0x0c000, 0x0cfff ) AM_RAM
787
807
        AM_RANGE( 0x0d005, 0x0d005 ) AM_READ_PORT( "INA" )
788
808
        AM_RANGE( 0x0d006, 0x0d006 ) AM_READ_PORT( "INB" )
789
809
 
790
 
        AM_RANGE( 0x0d009, 0x0d009 ) AM_WRITE( subsino_out_b_w )
791
 
        AM_RANGE( 0x0d00a, 0x0d00a ) AM_WRITE( subsino_out_a_w )
 
810
        AM_RANGE( 0x0d009, 0x0d009 ) AM_WRITE(subsino_out_b_w )
 
811
        AM_RANGE( 0x0d00a, 0x0d00a ) AM_WRITE(subsino_out_a_w )
792
812
 
793
813
        AM_RANGE( 0x0d00c, 0x0d00c ) AM_READ_PORT( "INC" )
794
814
 
795
 
        AM_RANGE( 0x0d016, 0x0d017 ) AM_DEVWRITE( "ymsnd", ym3812_w )
796
 
 
797
 
        AM_RANGE( 0x0d018, 0x0d018 ) AM_DEVWRITE_MODERN("oki", okim6295_device, write)
798
 
 
799
 
        AM_RANGE( 0x0d01b, 0x0d01b ) AM_WRITE( subsino_tiles_offset_w )
800
 
 
801
 
        AM_RANGE( 0x0e000, 0x0e7ff ) AM_RAM_WRITE( subsino_colorram_w ) AM_BASE_MEMBER(subsino_state, m_colorram )
802
 
        AM_RANGE( 0x0e800, 0x0efff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE_MEMBER(subsino_state, m_videoram )
 
815
        AM_RANGE( 0x0d016, 0x0d017 ) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w )
 
816
 
 
817
        AM_RANGE( 0x0d018, 0x0d018 ) AM_DEVWRITE("oki", okim6295_device, write)
 
818
 
 
819
        AM_RANGE( 0x0d01b, 0x0d01b ) AM_WRITE(subsino_tiles_offset_w )
 
820
 
 
821
        AM_RANGE( 0x0e000, 0x0e7ff ) AM_RAM_WRITE(subsino_colorram_w ) AM_SHARE("colorram")
 
822
        AM_RANGE( 0x0e800, 0x0efff ) AM_RAM_WRITE(subsino_videoram_w ) AM_SHARE("videoram")
803
823
ADDRESS_MAP_END
804
824
 
805
825
 
806
 
static ADDRESS_MAP_START( sharkpy_map, AS_PROGRAM, 8 )
 
826
static ADDRESS_MAP_START( sharkpy_map, AS_PROGRAM, 8, subsino_state )
807
827
        AM_RANGE( 0x09800, 0x09fff ) AM_RAM
808
828
 
809
829
        AM_RANGE( 0x09000, 0x09000 ) AM_READ_PORT( "SW1" )
814
834
        AM_RANGE( 0x09005, 0x09005 ) AM_READ_PORT( "INA" )
815
835
        AM_RANGE( 0x09006, 0x09006 ) AM_READ_PORT( "INB" )
816
836
 
817
 
        AM_RANGE( 0x09009, 0x09009 ) AM_WRITE( subsino_out_b_w )
818
 
        AM_RANGE( 0x0900a, 0x0900a ) AM_WRITE( subsino_out_a_w )
 
837
        AM_RANGE( 0x09009, 0x09009 ) AM_WRITE(subsino_out_b_w )
 
838
        AM_RANGE( 0x0900a, 0x0900a ) AM_WRITE(subsino_out_a_w )
819
839
 
820
840
        AM_RANGE( 0x0900c, 0x0900c ) AM_READ_PORT( "INC" )
821
841
 
822
 
        AM_RANGE( 0x09016, 0x09017 ) AM_DEVWRITE( "ymsnd", ym3812_w )
823
 
 
824
 
        AM_RANGE( 0x09018, 0x09018 ) AM_DEVWRITE_MODERN("oki", okim6295_device, write)
825
 
 
826
 
        AM_RANGE( 0x0901b, 0x0901b ) AM_WRITE( subsino_tiles_offset_w )
 
842
        AM_RANGE( 0x09016, 0x09017 ) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w )
 
843
 
 
844
        AM_RANGE( 0x09018, 0x09018 ) AM_DEVWRITE("oki", okim6295_device, write)
 
845
 
 
846
        AM_RANGE( 0x0901b, 0x0901b ) AM_WRITE(subsino_tiles_offset_w )
827
847
 
828
848
        AM_RANGE( 0x07800, 0x07fff ) AM_RAM
829
 
        AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE( subsino_colorram_w ) AM_BASE_MEMBER(subsino_state, m_colorram )
830
 
        AM_RANGE( 0x08800, 0x08fff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE_MEMBER(subsino_state, m_videoram )
 
849
        AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE(subsino_colorram_w ) AM_SHARE("colorram")
 
850
        AM_RANGE( 0x08800, 0x08fff ) AM_RAM_WRITE(subsino_videoram_w ) AM_SHARE("videoram")
831
851
 
832
852
        AM_RANGE( 0x00000, 0x13fff ) AM_ROM //overlap unmapped regions
833
853
ADDRESS_MAP_END
838
858
this event makes the game to reset without any money in the bank.
839
859
*/
840
860
 
841
 
static ADDRESS_MAP_START( victor21_map, AS_PROGRAM, 8 )
 
861
static ADDRESS_MAP_START( victor21_map, AS_PROGRAM, 8, subsino_state )
842
862
        AM_RANGE( 0x09800, 0x09fff ) AM_RAM
843
863
 
844
 
        AM_RANGE( 0x09000, 0x09000 ) AM_WRITE( subsino_out_a_w )
845
 
        AM_RANGE( 0x09001, 0x09001 ) AM_WRITE( subsino_out_b_w )
 
864
        AM_RANGE( 0x09000, 0x09000 ) AM_WRITE(subsino_out_a_w )
 
865
        AM_RANGE( 0x09001, 0x09001 ) AM_WRITE(subsino_out_b_w )
846
866
        AM_RANGE( 0x09002, 0x09002 ) AM_READ_PORT( "INC" )
847
867
        AM_RANGE( 0x09004, 0x09004 ) AM_READ_PORT( "INA" )
848
868
        AM_RANGE( 0x09005, 0x09005 ) AM_READ_PORT( "INB" )
853
873
 
854
874
        AM_RANGE( 0x0900b, 0x0900b ) AM_RAM //protection
855
875
 
856
 
//  AM_RANGE( 0x0900c, 0x0900c ) AM_DEVWRITE_MODERN("oki", okim6295_device, write)
857
 
 
858
 
        AM_RANGE( 0x0900e, 0x0900f ) AM_DEVWRITE( "ymsnd", ym2413_w )
859
 
 
860
 
        AM_RANGE( 0x0900d, 0x0900d ) AM_WRITE( subsino_tiles_offset_w )
 
876
//  AM_RANGE( 0x0900c, 0x0900c ) AM_DEVWRITE("oki", okim6295_device, write)
 
877
 
 
878
        AM_RANGE( 0x0900e, 0x0900f ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w )
 
879
 
 
880
        AM_RANGE( 0x0900d, 0x0900d ) AM_WRITE(subsino_tiles_offset_w )
861
881
 
862
882
        AM_RANGE( 0x07800, 0x07fff ) AM_RAM
863
 
        AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE_MEMBER(subsino_state, m_videoram )
864
 
        AM_RANGE( 0x08800, 0x08fff ) AM_RAM_WRITE( subsino_colorram_w ) AM_BASE_MEMBER(subsino_state, m_colorram )
 
883
        AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE(subsino_videoram_w ) AM_SHARE("videoram")
 
884
        AM_RANGE( 0x08800, 0x08fff ) AM_RAM_WRITE(subsino_colorram_w ) AM_SHARE("colorram")
865
885
 
866
886
        AM_RANGE( 0x00000, 0x08fff ) AM_ROM //overlap unmapped regions
867
887
        AM_RANGE( 0x10000, 0x13fff ) AM_ROM
886
906
*/
887
907
 
888
908
 
889
 
static READ8_HANDLER( flash_r )
 
909
READ8_MEMBER(subsino_state::flash_r)
890
910
{
891
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
892
 
//  printf("R %02x\n",state->m_flash_val);
 
911
//  printf("R %02x\n",m_flash_val);
893
912
 
894
 
        if(state->m_flash_val == 0xff)
 
913
        if(m_flash_val == 0xff)
895
914
                return 0xd9;
896
 
        else if(state->m_flash_val <= 0xa)
897
 
                return state->m_flash_val;
898
 
        else if(state->m_flash_val == 0x92)
 
915
        else if(m_flash_val <= 0xa)
 
916
                return m_flash_val;
 
917
        else if(m_flash_val == 0x92)
899
918
                return 0xeb; //protected GFXs in Cross Bingo
900
919
        else
901
920
                return 0xd9;
902
921
}
903
922
 
904
 
static WRITE8_HANDLER( flash_w )
 
923
WRITE8_MEMBER(subsino_state::flash_w)
905
924
{
906
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
907
 
        switch(state->m_flash_packet_start)
 
925
        switch(m_flash_packet_start)
908
926
        {
909
927
                case 0:
910
 
                        state->m_flash_packet = data;
911
 
                        if((state->m_flash_packet & 0xf8) == 0xd0)
912
 
                                state->m_flash_packet_start = 1; //start of packet
 
928
                        m_flash_packet = data;
 
929
                        if((m_flash_packet & 0xf8) == 0xd0)
 
930
                                m_flash_packet_start = 1; //start of packet
913
931
                        break;
914
932
                case 1:
915
 
                        state->m_flash_packet = data;
916
 
                        if((state->m_flash_packet & 0xf8) == 0xe0)
917
 
                                state->m_flash_packet_start = 0; //end of packet
 
933
                        m_flash_packet = data;
 
934
                        if((m_flash_packet & 0xf8) == 0xe0)
 
935
                                m_flash_packet_start = 0; //end of packet
918
936
                        else
919
 
                                state->m_flash_val = data;
 
937
                                m_flash_val = data;
920
938
                        break;
921
939
        }
922
940
}
923
941
 
924
 
static ADDRESS_MAP_START( victor5_map, AS_PROGRAM, 8 )
 
942
static ADDRESS_MAP_START( victor5_map, AS_PROGRAM, 8, subsino_state )
925
943
        AM_IMPORT_FROM( victor21_map )
926
 
        AM_RANGE( 0x0900a, 0x0900a ) AM_READWRITE( flash_r, flash_w )
 
944
        AM_RANGE( 0x0900a, 0x0900a ) AM_READWRITE(flash_r, flash_w )
927
945
        AM_RANGE( 0x0900b, 0x0900b ) AM_READNOP //"flash" status, bit 0
928
946
ADDRESS_MAP_END
929
947
 
930
948
 
931
 
static READ8_HANDLER( hwcheck_r )
 
949
READ8_MEMBER(subsino_state::hwcheck_r)
932
950
{
933
951
        /* Wants this at POST otherwise an "Hardware Error" occurs. */
934
952
        return 0x55;
935
953
}
936
954
 
937
 
static ADDRESS_MAP_START( crsbingo_map, AS_PROGRAM, 8 )
 
955
static ADDRESS_MAP_START( crsbingo_map, AS_PROGRAM, 8, subsino_state )
938
956
        AM_RANGE( 0x09800, 0x09fff ) AM_RAM
939
957
 
940
958
        AM_RANGE( 0x09000, 0x09000 ) AM_READ_PORT( "SW1" )
942
960
        AM_RANGE( 0x09002, 0x09002 ) AM_READ_PORT( "INA" )
943
961
        AM_RANGE( 0x09003, 0x09003 ) AM_READ_PORT( "INB" )
944
962
        AM_RANGE( 0x09004, 0x09004 ) AM_READ_PORT( "INC" )
945
 
        AM_RANGE( 0x09005, 0x09005 ) AM_WRITE( subsino_out_a_w )
 
963
        AM_RANGE( 0x09005, 0x09005 ) AM_WRITE(subsino_out_a_w )
946
964
 
947
965
        AM_RANGE( 0x09008, 0x09008 ) AM_READ_PORT( "SW4" )
948
 
        AM_RANGE( 0x09009, 0x09009 ) AM_READ_PORT( "SW3" )      // AM_WRITE( subsino_out_a_w )
949
 
        AM_RANGE( 0x0900a, 0x0900a ) AM_READWRITE( hwcheck_r, subsino_out_b_w )
 
966
        AM_RANGE( 0x09009, 0x09009 ) AM_READ_PORT( "SW3" )      // AM_WRITE(subsino_out_a_w )
 
967
        AM_RANGE( 0x0900a, 0x0900a ) AM_READWRITE(hwcheck_r, subsino_out_b_w )
950
968
 
951
 
        AM_RANGE( 0x09010, 0x09010 ) AM_READWRITE( flash_r, flash_w )
 
969
        AM_RANGE( 0x09010, 0x09010 ) AM_READWRITE(flash_r, flash_w )
952
970
//  AM_RANGE( 0x09011, 0x09011 ) //"flash" status, bit 0
953
971
//  AM_RANGE( 0x0900c, 0x0900c ) AM_READ_PORT( "INC" )
954
 
        AM_RANGE( 0x0900c, 0x0900d ) AM_DEVWRITE( "ymsnd", ym2413_w )
955
 
 
956
 
//  AM_RANGE( 0x09018, 0x09018 ) AM_DEVWRITE_MODERN("oki", okim6295_device, write)
957
 
 
958
 
//  AM_RANGE( 0x0900d, 0x0900d ) AM_WRITE( subsino_tiles_offset_w )
 
972
        AM_RANGE( 0x0900c, 0x0900d ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w )
 
973
 
 
974
//  AM_RANGE( 0x09018, 0x09018 ) AM_DEVWRITE("oki", okim6295_device, write)
 
975
 
 
976
//  AM_RANGE( 0x0900d, 0x0900d ) AM_WRITE(subsino_tiles_offset_w )
959
977
 
960
978
        AM_RANGE( 0x07800, 0x07fff ) AM_RAM
961
 
        AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE_MEMBER(subsino_state, m_videoram )
962
 
        AM_RANGE( 0x08800, 0x08fff ) AM_RAM_WRITE( subsino_colorram_w ) AM_BASE_MEMBER(subsino_state, m_colorram )
 
979
        AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE(subsino_videoram_w ) AM_SHARE("videoram")
 
980
        AM_RANGE( 0x08800, 0x08fff ) AM_RAM_WRITE(subsino_colorram_w ) AM_SHARE("colorram")
963
981
 
964
982
        AM_RANGE( 0x00000, 0x8fff ) AM_ROM //overlap unmapped regions
965
983
 
967
985
 
968
986
ADDRESS_MAP_END
969
987
 
970
 
static WRITE8_HANDLER( subsino_out_c_w )
 
988
WRITE8_MEMBER(subsino_state::subsino_out_c_w)
971
989
{
972
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
973
990
        // not 100% sure on this
974
991
 
975
992
        // ???? eccc
976
993
        // e = enable reels?
977
994
        // c = reel colour bank?
978
 
        state->m_out_c = data;
 
995
        m_out_c = data;
979
996
 
980
 
        state->m_reel1_tilemap->mark_all_dirty();
981
 
        state->m_reel2_tilemap->mark_all_dirty();
982
 
        state->m_reel3_tilemap->mark_all_dirty();
 
997
        m_reel1_tilemap->mark_all_dirty();
 
998
        m_reel2_tilemap->mark_all_dirty();
 
999
        m_reel3_tilemap->mark_all_dirty();
983
1000
//  popmessage("data %02x\n",data);
984
1001
}
985
1002
 
986
 
static ADDRESS_MAP_START( tisub_map, AS_PROGRAM, 8 )
 
1003
static ADDRESS_MAP_START( tisub_map, AS_PROGRAM, 8, subsino_state )
987
1004
        AM_RANGE( 0x09800, 0x09fff ) AM_RAM
988
1005
 
989
1006
        AM_RANGE( 0x09000, 0x09000 ) AM_READ_PORT( "SW1" )
995
1012
        AM_RANGE( 0x09006, 0x09006 ) AM_READ_PORT( "INB" )
996
1013
 
997
1014
        /* 0x09008: is marked as OUTPUT C in the test mode. */
998
 
        AM_RANGE( 0x09008, 0x09008 ) AM_WRITE( subsino_out_c_w )
999
 
        AM_RANGE( 0x09009, 0x09009 ) AM_WRITE( subsino_out_b_w )
1000
 
        AM_RANGE( 0x0900a, 0x0900a ) AM_WRITE( subsino_out_a_w )
 
1015
        AM_RANGE( 0x09008, 0x09008 ) AM_WRITE(subsino_out_c_w )
 
1016
        AM_RANGE( 0x09009, 0x09009 ) AM_WRITE(subsino_out_b_w )
 
1017
        AM_RANGE( 0x0900a, 0x0900a ) AM_WRITE(subsino_out_a_w )
1001
1018
 
1002
1019
        AM_RANGE( 0x0900c, 0x0900c ) AM_READ_PORT( "INC" )
1003
1020
 
1004
 
        AM_RANGE( 0x09016, 0x09017 ) AM_DEVWRITE( "ymsnd", ym3812_w )
1005
 
 
1006
 
//  AM_RANGE( 0x0900c, 0x0900c ) AM_DEVWRITE_MODERN("oki", okim6295_device, write)
1007
 
 
1008
 
        AM_RANGE( 0x0901b, 0x0901b ) AM_WRITE( subsino_tiles_offset_w )
 
1021
        AM_RANGE( 0x09016, 0x09017 ) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w )
 
1022
 
 
1023
//  AM_RANGE( 0x0900c, 0x0900c ) AM_DEVWRITE("oki", okim6295_device, write)
 
1024
 
 
1025
        AM_RANGE( 0x0901b, 0x0901b ) AM_WRITE(subsino_tiles_offset_w )
1009
1026
 
1010
1027
        AM_RANGE( 0x07800, 0x07fff ) AM_RAM
1011
 
        AM_RANGE( 0x08800, 0x08fff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE_MEMBER(subsino_state, m_videoram )
1012
 
        AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE( subsino_colorram_w ) AM_BASE_MEMBER(subsino_state, m_colorram )
 
1028
        AM_RANGE( 0x08800, 0x08fff ) AM_RAM_WRITE(subsino_videoram_w ) AM_SHARE("videoram")
 
1029
        AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE(subsino_colorram_w ) AM_SHARE("colorram")
1013
1030
 
1014
1031
        AM_RANGE( 0x00000, 0x0bfff ) AM_ROM // overlap unmapped regions
1015
1032
        AM_RANGE( 0x10000, 0x13fff ) AM_ROM
1016
1033
        AM_RANGE( 0x14000, 0x14fff ) AM_ROM // reads the card face data here (see rom copy in rom loading)
1017
1034
 
1018
 
        AM_RANGE( 0x150c0, 0x150ff ) AM_RAM AM_BASE_MEMBER(subsino_state, m_reel3_scroll)
1019
 
        AM_RANGE( 0x15140, 0x1517f ) AM_RAM AM_BASE_MEMBER(subsino_state, m_reel2_scroll)
1020
 
        AM_RANGE( 0x15180, 0x151bf ) AM_RAM AM_BASE_MEMBER(subsino_state, m_reel1_scroll)
 
1035
        AM_RANGE( 0x150c0, 0x150ff ) AM_RAM AM_SHARE("reel3_scroll")
 
1036
        AM_RANGE( 0x15140, 0x1517f ) AM_RAM AM_SHARE("reel2_scroll")
 
1037
        AM_RANGE( 0x15180, 0x151bf ) AM_RAM AM_SHARE("reel1_scroll")
1021
1038
 
1022
 
        AM_RANGE( 0x15800, 0x159ff ) AM_RAM_WRITE(subsino_reel1_ram_w) AM_BASE_MEMBER(subsino_state, m_reel1_ram)
1023
 
        AM_RANGE( 0x15a00, 0x15bff ) AM_RAM_WRITE(subsino_reel2_ram_w) AM_BASE_MEMBER(subsino_state, m_reel2_ram)
1024
 
        AM_RANGE( 0x15c00, 0x15dff ) AM_RAM_WRITE(subsino_reel3_ram_w) AM_BASE_MEMBER(subsino_state, m_reel3_ram)
 
1039
        AM_RANGE( 0x15800, 0x159ff ) AM_RAM_WRITE(subsino_reel1_ram_w) AM_SHARE("reel1_ram")
 
1040
        AM_RANGE( 0x15a00, 0x15bff ) AM_RAM_WRITE(subsino_reel2_ram_w) AM_SHARE("reel2_ram")
 
1041
        AM_RANGE( 0x15c00, 0x15dff ) AM_RAM_WRITE(subsino_reel3_ram_w) AM_SHARE("reel3_ram")
1025
1042
ADDRESS_MAP_END
1026
1043
 
1027
1044
 
1028
 
static WRITE8_HANDLER(colordac_w)
 
1045
WRITE8_MEMBER(subsino_state::colordac_w)
1029
1046
{
1030
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
1031
1047
        switch ( offset )
1032
1048
        {
1033
1049
                case 0:
1034
 
                        state->m_colordac_offs = data * 3;
 
1050
                        m_colordac_offs = data * 3;
1035
1051
                        break;
1036
1052
 
1037
1053
                case 1:
1038
 
                        state->m_stisub_colorram[state->m_colordac_offs] = data;
1039
 
                        palette_set_color_rgb(space->machine(), state->m_colordac_offs/3,
1040
 
                                pal6bit(state->m_stisub_colorram[(state->m_colordac_offs/3)*3+0]),
1041
 
                                pal6bit(state->m_stisub_colorram[(state->m_colordac_offs/3)*3+1]),
1042
 
                                pal6bit(state->m_stisub_colorram[(state->m_colordac_offs/3)*3+2])
 
1054
                        m_stisub_colorram[m_colordac_offs] = data;
 
1055
                        palette_set_color_rgb(machine(), m_colordac_offs/3,
 
1056
                                pal6bit(m_stisub_colorram[(m_colordac_offs/3)*3+0]),
 
1057
                                pal6bit(m_stisub_colorram[(m_colordac_offs/3)*3+1]),
 
1058
                                pal6bit(m_stisub_colorram[(m_colordac_offs/3)*3+2])
1043
1059
                        );
1044
 
                        state->m_colordac_offs = (state->m_colordac_offs+1) % (256*3);
 
1060
                        m_colordac_offs = (m_colordac_offs+1) % (256*3);
1045
1061
                        break;
1046
1062
 
1047
1063
                case 2:
1054
1070
}
1055
1071
 
1056
1072
 
1057
 
static WRITE8_HANDLER( stisub_out_c_w )
 
1073
WRITE8_MEMBER(subsino_state::stisub_out_c_w)
1058
1074
{
1059
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
1060
 
        state->m_stisub_outc = data;
 
1075
        m_stisub_outc = data;
1061
1076
 
1062
1077
}
1063
1078
 
1064
1079
// this stuff is banked..
1065
1080
// not 100% sure on the bank bits.. other bits are also set
1066
 
static WRITE8_HANDLER( reel_scrollattr_w )
 
1081
WRITE8_MEMBER(subsino_state::reel_scrollattr_w)
1067
1082
{
1068
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
1069
 
        if (state->m_stisub_outc&0x20)
 
1083
        if (m_stisub_outc&0x20)
1070
1084
        {
1071
1085
                if (offset<0x200)
1072
1086
                {
1073
 
                        state->m_reel1_attr[offset&0x1ff] = data;
 
1087
                        m_reel1_attr[offset&0x1ff] = data;
1074
1088
                }
1075
1089
                else if (offset<0x400)
1076
1090
                {
1077
 
                        state->m_reel2_attr[offset&0x1ff] = data;
 
1091
                        m_reel2_attr[offset&0x1ff] = data;
1078
1092
                }
1079
1093
                else if (offset<0x600)
1080
1094
                {
1081
 
                        state->m_reel3_attr[offset&0x1ff] = data;
 
1095
                        m_reel3_attr[offset&0x1ff] = data;
1082
1096
                }
1083
1097
                else
1084
1098
                {
1095
1109
                }
1096
1110
                else if (offset<0x80)
1097
1111
                {
1098
 
                        state->m_reel2_scroll[offset&0x3f] = data;
 
1112
                        m_reel2_scroll[offset&0x3f] = data;
1099
1113
                }
1100
1114
                else if (offset<0xc0)
1101
1115
                {
1102
 
                        state->m_reel1_scroll[offset&0x3f] = data;
 
1116
                        m_reel1_scroll[offset&0x3f] = data;
1103
1117
                }
1104
1118
                else
1105
1119
                {
1106
 
                        state->m_reel3_scroll[offset&0x3f] = data;
 
1120
                        m_reel3_scroll[offset&0x3f] = data;
1107
1121
                }
1108
1122
        }
1109
1123
}
1110
1124
 
1111
 
static READ8_HANDLER( reel_scrollattr_r )
 
1125
READ8_MEMBER(subsino_state::reel_scrollattr_r)
1112
1126
{
1113
 
        subsino_state *state = space->machine().driver_data<subsino_state>();
1114
 
        return state->m_reel1_attr[offset];
 
1127
        return m_reel1_attr[offset];
1115
1128
}
1116
1129
 
1117
 
static ADDRESS_MAP_START( stisub_map, AS_PROGRAM, 8 )
 
1130
static ADDRESS_MAP_START( stisub_map, AS_PROGRAM, 8, subsino_state )
1118
1131
        AM_RANGE( 0x00000, 0x0bfff ) AM_ROM
1119
1132
 
1120
1133
        AM_RANGE( 0x0c000, 0x0cfff ) AM_RAM
1127
1140
        AM_RANGE( 0x0d005, 0x0d005 ) AM_READ_PORT( "INB" )
1128
1141
        AM_RANGE( 0x0d006, 0x0d006 ) AM_READ_PORT( "INA" )
1129
1142
 
1130
 
        AM_RANGE( 0x0d008, 0x0d008 ) AM_WRITE( stisub_out_c_w )
 
1143
        AM_RANGE( 0x0d008, 0x0d008 ) AM_WRITE(stisub_out_c_w )
1131
1144
 
1132
 
        AM_RANGE( 0x0d009, 0x0d009 ) AM_WRITE( subsino_out_b_w )
1133
 
        AM_RANGE( 0x0d00a, 0x0d00a ) AM_WRITE( subsino_out_a_w )
 
1145
        AM_RANGE( 0x0d009, 0x0d009 ) AM_WRITE(subsino_out_b_w )
 
1146
        AM_RANGE( 0x0d00a, 0x0d00a ) AM_WRITE(subsino_out_a_w )
1134
1147
 
1135
1148
        AM_RANGE( 0x0d00c, 0x0d00c ) AM_READ_PORT( "INC" )
1136
1149
 
1137
1150
        AM_RANGE( 0x0d010, 0x0d013 ) AM_WRITE(colordac_w)
1138
1151
 
1139
 
        AM_RANGE( 0x0d016, 0x0d017 ) AM_DEVWRITE( "ymsnd", ym3812_w )
1140
 
 
1141
 
//  AM_RANGE( 0x0d01b, 0x0d01b ) AM_WRITE( subsino_tiles_offset_w )
1142
 
 
1143
 
        AM_RANGE( 0x0e000, 0x0e7ff ) AM_RAM_WRITE( subsino_colorram_w ) AM_BASE_MEMBER(subsino_state, m_colorram )
1144
 
        AM_RANGE( 0x0e800, 0x0efff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE_MEMBER(subsino_state, m_videoram )
 
1152
        AM_RANGE( 0x0d016, 0x0d017 ) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w )
 
1153
 
 
1154
//  AM_RANGE( 0x0d01b, 0x0d01b ) AM_WRITE(subsino_tiles_offset_w )
 
1155
 
 
1156
        AM_RANGE( 0x0e000, 0x0e7ff ) AM_RAM_WRITE(subsino_colorram_w ) AM_SHARE("colorram")
 
1157
        AM_RANGE( 0x0e800, 0x0efff ) AM_RAM_WRITE(subsino_videoram_w ) AM_SHARE("videoram")
1145
1158
 
1146
1159
        AM_RANGE( 0xf000, 0xf7ff ) AM_READWRITE(reel_scrollattr_r, reel_scrollattr_w)
1147
1160
 
1148
 
        AM_RANGE( 0xf800, 0xf9ff ) AM_RAM_WRITE(subsino_reel1_ram_w) AM_BASE_MEMBER(subsino_state, m_reel1_ram)
1149
 
        AM_RANGE( 0xfa00, 0xfbff ) AM_RAM_WRITE(subsino_reel2_ram_w) AM_BASE_MEMBER(subsino_state, m_reel2_ram)
1150
 
        AM_RANGE( 0xfc00, 0xfdff ) AM_RAM_WRITE(subsino_reel3_ram_w) AM_BASE_MEMBER(subsino_state, m_reel3_ram)
 
1161
        AM_RANGE( 0xf800, 0xf9ff ) AM_RAM_WRITE(subsino_reel1_ram_w) AM_SHARE("reel1_ram")
 
1162
        AM_RANGE( 0xfa00, 0xfbff ) AM_RAM_WRITE(subsino_reel2_ram_w) AM_SHARE("reel2_ram")
 
1163
        AM_RANGE( 0xfc00, 0xfdff ) AM_RAM_WRITE(subsino_reel3_ram_w) AM_SHARE("reel3_ram")
1151
1164
ADDRESS_MAP_END
1152
1165
 
1153
1166
 
1155
1168
                        Magic Train (Clear NVRAM ROM?)
1156
1169
***************************************************************************/
1157
1170
 
1158
 
static ADDRESS_MAP_START( mtrainnv_map, AS_PROGRAM, 8 )
 
1171
static ADDRESS_MAP_START( mtrainnv_map, AS_PROGRAM, 8, subsino_state )
1159
1172
        AM_RANGE( 0x00000, 0x0bfff ) AM_ROM
1160
1173
 
1161
1174
        AM_RANGE( 0x0c000, 0x0cfff ) AM_RAM
1177
1190
 
1178
1191
//  AM_RANGE( 0x0d012, 0x0d012 ) AM_WRITE
1179
1192
 
1180
 
        AM_RANGE( 0x0d016, 0x0d017 ) AM_DEVWRITE( "ymsnd", ym3812_w )
1181
 
 
1182
 
//  AM_RANGE( 0x0d018, 0x0d018 ) AM_DEVREADWRITE_MODERN("oki", okim6295_device, read, write)
1183
 
 
1184
 
        AM_RANGE( 0x0e000, 0x0e7ff ) AM_RAM_WRITE( subsino_colorram_w ) AM_BASE_MEMBER(subsino_state, m_colorram )
1185
 
        AM_RANGE( 0x0e800, 0x0efff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE_MEMBER(subsino_state, m_videoram )
 
1193
        AM_RANGE( 0x0d016, 0x0d017 ) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w )
 
1194
 
 
1195
//  AM_RANGE( 0x0d018, 0x0d018 ) AM_DEVREADWRITE("oki", okim6295_device, read, write)
 
1196
 
 
1197
        AM_RANGE( 0x0e000, 0x0e7ff ) AM_RAM_WRITE(subsino_colorram_w ) AM_SHARE("colorram")
 
1198
        AM_RANGE( 0x0e800, 0x0efff ) AM_RAM_WRITE(subsino_videoram_w ) AM_SHARE("videoram")
1186
1199
 
1187
1200
        AM_RANGE( 0xf000, 0xf7ff ) AM_READWRITE(reel_scrollattr_r, reel_scrollattr_w)
1188
1201
 
1189
 
        AM_RANGE( 0xf800, 0xf9ff ) AM_RAM_WRITE(subsino_reel1_ram_w) AM_BASE_MEMBER(subsino_state, m_reel1_ram)
1190
 
        AM_RANGE( 0xfa00, 0xfbff ) AM_RAM_WRITE(subsino_reel2_ram_w) AM_BASE_MEMBER(subsino_state, m_reel2_ram)
1191
 
        AM_RANGE( 0xfc00, 0xfdff ) AM_RAM_WRITE(subsino_reel3_ram_w) AM_BASE_MEMBER(subsino_state, m_reel3_ram)
 
1202
        AM_RANGE( 0xf800, 0xf9ff ) AM_RAM_WRITE(subsino_reel1_ram_w) AM_SHARE("reel1_ram")
 
1203
        AM_RANGE( 0xfa00, 0xfbff ) AM_RAM_WRITE(subsino_reel2_ram_w) AM_SHARE("reel2_ram")
 
1204
        AM_RANGE( 0xfc00, 0xfdff ) AM_RAM_WRITE(subsino_reel3_ram_w) AM_SHARE("reel3_ram")
1192
1205
ADDRESS_MAP_END
1193
1206
 
1194
1207
 
1195
 
static ADDRESS_MAP_START( subsino_iomap, AS_IO, 8 )
 
1208
static ADDRESS_MAP_START( subsino_iomap, AS_IO, 8, subsino_state )
1196
1209
        AM_RANGE( 0x0000, 0x003f ) AM_RAM // internal regs
1197
1210
ADDRESS_MAP_END
1198
1211
 
3349
3362
 
3350
3363
static DRIVER_INIT( smoto16 )
3351
3364
{
3352
 
        UINT8 *rom = machine.region( "maincpu" )->base();
 
3365
        UINT8 *rom = machine.root_device().memregion( "maincpu" )->base();
3353
3366
        rom[0x12d0] = 0x20;     // "ERROR 951010"
3354
3367
}
3355
3368
 
3499
3512
 
3500
3513
static DRIVER_INIT( smoto20 )
3501
3514
{
3502
 
        UINT8 *rom = machine.region( "maincpu" )->base();
 
3515
        UINT8 *rom = machine.root_device().memregion( "maincpu" )->base();
3503
3516
        rom[0x12e1] = 0x20;     // "ERROR 951010"
3504
3517
}
3505
3518
 
3506
3519
static DRIVER_INIT( tisub )
3507
3520
{
3508
 
        UINT8 *rom = machine.region( "maincpu" )->base();
 
3521
        UINT8 *rom = machine.root_device().memregion( "maincpu" )->base();
3509
3522
 
3510
3523
        DRIVER_INIT_CALL(victor5);
3511
3524
 
3520
3533
 
3521
3534
static DRIVER_INIT( tisuba )
3522
3535
{
3523
 
        UINT8 *rom = machine.region( "maincpu" )->base();
 
3536
        UINT8 *rom = machine.root_device().memregion( "maincpu" )->base();
3524
3537
 
3525
3538
        DRIVER_INIT_CALL(victor5);
3526
3539
 
3536
3549
static DRIVER_INIT( stisub )
3537
3550
{
3538
3551
        subsino_state *state = machine.driver_data<subsino_state>();
3539
 
        UINT8 *rom = machine.region( "maincpu" )->base();
 
3552
        UINT8 *rom = state->memregion( "maincpu" )->base();
3540
3553
        rom[0x1005] = 0x1d; //patch protection check
3541
3554
        rom[0x7ab] = 0x18; //patch "winning protection" check
3542
3555
        rom[0x957] = 0x18; //patch "losing protection" check
3543
3556
        state->m_stisub_colorram = auto_alloc_array(machine, UINT8, 256*3);
3544
3557
 
3545
 
        state->m_reel1_scroll = auto_alloc_array(machine, UINT8, 0x40);
3546
 
        state->m_reel2_scroll = auto_alloc_array(machine, UINT8, 0x40);
3547
 
        state->m_reel3_scroll = auto_alloc_array(machine, UINT8, 0x40);
 
3558
        state->m_reel1_scroll.allocate(0x40);
 
3559
        state->m_reel2_scroll.allocate(0x40);
 
3560
        state->m_reel3_scroll.allocate(0x40);
3548
3561
 
3549
3562
        state->m_reel1_attr = auto_alloc_array(machine, UINT8, 0x200);
3550
3563
        state->m_reel2_attr = auto_alloc_array(machine, UINT8, 0x200);
3556
3569
        subsino_state *state = machine.driver_data<subsino_state>();
3557
3570
        state->m_stisub_colorram = auto_alloc_array(machine, UINT8, 256*3);
3558
3571
 
3559
 
        state->m_reel1_scroll = auto_alloc_array(machine, UINT8, 0x40);
3560
 
        state->m_reel2_scroll = auto_alloc_array(machine, UINT8, 0x40);
3561
 
        state->m_reel3_scroll = auto_alloc_array(machine, UINT8, 0x40);
 
3572
        state->m_reel1_scroll.allocate(0x40);
 
3573
        state->m_reel2_scroll.allocate(0x40);
 
3574
        state->m_reel3_scroll.allocate(0x40);
3562
3575
 
3563
3576
        state->m_reel1_attr = auto_alloc_array(machine, UINT8, 0x200);
3564
3577
        state->m_reel2_attr = auto_alloc_array(machine, UINT8, 0x200);