src/mess/machine/s100_dj2db.c
| r12018 | r12019 | |
| 33 | 33 | //------------------------------------------------- |
| 34 | 34 | |
| 35 | 35 | ROM_START( dj2db ) |
| 36 | | ROM_REGION( 0x400, "dj2db", 0 ) |
| 36 | ROM_REGION( 0x400, "dj2db", ROMREGION_INVERT ) // TODO does not invert currently |
| 37 | 37 | ROM_LOAD( "bv-2 f8.11d", 0x000, 0x400, CRC(b6218d0b) SHA1(e4b2ae886c0dd7717e2e02ae2e202115d8ec2def) ) |
| 38 | 38 | |
| 39 | 39 | ROM_REGION( 0x220, "proms", 0 ) |
| r12018 | r12019 | |
| 269 | 269 | void s100_dj2db_device::device_start() |
| 270 | 270 | { |
| 271 | 271 | m_s100 = machine().device<s100_device>("s100"); |
| 272 | |
| 273 | m_rom = subregion("dj2db")->base(); |
| 274 | m_ram = auto_alloc_array(machine(), UINT8, 0x400); |
| 272 | 275 | } |
| 273 | 276 | |
| 274 | 277 | |
| r12018 | r12019 | |
| 287 | 290 | |
| 288 | 291 | UINT8 s100_dj2db_device::s100_smemr_r(offs_t offset) |
| 289 | 292 | { |
| 290 | | return 0; |
| 293 | UINT8 data = 0; |
| 294 | |
| 295 | if ((offset >= 0xf800) && (offset < 0xfbf8)) |
| 296 | { |
| 297 | data = m_rom[offset & 0x3ff] ^ 0xff; // TODO remove ^0xff once ROMREGION_INVERT has been fixed |
| 298 | } |
| 299 | else if (offset == 0xfbf8) |
| 300 | { |
| 301 | // UART inverted data |
| 302 | } |
| 303 | else if (offset == 0xfbf9) |
| 304 | { |
| 305 | // UART inverted status |
| 306 | } |
| 307 | else if (offset == 0xfbfa) |
| 308 | { |
| 309 | // disk jockey status |
| 310 | } |
| 311 | else if ((offset >= 0xfbfc) && (offset < 0xfc00)) |
| 312 | { |
| 313 | data = wd17xx_r(m_fdc, offset & 0x03); |
| 314 | } |
| 315 | else if ((offset >= 0xfc00) && (offset < 0x10000)) |
| 316 | { |
| 317 | data = m_ram[offset & 0x3ff]; |
| 318 | } |
| 319 | |
| 320 | return data; |
| 291 | 321 | } |
| 292 | 322 | |
| 293 | 323 | |
| r12018 | r12019 | |
| 297 | 327 | |
| 298 | 328 | void s100_dj2db_device::s100_mwrt_w(offs_t offset, UINT8 data) |
| 299 | 329 | { |
| 330 | if (offset == 0xfbf8) |
| 331 | { |
| 332 | // UART inverted data |
| 333 | } |
| 334 | else if (offset == 0xfbf9) |
| 335 | { |
| 336 | // disk jockey function |
| 337 | } |
| 338 | else if (offset == 0xfbfa) |
| 339 | { |
| 340 | // drive control register |
| 341 | } |
| 342 | else if ((offset >= 0xfbfc) && (offset < 0xfc00)) |
| 343 | { |
| 344 | wd17xx_w(m_fdc, offset & 0x03, data); |
| 345 | } |
| 346 | else if ((offset >= 0xfc00) && (offset < 0x10000)) |
| 347 | { |
| 348 | m_ram[offset & 0x3ff] = data; |
| 349 | } |
| 300 | 350 | } |
| 301 | 351 | |
| 302 | 352 | |