~ubuntu-branches/ubuntu/precise/mame/precise-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Cesare Falco
  • Date: 2011-11-30 18:50:10 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111130185010-02hcxybht1mn082w
Tags: 0.144-0ubuntu1
* New upstream release (LP: #913550)
* mame.install:
  - Added artwork/ images to be used with -effect switch
  - Be more selective with hash/ contents
* contrib/mame.ini: added /usr/share/games/mame/artwork/ to artpath

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    This method works with the following games:
47
47
    topgear  500
48
48
 
 
49
    Method 3 :
 
50
    * Key in with the Jackpot Key followed by the Audit Key
 
51
    * Press PB4, PB5 and PB6 keys simultaneously (Z+X+C keys by default)
 
52
    * Press Service (default A) 4 times until you are in the Setup Screen, with Printer Pay Limit.
 
53
    * Press Bet 2 (default D) to change the Jackpot Win Limit. A higher value is better (3000 max)
 
54
    * Key out both the Jackpot and Audit Keys
 
55
 
 
56
    This method works with the following games:
 
57
    eforest
 
58
    arcwins
 
59
 
49
60
    Technical Notes:
50
61
 
51
62
    68B09EP Motorola Processor
124
135
    Remapped the video poker buttons; holds are now keys S,D,F,G,H
125
136
    Un-mapped the unused inputs
126
137
 
 
138
    06/08/2011 - FrasheR
 
139
    Implement 'Printer Fault' fix.
 
140
 
 
141
    08/08/2011 - FrasheR
 
142
    Implement Port '5005' for eforest. Changing this only works after performing memory reset.(delete nvram file)
 
143
    First 3 bits
 
144
    000 = $100 / Credit
 
145
    001 = 50c  / Credit
 
146
    010 = $5   / Credit
 
147
    011 = 10c  / Credit
 
148
    100 = $10  / Credit
 
149
    101 = 25c  / Credit
 
150
    110 = $1   / Credit
 
151
    111 = 5c   / Credit (default)
 
152
    Implement Bill Acceptor for eforest to add credits.
 
153
    arcwins and eforest are now working.
 
154
 
 
155
    ****************************************************************************
 
156
 
127
157
    When the games first power on (or when reset), they will display a TILT message on the screen. This doesn't affect gameplay, and if there are no pending errors the game should coin up and/or play immediately.
128
158
    The tilt message will also appear when an error code is displayed, such as the main door being opened/closed, or a hardware error/fault (such as hopper empty, coin yoyo, printer errors; none of which should happen MAME however).
129
159
    The tilt message will disappear if you turn the Audit Key on and off, or after you start playing.
146
176
 
147
177
    3. arcwins, eforest, fhunter, fhuntera and cgold2 do not work (these US-based games require note acceptor and printer support).
148
178
     - fhunter, fhuntera and cgold2 need DIP 5201-5 enabled to work (if disabled, it acts as a 'freeze' switch).
149
 
     - The US games do work as such, however the unemulated items cause the games to end up disabled with the error (most notably, 70 - Printer Fault).
 
179
     - The US games do work as such, however the unemulated items cause the games to end up disabled with the error (most notably, 70 - Printer Fault). ** Fixed 06/08/2011 **
150
180
     - These games possibly need a set chip, as it is currently impossible to set up denominations; the machines are stuck in $100 per credit mode, which is a highly unusual setting.
151
181
     - If you turn PTRHOM off (with PTRTAC on), this will give you a short amount of time to enter the audit menu, however the games will still lock up with a printer fault.
152
182
        To temporarily get around the lockup, keep triggering the main door switch (hit M twice). The machine will keep locking up every 2-3 seconds, however it is usable. If PTRHOM is on, the lockup happens immediately.
182
212
    907D    BITA $1800  ( crtc )
183
213
    9080    BNE  $907D  ; is zero
184
214
    9082    BITA $1800
185
 
    9085    BEQ  $9082  ; branches to 9082 indefinately, value is always zero.
 
215
    9085    BEQ  $9082  ; branches to 9082 indefinitely, value is always zero.
186
216
    9087    LDA  #$40
187
217
 
188
218
    If the PC ( program counter ) is set to 9087 then the game runs.
249
279
        UINT8 m_ripple;
250
280
        int m_hopper_motor;
251
281
        int m_inscrd;
 
282
        int m_insnote;
252
283
        int m_cashcade_c;
 
284
        int m_printer_motor;
253
285
};
254
286
 
255
287
/* Partial Cashcade protocol */
339
371
        {
340
372
        return 0;
341
373
        }
342
 
        return state->m_cgdrsw = input_port_read(space->machine(), "CGDRSW");
 
374
        return state->m_cgdrsw = input_port_read(space->machine(), "5005");
343
375
}
344
376
 
345
377
static READ8_HANDLER(cgdrr)
365
397
        aristmk4_state *state = space->machine().driver_data<aristmk4_state>();
366
398
 
367
399
        state->m_u3_p0_w = data;
 
400
 
 
401
        if ((data&0x80)==0) //Printer Motor Off
 
402
        {
 
403
                state->m_printer_motor = 1; // Set this so the next read of u3_p3 returns PTRHOM as OFF.
 
404
        }
 
405
 
368
406
        //logerror("u3_p0_w: %02X\n",state->m_u3_p0_w);
369
407
}
370
408
 
395
433
        return u3_p2_ret;
396
434
}
397
435
 
 
436
static READ8_HANDLER(u3_p3)
 
437
{
 
438
    aristmk4_state *state = space->machine().driver_data<aristmk4_state>();
 
439
 
 
440
    int u3_p3_ret= input_port_read(space->machine(), "5003");
 
441
 
 
442
    if ((state->m_printer_motor)==1) // Printer Motor Off
 
443
 
 
444
    {
 
445
        u3_p3_ret = u3_p3_ret^0x80; // Printer Home Off
 
446
          state->m_printer_motor=0;
 
447
 
 
448
    }
 
449
 
 
450
    return u3_p3_ret;
 
451
 
 
452
}
 
453
 
 
454
static TIMER_CALLBACK(note_input_reset)
 
455
{
 
456
        aristmk4_state *state = machine.driver_data<aristmk4_state>();
 
457
        state->m_insnote=0; //reset note input after 150msec
 
458
}
 
459
 
 
460
static READ8_HANDLER(bv_p0)
 
461
{
 
462
        aristmk4_state *state = space->machine().driver_data<aristmk4_state>();
 
463
 
 
464
        int bv_p0_ret=0x00;
 
465
 
 
466
        switch(state->m_insnote)
 
467
        {
 
468
        case 0x01:
 
469
                bv_p0_ret=input_port_read(space->machine(), "NS")+0x81; //check note selector
 
470
                state->m_insnote++;
 
471
                break;
 
472
        case 0x02:
 
473
                bv_p0_ret=0x89;
 
474
                state->m_insnote++;
 
475
                space->machine().scheduler().timer_set(attotime::from_msec(150), FUNC(note_input_reset));
 
476
                break;
 
477
        default:
 
478
                break; //timer will reset the input
 
479
        }
 
480
 
 
481
        return bv_p0_ret;
 
482
 
 
483
}
 
484
 
 
485
static READ8_HANDLER(bv_p1)
 
486
{
 
487
        aristmk4_state *state = space->machine().driver_data<aristmk4_state>();
 
488
 
 
489
        int bv_p1_ret=0x00;
 
490
 
 
491
        if (state->m_insnote==0)
 
492
                state->m_insnote=input_port_read(space->machine(), "insertnote");
 
493
 
 
494
        if (state->m_insnote==1)
 
495
                        bv_p1_ret=0x08;
 
496
 
 
497
        if (state->m_insnote==2)
 
498
                        bv_p1_ret=0x08;
 
499
 
 
500
        return bv_p1_ret;
 
501
 
 
502
}
 
503
 
 
504
 
398
505
/******************************************************************************
399
506
 
400
507
PERIPHERAL INTERFACE ADAPTER CONFIGURATION
775
882
 
776
883
        AM_RANGE(0x5000, 0x5000) AM_WRITE(u3_p0)
777
884
        AM_RANGE(0x5002, 0x5002) AM_READ(u3_p2)
778
 
        AM_RANGE(0x5003, 0x5003) AM_READ_PORT("5003")
 
885
        AM_RANGE(0x5003, 0x5003) AM_READ(u3_p3)
779
886
        AM_RANGE(0x5005, 0x5005) AM_READ(ldsw)
780
887
        AM_RANGE(0x500d, 0x500d) AM_READ_PORT("500d")
781
888
        AM_RANGE(0x500e, 0x500e) AM_READ_PORT("500e")
783
890
        AM_RANGE(0x5010, 0x501f) AM_DEVREADWRITE_MODERN("via6522_0",via6522_device,read,write)
784
891
        AM_RANGE(0x5200, 0x5200) AM_READ(cashcade_r)
785
892
        AM_RANGE(0x5201, 0x5201) AM_READ_PORT("5201")
 
893
        AM_RANGE(0x52c0, 0x52c0) AM_READ(bv_p0)
 
894
        AM_RANGE(0x52c1, 0x52c1) AM_READ(bv_p1)
786
895
        AM_RANGE(0x527f, 0x5281) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
787
896
        AM_RANGE(0x5300, 0x5300) AM_READ_PORT("5300")
788
897
        AM_RANGE(0x5380, 0x5383) AM_DEVREADWRITE_MODERN("pia6821_0", pia6821_device, read, write)  // RTC data - PORT A , mechanical meters - PORTB ??
824
933
        AM_RANGE(0x5010, 0x501f) AM_DEVREADWRITE_MODERN("via6522_0",via6522_device,read,write)
825
934
        AM_RANGE(0x5200, 0x5200) AM_READ(cashcade_r)
826
935
        AM_RANGE(0x5201, 0x5201) AM_READ_PORT("5201")
 
936
        AM_RANGE(0x52c0, 0x52c0) AM_READ(bv_p0)
 
937
        AM_RANGE(0x52c1, 0x52c1) AM_READ(bv_p1)
827
938
        AM_RANGE(0x527f, 0x5281) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
828
939
        AM_RANGE(0x5300, 0x5300) AM_READ_PORT("5300")
829
940
        AM_RANGE(0x5380, 0x5383) AM_DEVREADWRITE_MODERN("pia6821_0", pia6821_device, read, write)  // RTC data - PORT A , mechanical meters - PORTB ??
842
953
static INPUT_PORTS_START(aristmk4)
843
954
 
844
955
        PORT_START("via_port_b")
 
956
        PORT_DIPNAME( 0x10, 0x00, "1" )
 
957
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
 
958
        PORT_DIPSETTING(    0x10, DEF_STR( On ) ) PORT_DIPLOCATION("AY:1")
 
959
        PORT_DIPNAME( 0x20, 0x00, "2" )
 
960
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
 
961
        PORT_DIPSETTING(    0x20, DEF_STR( On ) ) PORT_DIPLOCATION("AY:2")
845
962
        PORT_DIPNAME( 0x40, 0x40, "HOPCO1" )
846
963
        PORT_DIPSETTING(    0x40, DEF_STR( On ) ) PORT_DIPLOCATION("AY:3")
847
964
        PORT_DIPNAME( 0x80, 0x00, "CBOPT1" )
886
1003
        PORT_DIPNAME( 0x40, 0x00, "PTRTAC") // printer taco
887
1004
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:7")
888
1005
        PORT_DIPSETTING(    0x40, DEF_STR( On ) )
889
 
        PORT_DIPNAME( 0x80, 0x00, "PTRHOM") // printer home
890
 
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:8")
 
1006
        PORT_DIPNAME( 0x80, 0x80, "PTRHOM") // printer home
 
1007
        PORT_DIPSETTING(    0x80, DEF_STR( On ) ) PORT_DIPLOCATION("5003:8")
 
1008
 
 
1009
        PORT_START("5005")
 
1010
        PORT_DIPNAME( 0x01, 0x01, "CREDIT SELECT 1")
 
1011
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5005:1")
 
1012
        PORT_DIPSETTING(    0x01, DEF_STR( On ) )
 
1013
        PORT_DIPNAME( 0x02, 0x02, "CREDIT SELECT 2")
 
1014
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5005:2")
 
1015
        PORT_DIPSETTING(    0x02, DEF_STR( On ) )
 
1016
        PORT_DIPNAME( 0x04, 0x04, "CREDIT SELECT 3")
 
1017
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5005:3")
 
1018
        PORT_DIPSETTING(    0x04, DEF_STR( On ) )
 
1019
        PORT_DIPNAME( 0x08, 0x00, "5005-4")
 
1020
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5005:4")
 
1021
        PORT_DIPSETTING(    0x08, DEF_STR( On ) )
 
1022
        PORT_DIPNAME( 0x10, 0x10, "CGDRSW") // Logic Door (Security Cage)
 
1023
        PORT_DIPSETTING(    0x10, DEF_STR( On ) ) PORT_DIPLOCATION("5005:5")
 
1024
        PORT_DIPNAME( 0x20, 0x00, "5005-6")
 
1025
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5005:6")
 
1026
        PORT_DIPSETTING(    0x20, DEF_STR( On ) )
 
1027
        PORT_DIPNAME( 0x40, 0x00, "5005-7")
 
1028
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5005:7")
 
1029
        PORT_DIPSETTING(    0x40, DEF_STR( On ) )
 
1030
        PORT_DIPNAME( 0x80, 0x00, "5005-8")
 
1031
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5005:8")
891
1032
        PORT_DIPSETTING(    0x80, DEF_STR( On ) )
892
1033
 
893
1034
        PORT_START("5300")
1001
1142
        PORT_START("insertcoin")
1002
1143
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Insert Credit")
1003
1144
 
 
1145
        PORT_START("insertnote")
 
1146
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_NAME("Insert Note")
 
1147
 
1004
1148
        PORT_START("powerfail")
1005
1149
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Power Fail / Shutdown") PORT_CODE(KEYCODE_COMMA)
1006
1150
 
1007
 
        PORT_START("CGDRSW") // Logic Door (Security Cage)
1008
 
        PORT_DIPNAME( 0x10, 0x10, "CGDRSW" ) PORT_DIPLOCATION("CGDRSW:1")       /* toggle switch */
1009
 
        PORT_DIPSETTING(    0x00, "Open" )
1010
 
        PORT_DIPSETTING(    0x10, "Closed" )
1011
 
 
1012
1151
        /************************************** LINKS ***************************************************************/
1013
1152
 
1014
1153
        PORT_START("LK13")
1133
1272
        PORT_DIPNAME( 0x80, 0x00, "DSW2 - Unconnected" )
1134
1273
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("SW2:8")
1135
1274
        PORT_DIPSETTING(    0x80, DEF_STR( On ) )
 
1275
 
 
1276
        /* Rotary switch for Note selection. I've done it like this so we can use 1 keyboard command (IPT_COIN2) to feed the bill acceptor */
 
1277
        PORT_START("NS")
 
1278
        PORT_DIPNAME( 0x0f, 0x00, "Note Selector" )
 
1279
        PORT_DIPSETTING(    0x00, "$1" )
 
1280
        PORT_DIPSETTING(    0x01, "$2" )
 
1281
        PORT_DIPSETTING(    0x02, "$5" )
 
1282
        PORT_DIPSETTING(    0x03, "$10" )
 
1283
        PORT_DIPSETTING(    0x04, "$20" )
 
1284
        PORT_DIPSETTING(    0x05, "$50" )
 
1285
        PORT_DIPSETTING(    0x06, "$100" )
 
1286
 
1136
1287
INPUT_PORTS_END
1137
1288
 
1138
1289
static INPUT_PORTS_START(3bagflvt)
2160
2311
ROM_END
2161
2312
 
2162
2313
GAMEL( 1985, 86lions,  0,        86lions,  aristmk4, aristmk4, ROT0, "Aristocrat", "86 Lions",                                  GAME_NOT_WORKING, layout_topgear  )
2163
 
GAMEL( 1996, eforest,  0,        aristmk4, eforest,  aristmk4, ROT0, "Aristocrat", "Enchanted Forest (12XF528902, US)",         GAME_NOT_WORKING, layout_eforest  ) // multiple denominations
 
2314
GAMEL( 1996, eforest,  0,        aristmk4, eforest,  aristmk4, ROT0, "Aristocrat", "Enchanted Forest (12XF528902, US)",         0, layout_eforest  ) // multiple denominations
2164
2315
GAMEL( 1995, eforesta, eforest,  aristmk4, aristmk4, aristmk4, ROT0, "Aristocrat", "Enchanted Forest (4VXFC818, NSW)",          0,                layout_aristmk4 ) // 10c, $1 = 10 credits
2165
2316
GAMEL( 1996, eforestb, eforest,  aristmk4, arimk4nz, aristmk4, ROT0, "Aristocrat", "Enchanted Forest (3VXFC5343, New Zealand)", 0,                layout_arimk4nz ) // 5c, $2 = 40 credits
2166
2317
GAMEL( 1996, 3bagflvt, 0,        aristmk4, 3bagflvt, aristmk4, ROT0, "Aristocrat", "3 Bags Full (5VXFC790, Victoria)",          0,                layout_3bagflvt ) // 5c, $1 = 20 credits
2181
2332
GAMEL( 1995, cgold2,   0,        aristmk4, cgold2,   aristmk4, ROT0, "Aristocrat", "Caribbean Gold II (3XF5182H04, US)",        GAME_NOT_WORKING, layout_cgold2   ) // multiple denominations
2182
2333
GAMEL( 1996, fhunter,  0,        aristmk4, fhunter,  aristmk4, ROT0, "Aristocrat", "Fortune Hunter (2XF5196I01, US)",           GAME_NOT_WORKING, layout_fhunter  ) // multiple denominations
2183
2334
GAMEL( 1996, fhuntera, fhunter,  aristmk4, fhunter,  aristmk4, ROT0, "Aristocrat", "Fortune Hunter (2XF5196I02, US)",           GAME_NOT_WORKING, layout_fhunter  ) // multiple denominations
2184
 
GAMEL( 1996, arcwins,  0,        aristmk4, arcwins,  aristmk4, ROT0, "Aristocrat", "Arctic Wins (4XF5227H03, US)",              GAME_NOT_WORKING, layout_arcwins  ) // multiple denominations
 
2335
GAMEL( 1996, arcwins,  0,        aristmk4, arcwins,  aristmk4, ROT0, "Aristocrat", "Arctic Wins (4XF5227H03, US)",              0, layout_arcwins  ) // multiple denominations
2185
2336
GAMEL( 1997, wildone,  0,  aristmk4_poker, wildone,  aristmk4, ROT0, "Aristocrat", "Wild One (4VXEC5357, New Zealand)",         0,                layout_wildone  ) // 20c, $2 = 10 credits, video poker
2186
2337
GAMEL( 1986, gldnpkr,  0,  aristmk4_poker, gldnpkr,  aristmk4, ROT0, "Ainsworth Nominees P.L.", "Golden Poker (8VXEC037, NSW)", 0,                layout_gldnpkr  ) // possibly 20c, 1 coin = 1 credit, video poker