📄 bwidow.c
字号:
/***************************************************************************
Black Widow memory map (preliminary)
0000-04ff RAM
0800 COIN_IN
0a00 IN1
0c00 IN2
2000-27ff Vector generator RAM
5000-7fff ROM
BLACK WIDOW SWITCH SETTINGS (Atari, 1983)
-----------------------------------------
-------------------------------------------------------------------------------
Settings of 8-Toggle Switch on Black Widow CPU PCB (at D4)
8 7 6 5 4 3 2 1 Option
-------------------------------------------------------------------------------
Off Off 1 coin/1 credit <
On On 1 coin/2 credits
On Off 2 coins/1 credit
Off On Free play
Off Off Right coin mechanism x 1 <
On Off Right coin mechanism x 4
Off On Right coin mechanism x 5
On On Right coin mechanism x 6
Off Left coin mechanism x 1 <
On Left coin mechanism x 2
Off Off Off No bonus coins (0)* <
Off On On No bonus coins (6)
On On On No bonus coins (7)
On Off Off For every 2 coins inserted,
logic adds 1 more coin (1)
Off On Off For every 4 coins inserted,
logic adds 1 more coin (2)
On On Off For every 4 coins inserted,
logic adds 2 more coins (3)
Off Off On For every 5 coins inserted,
logic adds 1 more coin (4)
On Off On For every 3 coins inserted,
logic adds 1 more coin (5)
-------------------------------------------------------------------------------
* The numbers in parentheses will appear on the BONUS ADDER line in the
Operator Information Display (Figure 2-1) for these settings.
< Manufacturer's recommended setting
-------------------------------------------------------------------------------
Settings of 8-Toggle Switch on Black Widow CPU PCB (at B4)
8 7 6 5 4 3 2 1 Option
Note: The bits are the exact opposite of the switch numbers - switch 8 is bit 0.
-------------------------------------------------------------------------------
Off Off Maximum start at level 13
On Off Maximum start at level 21 <
Off On Maximum start at level 37
On On Maximum start at level 53
Off Off 3 spiders per game <
On Off 4 spiders per game
Off On 5 spiders per game
On On 6 spiders per game
Off Off Easy game play
On Off Medium game play <
Off On Hard game play
On On Demonstration mode
Off Off Bonus spider every 20,000 points <
On Off Bonus spider every 30,000 points
Off On Bonus spider every 40,000 points
On On No bonus
-------------------------------------------------------------------------------
< Manufacturer's recommended setting
GRAVITAR SWITCH SETTINGS (Atari, 1982)
--------------------------------------
-------------------------------------------------------------------------------
Settings of 8-Toggle Switch on Gravitar PCB (at B4)
8 7 6 5 4 3 2 1 Option
-------------------------------------------------------------------------------
Off On Free play
On On 1 coin for 2 credits
Off Off 1 coin for 1 credit <
On Off 2 coins for 1 credit
Off Off Right coin mechanism x 1 <
On Off Right coin mechanism x 4
Off On Right coin mechanism x 5
On On Right coin mechanism x 6
Off Left coin mechanism x 1 <
On Left coin mechanism x 2
Off Off Off No bonus coins <
Off On Off For every 4 coins inserted,
logic adds 1 more coin
On On Off For every 4 coins inserted,
logic adds 2 more coins
Off Off On For every 5 coins inserted,
logic adds 1 more coin
On Off On For every 3 coins inserted,
logic adds 1 more coin
Off On On No bonus coins
On Off Off ??? (not in manual!)
On On On No bonus coins
-------------------------------------------------------------------------------
< Manufacturer's recommended setting
-------------------------------------------------------------------------------
Settings of 8-Toggle Switch on Gravitar PCB (at D4)
8 7 6 5 4 3 2 1 Option
-------------------------------------------------------------------------------
On On No bonus
Off Off Bonus ship every 10,000 points <
d d d On Off Bonus ship every 20,000 points
e e e Off On Bonus ship every 30,000 points
s s s
U U On U Easy game play <
Off Hard game play
t t t
o o Off Off o 3 ships per game
N N On Off N 4 ships per game <
Off On 5 ships per game
On On 6 ships per game
-------------------------------------------------------------------------------
< Manufacturer's recommended setting
Space Duel Settings
-------------------
(Settings of 8-Toggle Switch on Space Duel game PCB at D4)
Note: The bits are the exact opposite of the switch numbers - switch 8 is bit 0.
8 7 6 5 4 3 2 1 Option
On Off 3 ships per game
Off Off 4 ships per game $
On On 5 ships per game
Off On 6 ships per game
On Off *Easy game difficulty
Off Off Normal game difficulty $
On On Medium game difficulty
Off On Hard game difficulty
Off Off English $
On Off German
On On Spanish
Off On French
Bonus life granted every:
Off On 8,000 points
Off Off 10,000 points
On Off 15,000 points
On On No bonus life
$Manufacturer's suggested settings
*Easy-In the beginning of the first wave, 3 targets appear on the
screen. Targets increase by one in each new wave.
Normal-Space station action is the same as 'Easy'. Fighter action has
4 targets in the beginning of the first wave. Targets increase by 2
in each new wave. Targets move faster and more targets enter.
Medium and Hard-In the beginning of the first wave, 4 targets appear
on the screen. Targets increase by 2 in each new wave. As difficulty
increases, targets move faster, and more targets enter.
(Settings of 8-Toggle Switch on Space Duel game PCB at B4)
8 7 6 5 4 3 2 1 Option
Off On Free play
Off Off *1 coin for 1 game (or 1 player) $
On On 1 coin for 2 game (or 2 players)
On Off 2 coins for 1 game (or 1 player)
Off Off Right coin mech x 1 $
On Off Right coin mech x 4
Off On Right coin mech x 5
On On Right coin mech x 6
Off Left coin mech x 1 $
On Left coin mech x 2
Off Off Off No bonus coins $
Off On Off For every 4 coins, game logic adds 1 more coin
On On Off For every 4 coins, game logic adds 2 more coin
Off On On For every 5 coins, game logic adds 1 more coin
On Off On**For every 3 coins, game logic adds 1 more coin
$Manufacturer's suggested settings
**In operator Information Display, this option displays same as no bonus.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
#include "vidhrdw/vector.h"
#include "vidhrdw/avgdvg.h"
#include "machine/atari_vg.h"
#define IN_LEFT (1 << 0)
#define IN_RIGHT (1 << 1)
#define IN_FIRE (1 << 2)
#define IN_SHIELD (1 << 3)
#define IN_THRUST (1 << 4)
#define IN_P1 (1 << 5)
#define IN_P2 (1 << 6)
/*
These 7 memory locations are used to read the 2 players' controls as well
as sharing some dipswitch info in the lower 4 bits pertaining to coins/credits
Typically, only the high 2 bits are read.
*/
static int spacduel_IN3_r (int offset) {
int res;
int res1;
int res2;
res1 = readinputport(3);
res2 = readinputport(4);
res = 0x00;
switch (offset & 0x07) {
case 0:
if (res1 & IN_SHIELD) res |= 0x80;
if (res1 & IN_FIRE) res |= 0x40;
break;
case 1: /* Player 2 */
if (res2 & IN_SHIELD) res |= 0x80;
if (res2 & IN_FIRE) res |= 0x40;
break;
case 2:
if (res1 & IN_LEFT) res |= 0x80;
if (res1 & IN_RIGHT) res |= 0x40;
break;
case 3: /* Player 2 */
if (res2 & IN_LEFT) res |= 0x80;
if (res2 & IN_RIGHT) res |= 0x40;
break;
case 4:
if (res1 & IN_THRUST) res |= 0x80;
if (res1 & IN_P1) res |= 0x40;
break;
case 5: /* Player 2 */
if (res2 & IN_THRUST) res |= 0x80;
break;
case 6:
if (res1 & IN_P2) res |= 0x80;
break;
case 7:
res = (0x00 /* upright */ | (0 & 0x40));
break;
}
return res;
}
int bzone_IN0_r(int offset);
void bwidow_misc_w (int offset, int data)
{
/*
0x10 = p1 led
0x20 = p2 led
0x01 = coin counter 1
0x02 = coin counter 2
*/
static int lastdata;
if (data == lastdata) return;
osd_led_w (0, ~((data & 0x10) >> 4));
osd_led_w (1, ~((data & 0x20) >> 5));
coin_counter_w (0, data & 0x01);
coin_counter_w (1, data & 0x02);
lastdata = data;
}
static struct MemoryReadAddress bwidow_readmem[] =
{
{ 0x0000, 0x07ff, MRA_RAM },
{ 0x9000, 0xffff, MRA_ROM },
{ 0x2800, 0x5fff, MRA_ROM },
{ 0x2000, 0x27ff, MRA_RAM, &vectorram, &vectorram_size },
{ 0x7000, 0x7000, atari_vg_earom_r },
{ 0x7800, 0x7800, bzone_IN0_r }, /* IN0 */
{ 0x8000, 0x8000, input_port_3_r }, /* IN1 */
{ 0x8800, 0x8800, input_port_4_r }, /* IN1 */
{ 0x6000, 0x600f, pokey1_r },
{ 0x6800, 0x680f, pokey2_r },
{ -1 } /* end of table */
};
static struct MemoryWriteAddress bwidow_writemem[] =
{
{ 0x0000, 0x07ff, MWA_RAM },
{ 0x2000, 0x27ff, MWA_RAM },
{ 0x6000, 0x67ff, pokey1_w },
{ 0x6800, 0x6fff, pokey2_w },
{ 0x8800, 0x8800, bwidow_misc_w }, /* coin counters, leds */
{ 0x8840, 0x8840, avgdvg_go },
{ 0x8880, 0x8880, avgdvg_reset },
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -