~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "driver.h"
 
2
#include "megadriv.h"
 
3
 
 
4
/* Sunset Riders bootleg - based on Genesis / Megadrive version
 
5
 
 
6
 - coinage system is protected?  (by what?)
 
7
 
 
8
 - title raster effect is broken (bug in megadrive code, happens with normal set too)
 
9
 
 
10
 */
 
11
 
 
12
ROM_START( ssgbl )
 
13
        ROM_REGION( 0x400000, "maincpu", 0 ) /* 68000 Code */
 
14
        ROM_LOAD16_BYTE( "u1", 0x000001, 0x020000,  CRC(c59f33bd) SHA1(bd5bce7698a70ea005b79ab34bcdb056872ef980) )
 
15
        ROM_LOAD16_BYTE( "u2", 0x000000, 0x020000,  CRC(9125c054) SHA1(c73bdeb6b11c59d2b5f5968959b02697957ca894) )
 
16
        ROM_LOAD16_BYTE( "u3", 0x040001, 0x020000,  CRC(0fee0fbe) SHA1(001e0fda12707512aad537e533acf28e726e6107) )
 
17
        ROM_LOAD16_BYTE( "u4", 0x040000, 0x020000,  CRC(fc2aed41) SHA1(27eb3957f5ed26ee5276523b1df46fa7eb298e1f))
 
18
ROM_END
 
19
 
 
20
 
 
21
static READ16_HANDLER( sunsetbl_r )
 
22
{
 
23
        return mame_rand(space->machine);
 
24
}
 
25
 
 
26
static READ16_HANDLER( sunsetbl2_r )
 
27
{
 
28
        return 0x0000;//mame_rand(space->machine);
 
29
}
 
30
 
 
31
static DRIVER_INIT( sunsetbl )
 
32
{
 
33
        int i;
 
34
        UINT8* rom = memory_region(machine, "maincpu");
 
35
 
 
36
        /* todo, reduce bitswaps to single swap */
 
37
        for (i=0x00001;i<0x40000;i+=2)
 
38
        {
 
39
                rom[i] = rom[i] ^ 0xff;
 
40
                rom[i] = BITSWAP8(rom[i], 7,6,5,4,3,2,1,0 );
 
41
                rom[i] = BITSWAP8(rom[i], 1,6,5,4,3,2,7,0 );
 
42
                rom[i] = BITSWAP8(rom[i], 7,6,5,3,4,2,1,0 );
 
43
                rom[i] = BITSWAP8(rom[i], 7,6,5,2,3,4,1,0 );
 
44
                rom[i] = BITSWAP8(rom[i], 5,6,7,4,3,2,1,0 );
 
45
                rom[i] = BITSWAP8(rom[i], 7,5,6,4,3,2,1,0 );
 
46
        }
 
47
 
 
48
        for (i=0x40001;i<0x80000;i+=2)
 
49
        {
 
50
                rom[i] = BITSWAP8(rom[i], 7,6,5,4,3,2,1,0 );
 
51
                rom[i] = BITSWAP8(rom[i], 7,6,1,4, 3,2,5,0);
 
52
                rom[i] = BITSWAP8(rom[i], 7,6,5,4,0,2,1,3 );
 
53
                rom[i] = BITSWAP8(rom[i], 2,6,5,4,3,7,1,0 );
 
54
                rom[i] = BITSWAP8(rom[i], 7,6,5,0,3,2,1,4 );
 
55
                rom[i] = BITSWAP8(rom[i], 7,6,5,1,3,2,4,0 );
 
56
 
 
57
        }
 
58
 
 
59
        memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x770070, 0x77007f, 0, 0, sunsetbl_r);
 
60
        memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa10006, 0xa10007, 0, 0, sunsetbl2_r); // coins??
 
61
 
 
62
        /* patch the startup and boot vector?! */
 
63
        rom[0x01] = 0x00;
 
64
        rom[0x00] = 0xff;
 
65
        rom[0x03] = 0xff;
 
66
        rom[0x02] = 0x00;
 
67
 
 
68
        rom[0x06] = 0xd2;
 
69
        rom[0x07] = 0x00;
 
70
 
 
71
        DRIVER_INIT_CALL(megadriv);
 
72
}
 
73
 
 
74
GAME( 1993, ssgbl ,  0,   megadriv,    megadriv,       sunsetbl,  ROT0,   "bootleg", "Sunset Riders (bootleg of Megadrive version)", GAME_NOT_WORKING) // playable, but coin system is broken