-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBSOS_Config.h
More file actions
120 lines (100 loc) · 4.42 KB
/
BSOS_Config.h
File metadata and controls
120 lines (100 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/**************************************************************************
* This file is part of the Bally/Stern OS for Arduino Project.
I, Dick Hamill, the author of this program disclaim all copyright
in order to make this program freely available in perpetuity to
anyone who would like to use it. Dick Hamill, 6/1/2020
BallySternOS is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
BallySternOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
See <https://www.gnu.org/licenses/>.
*/
#ifndef BSOS_CONFIG_H
/***
Use this file to set game-specific and hardware-specific parameters
***/
// Hardware Rev 1 generally uses an Arduino Nano & (option) 74125
// Hardware Rev 2 uses an Arduino Nano, a 74155, and a 74240
#define BALLY_STERN_OS_HARDWARE_REV 3
#define BALLY_STERN_OS_USE_DIP_SWITCHES
//#define BALLY_STERN_OS_USE_SQUAWK_AND_TALK
//#define BALLY_STERN_OS_USE_DASH51
//#define BALLY_STERN_OS_USE_SB100
#define BALLY_STERN_OS_USE_SB300
//#define USE_CHIMES
//#define USE_WAV_TRIGGER
#define USE_WAV_TRIGGER_1p3
//#define BALLY_STERN_OS_USE_AUX_LAMPS
#define BALLY_STERN_OS_USE_7_DIGIT_DISPLAYS
#define BALLY_STERN_OS_USE_6_DIGIT_CREDIT_DISPLAY_WITH_7_DIGIT_DISPLAYS
//#define BALLY_STERN_OS_DIMMABLE_DISPLAYS
#define BALLY_STERN_OS_SOFTWARE_DISPLAY_INTERRUPT
//#define BSOS_USE_EXTENDED_SWITCHES_ON_PB4
//#define BALLY_STERN_OS_ADJUSTABLE_DISPLAY_INTERRUPT
#define ENABLE_CPC_SETTINGS
// Depending on the number of digits, the BALLY_STERN_OS_SOFTWARE_DISPLAY_INTERRUPT_INTERVAL
// can be adjusted in order to change the refresh rate of the displays.
// The original -17 / MPU-100 boards ran at 320 Hz
// The Alltek runs the displays at 440 Hz (probably so 7-digit displays won't flicker)
// The value below is calculated with this formula:
// Value = (interval in ms) * (16*10^6) / (1*1024) - 1
// (must be <65536)
// Choose one of these values (or do whatever)
// Value Frequency
// 48 318.8 Hz
// 47 325.5 Hz
// 46 332.4 Hz increments (I use this for 6-digits displays)
// 45 339.6 Hz
// 40 381 Hz
// 35 434 Hz (This would probably be good for 7-digit displays)
// 34 446.4 Hz
#define BALLY_STERN_OS_SOFTWARE_DISPLAY_INTERRUPT_INTERVAL 34
#ifdef BALLY_STERN_OS_USE_6_DIGIT_CREDIT_DISPLAY_WITH_7_DIGIT_DISPLAYS
#define BALLY_STERN_OS_MASK_SHIFT_1 0x60
#define BALLY_STERN_OS_MASK_SHIFT_2 0x0C
#else
#define BALLY_STERN_OS_MASK_SHIFT_1 0x30
#define BALLY_STERN_OS_MASK_SHIFT_2 0x06
#endif
#ifdef BALLY_STERN_OS_USE_7_DIGIT_DISPLAYS
#define BALLY_STERN_OS_MAX_DISPLAY_SCORE 9999999
#define BALLY_STERN_OS_NUM_DIGITS 7
#define BALLY_STERN_OS_ALL_DIGITS_MASK 0x7F
#else
#define BALLY_STERN_OS_MAX_DISPLAY_SCORE 999999
#define BALLY_STERN_OS_NUM_DIGITS 6
#define BALLY_STERN_OS_ALL_DIGITS_MASK 0x3F
#endif
#ifdef BALLY_STERN_OS_USE_AUX_LAMPS
#define BSOS_NUM_LAMP_BITS 22
#define BSOS_MAX_LAMPS 88
#else
#define BSOS_NUM_LAMP_BITS 15
#define BSOS_MAX_LAMPS 60
#endif
#define CONTSOL_DISABLE_FLIPPERS 0x40
#define CONTSOL_DISABLE_COIN_LOCKOUT 0x20
#define BSOS_SWITCH_DELAY_IN_MICROSECONDS 200
#define BSOS_TIMING_LOOP_PADDING_IN_MICROSECONDS 70
// Fast boards might need a slower lamp strobe
#define BSOS_SLOW_DOWN_LAMP_STROBE 0
#define BSOS_CREDITS_EEPROM_BYTE 5
#define BSOS_HIGHSCORE_EEPROM_START_BYTE 1
#define BSOS_AWARD_SCORE_1_EEPROM_START_BYTE 10
#define BSOS_AWARD_SCORE_2_EEPROM_START_BYTE 14
#define BSOS_AWARD_SCORE_3_EEPROM_START_BYTE 18
#define BSOS_TOTAL_PLAYS_EEPROM_START_BYTE 26
#define BSOS_TOTAL_REPLAYS_EEPROM_START_BYTE 30
#define BSOS_TOTAL_HISCORE_BEATEN_START_BYTE 34
#define BSOS_CHUTE_2_COINS_START_BYTE 38
#define BSOS_CHUTE_1_COINS_START_BYTE 42
#define BSOS_CHUTE_3_COINS_START_BYTE 46
#define BSOS_CPC_CHUTE_1_SELECTION_BYTE 50
#define BSOS_CPC_CHUTE_2_SELECTION_BYTE 51
#define BSOS_CPC_CHUTE_3_SELECTION_BYTE 52
#define BSOS_CONFIG_H
#endif