hash/c64_cart.xml
| r14906 | r14907 | |
| 164 | 164 | </part> |
| 165 | 165 | </software> |
| 166 | 166 | |
| 167 | | <software name="cs64" supported="no"> |
| 167 | <software name="cs64"> |
| 168 | 168 | <description>Currah Speech 64</description> |
| 169 | 169 | <year>1984</year> |
| 170 | 170 | <publisher>Currah</publisher> |
| r14906 | r14907 | |
| 172 | 172 | <part name="cart" interface="c64_cart"> |
| 173 | 173 | <feature name="slot" value="cs64" /> |
| 174 | 174 | <feature name="game" value="1" /> |
| 175 | | <feature name="exrom" value="0" /> |
| 175 | <feature name="exrom" value="1" /> |
| 176 | 176 | |
| 177 | | <dataarea name="roml" size="0x2000"> |
| 177 | <dataarea name="romh" size="0x2000"> |
| 178 | 178 | <rom name="778r01" size="0x2000" crc="e3f8abd0" sha1="dc9fc1ffb033531abec03b1a06a8d5064dd0ce61" offset="0x0000" /> |
| 179 | 179 | </dataarea> |
| 180 | 180 | </part> |
src/mess/machine/c64_sfx_sound_expander.h
| r14906 | r14907 | |
| 55 | 55 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 56 | 56 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 57 | 57 | virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
|
| 58 | | virtual int c64_exrom_r();
|
| 58 | virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram);
|
| 59 | 59 | |
| 60 | 60 | private:
|
| 61 | 61 | required_device<device_t> m_opl;
|
src/mess/machine/c64_xl80.h
| r14906 | r14907 | |
| 49 | 49 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2); |
| 50 | 50 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2); |
| 51 | 51 | virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram) { return 1; } |
| 52 | | virtual int c64_exrom_r() { return 0; } |
| 52 | virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram) { return 0; } |
| 53 | 53 | |
| 54 | 54 | private: |
| 55 | 55 | required_device<h46505_device> m_crtc; |
src/mess/machine/c64_currah_speech.c
| r14906 | r14907 | |
| 30 | 30 | ROM - General Instruments R09864CS-2030 8Kx8 ROM "778R01" |
| 31 | 31 | SP0256 - General Instruments SP0256A-AL2 Speech Synthesizer |
| 32 | 32 | |
| 33 | |
| 34 | LA05-164 Pinout |
| 35 | --------------- |
| 36 | _____ _____ |
| 37 | DOTCLK 1 |* \_/ | 28 +5V |
| 38 | CA7 2 | | 27 CD7 |
| 39 | CA6 3 | | 26 CA8 |
| 40 | CA5 4 | | 25 CA9 |
| 41 | CA4 5 | | 24 CA11 |
| 42 | CA3 6 | | 23 BA |
| 43 | CA2 7 | LA05-164 | 22 CA10 |
| 44 | CA1 8 | | 21 SP0256 _ALD |
| 45 | CA0 9 | | 20 SP0256 OSC1 |
| 46 | 10 | | 19 SP0256 SBY |
| 47 | _GA+EX 11 | | 18 CA15 |
| 48 | I/O1 12 | | 17 CA12 |
| 49 | _CR/W 13 | | 16 CA13 |
| 50 | GND 14 |_____________| 15 CA14 |
| 51 | |
| 52 | Notes: |
| 53 | _GA+EX - _GAME and _EXROM tied together |
| 54 | |
| 33 | 55 | */ |
| 34 | 56 | |
| 57 | /* |
| 58 | |
| 59 | BASIC Commands |
| 60 | -------------- |
| 61 | |
| 62 | INIT Initialize the cartridge |
| 63 | KON 0 Enable keyvoices, low voice |
| 64 | KON 1 Enable keyvoices, high voice |
| 65 | KOFF Disable keyvoices |
| 66 | SAY "" Say words |
| 67 | |
| 68 | */ |
| 69 | |
| 35 | 70 | #include "c64_currah_speech.h" |
| 36 | 71 | |
| 37 | 72 | |
| r14906 | r14907 | |
| 56 | 91 | //------------------------------------------------- |
| 57 | 92 | |
| 58 | 93 | ROM_START( c64_currah_speech ) |
| 59 | | ROM_REGION( 0x800, SP0256_TAG, 0 ) |
| 94 | ROM_REGION( 0x10000, SP0256_TAG, 0 ) |
| 60 | 95 | ROM_LOAD( "sp0256a-al2", 0x000, 0x800, CRC(df8de0b0) SHA1(86fb6d9fef955ac0bc76e0c45c66585946d278a1) ) |
| 61 | 96 | ROM_END |
| 62 | 97 | |
| r14906 | r14907 | |
| 117 | 152 | c64_currah_speech_cartridge_device::c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 118 | 153 | device_t(mconfig, C64_CURRAH_SPEECH, "C64 Currah Speech", tag, owner, clock), |
| 119 | 154 | device_c64_expansion_card_interface(mconfig, *this), |
| 120 | | m_nsp(*this, SP0256_TAG) |
| 155 | m_nsp(*this, SP0256_TAG), |
| 156 | m_rom_en(0) |
| 121 | 157 | { |
| 122 | 158 | } |
| 123 | 159 | |
| r14906 | r14907 | |
| 128 | 164 | |
| 129 | 165 | void c64_currah_speech_cartridge_device::device_start() |
| 130 | 166 | { |
| 131 | | // find memory regions |
| 132 | | m_rom = subregion(SP0256_TAG)->base(); |
| 167 | // state saving |
| 168 | save_item(NAME(m_rom_en)); |
| 133 | 169 | } |
| 134 | 170 | |
| 135 | 171 | |
| r14906 | r14907 | |
| 139 | 175 | |
| 140 | 176 | void c64_currah_speech_cartridge_device::device_reset() |
| 141 | 177 | { |
| 178 | m_rom_en = 0; |
| 142 | 179 | } |
| 143 | 180 | |
| 144 | 181 | |
| r14906 | r14907 | |
| 150 | 187 | { |
| 151 | 188 | UINT8 data = 0; |
| 152 | 189 | |
| 153 | | if (!io1) |
| 190 | if (!romh) |
| 154 | 191 | { |
| 192 | data = m_romh[offset & 0x1fff]; |
| 193 | } |
| 194 | else if (!io1) |
| 195 | { |
| 155 | 196 | /* |
| 156 | 197 | |
| 157 | 198 | bit description |
| r14906 | r14907 | |
| 163 | 204 | 4 |
| 164 | 205 | 5 |
| 165 | 206 | 6 |
| 166 | | 7 LRQ |
| 207 | 7 SBY |
| 167 | 208 | |
| 168 | 209 | */ |
| 169 | 210 | |
| 170 | | data = sp0256_lrq_r(m_nsp) << 7; |
| 211 | data = sp0256_sby_r(m_nsp) << 7; |
| 171 | 212 | } |
| 213 | else if (offset == 0xa7f0) |
| 214 | { |
| 215 | m_rom_en = !m_rom_en; |
| 216 | } |
| 172 | 217 | |
| 173 | 218 | return data; |
| 174 | 219 | } |
| r14906 | r14907 | |
| 182 | 227 | { |
| 183 | 228 | if (!io1) |
| 184 | 229 | { |
| 185 | | // TODO offset bit 0 = high/low voice |
| 186 | | sp0256_ALD_w(m_nsp, 0, data); |
| 230 | /* |
| 231 | |
| 232 | bit description |
| 233 | |
| 234 | 0 A1 |
| 235 | 1 A2 |
| 236 | 2 A3 |
| 237 | 3 A4 |
| 238 | 4 A5 |
| 239 | 5 A6 |
| 240 | 6 |
| 241 | 7 intonation |
| 242 | |
| 243 | */ |
| 244 | |
| 245 | // TODO offset bit 0 = low/high voice |
| 246 | sp0256_ALD_w(m_nsp, 0, data & 0x3f); |
| 187 | 247 | } |
| 188 | 248 | } |
| 189 | 249 | |
| r14906 | r14907 | |
| 194 | 254 | |
| 195 | 255 | int c64_currah_speech_cartridge_device::c64_game_r(offs_t offset, int ba, int rw, int hiram) |
| 196 | 256 | { |
| 197 | | return 1; // TODO |
| 257 | return !(m_rom_en && ba && rw && ((offset & 0xe000) == 0xa000)); |
| 198 | 258 | } |
| 199 | 259 | |
| 200 | 260 | |
| r14906 | r14907 | |
| 202 | 262 | // c64_exrom_r - EXROM read |
| 203 | 263 | //------------------------------------------------- |
| 204 | 264 | |
| 205 | | int c64_currah_speech_cartridge_device::c64_exrom_r() |
| 265 | int c64_currah_speech_cartridge_device::c64_exrom_r(offs_t offset, int ba, int rw, int hiram) |
| 206 | 266 | { |
| 207 | | return 1; // TODO |
| 267 | return !(m_rom_en && ba && rw && ((offset & 0xe000) == 0xa000)); |
| 208 | 268 | } |
src/mess/machine/c64_currah_speech.h
| r14906 | r14907 | |
| 46 | 46 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2); |
| 47 | 47 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2); |
| 48 | 48 | virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram); |
| 49 | | virtual int c64_exrom_r(); |
| 49 | virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram); |
| 50 | 50 | |
| 51 | 51 | private: |
| 52 | 52 | required_device<device_t> m_nsp; |
| 53 | 53 | |
| 54 | | UINT8 *m_rom; |
| 54 | int m_rom_en; |
| 55 | 55 | }; |
| 56 | 56 | |
| 57 | 57 | |
src/mess/machine/c64_easyflash.h
| r14906 | r14907 | |
| 47 | 47 | // device_c64_expansion_card_interface overrides
|
| 48 | 48 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 49 | 49 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 50 | | virtual int c64_exrom_r();
|
| 50 | virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram);
|
| 51 | 51 | virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
|
| 52 | 52 | |
| 53 | 53 | private:
|
src/mess/machine/c64exp.h
| r14906 | r14907 | |
| 100 | 100 | UINT8 cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2); |
| 101 | 101 | void cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2); |
| 102 | 102 | int game_r(offs_t offset, int ba, int rw, int hiram); |
| 103 | | DECLARE_READ_LINE_MEMBER( exrom_r ); |
| 103 | int exrom_r(offs_t offset, int ba, int rw, int hiram); |
| 104 | 104 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 105 | 105 | |
| 106 | 106 | // cartridge interface |
| r14906 | r14907 | |
| 169 | 169 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2) { return 0; }; |
| 170 | 170 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2) { }; |
| 171 | 171 | virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram) { return m_game; } |
| 172 | | virtual int c64_exrom_r() { return m_exrom; } |
| 172 | virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram) { return m_exrom; } |
| 173 | 173 | virtual void c64_reset_w() { }; |
| 174 | 174 | virtual UINT32 c64_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return false; } |
| 175 | 175 | |
src/mess/drivers/c64.c
| r14906 | r14907 | |
| 61 | 61 | void c64_state::bankswitch(offs_t offset, offs_t va, int rw, int aec, int ba, int cas, int *casram, int *basic, int *kernal, int *charom, int *grw, int *io, int *roml, int *romh) |
| 62 | 62 | { |
| 63 | 63 | int game = m_exp->game_r(offset, rw, ba, m_hiram); |
| 64 | | int exrom = m_exp->exrom_r(); |
| 64 | int exrom = m_exp->exrom_r(offset, rw, ba, m_hiram); |
| 65 | 65 | |
| 66 | 66 | UINT16 input = VA12 << 15 | VA13 << 14 | game << 13 | exrom << 12 | rw << 11 | aec << 10 | ba << 9 | A12 << 8 | A13 << 7 | A14 << 6 | A15 << 5 | m_va14 << 4 | m_charen << 3 | m_hiram << 2 | m_loram << 1 | cas; |
| 67 | 67 | UINT8 data = m_pla->read(input); |