hash/c64_flop.xml
| r15019 | r15020 | |
| 323 | 323 | <year>1985</year> |
| 324 | 324 | <publisher>Commodore</publisher> |
| 325 | 325 | <sharedfeat name="requirement" value="c64_cart:sfxse"/> |
| 326 | | |
| 326 | |
| 327 | 327 | <part name="flop1" interface="floppy_5_25"> |
| 328 | 328 | <dataarea name="flop" size="174848"> |
| 329 | 329 | <rom name="sfx.d64" size="174848" crc="23238762" sha1="a7c6c027af8d9d18a0a4e9d751ffec28cc863bf6" offset="0" status="baddump" /> |
| r15019 | r15020 | |
| 350 | 350 | <year>1989</year> |
| 351 | 351 | <publisher>Koulun erityispalvelu</publisher> |
| 352 | 352 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 353 | | |
| 353 | |
| 354 | 354 | <part name="flop1" interface="floppy_5_25"> |
| 355 | 355 | <dataarea name="flop" size="174848"> |
| 356 | 356 | <rom name="kats-1.d64" size="174848" crc="076e961a" sha1="011922880a227d388a77b5c179d7540d6118469d" offset="0" /> |
| r15019 | r15020 | |
| 363 | 363 | <year>1989</year> |
| 364 | 364 | <publisher>Koulun erityispalvelu</publisher> |
| 365 | 365 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 366 | | |
| 366 | |
| 367 | 367 | <part name="flop1" interface="floppy_5_25"> |
| 368 | 368 | <dataarea name="flop" size="174848"> |
| 369 | 369 | <rom name="kats-2.d64" size="174848" crc="44a5f655" sha1="eecb240de09b8adfaac68190e490984ea7e62304" offset="0" /> |
| r15019 | r15020 | |
| 376 | 376 | <year>1986</year> |
| 377 | 377 | <publisher>Koulun erityispalvelu</publisher> |
| 378 | 378 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 379 | | |
| 379 | |
| 380 | 380 | <part name="flop1" interface="floppy_5_25"> |
| 381 | 381 | <dataarea name="flop" size="174848"> |
| 382 | 382 | <rom name="kertolasku.d64" size="174848" crc="78f4ad0d" sha1="4ef1552535c26bf6c884f463d69f6e11fe152a9c" offset="0" /> |
| r15019 | r15020 | |
| 389 | 389 | <year>1988</year> |
| 390 | 390 | <publisher>Koulun erityispalvelu</publisher> |
| 391 | 391 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 392 | | |
| 392 | |
| 393 | 393 | <part name="flop1" interface="floppy_5_25"> |
| 394 | 394 | <dataarea name="flop" size="174848"> |
| 395 | 395 | <rom name="lrs-harjoitus.d64" size="174848" crc="ed5ce5ae" sha1="ca4eabc7d41db9f56e434ba8f38d7f24ad2fe5b7" offset="0" /> |
| r15019 | r15020 | |
| 402 | 402 | <year>1985</year> |
| 403 | 403 | <publisher>Koulun erityispalvelu</publisher> |
| 404 | 404 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 405 | | |
| 405 | |
| 406 | 406 | <part name="flop1" interface="floppy_5_25"> |
| 407 | 407 | <dataarea name="flop" size="174848"> |
| 408 | 408 | <rom name="opin_kirjoittamaan.d64" size="174848" crc="6125f441" sha1="e1d908644529eb3c0e4fef4be7b394a697d6bb9a" offset="0" /> |
| 409 | 409 | </dataarea> |
| 410 | 410 | </part> |
| 411 | | </software> |
| 411 | </software> |
| 412 | 412 | |
| 413 | 413 | <software name="opinluk1"> |
| 414 | 414 | <description>Opin lukemaan 1 (Fin)</description> |
| 415 | 415 | <year>1985</year> |
| 416 | 416 | <publisher>Koulun erityispalvelu</publisher> |
| 417 | 417 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 418 | | |
| 418 | |
| 419 | 419 | <part name="flop1" interface="floppy_5_25"> |
| 420 | 420 | <dataarea name="flop" size="174848"> |
| 421 | 421 | <rom name="opin_lukemaan_1.d64" size="174848" crc="70b4d79e" sha1="0f7ba68acfdca1b3fb8fc137b5b2c2292b6fc397" offset="0" /> |
| r15019 | r15020 | |
| 428 | 428 | <year>1985</year> |
| 429 | 429 | <publisher>Koulun erityispalvelu</publisher> |
| 430 | 430 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 431 | | |
| 431 | |
| 432 | 432 | <part name="flop1" interface="floppy_5_25"> |
| 433 | 433 | <dataarea name="flop" size="174848"> |
| 434 | 434 | <rom name="opin_lukemaan_2.d64" size="174848" crc="58cb5f41" sha1="5cc321cb82f144b3faa88dbcb9b591657cdc66cf" offset="0" /> |
| r15019 | r15020 | |
| 441 | 441 | <year>1986</year> |
| 442 | 442 | <publisher>Koulun erityispalvelu</publisher> |
| 443 | 443 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 444 | | |
| 444 | |
| 445 | 445 | <part name="flop1" interface="floppy_5_25"> |
| 446 | 446 | <dataarea name="flop" size="174848"> |
| 447 | 447 | <rom name="ps-english.d64" size="174848" crc="18d66daa" sha1="35d9871fb337ada74f0788d4910dfba08d1d4c15" offset="0" /> |
| r15019 | r15020 | |
| 454 | 454 | <year>1989</year> |
| 455 | 455 | <publisher>Koulun erityispalvelu</publisher> |
| 456 | 456 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 457 | | |
| 457 | |
| 458 | 458 | <part name="flop1" interface="floppy_5_25"> |
| 459 | 459 | <dataarea name="flop" size="174848"> |
| 460 | 460 | <rom name="ps-memory.d64" size="174848" crc="08a635cd" sha1="cd797378c35272ca65f35784fda7f4e42029d8ea" offset="0" /> |
| r15019 | r15020 | |
| 467 | 467 | <year>1986</year> |
| 468 | 468 | <publisher>Koulun erityispalvelu</publisher> |
| 469 | 469 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 470 | | |
| 470 | |
| 471 | 471 | <part name="flop1" interface="floppy_5_25"> |
| 472 | 472 | <dataarea name="flop" size="174848"> |
| 473 | 473 | <rom name="puhuva_venttipeli.d64" size="174848" crc="16661038" sha1="69c67d4e3c2f15285549df4cb19caae44ed2dc2a" offset="0" /> |
| r15019 | r15020 | |
| 480 | 480 | <year>1986</year> |
| 481 | 481 | <publisher>Koulun erityispalvelu</publisher> |
| 482 | 482 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 483 | | |
| 483 | |
| 484 | 484 | <part name="flop1" interface="floppy_5_25"> |
| 485 | 485 | <dataarea name="flop" size="174848"> |
| 486 | 486 | <rom name="vahennyslasku.d64" size="174848" crc="e03d35ae" sha1="2fa26e548c577b647f3e23a93851c7cf4dc257ce" offset="0" /> |
| r15019 | r15020 | |
| 493 | 493 | <year>198?</year> |
| 494 | 494 | <publisher>Koulun erityispalvelu</publisher> |
| 495 | 495 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 496 | | |
| 496 | |
| 497 | 497 | <part name="flop1" interface="floppy_5_25"> |
| 498 | 498 | <dataarea name="flop" size="174848"> |
| 499 | 499 | <rom name="valm-harj1.d64" size="174848" crc="190cf6d4" sha1="7ca9176a83c48f5b9aebbc3e38e9a847da9ffc3c" offset="0" /> |
| r15019 | r15020 | |
| 506 | 506 | <year>198?</year> |
| 507 | 507 | <publisher>Koulun erityispalvelu</publisher> |
| 508 | 508 | <sharedfeat name="requirement" value="c64_cart:ps64"/> |
| 509 | | |
| 509 | |
| 510 | 510 | <part name="flop1" interface="floppy_5_25"> |
| 511 | 511 | <dataarea name="flop" size="174848"> |
| 512 | 512 | <rom name="yhteenlasku.d64" size="174848" crc="c02a0821" sha1="17e03cd9d81ee2bf328e802354c149945a319450" offset="0" /> |
src/mess/machine/c64_tdos.c
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | Triton QD TDOS cartridge emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | /* |
| 11 | | |
| 12 | | PCB Layout |
| 13 | | ---------- |
| 14 | | |
| 15 | | XM-2206-A (top) |
| 16 | | XM-2205-A (bottom) |
| 17 | | |
| 18 | | |===========================| |
| 19 | | | CN4 | |
| 20 | | | | |
| 21 | | | ULA | |
| 22 | | | | |
| 23 | | | 6.5MHz | |
| 24 | | | | |
| 25 | | | SSDA | |
| 26 | | | LS175 | |
| 27 | | | LS367 | |
| 28 | | | CN3 | |
| 29 | | |=========|||||||||=========| |
| 30 | | ||||||||| |
| 31 | | |=============|||||||||============| |
| 32 | | | CN2 | |
| 33 | | | LS00 LS02 LS138 | |
| 34 | | |=======| | |
| 35 | | |=| LS245 ROM | |
| 36 | | |=| | |
| 37 | | |=| | |
| 38 | | |=| CN1| |
| 39 | | |=| | |
| 40 | | |=| | |
| 41 | | |=| | |
| 42 | | |=| SW1 | |
| 43 | | |==========================================| |
| 44 | | |
| 45 | | ROM - Hitachi HN482764G 8Kx8 EPROM "TDOS 1.2" |
| 46 | | ULA - Ferranti ULA5RB073E1 XZ-2085-1 custom (?) |
| 47 | | SSDA - Motorola MC68A52P SSDA |
| 48 | | CN1 - C64 expansion connector (pass-thru) |
| 49 | | CN2,3 - 19x1 flat ribbon cable to other PCB |
| 50 | | CN4 - 9 wires to 3" drive |
| 51 | | SW1 - cartridge on/off switch |
| 52 | | |
| 53 | | */ |
| 54 | | |
| 55 | | #include "c64_tdos.h" |
| 56 | | |
| 57 | | |
| 58 | | |
| 59 | | //************************************************************************** |
| 60 | | // MACROS/CONSTANTS |
| 61 | | //************************************************************************** |
| 62 | | |
| 63 | | #define MC68A52P_TAG "mc6852" |
| 64 | | |
| 65 | | |
| 66 | | |
| 67 | | //************************************************************************** |
| 68 | | // DEVICE DEFINITIONS |
| 69 | | //************************************************************************** |
| 70 | | |
| 71 | | const device_type C64_TDOS = &device_creator<c64_tdos_cartridge_device>; |
| 72 | | |
| 73 | | |
| 74 | | //------------------------------------------------- |
| 75 | | // MC6852_INTERFACE( ssda_intf ) |
| 76 | | //------------------------------------------------- |
| 77 | | |
| 78 | | static MC6852_INTERFACE( ssda_intf ) |
| 79 | | { |
| 80 | | 0, |
| 81 | | 0, |
| 82 | | DEVCB_NULL, |
| 83 | | DEVCB_NULL, |
| 84 | | DEVCB_NULL, |
| 85 | | DEVCB_NULL, |
| 86 | | DEVCB_NULL, |
| 87 | | DEVCB_NULL, |
| 88 | | DEVCB_NULL |
| 89 | | }; |
| 90 | | |
| 91 | | |
| 92 | | //------------------------------------------------- |
| 93 | | // floppy_interface tdos_floppy_interface |
| 94 | | //------------------------------------------------- |
| 95 | | |
| 96 | | static const floppy_interface tdos_floppy_interface = |
| 97 | | { |
| 98 | | DEVCB_NULL, |
| 99 | | DEVCB_NULL, |
| 100 | | DEVCB_NULL, |
| 101 | | DEVCB_NULL, |
| 102 | | DEVCB_NULL, |
| 103 | | FLOPPY_STANDARD_5_25_DSHD, |
| 104 | | LEGACY_FLOPPY_OPTIONS_NAME(default), |
| 105 | | "floppy_2_8", |
| 106 | | NULL |
| 107 | | }; |
| 108 | | |
| 109 | | |
| 110 | | //------------------------------------------------- |
| 111 | | // C64_EXPANSION_INTERFACE( expansion_intf ) |
| 112 | | //------------------------------------------------- |
| 113 | | |
| 114 | | READ8_MEMBER( c64_tdos_cartridge_device::dma_cd_r ) |
| 115 | | { |
| 116 | | return m_slot->dma_cd_r(offset); |
| 117 | | } |
| 118 | | |
| 119 | | WRITE8_MEMBER( c64_tdos_cartridge_device::dma_cd_w ) |
| 120 | | { |
| 121 | | m_slot->dma_cd_w(offset, data); |
| 122 | | } |
| 123 | | |
| 124 | | WRITE_LINE_MEMBER( c64_tdos_cartridge_device::irq_w ) |
| 125 | | { |
| 126 | | m_slot->irq_w(state); |
| 127 | | } |
| 128 | | |
| 129 | | WRITE_LINE_MEMBER( c64_tdos_cartridge_device::nmi_w ) |
| 130 | | { |
| 131 | | m_slot->nmi_w(state); |
| 132 | | } |
| 133 | | |
| 134 | | WRITE_LINE_MEMBER( c64_tdos_cartridge_device::dma_w ) |
| 135 | | { |
| 136 | | m_slot->dma_w(state); |
| 137 | | } |
| 138 | | |
| 139 | | WRITE_LINE_MEMBER( c64_tdos_cartridge_device::reset_w ) |
| 140 | | { |
| 141 | | m_slot->reset_w(state); |
| 142 | | } |
| 143 | | |
| 144 | | static C64_EXPANSION_INTERFACE( expansion_intf ) |
| 145 | | { |
| 146 | | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, dma_cd_r), |
| 147 | | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, dma_cd_w), |
| 148 | | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, irq_w), |
| 149 | | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, nmi_w), |
| 150 | | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, dma_w), |
| 151 | | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, reset_w) |
| 152 | | }; |
| 153 | | |
| 154 | | |
| 155 | | //------------------------------------------------- |
| 156 | | // MACHINE_CONFIG_FRAGMENT( c64_multiscreen ) |
| 157 | | //------------------------------------------------- |
| 158 | | |
| 159 | | static MACHINE_CONFIG_FRAGMENT( c64_tdos ) |
| 160 | | MCFG_MC6852_ADD(MC68A52P_TAG, XTAL_6_5MHz, ssda_intf) |
| 161 | | MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, tdos_floppy_interface) |
| 162 | | |
| 163 | | MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, 0, expansion_intf, c64_expansion_cards, NULL, NULL) |
| 164 | | MACHINE_CONFIG_END |
| 165 | | |
| 166 | | |
| 167 | | //------------------------------------------------- |
| 168 | | // machine_config_additions - device-specific |
| 169 | | // machine configurations |
| 170 | | //------------------------------------------------- |
| 171 | | |
| 172 | | machine_config_constructor c64_tdos_cartridge_device::device_mconfig_additions() const |
| 173 | | { |
| 174 | | return MACHINE_CONFIG_NAME( c64_tdos ); |
| 175 | | } |
| 176 | | |
| 177 | | |
| 178 | | |
| 179 | | //************************************************************************** |
| 180 | | // LIVE DEVICE |
| 181 | | //************************************************************************** |
| 182 | | |
| 183 | | //------------------------------------------------- |
| 184 | | // c64_tdos_cartridge_device - constructor |
| 185 | | //------------------------------------------------- |
| 186 | | |
| 187 | | c64_tdos_cartridge_device::c64_tdos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 188 | | device_t(mconfig, C64_TDOS, "C64 TDOS cartridge", tag, owner, clock), |
| 189 | | device_c64_expansion_card_interface(mconfig, *this), |
| 190 | | m_ssda(*this, MC68A52P_TAG), |
| 191 | | m_exp(*this, C64_EXPANSION_SLOT_TAG) |
| 192 | | { |
| 193 | | } |
| 194 | | |
| 195 | | |
| 196 | | //------------------------------------------------- |
| 197 | | // device_start - device-specific startup |
| 198 | | //------------------------------------------------- |
| 199 | | |
| 200 | | void c64_tdos_cartridge_device::device_start() |
| 201 | | { |
| 202 | | } |
| 203 | | |
| 204 | | |
| 205 | | //------------------------------------------------- |
| 206 | | // device_reset - device-specific reset |
| 207 | | //------------------------------------------------- |
| 208 | | |
| 209 | | void c64_tdos_cartridge_device::device_reset() |
| 210 | | { |
| 211 | | } |
| 212 | | |
| 213 | | |
| 214 | | //------------------------------------------------- |
| 215 | | // c64_cd_r - cartridge data read |
| 216 | | //------------------------------------------------- |
| 217 | | |
| 218 | | UINT8 c64_tdos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2) |
| 219 | | { |
| 220 | | UINT8 data = m_exp->cd_r(space, offset, roml, romh, io1, io2); |
| 221 | | |
| 222 | | // TODO |
| 223 | | |
| 224 | | return data; |
| 225 | | } |
| 226 | | |
| 227 | | |
| 228 | | //------------------------------------------------- |
| 229 | | // c64_cd_w - cartridge data write |
| 230 | | //------------------------------------------------- |
| 231 | | |
| 232 | | void c64_tdos_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2) |
| 233 | | { |
| 234 | | // TODO |
| 235 | | m_exp->cd_w(space, offset, data, roml, romh, io1, io2); |
| 236 | | } |
| 237 | | |
| 238 | | |
| 239 | | //------------------------------------------------- |
| 240 | | // c64_game_r - GAME read |
| 241 | | //------------------------------------------------- |
| 242 | | |
| 243 | | int c64_tdos_cartridge_device::c64_game_r(offs_t offset, int ba, int rw, int hiram) |
| 244 | | { |
| 245 | | return m_exp->game_r(offset, ba, rw, hiram); |
| 246 | | } |
| 247 | | |
| 248 | | |
| 249 | | //------------------------------------------------- |
| 250 | | // c64_exrom_r - EXROM read |
| 251 | | //------------------------------------------------- |
| 252 | | |
| 253 | | int c64_tdos_cartridge_device::c64_exrom_r(offs_t offset, int ba, int rw, int hiram) |
| 254 | | { |
| 255 | | return m_exp->exrom_r(offset, ba, rw, hiram); |
| 256 | | } |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Triton QD TDOS cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | /*
|
| 11 | |
| 12 | PCB Layout
|
| 13 | ----------
|
| 14 | |
| 15 | XM-2206-A (top)
|
| 16 | XM-2205-A (bottom)
|
| 17 | |
| 18 | |===========================|
|
| 19 | | CN4 |
|
| 20 | | |
|
| 21 | | ULA |
|
| 22 | | |
|
| 23 | | 6.5MHz |
|
| 24 | | |
|
| 25 | | SSDA |
|
| 26 | | LS175 |
|
| 27 | | LS367 |
|
| 28 | | CN3 |
|
| 29 | |=========|||||||||=========|
|
| 30 | |||||||||
|
| 31 | |=============|||||||||============|
|
| 32 | | CN2 |
|
| 33 | | LS00 LS02 LS138 |
|
| 34 | |=======| |
|
| 35 | |=| LS245 ROM |
|
| 36 | |=| |
|
| 37 | |=| |
|
| 38 | |=| CN1|
|
| 39 | |=| |
|
| 40 | |=| |
|
| 41 | |=| |
|
| 42 | |=| SW1 |
|
| 43 | |==========================================|
|
| 44 | |
| 45 | ROM - Hitachi HN482764G 8Kx8 EPROM "TDOS 1.2"
|
| 46 | ULA - Ferranti ULA5RB073E1 XZ-2085-1 custom (?)
|
| 47 | SSDA - Motorola MC68A52P SSDA
|
| 48 | CN1 - C64 expansion connector (pass-thru)
|
| 49 | CN2,3 - 19x1 flat ribbon cable to other PCB
|
| 50 | CN4 - 9 wires to 3" drive
|
| 51 | SW1 - cartridge on/off switch
|
| 52 | |
| 53 | */
|
| 54 | |
| 55 | #include "c64_tdos.h"
|
| 56 | |
| 57 | |
| 58 | |
| 59 | //**************************************************************************
|
| 60 | // MACROS/CONSTANTS
|
| 61 | //**************************************************************************
|
| 62 | |
| 63 | #define MC68A52P_TAG "mc6852"
|
| 64 | |
| 65 | |
| 66 | |
| 67 | //**************************************************************************
|
| 68 | // DEVICE DEFINITIONS
|
| 69 | //**************************************************************************
|
| 70 | |
| 71 | const device_type C64_TDOS = &device_creator<c64_tdos_cartridge_device>;
|
| 72 | |
| 73 | |
| 74 | //-------------------------------------------------
|
| 75 | // MC6852_INTERFACE( ssda_intf )
|
| 76 | //-------------------------------------------------
|
| 77 | |
| 78 | static MC6852_INTERFACE( ssda_intf )
|
| 79 | {
|
| 80 | 0,
|
| 81 | 0,
|
| 82 | DEVCB_NULL,
|
| 83 | DEVCB_NULL,
|
| 84 | DEVCB_NULL,
|
| 85 | DEVCB_NULL,
|
| 86 | DEVCB_NULL,
|
| 87 | DEVCB_NULL,
|
| 88 | DEVCB_NULL
|
| 89 | };
|
| 90 | |
| 91 | |
| 92 | //-------------------------------------------------
|
| 93 | // floppy_interface tdos_floppy_interface
|
| 94 | //-------------------------------------------------
|
| 95 | |
| 96 | static const floppy_interface tdos_floppy_interface =
|
| 97 | {
|
| 98 | DEVCB_NULL,
|
| 99 | DEVCB_NULL,
|
| 100 | DEVCB_NULL,
|
| 101 | DEVCB_NULL,
|
| 102 | DEVCB_NULL,
|
| 103 | FLOPPY_STANDARD_5_25_DSHD,
|
| 104 | LEGACY_FLOPPY_OPTIONS_NAME(default),
|
| 105 | "floppy_2_8",
|
| 106 | NULL
|
| 107 | };
|
| 108 | |
| 109 | |
| 110 | //-------------------------------------------------
|
| 111 | // C64_EXPANSION_INTERFACE( expansion_intf )
|
| 112 | //-------------------------------------------------
|
| 113 | |
| 114 | READ8_MEMBER( c64_tdos_cartridge_device::dma_cd_r )
|
| 115 | {
|
| 116 | return m_slot->dma_cd_r(offset);
|
| 117 | }
|
| 118 | |
| 119 | WRITE8_MEMBER( c64_tdos_cartridge_device::dma_cd_w )
|
| 120 | {
|
| 121 | m_slot->dma_cd_w(offset, data);
|
| 122 | }
|
| 123 | |
| 124 | WRITE_LINE_MEMBER( c64_tdos_cartridge_device::irq_w )
|
| 125 | {
|
| 126 | m_slot->irq_w(state);
|
| 127 | }
|
| 128 | |
| 129 | WRITE_LINE_MEMBER( c64_tdos_cartridge_device::nmi_w )
|
| 130 | {
|
| 131 | m_slot->nmi_w(state);
|
| 132 | }
|
| 133 | |
| 134 | WRITE_LINE_MEMBER( c64_tdos_cartridge_device::dma_w )
|
| 135 | {
|
| 136 | m_slot->dma_w(state);
|
| 137 | }
|
| 138 | |
| 139 | WRITE_LINE_MEMBER( c64_tdos_cartridge_device::reset_w )
|
| 140 | {
|
| 141 | m_slot->reset_w(state);
|
| 142 | }
|
| 143 | |
| 144 | static C64_EXPANSION_INTERFACE( expansion_intf )
|
| 145 | {
|
| 146 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, dma_cd_r),
|
| 147 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, dma_cd_w),
|
| 148 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, irq_w),
|
| 149 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, nmi_w),
|
| 150 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, dma_w),
|
| 151 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, reset_w)
|
| 152 | };
|
| 153 | |
| 154 | |
| 155 | //-------------------------------------------------
|
| 156 | // MACHINE_CONFIG_FRAGMENT( c64_multiscreen )
|
| 157 | //-------------------------------------------------
|
| 158 | |
| 159 | static MACHINE_CONFIG_FRAGMENT( c64_tdos )
|
| 160 | MCFG_MC6852_ADD(MC68A52P_TAG, XTAL_6_5MHz, ssda_intf)
|
| 161 | MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, tdos_floppy_interface)
|
| 162 | |
| 163 | MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, 0, expansion_intf, c64_expansion_cards, NULL, NULL)
|
| 164 | MACHINE_CONFIG_END
|
| 165 | |
| 166 | |
| 167 | //-------------------------------------------------
|
| 168 | // machine_config_additions - device-specific
|
| 169 | // machine configurations
|
| 170 | //-------------------------------------------------
|
| 171 | |
| 172 | machine_config_constructor c64_tdos_cartridge_device::device_mconfig_additions() const
|
| 173 | {
|
| 174 | return MACHINE_CONFIG_NAME( c64_tdos );
|
| 175 | }
|
| 176 | |
| 177 | |
| 178 | |
| 179 | //**************************************************************************
|
| 180 | // LIVE DEVICE
|
| 181 | //**************************************************************************
|
| 182 | |
| 183 | //-------------------------------------------------
|
| 184 | // c64_tdos_cartridge_device - constructor
|
| 185 | //-------------------------------------------------
|
| 186 | |
| 187 | c64_tdos_cartridge_device::c64_tdos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 188 | device_t(mconfig, C64_TDOS, "C64 TDOS cartridge", tag, owner, clock),
|
| 189 | device_c64_expansion_card_interface(mconfig, *this),
|
| 190 | m_ssda(*this, MC68A52P_TAG),
|
| 191 | m_exp(*this, C64_EXPANSION_SLOT_TAG)
|
| 192 | {
|
| 193 | }
|
| 194 | |
| 195 | |
| 196 | //-------------------------------------------------
|
| 197 | // device_start - device-specific startup
|
| 198 | //-------------------------------------------------
|
| 199 | |
| 200 | void c64_tdos_cartridge_device::device_start()
|
| 201 | {
|
| 202 | }
|
| 203 | |
| 204 | |
| 205 | //-------------------------------------------------
|
| 206 | // device_reset - device-specific reset
|
| 207 | //-------------------------------------------------
|
| 208 | |
| 209 | void c64_tdos_cartridge_device::device_reset()
|
| 210 | {
|
| 211 | }
|
| 212 | |
| 213 | |
| 214 | //-------------------------------------------------
|
| 215 | // c64_cd_r - cartridge data read
|
| 216 | //-------------------------------------------------
|
| 217 | |
| 218 | UINT8 c64_tdos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 219 | {
|
| 220 | UINT8 data = m_exp->cd_r(space, offset, roml, romh, io1, io2);
|
| 221 | |
| 222 | // TODO
|
| 223 | |
| 224 | return data;
|
| 225 | }
|
| 226 | |
| 227 | |
| 228 | //-------------------------------------------------
|
| 229 | // c64_cd_w - cartridge data write
|
| 230 | //-------------------------------------------------
|
| 231 | |
| 232 | void c64_tdos_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 233 | {
|
| 234 | // TODO
|
| 235 | m_exp->cd_w(space, offset, data, roml, romh, io1, io2);
|
| 236 | }
|
| 237 | |
| 238 | |
| 239 | //-------------------------------------------------
|
| 240 | // c64_game_r - GAME read
|
| 241 | //-------------------------------------------------
|
| 242 | |
| 243 | int c64_tdos_cartridge_device::c64_game_r(offs_t offset, int ba, int rw, int hiram)
|
| 244 | {
|
| 245 | return m_exp->game_r(offset, ba, rw, hiram);
|
| 246 | }
|
| 247 | |
| 248 | |
| 249 | //-------------------------------------------------
|
| 250 | // c64_exrom_r - EXROM read
|
| 251 | //-------------------------------------------------
|
| 252 | |
| 253 | int c64_tdos_cartridge_device::c64_exrom_r(offs_t offset, int ba, int rw, int hiram)
|
| 254 | {
|
| 255 | return m_exp->exrom_r(offset, ba, rw, hiram);
|
| 256 | }
|
src/mess/machine/c64_tdos.h
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | Triton QD TDOS cartridge emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | #pragma once |
| 11 | | |
| 12 | | #ifndef __TDOS__ |
| 13 | | #define __TDOS__ |
| 14 | | |
| 15 | | |
| 16 | | #include "emu.h" |
| 17 | | #include "imagedev/flopdrv.h" |
| 18 | | #include "machine/c64exp.h" |
| 19 | | #include "machine/cbmipt.h" |
| 20 | | #include "machine/mc6852.h" |
| 21 | | |
| 22 | | |
| 23 | | |
| 24 | | //************************************************************************** |
| 25 | | // TYPE DEFINITIONS |
| 26 | | //************************************************************************** |
| 27 | | |
| 28 | | // ======================> c64_tdos_cartridge_device |
| 29 | | |
| 30 | | class c64_tdos_cartridge_device : public device_t, |
| 31 | | public device_c64_expansion_card_interface |
| 32 | | { |
| 33 | | public: |
| 34 | | // construction/destruction |
| 35 | | c64_tdos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 36 | | |
| 37 | | // optional information overrides |
| 38 | | virtual machine_config_constructor device_mconfig_additions() const; |
| 39 | | |
| 40 | | // not really public |
| 41 | | DECLARE_READ8_MEMBER( dma_cd_r ); |
| 42 | | DECLARE_WRITE8_MEMBER( dma_cd_w ); |
| 43 | | DECLARE_WRITE_LINE_MEMBER( irq_w ); |
| 44 | | DECLARE_WRITE_LINE_MEMBER( nmi_w ); |
| 45 | | DECLARE_WRITE_LINE_MEMBER( dma_w ); |
| 46 | | DECLARE_WRITE_LINE_MEMBER( reset_w ); |
| 47 | | |
| 48 | | protected: |
| 49 | | // device-level overrides |
| 50 | | virtual void device_config_complete() { m_shortname = "c64_tdos"; } |
| 51 | | virtual void device_start(); |
| 52 | | virtual void device_reset(); |
| 53 | | |
| 54 | | // device_c64_expansion_card_interface overrides |
| 55 | | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2); |
| 56 | | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2); |
| 57 | | virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram); |
| 58 | | virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram); |
| 59 | | |
| 60 | | private: |
| 61 | | required_device<mc6852_device> m_ssda; |
| 62 | | required_device<c64_expansion_slot_device> m_exp; |
| 63 | | }; |
| 64 | | |
| 65 | | |
| 66 | | // device type definition |
| 67 | | extern const device_type C64_TDOS; |
| 68 | | |
| 69 | | |
| 70 | | #endif |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Triton QD TDOS cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #pragma once
|
| 11 | |
| 12 | #ifndef __TDOS__
|
| 13 | #define __TDOS__
|
| 14 | |
| 15 | |
| 16 | #include "emu.h"
|
| 17 | #include "imagedev/flopdrv.h"
|
| 18 | #include "machine/c64exp.h"
|
| 19 | #include "machine/cbmipt.h"
|
| 20 | #include "machine/mc6852.h"
|
| 21 | |
| 22 | |
| 23 | |
| 24 | //**************************************************************************
|
| 25 | // TYPE DEFINITIONS
|
| 26 | //**************************************************************************
|
| 27 | |
| 28 | // ======================> c64_tdos_cartridge_device
|
| 29 | |
| 30 | class c64_tdos_cartridge_device : public device_t,
|
| 31 | public device_c64_expansion_card_interface
|
| 32 | {
|
| 33 | public:
|
| 34 | // construction/destruction
|
| 35 | c64_tdos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 36 | |
| 37 | // optional information overrides
|
| 38 | virtual machine_config_constructor device_mconfig_additions() const;
|
| 39 | |
| 40 | // not really public
|
| 41 | DECLARE_READ8_MEMBER( dma_cd_r );
|
| 42 | DECLARE_WRITE8_MEMBER( dma_cd_w );
|
| 43 | DECLARE_WRITE_LINE_MEMBER( irq_w );
|
| 44 | DECLARE_WRITE_LINE_MEMBER( nmi_w );
|
| 45 | DECLARE_WRITE_LINE_MEMBER( dma_w );
|
| 46 | DECLARE_WRITE_LINE_MEMBER( reset_w );
|
| 47 | |
| 48 | protected:
|
| 49 | // device-level overrides
|
| 50 | virtual void device_config_complete() { m_shortname = "c64_tdos"; }
|
| 51 | virtual void device_start();
|
| 52 | virtual void device_reset();
|
| 53 | |
| 54 | // device_c64_expansion_card_interface overrides
|
| 55 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 56 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 57 | virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
|
| 58 | virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram);
|
| 59 | |
| 60 | private:
|
| 61 | required_device<mc6852_device> m_ssda;
|
| 62 | required_device<c64_expansion_slot_device> m_exp;
|
| 63 | };
|
| 64 | |
| 65 | |
| 66 | // device type definition
|
| 67 | extern const device_type C64_TDOS;
|
| 68 | |
| 69 | |
| 70 | #endif
|
src/mess/machine/abc80kb.c
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | Luxor ABC-80 keyboard emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | /* |
| 11 | | |
| 12 | | PCB Layout |
| 13 | | ---------- |
| 14 | | |
| 15 | | KTC 65-01870-001 (dated 1978) |
| 16 | | PCB-002B |
| 17 | | |
| 18 | | |---------------| |
| 19 | | |---| CN1 |---------------------------------------------------| |
| 20 | | | | |
| 21 | | | LS06 LS04 LS04 LS06 LS00 LS123 | |
| 22 | | | LS74 PROM MCU 4051 900C | |
| 23 | | | | |
| 24 | | | | |
| 25 | | | | |
| 26 | | | | |
| 27 | | | | |
| 28 | | | | |
| 29 | | | | |
| 30 | | | | |
| 31 | | |-----------------------------------------------------------------------| |
| 32 | | |
| 33 | | Notes: |
| 34 | | All IC's shown. |
| 35 | | |
| 36 | | MCU - General Instruments 30293B-013 20-04592-013 (?) |
| 37 | | PROM - Synertek N82S141N 512x8 bipolar PROM "053" |
| 38 | | 900C - Ferranti Interdesign 900C custom (?) |
| 39 | | CN1 - keyboard data connector |
| 40 | | |
| 41 | | */ |
| 42 | | |
| 43 | | /* |
| 44 | | |
| 45 | | PCB Layout |
| 46 | | ---------- |
| 47 | | |
| 48 | | KTC A65-01870-001 (dated 1983) |
| 49 | | PCB-201C |
| 50 | | |
| 51 | | |---------------| |
| 52 | | |---| CN1 |---------------------------------------------------| |
| 53 | | | | |
| 54 | | | LS06 LS04 LS04 LS00 LS123 | |
| 55 | | | MCU 4051 900C | |
| 56 | | | | |
| 57 | | | | |
| 58 | | | | |
| 59 | | | | |
| 60 | | | | |
| 61 | | | | |
| 62 | | | | |
| 63 | | | | |
| 64 | | |-----------------------------------------------------------------------| |
| 65 | | |
| 66 | | Notes: |
| 67 | | All IC's shown. |
| 68 | | |
| 69 | | MCU - General Instruments 30293B-047 20-04592-047 (?) |
| 70 | | 900C - Ferranti Interdesign 900C custom (?) |
| 71 | | CN1 - keyboard data connector |
| 72 | | |
| 73 | | */ |
| 74 | | |
| 75 | | #include "abc80kb.h" |
| 76 | | |
| 77 | | |
| 78 | | |
| 79 | | //************************************************************************** |
| 80 | | // MACROS / CONSTANTS |
| 81 | | //************************************************************************** |
| 82 | | |
| 83 | | #define I8048_TAG "i8048" |
| 84 | | |
| 85 | | |
| 86 | | |
| 87 | | //************************************************************************** |
| 88 | | // DEVICE DEFINITIONS |
| 89 | | //************************************************************************** |
| 90 | | |
| 91 | | const device_type ABC80_KEYBOARD = &device_creator<abc80_keyboard_device>; |
| 92 | | |
| 93 | | |
| 94 | | //------------------------------------------------- |
| 95 | | // device_config_complete - perform any |
| 96 | | // operations now that the configuration is |
| 97 | | // complete |
| 98 | | //------------------------------------------------- |
| 99 | | |
| 100 | | void abc80_keyboard_device::device_config_complete() |
| 101 | | { |
| 102 | | // inherit a copy of the static data |
| 103 | | const abc80_keyboard_interface *intf = reinterpret_cast<const abc80_keyboard_interface *>(static_config()); |
| 104 | | if (intf != NULL) |
| 105 | | *static_cast<abc80_keyboard_interface *>(this) = *intf; |
| 106 | | |
| 107 | | // or initialize to defaults if none provided |
| 108 | | else |
| 109 | | { |
| 110 | | memset(&m_out_keydown_cb, 0, sizeof(m_out_keydown_cb)); |
| 111 | | } |
| 112 | | |
| 113 | | m_shortname = "abc80kb"; |
| 114 | | } |
| 115 | | |
| 116 | | |
| 117 | | //------------------------------------------------- |
| 118 | | // ROM( abc80_keyboard ) |
| 119 | | //------------------------------------------------- |
| 120 | | |
| 121 | | ROM_START( abc80_keyboard ) |
| 122 | | ROM_REGION( 0x400, I8048_TAG, 0 ) |
| 123 | | ROM_LOAD( "053.z5", 0x0000, 0x0400, NO_DUMP ) |
| 124 | | ROM_END |
| 125 | | |
| 126 | | |
| 127 | | //------------------------------------------------- |
| 128 | | // rom_region - device-specific ROM region |
| 129 | | //------------------------------------------------- |
| 130 | | |
| 131 | | const rom_entry *abc80_keyboard_device::device_rom_region() const |
| 132 | | { |
| 133 | | return ROM_NAME( abc80_keyboard ); |
| 134 | | } |
| 135 | | |
| 136 | | |
| 137 | | //------------------------------------------------- |
| 138 | | // ADDRESS_MAP( abc80_keyboard_io ) |
| 139 | | //------------------------------------------------- |
| 140 | | |
| 141 | | static ADDRESS_MAP_START( abc80_keyboard_io, AS_IO, 8, abc80_keyboard_device ) |
| 142 | | ADDRESS_MAP_END |
| 143 | | |
| 144 | | |
| 145 | | //------------------------------------------------- |
| 146 | | // MACHINE_DRIVER( abc80_keyboard ) |
| 147 | | //------------------------------------------------- |
| 148 | | |
| 149 | | static MACHINE_CONFIG_FRAGMENT( abc80_keyboard ) |
| 150 | | MCFG_CPU_ADD(I8048_TAG, I8048, XTAL_5_9904MHz) |
| 151 | | MCFG_CPU_IO_MAP(abc80_keyboard_io) |
| 152 | | MACHINE_CONFIG_END |
| 153 | | |
| 154 | | |
| 155 | | //------------------------------------------------- |
| 156 | | // machine_config_additions - device-specific |
| 157 | | // machine configurations |
| 158 | | //------------------------------------------------- |
| 159 | | |
| 160 | | machine_config_constructor abc80_keyboard_device::device_mconfig_additions() const |
| 161 | | { |
| 162 | | return MACHINE_CONFIG_NAME( abc80_keyboard ); |
| 163 | | } |
| 164 | | |
| 165 | | |
| 166 | | //------------------------------------------------- |
| 167 | | // INPUT_PORTS( abc80_keyboard ) |
| 168 | | //------------------------------------------------- |
| 169 | | |
| 170 | | INPUT_PORTS_START( abc80_keyboard ) |
| 171 | | INPUT_PORTS_END |
| 172 | | |
| 173 | | |
| 174 | | //------------------------------------------------- |
| 175 | | // input_ports - device-specific input ports |
| 176 | | //------------------------------------------------- |
| 177 | | |
| 178 | | ioport_constructor abc80_keyboard_device::device_input_ports() const |
| 179 | | { |
| 180 | | return INPUT_PORTS_NAME( abc80_keyboard ); |
| 181 | | } |
| 182 | | |
| 183 | | |
| 184 | | |
| 185 | | //************************************************************************** |
| 186 | | // LIVE DEVICE |
| 187 | | //************************************************************************** |
| 188 | | |
| 189 | | //------------------------------------------------- |
| 190 | | // abc80_keyboard_device - constructor |
| 191 | | //------------------------------------------------- |
| 192 | | |
| 193 | | abc80_keyboard_device::abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 194 | | : device_t(mconfig, ABC80_KEYBOARD, "ABC-80 Keyboard", tag, owner, clock), |
| 195 | | m_maincpu(*this, I8048_TAG) |
| 196 | | { |
| 197 | | } |
| 198 | | |
| 199 | | |
| 200 | | //------------------------------------------------- |
| 201 | | // device_start - device-specific startup |
| 202 | | //------------------------------------------------- |
| 203 | | |
| 204 | | void abc80_keyboard_device::device_start() |
| 205 | | { |
| 206 | | // resolve callbacks |
| 207 | | m_out_keydown_func.resolve(m_out_keydown_cb, *this); |
| 208 | | } |
| 209 | | |
| 210 | | |
| 211 | | //------------------------------------------------- |
| 212 | | // device_reset - device-specific reset |
| 213 | | //------------------------------------------------- |
| 214 | | |
| 215 | | void abc80_keyboard_device::device_reset() |
| 216 | | { |
| 217 | | } |
| 218 | | |
| 219 | | |
| 220 | | //------------------------------------------------- |
| 221 | | // data_r - keyboard data read |
| 222 | | //------------------------------------------------- |
| 223 | | |
| 224 | | READ8_MEMBER( abc80_keyboard_device::data_r ) |
| 225 | | { |
| 226 | | return 0; |
| 227 | | } |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Luxor ABC-80 keyboard emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | /*
|
| 11 | |
| 12 | PCB Layout
|
| 13 | ----------
|
| 14 | |
| 15 | KTC 65-01870-001 (dated 1978)
|
| 16 | PCB-002B
|
| 17 | |
| 18 | |---------------|
|
| 19 | |---| CN1 |---------------------------------------------------|
|
| 20 | | |
|
| 21 | | LS06 LS04 LS04 LS06 LS00 LS123 |
|
| 22 | | LS74 PROM MCU 4051 900C |
|
| 23 | | |
|
| 24 | | |
|
| 25 | | |
|
| 26 | | |
|
| 27 | | |
|
| 28 | | |
|
| 29 | | |
|
| 30 | | |
|
| 31 | |-----------------------------------------------------------------------|
|
| 32 | |
| 33 | Notes:
|
| 34 | All IC's shown.
|
| 35 | |
| 36 | MCU - General Instruments 30293B-013 20-04592-013 (?)
|
| 37 | PROM - Synertek N82S141N 512x8 bipolar PROM "053"
|
| 38 | 900C - Ferranti Interdesign 900C custom (?)
|
| 39 | CN1 - keyboard data connector
|
| 40 | |
| 41 | */
|
| 42 | |
| 43 | /*
|
| 44 | |
| 45 | PCB Layout
|
| 46 | ----------
|
| 47 | |
| 48 | KTC A65-01870-001 (dated 1983)
|
| 49 | PCB-201C
|
| 50 | |
| 51 | |---------------|
|
| 52 | |---| CN1 |---------------------------------------------------|
|
| 53 | | |
|
| 54 | | LS06 LS04 LS04 LS00 LS123 |
|
| 55 | | MCU 4051 900C |
|
| 56 | | |
|
| 57 | | |
|
| 58 | | |
|
| 59 | | |
|
| 60 | | |
|
| 61 | | |
|
| 62 | | |
|
| 63 | | |
|
| 64 | |-----------------------------------------------------------------------|
|
| 65 | |
| 66 | Notes:
|
| 67 | All IC's shown.
|
| 68 | |
| 69 | MCU - General Instruments 30293B-047 20-04592-047 (?)
|
| 70 | 900C - Ferranti Interdesign 900C custom (?)
|
| 71 | CN1 - keyboard data connector
|
| 72 | |
| 73 | */
|
| 74 | |
| 75 | #include "abc80kb.h"
|
| 76 | |
| 77 | |
| 78 | |
| 79 | //**************************************************************************
|
| 80 | // MACROS / CONSTANTS
|
| 81 | //**************************************************************************
|
| 82 | |
| 83 | #define I8048_TAG "i8048"
|
| 84 | |
| 85 | |
| 86 | |
| 87 | //**************************************************************************
|
| 88 | // DEVICE DEFINITIONS
|
| 89 | //**************************************************************************
|
| 90 | |
| 91 | const device_type ABC80_KEYBOARD = &device_creator<abc80_keyboard_device>;
|
| 92 | |
| 93 | |
| 94 | //-------------------------------------------------
|
| 95 | // device_config_complete - perform any
|
| 96 | // operations now that the configuration is
|
| 97 | // complete
|
| 98 | //-------------------------------------------------
|
| 99 | |
| 100 | void abc80_keyboard_device::device_config_complete()
|
| 101 | {
|
| 102 | // inherit a copy of the static data
|
| 103 | const abc80_keyboard_interface *intf = reinterpret_cast<const abc80_keyboard_interface *>(static_config());
|
| 104 | if (intf != NULL)
|
| 105 | *static_cast<abc80_keyboard_interface *>(this) = *intf;
|
| 106 | |
| 107 | // or initialize to defaults if none provided
|
| 108 | else
|
| 109 | {
|
| 110 | memset(&m_out_keydown_cb, 0, sizeof(m_out_keydown_cb));
|
| 111 | }
|
| 112 | |
| 113 | m_shortname = "abc80kb";
|
| 114 | }
|
| 115 | |
| 116 | |
| 117 | //-------------------------------------------------
|
| 118 | // ROM( abc80_keyboard )
|
| 119 | //-------------------------------------------------
|
| 120 | |
| 121 | ROM_START( abc80_keyboard )
|
| 122 | ROM_REGION( 0x400, I8048_TAG, 0 )
|
| 123 | ROM_LOAD( "053.z5", 0x0000, 0x0400, NO_DUMP )
|
| 124 | ROM_END
|
| 125 | |
| 126 | |
| 127 | //-------------------------------------------------
|
| 128 | // rom_region - device-specific ROM region
|
| 129 | //-------------------------------------------------
|
| 130 | |
| 131 | const rom_entry *abc80_keyboard_device::device_rom_region() const
|
| 132 | {
|
| 133 | return ROM_NAME( abc80_keyboard );
|
| 134 | }
|
| 135 | |
| 136 | |
| 137 | //-------------------------------------------------
|
| 138 | // ADDRESS_MAP( abc80_keyboard_io )
|
| 139 | //-------------------------------------------------
|
| 140 | |
| 141 | static ADDRESS_MAP_START( abc80_keyboard_io, AS_IO, 8, abc80_keyboard_device )
|
| 142 | ADDRESS_MAP_END
|
| 143 | |
| 144 | |
| 145 | //-------------------------------------------------
|
| 146 | // MACHINE_DRIVER( abc80_keyboard )
|
| 147 | //-------------------------------------------------
|
| 148 | |
| 149 | static MACHINE_CONFIG_FRAGMENT( abc80_keyboard )
|
| 150 | MCFG_CPU_ADD(I8048_TAG, I8048, XTAL_5_9904MHz)
|
| 151 | MCFG_CPU_IO_MAP(abc80_keyboard_io)
|
| 152 | MACHINE_CONFIG_END
|
| 153 | |
| 154 | |
| 155 | //-------------------------------------------------
|
| 156 | // machine_config_additions - device-specific
|
| 157 | // machine configurations
|
| 158 | //-------------------------------------------------
|
| 159 | |
| 160 | machine_config_constructor abc80_keyboard_device::device_mconfig_additions() const
|
| 161 | {
|
| 162 | return MACHINE_CONFIG_NAME( abc80_keyboard );
|
| 163 | }
|
| 164 | |
| 165 | |
| 166 | //-------------------------------------------------
|
| 167 | // INPUT_PORTS( abc80_keyboard )
|
| 168 | //-------------------------------------------------
|
| 169 | |
| 170 | INPUT_PORTS_START( abc80_keyboard )
|
| 171 | INPUT_PORTS_END
|
| 172 | |
| 173 | |
| 174 | //-------------------------------------------------
|
| 175 | // input_ports - device-specific input ports
|
| 176 | //-------------------------------------------------
|
| 177 | |
| 178 | ioport_constructor abc80_keyboard_device::device_input_ports() const
|
| 179 | {
|
| 180 | return INPUT_PORTS_NAME( abc80_keyboard );
|
| 181 | }
|
| 182 | |
| 183 | |
| 184 | |
| 185 | //**************************************************************************
|
| 186 | // LIVE DEVICE
|
| 187 | //**************************************************************************
|
| 188 | |
| 189 | //-------------------------------------------------
|
| 190 | // abc80_keyboard_device - constructor
|
| 191 | //-------------------------------------------------
|
| 192 | |
| 193 | abc80_keyboard_device::abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
| 194 | : device_t(mconfig, ABC80_KEYBOARD, "ABC-80 Keyboard", tag, owner, clock),
|
| 195 | m_maincpu(*this, I8048_TAG)
|
| 196 | {
|
| 197 | }
|
| 198 | |
| 199 | |
| 200 | //-------------------------------------------------
|
| 201 | // device_start - device-specific startup
|
| 202 | //-------------------------------------------------
|
| 203 | |
| 204 | void abc80_keyboard_device::device_start()
|
| 205 | {
|
| 206 | // resolve callbacks
|
| 207 | m_out_keydown_func.resolve(m_out_keydown_cb, *this);
|
| 208 | }
|
| 209 | |
| 210 | |
| 211 | //-------------------------------------------------
|
| 212 | // device_reset - device-specific reset
|
| 213 | //-------------------------------------------------
|
| 214 | |
| 215 | void abc80_keyboard_device::device_reset()
|
| 216 | {
|
| 217 | }
|
| 218 | |
| 219 | |
| 220 | //-------------------------------------------------
|
| 221 | // data_r - keyboard data read
|
| 222 | //-------------------------------------------------
|
| 223 | |
| 224 | READ8_MEMBER( abc80_keyboard_device::data_r )
|
| 225 | {
|
| 226 | return 0;
|
| 227 | }
|
src/mess/machine/abc80kb.h
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | Luxor ABC-80 keyboard emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | #pragma once |
| 11 | | |
| 12 | | #ifndef __ABC80_KEYBOARD__ |
| 13 | | #define __ABC80_KEYBOARD__ |
| 14 | | |
| 15 | | |
| 16 | | #include "emu.h" |
| 17 | | #include "cpu/mcs48/mcs48.h" |
| 18 | | |
| 19 | | |
| 20 | | |
| 21 | | //************************************************************************** |
| 22 | | // MACROS / CONSTANTS |
| 23 | | //************************************************************************** |
| 24 | | |
| 25 | | #define ABC80_KEYBOARD_TAG "abc80kb" |
| 26 | | |
| 27 | | |
| 28 | | |
| 29 | | //************************************************************************** |
| 30 | | // INTERFACE CONFIGURATION MACROS |
| 31 | | //************************************************************************** |
| 32 | | |
| 33 | | #define MCFG_ABC80_KEYBOARD_ADD(_config) \ |
| 34 | | MCFG_DEVICE_ADD(ABC80_KEYBOARD_TAG, ABC80_KEYBOARD, 0) \ |
| 35 | | MCFG_DEVICE_CONFIG(_config) |
| 36 | | |
| 37 | | |
| 38 | | #define ABC80_KEYBOARD_INTERFACE(_name) \ |
| 39 | | const abc80_keyboard_interface (_name) = |
| 40 | | |
| 41 | | |
| 42 | | |
| 43 | | //************************************************************************** |
| 44 | | // TYPE DEFINITIONS |
| 45 | | //************************************************************************** |
| 46 | | |
| 47 | | // ======================> abc80_keyboard_interface |
| 48 | | |
| 49 | | struct abc80_keyboard_interface |
| 50 | | { |
| 51 | | devcb_write_line m_out_keydown_cb; |
| 52 | | }; |
| 53 | | |
| 54 | | |
| 55 | | // ======================> abc80_keyboard_device |
| 56 | | |
| 57 | | class abc80_keyboard_device : public device_t, |
| 58 | | public abc80_keyboard_interface |
| 59 | | { |
| 60 | | public: |
| 61 | | // construction/destruction |
| 62 | | abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 63 | | |
| 64 | | // optional information overrides |
| 65 | | virtual const rom_entry *device_rom_region() const; |
| 66 | | virtual machine_config_constructor device_mconfig_additions() const; |
| 67 | | virtual ioport_constructor device_input_ports() const; |
| 68 | | |
| 69 | | DECLARE_READ8_MEMBER( data_r ); |
| 70 | | |
| 71 | | protected: |
| 72 | | // device-level overrides |
| 73 | | virtual void device_config_complete(); |
| 74 | | virtual void device_start(); |
| 75 | | virtual void device_reset(); |
| 76 | | |
| 77 | | private: |
| 78 | | devcb_resolved_write_line m_out_keydown_func; |
| 79 | | |
| 80 | | required_device<cpu_device> m_maincpu; |
| 81 | | }; |
| 82 | | |
| 83 | | |
| 84 | | // device type definition |
| 85 | | extern const device_type ABC80_KEYBOARD; |
| 86 | | |
| 87 | | |
| 88 | | |
| 89 | | #endif |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Luxor ABC-80 keyboard emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #pragma once
|
| 11 | |
| 12 | #ifndef __ABC80_KEYBOARD__
|
| 13 | #define __ABC80_KEYBOARD__
|
| 14 | |
| 15 | |
| 16 | #include "emu.h"
|
| 17 | #include "cpu/mcs48/mcs48.h"
|
| 18 | |
| 19 | |
| 20 | |
| 21 | //**************************************************************************
|
| 22 | // MACROS / CONSTANTS
|
| 23 | //**************************************************************************
|
| 24 | |
| 25 | #define ABC80_KEYBOARD_TAG "abc80kb"
|
| 26 | |
| 27 | |
| 28 | |
| 29 | //**************************************************************************
|
| 30 | // INTERFACE CONFIGURATION MACROS
|
| 31 | //**************************************************************************
|
| 32 | |
| 33 | #define MCFG_ABC80_KEYBOARD_ADD(_config) \
|
| 34 | MCFG_DEVICE_ADD(ABC80_KEYBOARD_TAG, ABC80_KEYBOARD, 0) \
|
| 35 | MCFG_DEVICE_CONFIG(_config)
|
| 36 | |
| 37 | |
| 38 | #define ABC80_KEYBOARD_INTERFACE(_name) \
|
| 39 | const abc80_keyboard_interface (_name) =
|
| 40 | |
| 41 | |
| 42 | |
| 43 | //**************************************************************************
|
| 44 | // TYPE DEFINITIONS
|
| 45 | //**************************************************************************
|
| 46 | |
| 47 | // ======================> abc80_keyboard_interface
|
| 48 | |
| 49 | struct abc80_keyboard_interface
|
| 50 | {
|
| 51 | devcb_write_line m_out_keydown_cb;
|
| 52 | };
|
| 53 | |
| 54 | |
| 55 | // ======================> abc80_keyboard_device
|
| 56 | |
| 57 | class abc80_keyboard_device : public device_t,
|
| 58 | public abc80_keyboard_interface
|
| 59 | {
|
| 60 | public:
|
| 61 | // construction/destruction
|
| 62 | abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 63 | |
| 64 | // optional information overrides
|
| 65 | virtual const rom_entry *device_rom_region() const;
|
| 66 | virtual machine_config_constructor device_mconfig_additions() const;
|
| 67 | virtual ioport_constructor device_input_ports() const;
|
| 68 | |
| 69 | DECLARE_READ8_MEMBER( data_r );
|
| 70 | |
| 71 | protected:
|
| 72 | // device-level overrides
|
| 73 | virtual void device_config_complete();
|
| 74 | virtual void device_start();
|
| 75 | virtual void device_reset();
|
| 76 | |
| 77 | private:
|
| 78 | devcb_resolved_write_line m_out_keydown_func;
|
| 79 | |
| 80 | required_device<cpu_device> m_maincpu;
|
| 81 | };
|
| 82 | |
| 83 | |
| 84 | // device type definition
|
| 85 | extern const device_type ABC80_KEYBOARD;
|
| 86 | |
| 87 | |
| 88 | |
| 89 | #endif
|
src/mess/machine/c64_ide64.c
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | IDE64 v4.1 cartridge emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | /* |
| 11 | | |
| 12 | | TODO: |
| 13 | | |
| 14 | | - flash write |
| 15 | | - FT245 |
| 16 | | |
| 17 | | */ |
| 18 | | |
| 19 | | #include "c64_ide64.h" |
| 20 | | |
| 21 | | |
| 22 | | |
| 23 | | //************************************************************************** |
| 24 | | // MACROS/CONSTANTS |
| 25 | | //************************************************************************** |
| 26 | | |
| 27 | | #define AT29C010A_TAG "u3" |
| 28 | | #define DS1302_TAG "u4" |
| 29 | | #define FT245R_TAG "u21" |
| 30 | | |
| 31 | | |
| 32 | | |
| 33 | | //************************************************************************** |
| 34 | | // DEVICE DEFINITIONS |
| 35 | | //************************************************************************** |
| 36 | | |
| 37 | | const device_type C64_IDE64 = &device_creator<c64_ide64_cartridge_device>; |
| 38 | | |
| 39 | | |
| 40 | | //------------------------------------------------- |
| 41 | | // MACHINE_CONFIG_FRAGMENT( c64_ide64 ) |
| 42 | | //------------------------------------------------- |
| 43 | | |
| 44 | | static MACHINE_CONFIG_FRAGMENT( c64_ide64 ) |
| 45 | | MCFG_ATMEL_29C010_ADD(AT29C010A_TAG) |
| 46 | | MCFG_DS1302_ADD(DS1302_TAG) |
| 47 | | // TODO FT245R |
| 48 | | // TODO CompactFlash |
| 49 | | |
| 50 | | MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_image_devices, "hdd", "hdd") |
| 51 | | MACHINE_CONFIG_END |
| 52 | | |
| 53 | | |
| 54 | | //------------------------------------------------- |
| 55 | | // machine_config_additions - device-specific |
| 56 | | // machine configurations |
| 57 | | //------------------------------------------------- |
| 58 | | |
| 59 | | machine_config_constructor c64_ide64_cartridge_device::device_mconfig_additions() const |
| 60 | | { |
| 61 | | return MACHINE_CONFIG_NAME( c64_ide64 ); |
| 62 | | } |
| 63 | | |
| 64 | | |
| 65 | | //------------------------------------------------- |
| 66 | | // INPUT_PORTS( c64_ide64 ) |
| 67 | | //------------------------------------------------- |
| 68 | | |
| 69 | | static INPUT_PORTS_START( c64_ide64 ) |
| 70 | | PORT_START("JP1") |
| 71 | | PORT_DIPNAME( 0x01, 0x01, "Flash ROM Write Protect" ) |
| 72 | | PORT_DIPSETTING( 0x00, "Disabled" ) |
| 73 | | PORT_DIPSETTING( 0x01, "Enabled" ) |
| 74 | | INPUT_PORTS_END |
| 75 | | |
| 76 | | |
| 77 | | //------------------------------------------------- |
| 78 | | // input_ports - device-specific input ports |
| 79 | | //------------------------------------------------- |
| 80 | | |
| 81 | | ioport_constructor c64_ide64_cartridge_device::device_input_ports() const |
| 82 | | { |
| 83 | | return INPUT_PORTS_NAME( c64_ide64 ); |
| 84 | | } |
| 85 | | |
| 86 | | |
| 87 | | |
| 88 | | //************************************************************************** |
| 89 | | // LIVE DEVICE |
| 90 | | //************************************************************************** |
| 91 | | |
| 92 | | //------------------------------------------------- |
| 93 | | // c64_ide64_cartridge_device - constructor |
| 94 | | //------------------------------------------------- |
| 95 | | |
| 96 | | c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 97 | | device_t(mconfig, C64_IDE64, "C64 IDE64 cartridge", tag, owner, clock), |
| 98 | | device_c64_expansion_card_interface(mconfig, *this), |
| 99 | | m_flash_rom(*this, AT29C010A_TAG), |
| 100 | | m_rtc(*this, DS1302_TAG), |
| 101 | | m_ide(*this, "ide") |
| 102 | | { |
| 103 | | } |
| 104 | | |
| 105 | | |
| 106 | | //------------------------------------------------- |
| 107 | | // device_start - device-specific startup |
| 108 | | //------------------------------------------------- |
| 109 | | |
| 110 | | void c64_ide64_cartridge_device::device_start() |
| 111 | | { |
| 112 | | // allocate memory |
| 113 | | c64_ram_pointer(machine(), 0x8000); |
| 114 | | |
| 115 | | // state saving |
| 116 | | save_item(NAME(m_bank)); |
| 117 | | save_item(NAME(m_ide_data)); |
| 118 | | save_item(NAME(m_enable)); |
| 119 | | save_item(NAME(m_rtc_ce)); |
| 120 | | } |
| 121 | | |
| 122 | | |
| 123 | | //------------------------------------------------- |
| 124 | | // device_reset - device-specific reset |
| 125 | | //------------------------------------------------- |
| 126 | | |
| 127 | | void c64_ide64_cartridge_device::device_reset() |
| 128 | | { |
| 129 | | m_bank = 0; |
| 130 | | m_game = 1; |
| 131 | | m_exrom = 1; |
| 132 | | m_enable = 1; |
| 133 | | m_rtc_ce = 0; |
| 134 | | |
| 135 | | m_wp = input_port_read(*this, "JP1"); |
| 136 | | } |
| 137 | | |
| 138 | | |
| 139 | | //------------------------------------------------- |
| 140 | | // c64_cd_r - cartridge data read |
| 141 | | //------------------------------------------------- |
| 142 | | |
| 143 | | UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2) |
| 144 | | { |
| 145 | | if (!m_enable) return 0; |
| 146 | | |
| 147 | | UINT8 data = 0; |
| 148 | | int rom_oe = 1, ram_oe = 1; |
| 149 | | |
| 150 | | if (!m_game && m_exrom) |
| 151 | | { |
| 152 | | if (offset >= 0x1000 && offset < 0x8000) |
| 153 | | { |
| 154 | | ram_oe = 0; |
| 155 | | } |
| 156 | | else if (offset >= 0xa000 && offset < 0xc000) |
| 157 | | { |
| 158 | | rom_oe = 0; |
| 159 | | } |
| 160 | | else if (offset >= 0xc000 && offset < 0xd000) |
| 161 | | { |
| 162 | | ram_oe = 0; |
| 163 | | } |
| 164 | | else if (!romh) |
| 165 | | { |
| 166 | | rom_oe = 0; |
| 167 | | } |
| 168 | | } |
| 169 | | else |
| 170 | | { |
| 171 | | if (!roml || !romh) |
| 172 | | { |
| 173 | | rom_oe = 0; |
| 174 | | } |
| 175 | | else if (!io1) |
| 176 | | { |
| 177 | | // 0x20-0x2f IDE |
| 178 | | // 0x30-0x37 I/O |
| 179 | | // 0x5d-0x5e FT245 |
| 180 | | // 0x5f-0x5f DS1302 |
| 181 | | // 0x60-0xff ROM |
| 182 | | |
| 183 | | UINT8 io1_offset = offset & 0xff; |
| 184 | | |
| 185 | | if (io1_offset >= 0x20 && io1_offset < 0x30) |
| 186 | | { |
| 187 | | m_ide_data = ide_bus_r(m_ide, BIT(offset, 3), offset & 0x07); |
| 188 | | |
| 189 | | data = m_ide_data & 0xff; |
| 190 | | } |
| 191 | | else if (io1_offset == 0x31) |
| 192 | | { |
| 193 | | data = m_ide_data >> 8; |
| 194 | | } |
| 195 | | else if (io1_offset == 0x32) |
| 196 | | { |
| 197 | | /* |
| 198 | | |
| 199 | | bit description |
| 200 | | |
| 201 | | 0 GAME |
| 202 | | 1 EXROM |
| 203 | | 2 A14 |
| 204 | | 3 A15 |
| 205 | | 4 A16 |
| 206 | | 5 v4.x |
| 207 | | 6 |
| 208 | | 7 |
| 209 | | |
| 210 | | */ |
| 211 | | |
| 212 | | data = 0x20 | (m_bank << 2) | (m_exrom << 1) | m_game; |
| 213 | | } |
| 214 | | else if ((io1_offset == 0x5f) && m_rtc_ce) |
| 215 | | { |
| 216 | | m_rtc->ds1302_clk_w(0, 0); |
| 217 | | |
| 218 | | m_rtc->ds1302_dat_w(0, BIT(data, 0)); |
| 219 | | |
| 220 | | m_rtc->ds1302_clk_w(0, 1); |
| 221 | | } |
| 222 | | else if (io1_offset >= 0x60) |
| 223 | | { |
| 224 | | rom_oe = 0; |
| 225 | | } |
| 226 | | } |
| 227 | | } |
| 228 | | |
| 229 | | if (!rom_oe) |
| 230 | | { |
| 231 | | offs_t addr = (m_bank << 14) | (offset & 0x3fff); |
| 232 | | data = m_flash_rom->read(addr); |
| 233 | | } |
| 234 | | else if (!ram_oe) |
| 235 | | { |
| 236 | | data = m_ram[offset & 0x7fff]; |
| 237 | | } |
| 238 | | |
| 239 | | return data; |
| 240 | | } |
| 241 | | |
| 242 | | |
| 243 | | //------------------------------------------------- |
| 244 | | // c64_cd_w - cartridge data write |
| 245 | | //------------------------------------------------- |
| 246 | | |
| 247 | | void c64_ide64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2) |
| 248 | | { |
| 249 | | if (!m_enable) return; |
| 250 | | |
| 251 | | if (!m_game && m_exrom) |
| 252 | | { |
| 253 | | if (offset >= 0x1000 && offset < 0x8000) |
| 254 | | { |
| 255 | | m_ram[offset & 0x7fff] = data; |
| 256 | | } |
| 257 | | else if (offset >= 0xc000 && offset < 0xd000) |
| 258 | | { |
| 259 | | m_ram[offset & 0x7fff] = data; |
| 260 | | } |
| 261 | | } |
| 262 | | else |
| 263 | | { |
| 264 | | if ((offset >= 0x8000 && offset < 0xc000) && !m_wp) |
| 265 | | { |
| 266 | | offs_t addr = (m_bank << 14) | (offset & 0x3fff); |
| 267 | | m_flash_rom->write(addr, data); |
| 268 | | } |
| 269 | | else if (!io1) |
| 270 | | { |
| 271 | | // 0x20-0x2f IDE |
| 272 | | // 0x30-0x37 I/O |
| 273 | | // 0x5d-0x5e FT245 |
| 274 | | // 0x5f-0x5f DS1302 |
| 275 | | // 0x60-0xff ROM |
| 276 | | |
| 277 | | UINT8 io1_offset = offset & 0xff; |
| 278 | | |
| 279 | | if (io1_offset >= 0x20 && io1_offset < 0x30) |
| 280 | | { |
| 281 | | m_ide_data = (m_ide_data & 0xff00) | data; |
| 282 | | |
| 283 | | ide_bus_w(m_ide, BIT(offset, 3), offset & 0x07, m_ide_data); |
| 284 | | } |
| 285 | | else if (io1_offset == 0x31) |
| 286 | | { |
| 287 | | m_ide_data = (data << 8) | (m_ide_data & 0xff); |
| 288 | | } |
| 289 | | else if ((io1_offset == 0x5f) && m_rtc_ce) |
| 290 | | { |
| 291 | | m_rtc->ds1302_clk_w(0, 0); |
| 292 | | |
| 293 | | data = m_rtc->ds1302_read(0); |
| 294 | | |
| 295 | | m_rtc->ds1302_clk_w(0, 1); |
| 296 | | } |
| 297 | | else if (io1_offset >= 0x60 && io1_offset < 0x68) |
| 298 | | { |
| 299 | | m_bank = offset & 0x07; |
| 300 | | } |
| 301 | | else if (io1_offset >= 0xfb) |
| 302 | | { |
| 303 | | /* |
| 304 | | |
| 305 | | bit description |
| 306 | | |
| 307 | | 0 disable cartridge |
| 308 | | 1 RTC CE |
| 309 | | 2 |
| 310 | | 3 |
| 311 | | 4 |
| 312 | | 5 |
| 313 | | 6 |
| 314 | | 7 |
| 315 | | |
| 316 | | */ |
| 317 | | |
| 318 | | m_enable = !BIT(data, 0); |
| 319 | | m_rtc_ce = BIT(data, 1); |
| 320 | | |
| 321 | | m_game = BIT(offset, 0); |
| 322 | | m_exrom = BIT(offset, 1); |
| 323 | | } |
| 324 | | else if (io1_offset >= 0xfc) |
| 325 | | { |
| 326 | | m_game = BIT(offset, 0); |
| 327 | | m_exrom = BIT(offset, 1); |
| 328 | | } |
| 329 | | } |
| 330 | | } |
| 331 | | } |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | IDE64 v4.1 cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | /*
|
| 11 | |
| 12 | TODO:
|
| 13 | |
| 14 | - flash write
|
| 15 | - FT245
|
| 16 | |
| 17 | */
|
| 18 | |
| 19 | #include "c64_ide64.h"
|
| 20 | |
| 21 | |
| 22 | |
| 23 | //**************************************************************************
|
| 24 | // MACROS/CONSTANTS
|
| 25 | //**************************************************************************
|
| 26 | |
| 27 | #define AT29C010A_TAG "u3"
|
| 28 | #define DS1302_TAG "u4"
|
| 29 | #define FT245R_TAG "u21"
|
| 30 | |
| 31 | |
| 32 | |
| 33 | //**************************************************************************
|
| 34 | // DEVICE DEFINITIONS
|
| 35 | //**************************************************************************
|
| 36 | |
| 37 | const device_type C64_IDE64 = &device_creator<c64_ide64_cartridge_device>;
|
| 38 | |
| 39 | |
| 40 | //-------------------------------------------------
|
| 41 | // MACHINE_CONFIG_FRAGMENT( c64_ide64 )
|
| 42 | //-------------------------------------------------
|
| 43 | |
| 44 | static MACHINE_CONFIG_FRAGMENT( c64_ide64 )
|
| 45 | MCFG_ATMEL_29C010_ADD(AT29C010A_TAG)
|
| 46 | MCFG_DS1302_ADD(DS1302_TAG)
|
| 47 | // TODO FT245R
|
| 48 | // TODO CompactFlash
|
| 49 | |
| 50 | MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_image_devices, "hdd", "hdd")
|
| 51 | MACHINE_CONFIG_END
|
| 52 | |
| 53 | |
| 54 | //-------------------------------------------------
|
| 55 | // machine_config_additions - device-specific
|
| 56 | // machine configurations
|
| 57 | //-------------------------------------------------
|
| 58 | |
| 59 | machine_config_constructor c64_ide64_cartridge_device::device_mconfig_additions() const
|
| 60 | {
|
| 61 | return MACHINE_CONFIG_NAME( c64_ide64 );
|
| 62 | }
|
| 63 | |
| 64 | |
| 65 | //-------------------------------------------------
|
| 66 | // INPUT_PORTS( c64_ide64 )
|
| 67 | //-------------------------------------------------
|
| 68 | |
| 69 | static INPUT_PORTS_START( c64_ide64 )
|
| 70 | PORT_START("JP1")
|
| 71 | PORT_DIPNAME( 0x01, 0x01, "Flash ROM Write Protect" )
|
| 72 | PORT_DIPSETTING( 0x00, "Disabled" )
|
| 73 | PORT_DIPSETTING( 0x01, "Enabled" )
|
| 74 | INPUT_PORTS_END
|
| 75 | |
| 76 | |
| 77 | //-------------------------------------------------
|
| 78 | // input_ports - device-specific input ports
|
| 79 | //-------------------------------------------------
|
| 80 | |
| 81 | ioport_constructor c64_ide64_cartridge_device::device_input_ports() const
|
| 82 | {
|
| 83 | return INPUT_PORTS_NAME( c64_ide64 );
|
| 84 | }
|
| 85 | |
| 86 | |
| 87 | |
| 88 | //**************************************************************************
|
| 89 | // LIVE DEVICE
|
| 90 | //**************************************************************************
|
| 91 | |
| 92 | //-------------------------------------------------
|
| 93 | // c64_ide64_cartridge_device - constructor
|
| 94 | //-------------------------------------------------
|
| 95 | |
| 96 | c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 97 | device_t(mconfig, C64_IDE64, "C64 IDE64 cartridge", tag, owner, clock),
|
| 98 | device_c64_expansion_card_interface(mconfig, *this),
|
| 99 | m_flash_rom(*this, AT29C010A_TAG),
|
| 100 | m_rtc(*this, DS1302_TAG),
|
| 101 | m_ide(*this, "ide")
|
| 102 | {
|
| 103 | }
|
| 104 | |
| 105 | |
| 106 | //-------------------------------------------------
|
| 107 | // device_start - device-specific startup
|
| 108 | //-------------------------------------------------
|
| 109 | |
| 110 | void c64_ide64_cartridge_device::device_start()
|
| 111 | {
|
| 112 | // allocate memory
|
| 113 | c64_ram_pointer(machine(), 0x8000);
|
| 114 | |
| 115 | // state saving
|
| 116 | save_item(NAME(m_bank));
|
| 117 | save_item(NAME(m_ide_data));
|
| 118 | save_item(NAME(m_enable));
|
| 119 | save_item(NAME(m_rtc_ce));
|
| 120 | }
|
| 121 | |
| 122 | |
| 123 | //-------------------------------------------------
|
| 124 | // device_reset - device-specific reset
|
| 125 | //-------------------------------------------------
|
| 126 | |
| 127 | void c64_ide64_cartridge_device::device_reset()
|
| 128 | {
|
| 129 | m_bank = 0;
|
| 130 | m_game = 1;
|
| 131 | m_exrom = 1;
|
| 132 | m_enable = 1;
|
| 133 | m_rtc_ce = 0;
|
| 134 | |
| 135 | m_wp = input_port_read(*this, "JP1");
|
| 136 | }
|
| 137 | |
| 138 | |
| 139 | //-------------------------------------------------
|
| 140 | // c64_cd_r - cartridge data read
|
| 141 | //-------------------------------------------------
|
| 142 | |
| 143 | UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 144 | {
|
| 145 | if (!m_enable) return 0;
|
| 146 | |
| 147 | UINT8 data = 0;
|
| 148 | int rom_oe = 1, ram_oe = 1;
|
| 149 | |
| 150 | if (!m_game && m_exrom)
|
| 151 | {
|
| 152 | if (offset >= 0x1000 && offset < 0x8000)
|
| 153 | {
|
| 154 | ram_oe = 0;
|
| 155 | }
|
| 156 | else if (offset >= 0xa000 && offset < 0xc000)
|
| 157 | {
|
| 158 | rom_oe = 0;
|
| 159 | }
|
| 160 | else if (offset >= 0xc000 && offset < 0xd000)
|
| 161 | {
|
| 162 | ram_oe = 0;
|
| 163 | }
|
| 164 | else if (!romh)
|
| 165 | {
|
| 166 | rom_oe = 0;
|
| 167 | }
|
| 168 | }
|
| 169 | else
|
| 170 | {
|
| 171 | if (!roml || !romh)
|
| 172 | {
|
| 173 | rom_oe = 0;
|
| 174 | }
|
| 175 | else if (!io1)
|
| 176 | {
|
| 177 | // 0x20-0x2f IDE
|
| 178 | // 0x30-0x37 I/O
|
| 179 | // 0x5d-0x5e FT245
|
| 180 | // 0x5f-0x5f DS1302
|
| 181 | // 0x60-0xff ROM
|
| 182 | |
| 183 | UINT8 io1_offset = offset & 0xff;
|
| 184 | |
| 185 | if (io1_offset >= 0x20 && io1_offset < 0x30)
|
| 186 | {
|
| 187 | m_ide_data = ide_bus_r(m_ide, BIT(offset, 3), offset & 0x07);
|
| 188 | |
| 189 | data = m_ide_data & 0xff;
|
| 190 | }
|
| 191 | else if (io1_offset == 0x31)
|
| 192 | {
|
| 193 | data = m_ide_data >> 8;
|
| 194 | }
|
| 195 | else if (io1_offset == 0x32)
|
| 196 | {
|
| 197 | /*
|
| 198 | |
| 199 | bit description
|
| 200 | |
| 201 | 0 GAME
|
| 202 | 1 EXROM
|
| 203 | 2 A14
|
| 204 | 3 A15
|
| 205 | 4 A16
|
| 206 | 5 v4.x
|
| 207 | 6
|
| 208 | 7
|
| 209 | |
| 210 | */
|
| 211 | |
| 212 | data = 0x20 | (m_bank << 2) | (m_exrom << 1) | m_game;
|
| 213 | }
|
| 214 | else if ((io1_offset == 0x5f) && m_rtc_ce)
|
| 215 | {
|
| 216 | m_rtc->ds1302_clk_w(0, 0);
|
| 217 | |
| 218 | m_rtc->ds1302_dat_w(0, BIT(data, 0));
|
| 219 | |
| 220 | m_rtc->ds1302_clk_w(0, 1);
|
| 221 | }
|
| 222 | else if (io1_offset >= 0x60)
|
| 223 | {
|
| 224 | rom_oe = 0;
|
| 225 | }
|
| 226 | }
|
| 227 | }
|
| 228 | |
| 229 | if (!rom_oe)
|
| 230 | {
|
| 231 | offs_t addr = (m_bank << 14) | (offset & 0x3fff);
|
| 232 | data = m_flash_rom->read(addr);
|
| 233 | }
|
| 234 | else if (!ram_oe)
|
| 235 | {
|
| 236 | data = m_ram[offset & 0x7fff];
|
| 237 | }
|
| 238 | |
| 239 | return data;
|
| 240 | }
|
| 241 | |
| 242 | |
| 243 | //-------------------------------------------------
|
| 244 | // c64_cd_w - cartridge data write
|
| 245 | //-------------------------------------------------
|
| 246 | |
| 247 | void c64_ide64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 248 | {
|
| 249 | if (!m_enable) return;
|
| 250 | |
| 251 | if (!m_game && m_exrom)
|
| 252 | {
|
| 253 | if (offset >= 0x1000 && offset < 0x8000)
|
| 254 | {
|
| 255 | m_ram[offset & 0x7fff] = data;
|
| 256 | }
|
| 257 | else if (offset >= 0xc000 && offset < 0xd000)
|
| 258 | {
|
| 259 | m_ram[offset & 0x7fff] = data;
|
| 260 | }
|
| 261 | }
|
| 262 | else
|
| 263 | {
|
| 264 | if ((offset >= 0x8000 && offset < 0xc000) && !m_wp)
|
| 265 | {
|
| 266 | offs_t addr = (m_bank << 14) | (offset & 0x3fff);
|
| 267 | m_flash_rom->write(addr, data);
|
| 268 | }
|
| 269 | else if (!io1)
|
| 270 | {
|
| 271 | // 0x20-0x2f IDE
|
| 272 | // 0x30-0x37 I/O
|
| 273 | // 0x5d-0x5e FT245
|
| 274 | // 0x5f-0x5f DS1302
|
| 275 | // 0x60-0xff ROM
|
| 276 | |
| 277 | UINT8 io1_offset = offset & 0xff;
|
| 278 | |
| 279 | if (io1_offset >= 0x20 && io1_offset < 0x30)
|
| 280 | {
|
| 281 | m_ide_data = (m_ide_data & 0xff00) | data;
|
| 282 | |
| 283 | ide_bus_w(m_ide, BIT(offset, 3), offset & 0x07, m_ide_data);
|
| 284 | }
|
| 285 | else if (io1_offset == 0x31)
|
| 286 | {
|
| 287 | m_ide_data = (data << 8) | (m_ide_data & 0xff);
|
| 288 | }
|
| 289 | else if ((io1_offset == 0x5f) && m_rtc_ce)
|
| 290 | {
|
| 291 | m_rtc->ds1302_clk_w(0, 0);
|
| 292 | |
| 293 | data = m_rtc->ds1302_read(0);
|
| 294 | |
| 295 | m_rtc->ds1302_clk_w(0, 1);
|
| 296 | }
|
| 297 | else if (io1_offset >= 0x60 && io1_offset < 0x68)
|
| 298 | {
|
| 299 | m_bank = offset & 0x07;
|
| 300 | }
|
| 301 | else if (io1_offset >= 0xfb)
|
| 302 | {
|
| 303 | /*
|
| 304 | |
| 305 | bit description
|
| 306 | |
| 307 | 0 disable cartridge
|
| 308 | 1 RTC CE
|
| 309 | 2
|
| 310 | 3
|
| 311 | 4
|
| 312 | 5
|
| 313 | 6
|
| 314 | 7
|
| 315 | |
| 316 | */
|
| 317 | |
| 318 | m_enable = !BIT(data, 0);
|
| 319 | m_rtc_ce = BIT(data, 1);
|
| 320 | |
| 321 | m_game = BIT(offset, 0);
|
| 322 | m_exrom = BIT(offset, 1);
|
| 323 | }
|
| 324 | else if (io1_offset >= 0xfc)
|
| 325 | {
|
| 326 | m_game = BIT(offset, 0);
|
| 327 | m_exrom = BIT(offset, 1);
|
| 328 | }
|
| 329 | }
|
| 330 | }
|
| 331 | }
|
src/mess/machine/c64_ide64.h
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | IDE64 v4.1 cartridge emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | #pragma once |
| 11 | | |
| 12 | | #ifndef __IDE64__ |
| 13 | | #define __IDE64__ |
| 14 | | |
| 15 | | |
| 16 | | #include "emu.h" |
| 17 | | #include "machine/c64exp.h" |
| 18 | | #include "machine/ds1302.h" |
| 19 | | #include "machine/idectrl.h" |
| 20 | | #include "machine/intelfsh.h" |
| 21 | | #include "imagedev/harddriv.h" |
| 22 | | |
| 23 | | |
| 24 | | |
| 25 | | //************************************************************************** |
| 26 | | // TYPE DEFINITIONS |
| 27 | | //************************************************************************** |
| 28 | | |
| 29 | | // ======================> c64_ide64_cartridge_device |
| 30 | | |
| 31 | | class c64_ide64_cartridge_device : public device_t, |
| 32 | | public device_c64_expansion_card_interface |
| 33 | | { |
| 34 | | public: |
| 35 | | // construction/destruction |
| 36 | | c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 37 | | |
| 38 | | // optional information overrides |
| 39 | | virtual machine_config_constructor device_mconfig_additions() const; |
| 40 | | virtual ioport_constructor device_input_ports() const; |
| 41 | | |
| 42 | | protected: |
| 43 | | // device-level overrides |
| 44 | | virtual void device_config_complete() { m_shortname = "c64_ide64"; } |
| 45 | | virtual void device_start(); |
| 46 | | virtual void device_reset(); |
| 47 | | |
| 48 | | // device_c64_expansion_card_interface overrides |
| 49 | | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2); |
| 50 | | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2); |
| 51 | | |
| 52 | | private: |
| 53 | | required_device<atmel_29c010_device> m_flash_rom; |
| 54 | | required_device<ds1302_device> m_rtc; |
| 55 | | required_device<device_t> m_ide; |
| 56 | | |
| 57 | | UINT8 m_bank; |
| 58 | | UINT8 m_ide_data; |
| 59 | | int m_wp; |
| 60 | | int m_enable; |
| 61 | | int m_rtc_ce; |
| 62 | | }; |
| 63 | | |
| 64 | | |
| 65 | | // device type definition |
| 66 | | extern const device_type C64_IDE64; |
| 67 | | |
| 68 | | |
| 69 | | #endif |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | IDE64 v4.1 cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #pragma once
|
| 11 | |
| 12 | #ifndef __IDE64__
|
| 13 | #define __IDE64__
|
| 14 | |
| 15 | |
| 16 | #include "emu.h"
|
| 17 | #include "machine/c64exp.h"
|
| 18 | #include "machine/ds1302.h"
|
| 19 | #include "machine/idectrl.h"
|
| 20 | #include "machine/intelfsh.h"
|
| 21 | #include "imagedev/harddriv.h"
|
| 22 | |
| 23 | |
| 24 | |
| 25 | //**************************************************************************
|
| 26 | // TYPE DEFINITIONS
|
| 27 | //**************************************************************************
|
| 28 | |
| 29 | // ======================> c64_ide64_cartridge_device
|
| 30 | |
| 31 | class c64_ide64_cartridge_device : public device_t,
|
| 32 | public device_c64_expansion_card_interface
|
| 33 | {
|
| 34 | public:
|
| 35 | // construction/destruction
|
| 36 | c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 37 | |
| 38 | // optional information overrides
|
| 39 | virtual machine_config_constructor device_mconfig_additions() const;
|
| 40 | virtual ioport_constructor device_input_ports() const;
|
| 41 | |
| 42 | protected:
|
| 43 | // device-level overrides
|
| 44 | virtual void device_config_complete() { m_shortname = "c64_ide64"; }
|
| 45 | virtual void device_start();
|
| 46 | virtual void device_reset();
|
| 47 | |
| 48 | // device_c64_expansion_card_interface overrides
|
| 49 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 50 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 51 | |
| 52 | private:
|
| 53 | required_device<atmel_29c010_device> m_flash_rom;
|
| 54 | required_device<ds1302_device> m_rtc;
|
| 55 | required_device<device_t> m_ide;
|
| 56 | |
| 57 | UINT8 m_bank;
|
| 58 | UINT8 m_ide_data;
|
| 59 | int m_wp;
|
| 60 | int m_enable;
|
| 61 | int m_rtc_ce;
|
| 62 | };
|
| 63 | |
| 64 | |
| 65 | // device type definition
|
| 66 | extern const device_type C64_IDE64;
|
| 67 | |
| 68 | |
| 69 | #endif
|
src/mess/machine/c64_currah_speech.c
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | Currah Speech 64 cartridge emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | /* |
| 11 | | |
| 12 | | PCB Layout |
| 13 | | ---------- |
| 14 | | |
| 15 | | |===========================| |
| 16 | | |=| | |
| 17 | | |=| VLSI | |
| 18 | | |=| | |
| 19 | | |=| | |
| 20 | | |=| ROM | |
| 21 | | |=| | |
| 22 | | |=| | |
| 23 | | |=| SP0256 | |
| 24 | | |===========================| |
| 25 | | |
| 26 | | Notes: |
| 27 | | All IC's shown. |
| 28 | | |
| 29 | | VLSI - General Instruments LA05-164 custom |
| 30 | | ROM - General Instruments R09864CS-2030 8Kx8 ROM "778R01" |
| 31 | | SP0256 - General Instruments SP0256A-AL2 Speech Synthesizer |
| 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 | | |
| 55 | | */ |
| 56 | | |
| 57 | | /* |
| 58 | | |
| 59 | | BASIC Commands |
| 60 | | -------------- |
| 61 | | |
| 62 | | INIT Initialize the cartridge |
| 63 | | BYE Disable the cartridge |
| 64 | | KON 0 Enable keyvoices, low voice |
| 65 | | KON 1 Enable keyvoices, high voice |
| 66 | | KOFF Disable keyvoices |
| 67 | | SAY 0/1 "" Say words |
| 68 | | |
| 69 | | */ |
| 70 | | |
| 71 | | #include "c64_currah_speech.h" |
| 72 | | |
| 73 | | |
| 74 | | |
| 75 | | //************************************************************************** |
| 76 | | // MACROS/CONSTANTS |
| 77 | | //************************************************************************** |
| 78 | | |
| 79 | | #define SP0256_TAG "sp0256" |
| 80 | | |
| 81 | | |
| 82 | | |
| 83 | | //************************************************************************** |
| 84 | | // DEVICE DEFINITIONS |
| 85 | | //************************************************************************** |
| 86 | | |
| 87 | | const device_type C64_CURRAH_SPEECH = &device_creator<c64_currah_speech_cartridge_device>; |
| 88 | | |
| 89 | | |
| 90 | | //------------------------------------------------- |
| 91 | | // ROM( c64_currah_speech ) |
| 92 | | //------------------------------------------------- |
| 93 | | |
| 94 | | ROM_START( c64_currah_speech ) |
| 95 | | ROM_REGION( 0x10000, SP0256_TAG, 0 ) |
| 96 | | ROM_LOAD( "sp0256a-al2", 0x1000, 0x0800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc) ) |
| 97 | | ROM_END |
| 98 | | |
| 99 | | |
| 100 | | //------------------------------------------------- |
| 101 | | // rom_region - device-specific ROM region |
| 102 | | //------------------------------------------------- |
| 103 | | |
| 104 | | const rom_entry *c64_currah_speech_cartridge_device::device_rom_region() const |
| 105 | | { |
| 106 | | return ROM_NAME( c64_currah_speech ); |
| 107 | | } |
| 108 | | |
| 109 | | |
| 110 | | //------------------------------------------------- |
| 111 | | // sp0256_interface sp0256_intf |
| 112 | | //------------------------------------------------- |
| 113 | | |
| 114 | | static sp0256_interface sp0256_intf = |
| 115 | | { |
| 116 | | DEVCB_NULL, |
| 117 | | DEVCB_NULL |
| 118 | | }; |
| 119 | | |
| 120 | | |
| 121 | | //------------------------------------------------- |
| 122 | | // MACHINE_CONFIG_FRAGMENT( c64_currah_speech ) |
| 123 | | //------------------------------------------------- |
| 124 | | |
| 125 | | static MACHINE_CONFIG_FRAGMENT( c64_currah_speech ) |
| 126 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 127 | | MCFG_SOUND_ADD(SP0256_TAG, SP0256, 4000000) // ??? |
| 128 | | MCFG_SOUND_CONFIG(sp0256_intf) |
| 129 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 130 | | MACHINE_CONFIG_END |
| 131 | | |
| 132 | | |
| 133 | | //------------------------------------------------- |
| 134 | | // machine_config_additions - device-specific |
| 135 | | // machine configurations |
| 136 | | //------------------------------------------------- |
| 137 | | |
| 138 | | machine_config_constructor c64_currah_speech_cartridge_device::device_mconfig_additions() const |
| 139 | | { |
| 140 | | return MACHINE_CONFIG_NAME( c64_currah_speech ); |
| 141 | | } |
| 142 | | |
| 143 | | |
| 144 | | |
| 145 | | //************************************************************************** |
| 146 | | // INLINE HELPERS |
| 147 | | //************************************************************************** |
| 148 | | |
| 149 | | //------------------------------------------------- |
| 150 | | // set_osc1 - |
| 151 | | //------------------------------------------------- |
| 152 | | |
| 153 | | void c64_currah_speech_cartridge_device::set_osc1(int voice, int intonation) |
| 154 | | { |
| 155 | | int dotclock = m_slot->dotclock(); |
| 156 | | |
| 157 | | // TODO intonation and correct dividers |
| 158 | | sp0256_set_clock(m_nsp, dotclock / (2 << voice)); |
| 159 | | } |
| 160 | | |
| 161 | | |
| 162 | | |
| 163 | | //************************************************************************** |
| 164 | | // LIVE DEVICE |
| 165 | | //************************************************************************** |
| 166 | | |
| 167 | | //------------------------------------------------- |
| 168 | | // c64_currah_speech_cartridge_device - constructor |
| 169 | | //------------------------------------------------- |
| 170 | | |
| 171 | | c64_currah_speech_cartridge_device::c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 172 | | device_t(mconfig, C64_CURRAH_SPEECH, "C64 Currah Speech", tag, owner, clock), |
| 173 | | device_c64_expansion_card_interface(mconfig, *this), |
| 174 | | m_nsp(*this, SP0256_TAG) |
| 175 | | { |
| 176 | | } |
| 177 | | |
| 178 | | |
| 179 | | //------------------------------------------------- |
| 180 | | // device_start - device-specific startup |
| 181 | | //------------------------------------------------- |
| 182 | | |
| 183 | | void c64_currah_speech_cartridge_device::device_start() |
| 184 | | { |
| 185 | | } |
| 186 | | |
| 187 | | |
| 188 | | //------------------------------------------------- |
| 189 | | // device_reset - device-specific reset |
| 190 | | //------------------------------------------------- |
| 191 | | |
| 192 | | void c64_currah_speech_cartridge_device::device_reset() |
| 193 | | { |
| 194 | | m_game = 1; |
| 195 | | m_exrom = 1; |
| 196 | | } |
| 197 | | |
| 198 | | |
| 199 | | //------------------------------------------------- |
| 200 | | // c64_cd_r - cartridge data read |
| 201 | | //------------------------------------------------- |
| 202 | | |
| 203 | | UINT8 c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2) |
| 204 | | { |
| 205 | | UINT8 data = 0; |
| 206 | | |
| 207 | | if (!romh) |
| 208 | | { |
| 209 | | data = m_romh[offset & 0x1fff]; |
| 210 | | } |
| 211 | | else if (!io1) |
| 212 | | { |
| 213 | | /* |
| 214 | | |
| 215 | | bit description |
| 216 | | |
| 217 | | 0 |
| 218 | | 1 |
| 219 | | 2 |
| 220 | | 3 |
| 221 | | 4 |
| 222 | | 5 |
| 223 | | 6 |
| 224 | | 7 SBY |
| 225 | | |
| 226 | | */ |
| 227 | | |
| 228 | | data = sp0256_sby_r(m_nsp) << 7; |
| 229 | | } |
| 230 | | |
| 231 | | if (!space.debugger_access() && (offset == 0xa7f0)) |
| 232 | | { |
| 233 | | m_game = !m_game; |
| 234 | | m_exrom = !m_exrom; |
| 235 | | } |
| 236 | | |
| 237 | | return data; |
| 238 | | } |
| 239 | | |
| 240 | | |
| 241 | | //------------------------------------------------- |
| 242 | | // c64_cd_w - cartridge data write |
| 243 | | //------------------------------------------------- |
| 244 | | |
| 245 | | void c64_currah_speech_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2) |
| 246 | | { |
| 247 | | if (!io1) |
| 248 | | { |
| 249 | | /* |
| 250 | | |
| 251 | | bit description |
| 252 | | |
| 253 | | 0 A1 |
| 254 | | 1 A2 |
| 255 | | 2 A3 |
| 256 | | 3 A4 |
| 257 | | 4 A5 |
| 258 | | 5 A6 |
| 259 | | 6 |
| 260 | | 7 intonation |
| 261 | | |
| 262 | | */ |
| 263 | | |
| 264 | | int voice = BIT(offset, 0); |
| 265 | | int intonation = BIT(data, 7); |
| 266 | | |
| 267 | | set_osc1(voice, intonation); |
| 268 | | |
| 269 | | sp0256_ALD_w(m_nsp, 0, data & 0x3f); |
| 270 | | } |
| 271 | | } |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Currah Speech 64 cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | /*
|
| 11 | |
| 12 | PCB Layout
|
| 13 | ----------
|
| 14 | |
| 15 | |===========================|
|
| 16 | |=| |
|
| 17 | |=| VLSI |
|
| 18 | |=| |
|
| 19 | |=| |
|
| 20 | |=| ROM |
|
| 21 | |=| |
|
| 22 | |=| |
|
| 23 | |=| SP0256 |
|
| 24 | |===========================|
|
| 25 | |
| 26 | Notes:
|
| 27 | All IC's shown.
|
| 28 | |
| 29 | VLSI - General Instruments LA05-164 custom
|
| 30 | ROM - General Instruments R09864CS-2030 8Kx8 ROM "778R01"
|
| 31 | SP0256 - General Instruments SP0256A-AL2 Speech Synthesizer
|
| 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 | |
| 55 | */
|
| 56 | |
| 57 | /*
|
| 58 | |
| 59 | BASIC Commands
|
| 60 | --------------
|
| 61 | |
| 62 | INIT Initialize the cartridge
|
| 63 | BYE Disable the cartridge
|
| 64 | KON 0 Enable keyvoices, low voice
|
| 65 | KON 1 Enable keyvoices, high voice
|
| 66 | KOFF Disable keyvoices
|
| 67 | SAY 0/1 "" Say words
|
| 68 | |
| 69 | */
|
| 70 | |
| 71 | #include "c64_currah_speech.h"
|
| 72 | |
| 73 | |
| 74 | |
| 75 | //**************************************************************************
|
| 76 | // MACROS/CONSTANTS
|
| 77 | //**************************************************************************
|
| 78 | |
| 79 | #define SP0256_TAG "sp0256"
|
| 80 | |
| 81 | |
| 82 | |
| 83 | //**************************************************************************
|
| 84 | // DEVICE DEFINITIONS
|
| 85 | //**************************************************************************
|
| 86 | |
| 87 | const device_type C64_CURRAH_SPEECH = &device_creator<c64_currah_speech_cartridge_device>;
|
| 88 | |
| 89 | |
| 90 | //-------------------------------------------------
|
| 91 | // ROM( c64_currah_speech )
|
| 92 | //-------------------------------------------------
|
| 93 | |
| 94 | ROM_START( c64_currah_speech )
|
| 95 | ROM_REGION( 0x10000, SP0256_TAG, 0 )
|
| 96 | ROM_LOAD( "sp0256a-al2", 0x1000, 0x0800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc) )
|
| 97 | ROM_END
|
| 98 | |
| 99 | |
| 100 | //-------------------------------------------------
|
| 101 | // rom_region - device-specific ROM region
|
| 102 | //-------------------------------------------------
|
| 103 | |
| 104 | const rom_entry *c64_currah_speech_cartridge_device::device_rom_region() const
|
| 105 | {
|
| 106 | return ROM_NAME( c64_currah_speech );
|
| 107 | }
|
| 108 | |
| 109 | |
| 110 | //-------------------------------------------------
|
| 111 | // sp0256_interface sp0256_intf
|
| 112 | //-------------------------------------------------
|
| 113 | |
| 114 | static sp0256_interface sp0256_intf =
|
| 115 | {
|
| 116 | DEVCB_NULL,
|
| 117 | DEVCB_NULL
|
| 118 | };
|
| 119 | |
| 120 | |
| 121 | //-------------------------------------------------
|
| 122 | // MACHINE_CONFIG_FRAGMENT( c64_currah_speech )
|
| 123 | //-------------------------------------------------
|
| 124 | |
| 125 | static MACHINE_CONFIG_FRAGMENT( c64_currah_speech )
|
| 126 | MCFG_SPEAKER_STANDARD_MONO("mono")
|
| 127 | MCFG_SOUND_ADD(SP0256_TAG, SP0256, 4000000) // ???
|
| 128 | MCFG_SOUND_CONFIG(sp0256_intf)
|
| 129 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
| 130 | MACHINE_CONFIG_END
|
| 131 | |
| 132 | |
| 133 | //-------------------------------------------------
|
| 134 | // machine_config_additions - device-specific
|
| 135 | // machine configurations
|
| 136 | //-------------------------------------------------
|
| 137 | |
| 138 | machine_config_constructor c64_currah_speech_cartridge_device::device_mconfig_additions() const
|
| 139 | {
|
| 140 | return MACHINE_CONFIG_NAME( c64_currah_speech );
|
| 141 | }
|
| 142 | |
| 143 | |
| 144 | |
| 145 | //**************************************************************************
|
| 146 | // INLINE HELPERS
|
| 147 | //**************************************************************************
|
| 148 | |
| 149 | //-------------------------------------------------
|
| 150 | // set_osc1 -
|
| 151 | //-------------------------------------------------
|
| 152 | |
| 153 | void c64_currah_speech_cartridge_device::set_osc1(int voice, int intonation)
|
| 154 | {
|
| 155 | int dotclock = m_slot->dotclock();
|
| 156 | |
| 157 | // TODO intonation and correct dividers
|
| 158 | sp0256_set_clock(m_nsp, dotclock / (2 << voice));
|
| 159 | }
|
| 160 | |
| 161 | |
| 162 | |
| 163 | //**************************************************************************
|
| 164 | // LIVE DEVICE
|
| 165 | //**************************************************************************
|
| 166 | |
| 167 | //-------------------------------------------------
|
| 168 | // c64_currah_speech_cartridge_device - constructor
|
| 169 | //-------------------------------------------------
|
| 170 | |
| 171 | c64_currah_speech_cartridge_device::c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 172 | device_t(mconfig, C64_CURRAH_SPEECH, "C64 Currah Speech", tag, owner, clock),
|
| 173 | device_c64_expansion_card_interface(mconfig, *this),
|
| 174 | m_nsp(*this, SP0256_TAG)
|
| 175 | {
|
| 176 | }
|
| 177 | |
| 178 | |
| 179 | //-------------------------------------------------
|
| 180 | // device_start - device-specific startup
|
| 181 | //-------------------------------------------------
|
| 182 | |
| 183 | void c64_currah_speech_cartridge_device::device_start()
|
| 184 | {
|
| 185 | }
|
| 186 | |
| 187 | |
| 188 | //-------------------------------------------------
|
| 189 | // device_reset - device-specific reset
|
| 190 | //-------------------------------------------------
|
| 191 | |
| 192 | void c64_currah_speech_cartridge_device::device_reset()
|
| 193 | {
|
| 194 | m_game = 1;
|
| 195 | m_exrom = 1;
|
| 196 | }
|
| 197 | |
| 198 | |
| 199 | //-------------------------------------------------
|
| 200 | // c64_cd_r - cartridge data read
|
| 201 | //-------------------------------------------------
|
| 202 | |
| 203 | UINT8 c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 204 | {
|
| 205 | UINT8 data = 0;
|
| 206 | |
| 207 | if (!romh)
|
| 208 | {
|
| 209 | data = m_romh[offset & 0x1fff];
|
| 210 | }
|
| 211 | else if (!io1)
|
| 212 | {
|
| 213 | /*
|
| 214 | |
| 215 | bit description
|
| 216 | |
| 217 | 0
|
| 218 | 1
|
| 219 | 2
|
| 220 | 3
|
| 221 | 4
|
| 222 | 5
|
| 223 | 6
|
| 224 | 7 SBY
|
| 225 | |
| 226 | */
|
| 227 | |
| 228 | data = sp0256_sby_r(m_nsp) << 7;
|
| 229 | }
|
| 230 | |
| 231 | if (!space.debugger_access() && (offset == 0xa7f0))
|
| 232 | {
|
| 233 | m_game = !m_game;
|
| 234 | m_exrom = !m_exrom;
|
| 235 | }
|
| 236 | |
| 237 | return data;
|
| 238 | }
|
| 239 | |
| 240 | |
| 241 | //-------------------------------------------------
|
| 242 | // c64_cd_w - cartridge data write
|
| 243 | //-------------------------------------------------
|
| 244 | |
| 245 | void c64_currah_speech_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 246 | {
|
| 247 | if (!io1)
|
| 248 | {
|
| 249 | /*
|
| 250 | |
| 251 | bit description
|
| 252 | |
| 253 | 0 A1
|
| 254 | 1 A2
|
| 255 | 2 A3
|
| 256 | 3 A4
|
| 257 | 4 A5
|
| 258 | 5 A6
|
| 259 | 6
|
| 260 | 7 intonation
|
| 261 | |
| 262 | */
|
| 263 | |
| 264 | int voice = BIT(offset, 0);
|
| 265 | int intonation = BIT(data, 7);
|
| 266 | |
| 267 | set_osc1(voice, intonation);
|
| 268 | |
| 269 | sp0256_ALD_w(m_nsp, 0, data & 0x3f);
|
| 270 | }
|
| 271 | }
|
src/mess/machine/c64_currah_speech.h
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | Currah Speech 64 cartridge emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | #pragma once |
| 11 | | |
| 12 | | #ifndef __CURRAH_SPEECH_64__ |
| 13 | | #define __CURRAH_SPEECH_64__ |
| 14 | | |
| 15 | | |
| 16 | | #include "emu.h" |
| 17 | | #include "machine/c64exp.h" |
| 18 | | #include "sound/sp0256.h" |
| 19 | | |
| 20 | | |
| 21 | | |
| 22 | | //************************************************************************** |
| 23 | | // TYPE DEFINITIONS |
| 24 | | //************************************************************************** |
| 25 | | |
| 26 | | // ======================> c64_currah_speech_cartridge_device |
| 27 | | |
| 28 | | class c64_currah_speech_cartridge_device : public device_t, |
| 29 | | public device_c64_expansion_card_interface |
| 30 | | { |
| 31 | | public: |
| 32 | | // construction/destruction |
| 33 | | c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 34 | | |
| 35 | | // optional information overrides |
| 36 | | virtual const rom_entry *device_rom_region() const; |
| 37 | | virtual machine_config_constructor device_mconfig_additions() const; |
| 38 | | |
| 39 | | protected: |
| 40 | | // device-level overrides |
| 41 | | virtual void device_config_complete() { m_shortname = "c64_cs"; } |
| 42 | | virtual void device_start(); |
| 43 | | virtual void device_reset(); |
| 44 | | |
| 45 | | // device_c64_expansion_card_interface overrides |
| 46 | | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2); |
| 47 | | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2); |
| 48 | | |
| 49 | | private: |
| 50 | | inline void set_osc1(int voice, int intonation); |
| 51 | | |
| 52 | | required_device<device_t> m_nsp; |
| 53 | | }; |
| 54 | | |
| 55 | | |
| 56 | | // device type definition |
| 57 | | extern const device_type C64_CURRAH_SPEECH; |
| 58 | | |
| 59 | | |
| 60 | | #endif |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Currah Speech 64 cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #pragma once
|
| 11 | |
| 12 | #ifndef __CURRAH_SPEECH_64__
|
| 13 | #define __CURRAH_SPEECH_64__
|
| 14 | |
| 15 | |
| 16 | #include "emu.h"
|
| 17 | #include "machine/c64exp.h"
|
| 18 | #include "sound/sp0256.h"
|
| 19 | |
| 20 | |
| 21 | |
| 22 | //**************************************************************************
|
| 23 | // TYPE DEFINITIONS
|
| 24 | //**************************************************************************
|
| 25 | |
| 26 | // ======================> c64_currah_speech_cartridge_device
|
| 27 | |
| 28 | class c64_currah_speech_cartridge_device : public device_t,
|
| 29 | public device_c64_expansion_card_interface
|
| 30 | {
|
| 31 | public:
|
| 32 | // construction/destruction
|
| 33 | c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 34 | |
| 35 | // optional information overrides
|
| 36 | virtual const rom_entry *device_rom_region() const;
|
| 37 | virtual machine_config_constructor device_mconfig_additions() const;
|
| 38 | |
| 39 | protected:
|
| 40 | // device-level overrides
|
| 41 | virtual void device_config_complete() { m_shortname = "c64_cs"; }
|
| 42 | virtual void device_start();
|
| 43 | virtual void device_reset();
|
| 44 | |
| 45 | // device_c64_expansion_card_interface overrides
|
| 46 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 47 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 48 | |
| 49 | private:
|
| 50 | inline void set_osc1(int voice, int intonation);
|
| 51 | |
| 52 | required_device<device_t> m_nsp;
|
| 53 | };
|
| 54 | |
| 55 | |
| 56 | // device type definition
|
| 57 | extern const device_type C64_CURRAH_SPEECH;
|
| 58 | |
| 59 | |
| 60 | #endif
|
src/mess/machine/c64_sw8k.c
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | C64 switchable 8K cartridge emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | /* |
| 11 | | |
| 12 | | 4040 + Fast Hack'em |
| 13 | | |
| 14 | | PCB Layout |
| 15 | | ---------- |
| 16 | | |
| 17 | | |===========================| |
| 18 | | |=| | |
| 19 | | |=| SW1 | |
| 20 | | |=| ROM0 | |
| 21 | | |=| | |
| 22 | | |=| | |
| 23 | | |=| ROM1 | |
| 24 | | |=| | |
| 25 | | |=| | |
| 26 | | |===========================| |
| 27 | | |
| 28 | | ROM0,1 - National Semiconductor NMC27C64Q 8Kx8 EPROM |
| 29 | | SW1 - ROM selection switch |
| 30 | | |
| 31 | | */ |
| 32 | | |
| 33 | | #include "c64_sw8k.h" |
| 34 | | |
| 35 | | |
| 36 | | |
| 37 | | //************************************************************************** |
| 38 | | // DEVICE DEFINITIONS |
| 39 | | //************************************************************************** |
| 40 | | |
| 41 | | const device_type C64_SW8K = &device_creator<c64_switchable_8k_cartridge_device>; |
| 42 | | |
| 43 | | |
| 44 | | //------------------------------------------------- |
| 45 | | // INPUT_PORTS( c64_easyflash ) |
| 46 | | //------------------------------------------------- |
| 47 | | |
| 48 | | static INPUT_PORTS_START( c64_switchable_8k ) |
| 49 | | PORT_START("SW") |
| 50 | | PORT_DIPNAME( 0x01, 0x00, "ROM Select" ) |
| 51 | | PORT_DIPSETTING( 0x00, "ROM 0" ) |
| 52 | | PORT_DIPSETTING( 0x01, "ROM 1" ) |
| 53 | | INPUT_PORTS_END |
| 54 | | |
| 55 | | |
| 56 | | //------------------------------------------------- |
| 57 | | // input_ports - device-specific input ports |
| 58 | | //------------------------------------------------- |
| 59 | | |
| 60 | | ioport_constructor c64_switchable_8k_cartridge_device::device_input_ports() const |
| 61 | | { |
| 62 | | return INPUT_PORTS_NAME( c64_switchable_8k ); |
| 63 | | } |
| 64 | | |
| 65 | | |
| 66 | | |
| 67 | | //************************************************************************** |
| 68 | | // LIVE DEVICE |
| 69 | | //************************************************************************** |
| 70 | | |
| 71 | | //------------------------------------------------- |
| 72 | | // c64_switchable_8k_cartridge_device - constructor |
| 73 | | //------------------------------------------------- |
| 74 | | |
| 75 | | c64_switchable_8k_cartridge_device::c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 76 | | device_t(mconfig, C64_SW8K, "C64 Switchable 8K cartridge", tag, owner, clock), |
| 77 | | device_c64_expansion_card_interface(mconfig, *this) |
| 78 | | { |
| 79 | | } |
| 80 | | |
| 81 | | |
| 82 | | //------------------------------------------------- |
| 83 | | // device_start - device-specific startup |
| 84 | | //------------------------------------------------- |
| 85 | | |
| 86 | | void c64_switchable_8k_cartridge_device::device_start() |
| 87 | | { |
| 88 | | } |
| 89 | | |
| 90 | | |
| 91 | | //------------------------------------------------- |
| 92 | | // device_reset - device-specific reset |
| 93 | | //------------------------------------------------- |
| 94 | | |
| 95 | | void c64_switchable_8k_cartridge_device::device_reset() |
| 96 | | { |
| 97 | | m_bank = input_port_read(*this, "SW"); |
| 98 | | } |
| 99 | | |
| 100 | | |
| 101 | | //------------------------------------------------- |
| 102 | | // c64_cd_r - cartridge data read |
| 103 | | //------------------------------------------------- |
| 104 | | |
| 105 | | UINT8 c64_switchable_8k_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2) |
| 106 | | { |
| 107 | | UINT8 data = 0; |
| 108 | | |
| 109 | | if (!roml) |
| 110 | | { |
| 111 | | offs_t addr = (m_bank << 13) | (offset & 0x1fff); |
| 112 | | data = m_roml[addr]; |
| 113 | | } |
| 114 | | |
| 115 | | return data; |
| 116 | | } |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | C64 switchable 8K cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | /*
|
| 11 | |
| 12 | 4040 + Fast Hack'em
|
| 13 | |
| 14 | PCB Layout
|
| 15 | ----------
|
| 16 | |
| 17 | |===========================|
|
| 18 | |=| |
|
| 19 | |=| SW1 |
|
| 20 | |=| ROM0 |
|
| 21 | |=| |
|
| 22 | |=| |
|
| 23 | |=| ROM1 |
|
| 24 | |=| |
|
| 25 | |=| |
|
| 26 | |===========================|
|
| 27 | |
| 28 | ROM0,1 - National Semiconductor NMC27C64Q 8Kx8 EPROM
|
| 29 | SW1 - ROM selection switch
|
| 30 | |
| 31 | */
|
| 32 | |
| 33 | #include "c64_sw8k.h"
|
| 34 | |
| 35 | |
| 36 | |
| 37 | //**************************************************************************
|
| 38 | // DEVICE DEFINITIONS
|
| 39 | //**************************************************************************
|
| 40 | |
| 41 | const device_type C64_SW8K = &device_creator<c64_switchable_8k_cartridge_device>;
|
| 42 | |
| 43 | |
| 44 | //-------------------------------------------------
|
| 45 | // INPUT_PORTS( c64_easyflash )
|
| 46 | //-------------------------------------------------
|
| 47 | |
| 48 | static INPUT_PORTS_START( c64_switchable_8k )
|
| 49 | PORT_START("SW")
|
| 50 | PORT_DIPNAME( 0x01, 0x00, "ROM Select" )
|
| 51 | PORT_DIPSETTING( 0x00, "ROM 0" )
|
| 52 | PORT_DIPSETTING( 0x01, "ROM 1" )
|
| 53 | INPUT_PORTS_END
|
| 54 | |
| 55 | |
| 56 | //-------------------------------------------------
|
| 57 | // input_ports - device-specific input ports
|
| 58 | //-------------------------------------------------
|
| 59 | |
| 60 | ioport_constructor c64_switchable_8k_cartridge_device::device_input_ports() const
|
| 61 | {
|
| 62 | return INPUT_PORTS_NAME( c64_switchable_8k );
|
| 63 | }
|
| 64 | |
| 65 | |
| 66 | |
| 67 | //**************************************************************************
|
| 68 | // LIVE DEVICE
|
| 69 | //**************************************************************************
|
| 70 | |
| 71 | //-------------------------------------------------
|
| 72 | // c64_switchable_8k_cartridge_device - constructor
|
| 73 | //-------------------------------------------------
|
| 74 | |
| 75 | c64_switchable_8k_cartridge_device::c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 76 | device_t(mconfig, C64_SW8K, "C64 Switchable 8K cartridge", tag, owner, clock),
|
| 77 | device_c64_expansion_card_interface(mconfig, *this)
|
| 78 | {
|
| 79 | }
|
| 80 | |
| 81 | |
| 82 | //-------------------------------------------------
|
| 83 | // device_start - device-specific startup
|
| 84 | //-------------------------------------------------
|
| 85 | |
| 86 | void c64_switchable_8k_cartridge_device::device_start()
|
| 87 | {
|
| 88 | }
|
| 89 | |
| 90 | |
| 91 | //-------------------------------------------------
|
| 92 | // device_reset - device-specific reset
|
| 93 | //-------------------------------------------------
|
| 94 | |
| 95 | void c64_switchable_8k_cartridge_device::device_reset()
|
| 96 | {
|
| 97 | m_bank = input_port_read(*this, "SW");
|
| 98 | }
|
| 99 | |
| 100 | |
| 101 | //-------------------------------------------------
|
| 102 | // c64_cd_r - cartridge data read
|
| 103 | //-------------------------------------------------
|
| 104 | |
| 105 | UINT8 c64_switchable_8k_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 106 | {
|
| 107 | UINT8 data = 0;
|
| 108 | |
| 109 | if (!roml)
|
| 110 | {
|
| 111 | offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
| 112 | data = m_roml[addr];
|
| 113 | }
|
| 114 | |
| 115 | return data;
|
| 116 | }
|
src/mess/machine/a2videoterm.c
| r15019 | r15020 | |
| 3 | 3 | a2videoterm.c |
| 4 | 4 | |
| 5 | 5 | Implementation of the Videx VideoTerm 80-column card |
| 6 | | |
| 6 | |
| 7 | 7 | Notes (from Videoterm user's manual, which contains |
| 8 | 8 | schematics and firmware source listings). |
| 9 | | |
| 9 | |
| 10 | 10 | C0nX: C0n0 is 6845 register address, |
| 11 | 11 | C0n1 is 6845 register data. |
| 12 | | |
| 12 | |
| 13 | 13 | Bits 2 & 3 on any access to C0nX set the VRAM page at CC00. |
| 14 | | |
| 14 | |
| 15 | 15 | C800-CBFF: ROM |
| 16 | 16 | CC00-CDFF: VRAM window |
| 17 | | |
| 17 | |
| 18 | 18 | TODO: |
| 19 | 19 | Cursor is probably not completely right. |
| 20 | 20 | Add font ROM select. |
| 21 | | |
| 21 | |
| 22 | 22 | *********************************************************************/ |
| 23 | 23 | |
| 24 | 24 | #include "a2videoterm.h" |
| r15019 | r15020 | |
| 68 | 68 | |
| 69 | 69 | ROM_START( a2videoterm ) |
| 70 | 70 | ROM_REGION(0x400, VIDEOTERM_ROM_REGION, 0) |
| 71 | | ROM_LOAD( "videx videoterm rom 2.4.bin", 0x000000, 0x000400, CRC(bbe3bb28) SHA1(bb653836e84850ce3197f461d4e19355f738cfbf) ) |
| 71 | ROM_LOAD( "videx videoterm rom 2.4.bin", 0x000000, 0x000400, CRC(bbe3bb28) SHA1(bb653836e84850ce3197f461d4e19355f738cfbf) ) |
| 72 | 72 | |
| 73 | 73 | ROM_REGION(0x5000, VIDEOTERM_GFX_REGION, 0) |
| 74 | | ROM_LOAD( "videx videoterm character rom normal.bin", 0x000000, 0x000800, CRC(87f89f08) SHA1(410b54f33d13c82e3857f1be906d93a8c5b8d321) ) |
| 75 | | ROM_LOAD( "videx videoterm character rom normal uppercase.bin", 0x000800, 0x000800, CRC(3d94a7a4) SHA1(5518254f24bc945aab13bc71ecc9526d6dd8e033) ) |
| 76 | | ROM_LOAD( "videx videoterm character rom apl.bin", 0x001000, 0x000800, CRC(1adb704e) SHA1(a95df910eca33188cacee333b1325aa47edbcc25) ) |
| 77 | | ROM_LOAD( "videx videoterm character rom epson.bin", 0x001800, 0x000800, CRC(0c6ef8d0) SHA1(db72c0c120086f1aa4a87120c5d7993c4a9d3a18) ) |
| 78 | | ROM_LOAD( "videx videoterm character rom french.bin", 0x002000, 0x000800, CRC(266aa837) SHA1(2c6b4e9d342dbb2de8e278740f11925a9d8c6616) ) |
| 79 | | ROM_LOAD( "videx videoterm character rom german.bin", 0x002800, 0x000800, CRC(df7324fa) SHA1(0ce58d2ffadbebc8db9f85bbb9a08a4f142af682) ) |
| 80 | | ROM_LOAD( "videx videoterm character rom katakana.bin", 0x003000, 0x000800, CRC(b728690e) SHA1(e018fa66b0ff560313bb35757c9ce7adecae0c3a) ) |
| 81 | | ROM_LOAD( "videx videoterm character rom spanish.bin", 0x003800, 0x000800, CRC(439eac08) SHA1(d6f9f8eb7702440d9ae39129ea4f480b80fc4608) ) |
| 82 | | ROM_LOAD( "videx videoterm character rom super and subscript.bin", 0x004000, 0x000800, CRC(08b7c538) SHA1(7f4029d97be05680fe695debe07cea07666419e0) ) |
| 83 | | ROM_LOAD( "videx videoterm character rom symbol.bin", 0x004800, 0x000800, CRC(82bce582) SHA1(29dfa8c5257dbf25651c6bffa9cdb453482aa70e) ) |
| 74 | ROM_LOAD( "videx videoterm character rom normal.bin", 0x000000, 0x000800, CRC(87f89f08) SHA1(410b54f33d13c82e3857f1be906d93a8c5b8d321) ) |
| 75 | ROM_LOAD( "videx videoterm character rom normal uppercase.bin", 0x000800, 0x000800, CRC(3d94a7a4) SHA1(5518254f24bc945aab13bc71ecc9526d6dd8e033) ) |
| 76 | ROM_LOAD( "videx videoterm character rom apl.bin", 0x001000, 0x000800, CRC(1adb704e) SHA1(a95df910eca33188cacee333b1325aa47edbcc25) ) |
| 77 | ROM_LOAD( "videx videoterm character rom epson.bin", 0x001800, 0x000800, CRC(0c6ef8d0) SHA1(db72c0c120086f1aa4a87120c5d7993c4a9d3a18) ) |
| 78 | ROM_LOAD( "videx videoterm character rom french.bin", 0x002000, 0x000800, CRC(266aa837) SHA1(2c6b4e9d342dbb2de8e278740f11925a9d8c6616) ) |
| 79 | ROM_LOAD( "videx videoterm character rom german.bin", 0x002800, 0x000800, CRC(df7324fa) SHA1(0ce58d2ffadbebc8db9f85bbb9a08a4f142af682) ) |
| 80 | ROM_LOAD( "videx videoterm character rom katakana.bin", 0x003000, 0x000800, CRC(b728690e) SHA1(e018fa66b0ff560313bb35757c9ce7adecae0c3a) ) |
| 81 | ROM_LOAD( "videx videoterm character rom spanish.bin", 0x003800, 0x000800, CRC(439eac08) SHA1(d6f9f8eb7702440d9ae39129ea4f480b80fc4608) ) |
| 82 | ROM_LOAD( "videx videoterm character rom super and subscript.bin", 0x004000, 0x000800, CRC(08b7c538) SHA1(7f4029d97be05680fe695debe07cea07666419e0) ) |
| 83 | ROM_LOAD( "videx videoterm character rom symbol.bin", 0x004800, 0x000800, CRC(82bce582) SHA1(29dfa8c5257dbf25651c6bffa9cdb453482aa70e) ) |
| 84 | 84 | ROM_END |
| 85 | 85 | |
| 86 | 86 | /*************************************************************************** |
src/mess/machine/c64_ps64.c
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | PS-64 speech cartridge emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | /* |
| 11 | | |
| 12 | | PCB Layout |
| 13 | | ---------- |
| 14 | | |
| 15 | | |===========================| |
| 16 | | |=| | |
| 17 | | |=| SW1| |
| 18 | | |=| SC02 | |
| 19 | | |=| | |
| 20 | | |=| CN1| |
| 21 | | |=| ROM LF347 | |
| 22 | | |=| | |
| 23 | | |=| | |
| 24 | | |===========================| |
| 25 | | |
| 26 | | SC02 - Votrax SSI-263AP Speech Synthesizer |
| 27 | | ROM - Hynix Semiconductor HY27C64D-20 8Kx8 EPROM |
| 28 | | LF347 - National Instruments LF347N JFET Operational Amplifier |
| 29 | | SW1 - Module on/off switch |
| 30 | | CN1 - connector to C64 video/audio port |
| 31 | | |
| 32 | | */ |
| 33 | | |
| 34 | | /* |
| 35 | | |
| 36 | | TODO: |
| 37 | | |
| 38 | | - Votrax SC02 emulation |
| 39 | | - route sound to SID audio input |
| 40 | | - on/off switch |
| 41 | | |
| 42 | | */ |
| 43 | | |
| 44 | | #include "c64_ps64.h" |
| 45 | | |
| 46 | | |
| 47 | | |
| 48 | | //************************************************************************** |
| 49 | | // MACROS/CONSTANTS |
| 50 | | //************************************************************************** |
| 51 | | |
| 52 | | #define SSI263_TAG "ssi263" |
| 53 | | |
| 54 | | |
| 55 | | |
| 56 | | //************************************************************************** |
| 57 | | // DEVICE DEFINITIONS |
| 58 | | //************************************************************************** |
| 59 | | |
| 60 | | const device_type C64_PS64 = &device_creator<c64_ps64_cartridge_device>; |
| 61 | | |
| 62 | | |
| 63 | | //------------------------------------------------- |
| 64 | | // votrax_sc02_interface votrax_intf |
| 65 | | //------------------------------------------------- |
| 66 | | /* |
| 67 | | static struct votrax_sc02_interface votrax_intf = |
| 68 | | { |
| 69 | | DEVCB_NULL |
| 70 | | }; |
| 71 | | */ |
| 72 | | |
| 73 | | //------------------------------------------------- |
| 74 | | // MACHINE_CONFIG_FRAGMENT( c64_ps64 ) |
| 75 | | //------------------------------------------------- |
| 76 | | |
| 77 | | static MACHINE_CONFIG_FRAGMENT( c64_ps64 ) |
| 78 | | //MCFG_SPEAKER_STANDARD_MONO("mono") |
| 79 | | //MCFG_VOTRAX_SC02_ADD(SSI263_TAG, 2000000, votrax_intf) |
| 80 | | //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 81 | | MACHINE_CONFIG_END |
| 82 | | |
| 83 | | |
| 84 | | //------------------------------------------------- |
| 85 | | // machine_config_additions - device-specific |
| 86 | | // machine configurations |
| 87 | | //------------------------------------------------- |
| 88 | | |
| 89 | | machine_config_constructor c64_ps64_cartridge_device::device_mconfig_additions() const |
| 90 | | { |
| 91 | | return MACHINE_CONFIG_NAME( c64_ps64 ); |
| 92 | | } |
| 93 | | |
| 94 | | |
| 95 | | |
| 96 | | //************************************************************************** |
| 97 | | // LIVE DEVICE |
| 98 | | //************************************************************************** |
| 99 | | |
| 100 | | //------------------------------------------------- |
| 101 | | // c64_ps64_cartridge_device - constructor |
| 102 | | //------------------------------------------------- |
| 103 | | |
| 104 | | c64_ps64_cartridge_device::c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 105 | | device_t(mconfig, C64_PS64, "C64 PS-64", tag, owner, clock), |
| 106 | | device_c64_expansion_card_interface(mconfig, *this) |
| 107 | | { |
| 108 | | } |
| 109 | | |
| 110 | | |
| 111 | | //------------------------------------------------- |
| 112 | | // device_start - device-specific startup |
| 113 | | //------------------------------------------------- |
| 114 | | |
| 115 | | void c64_ps64_cartridge_device::device_start() |
| 116 | | { |
| 117 | | } |
| 118 | | |
| 119 | | |
| 120 | | //------------------------------------------------- |
| 121 | | // device_reset - device-specific reset |
| 122 | | //------------------------------------------------- |
| 123 | | |
| 124 | | void c64_ps64_cartridge_device::device_reset() |
| 125 | | { |
| 126 | | } |
| 127 | | |
| 128 | | |
| 129 | | //------------------------------------------------- |
| 130 | | // c64_cd_r - cartridge data read |
| 131 | | //------------------------------------------------- |
| 132 | | |
| 133 | | UINT8 c64_ps64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2) |
| 134 | | { |
| 135 | | UINT8 data = 0; |
| 136 | | |
| 137 | | if (!roml) |
| 138 | | { |
| 139 | | data = m_roml[offset & 0x1fff]; |
| 140 | | } |
| 141 | | else if (!io1) |
| 142 | | { |
| 143 | | //sc02->read(offset & 0x07); |
| 144 | | } |
| 145 | | |
| 146 | | return data; |
| 147 | | } |
| 148 | | |
| 149 | | |
| 150 | | //------------------------------------------------- |
| 151 | | // c64_cd_w - cartridge data write |
| 152 | | //------------------------------------------------- |
| 153 | | |
| 154 | | void c64_ps64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2) |
| 155 | | { |
| 156 | | if (!io1) |
| 157 | | { |
| 158 | | // sc02->write(offset & 0x07, data); |
| 159 | | } |
| 160 | | } |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | PS-64 speech cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | /*
|
| 11 | |
| 12 | PCB Layout
|
| 13 | ----------
|
| 14 | |
| 15 | |===========================|
|
| 16 | |=| |
|
| 17 | |=| SW1|
|
| 18 | |=| SC02 |
|
| 19 | |=| |
|
| 20 | |=| CN1|
|
| 21 | |=| ROM LF347 |
|
| 22 | |=| |
|
| 23 | |=| |
|
| 24 | |===========================|
|
| 25 | |
| 26 | SC02 - Votrax SSI-263AP Speech Synthesizer
|
| 27 | ROM - Hynix Semiconductor HY27C64D-20 8Kx8 EPROM
|
| 28 | LF347 - National Instruments LF347N JFET Operational Amplifier
|
| 29 | SW1 - Module on/off switch
|
| 30 | CN1 - connector to C64 video/audio port
|
| 31 | |
| 32 | */
|
| 33 | |
| 34 | /*
|
| 35 | |
| 36 | TODO:
|
| 37 | |
| 38 | - Votrax SC02 emulation
|
| 39 | - route sound to SID audio input
|
| 40 | - on/off switch
|
| 41 | |
| 42 | */
|
| 43 | |
| 44 | #include "c64_ps64.h"
|
| 45 | |
| 46 | |
| 47 | |
| 48 | //**************************************************************************
|
| 49 | // MACROS/CONSTANTS
|
| 50 | //**************************************************************************
|
| 51 | |
| 52 | #define SSI263_TAG "ssi263"
|
| 53 | |
| 54 | |
| 55 | |
| 56 | //**************************************************************************
|
| 57 | // DEVICE DEFINITIONS
|
| 58 | //**************************************************************************
|
| 59 | |
| 60 | const device_type C64_PS64 = &device_creator<c64_ps64_cartridge_device>;
|
| 61 | |
| 62 | |
| 63 | //-------------------------------------------------
|
| 64 | // votrax_sc02_interface votrax_intf
|
| 65 | //-------------------------------------------------
|
| 66 | /*
|
| 67 | static struct votrax_sc02_interface votrax_intf =
|
| 68 | {
|
| 69 | DEVCB_NULL
|
| 70 | };
|
| 71 | */
|
| 72 | |
| 73 | //-------------------------------------------------
|
| 74 | // MACHINE_CONFIG_FRAGMENT( c64_ps64 )
|
| 75 | //-------------------------------------------------
|
| 76 | |
| 77 | static MACHINE_CONFIG_FRAGMENT( c64_ps64 )
|
| 78 | //MCFG_SPEAKER_STANDARD_MONO("mono")
|
| 79 | //MCFG_VOTRAX_SC02_ADD(SSI263_TAG, 2000000, votrax_intf)
|
| 80 | //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
| 81 | MACHINE_CONFIG_END
|
| 82 | |
| 83 | |
| 84 | //-------------------------------------------------
|
| 85 | // machine_config_additions - device-specific
|
| 86 | // machine configurations
|
| 87 | //-------------------------------------------------
|
| 88 | |
| 89 | machine_config_constructor c64_ps64_cartridge_device::device_mconfig_additions() const
|
| 90 | {
|
| 91 | return MACHINE_CONFIG_NAME( c64_ps64 );
|
| 92 | }
|
| 93 | |
| 94 | |
| 95 | |
| 96 | //**************************************************************************
|
| 97 | // LIVE DEVICE
|
| 98 | //**************************************************************************
|
| 99 | |
| 100 | //-------------------------------------------------
|
| 101 | // c64_ps64_cartridge_device - constructor
|
| 102 | //-------------------------------------------------
|
| 103 | |
| 104 | c64_ps64_cartridge_device::c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 105 | device_t(mconfig, C64_PS64, "C64 PS-64", tag, owner, clock),
|
| 106 | device_c64_expansion_card_interface(mconfig, *this)
|
| 107 | {
|
| 108 | }
|
| 109 | |
| 110 | |
| 111 | //-------------------------------------------------
|
| 112 | // device_start - device-specific startup
|
| 113 | //-------------------------------------------------
|
| 114 | |
| 115 | void c64_ps64_cartridge_device::device_start()
|
| 116 | {
|
| 117 | }
|
| 118 | |
| 119 | |
| 120 | //-------------------------------------------------
|
| 121 | // device_reset - device-specific reset
|
| 122 | //-------------------------------------------------
|
| 123 | |
| 124 | void c64_ps64_cartridge_device::device_reset()
|
| 125 | {
|
| 126 | }
|
| 127 | |
| 128 | |
| 129 | //-------------------------------------------------
|
| 130 | // c64_cd_r - cartridge data read
|
| 131 | //-------------------------------------------------
|
| 132 | |
| 133 | UINT8 c64_ps64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 134 | {
|
| 135 | UINT8 data = 0;
|
| 136 | |
| 137 | if (!roml)
|
| 138 | {
|
| 139 | data = m_roml[offset & 0x1fff];
|
| 140 | }
|
| 141 | else if (!io1)
|
| 142 | {
|
| 143 | //sc02->read(offset & 0x07);
|
| 144 | }
|
| 145 | |
| 146 | return data;
|
| 147 | }
|
| 148 | |
| 149 | |
| 150 | //-------------------------------------------------
|
| 151 | // c64_cd_w - cartridge data write
|
| 152 | //-------------------------------------------------
|
| 153 | |
| 154 | void c64_ps64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 155 | {
|
| 156 | if (!io1)
|
| 157 | {
|
| 158 | // sc02->write(offset & 0x07, data);
|
| 159 | }
|
| 160 | }
|
src/mess/machine/c64_ps64.h
| r15019 | r15020 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | PS-64 speech cartridge emulation |
| 4 | | |
| 5 | | Copyright MESS Team. |
| 6 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | | |
| 8 | | **********************************************************************/ |
| 9 | | |
| 10 | | #pragma once |
| 11 | | |
| 12 | | #ifndef __PS64__ |
| 13 | | #define __PS64__ |
| 14 | | |
| 15 | | |
| 16 | | #include "emu.h" |
| 17 | | #include "machine/c64exp.h" |
| 18 | | #include "sound/votrax.h" |
| 19 | | |
| 20 | | |
| 21 | | |
| 22 | | //************************************************************************** |
| 23 | | // TYPE DEFINITIONS |
| 24 | | //************************************************************************** |
| 25 | | |
| 26 | | // ======================> c64_ps64_cartridge_device |
| 27 | | |
| 28 | | class c64_ps64_cartridge_device : public device_t, |
| 29 | | public device_c64_expansion_card_interface |
| 30 | | { |
| 31 | | public: |
| 32 | | // construction/destruction |
| 33 | | c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 34 | | |
| 35 | | // optional information overrides |
| 36 | | virtual machine_config_constructor device_mconfig_additions() const; |
| 37 | | |
| 38 | | protected: |
| 39 | | // device-level overrides |
| 40 | | virtual void device_config_complete() { m_shortname = "c64_ps64"; } |
| 41 | | virtual void device_start(); |
| 42 | | virtual void device_reset(); |
| 43 | | |
| 44 | | // device_c64_expansion_card_interface overrides |
| 45 | | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2); |
| 46 | | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2); |
| 47 | | }; |
| 48 | | |
| 49 | | |
| 50 | | // device type definition |
| 51 | | extern const device_type C64_PS64; |
| 52 | | |
| 53 | | |
| 54 | | #endif |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | PS-64 speech cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #pragma once
|
| 11 | |
| 12 | #ifndef __PS64__
|
| 13 | #define __PS64__
|
| 14 | |
| 15 | |
| 16 | #include "emu.h"
|
| 17 | #include "machine/c64exp.h"
|
| 18 | #include "sound/votrax.h"
|
| 19 | |
| 20 | |
| 21 | |
| 22 | //**************************************************************************
|
| 23 | // TYPE DEFINITIONS
|
| 24 | //**************************************************************************
|
| 25 | |
| 26 | // ======================> c64_ps64_cartridge_device
|
| 27 | |
| 28 | class c64_ps64_cartridge_device : public device_t,
|
| 29 | public device_c64_expansion_card_interface
|
| 30 | {
|
| 31 | public:
|
| 32 | // construction/destruction
|
| 33 | c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 34 | |
| 35 | // optional information overrides
|
| 36 | virtual machine_config_constructor device_mconfig_additions() const;
|
| 37 | |
| 38 | protected:
|
| 39 | // device-level overrides
|
| 40 | virtual void device_config_complete() { m_shortname = "c64_ps64"; }
|
| 41 | virtual void device_start();
|
| 42 | virtual void device_reset();
|
| 43 | |
| 44 | // device_c64_expansion_card_interface overrides
|
| 45 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 46 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 47 | };
|
| 48 | |
| 49 | |
| 50 | // device type definition
|
| 51 | extern const device_type C64_PS64;
|
| 52 | |
| 53 | |
| 54 | #endif
|