trunk/src/mame/drivers/peplus.c
| r241518 | r241519 | |
| 203 | 203 | { |
| 204 | 204 | TIMER_ASSERT_LP |
| 205 | 205 | }; |
| 206 | | |
| 207 | | peplus_state(const machine_config &mconfig, device_type type, const char *tag) |
| 208 | | : driver_device(mconfig, type, tag), |
| 209 | | m_cmos_ram(*this, "cmos") , |
| 210 | | m_program_ram(*this, "prograram"), |
| 211 | | m_s3000_ram(*this, "s3000_ram"), |
| 212 | | m_s5000_ram(*this, "s5000_ram"), |
| 206 | |
| 207 | peplus_state(const machine_config &mconfig, device_type type, const char *tag)
|
| 208 | : driver_device(mconfig, type, tag),
|
| 209 | m_maincpu(*this, "maincpu"),
|
| 210 | m_crtc(*this, "crtc"),
|
| 211 | m_i2cmem(*this, "i2cmem"),
|
| 212 | m_screen(*this, "screen"),
|
| 213 | m_gfxdecode(*this, "gfxdecode"),
|
| 214 | m_palette(*this, "palette"),
|
| 215 | m_cmos_ram(*this, "cmos"),
|
| 216 | m_program_ram(*this, "prograram"),
|
| 217 | m_s3000_ram(*this, "s3000_ram"),
|
| 218 | m_s5000_ram(*this, "s5000_ram"),
|
| 213 | 219 | m_videoram(*this, "videoram"), |
| 214 | 220 | m_s7000_ram(*this, "s7000_ram"), |
| 215 | | m_sb000_ram(*this, "sb000_ram"), |
| 216 | | m_sd000_ram(*this, "sd000_ram"), |
| 217 | | m_sf000_ram(*this, "sf000_ram"), |
| 218 | | m_io_port(*this, "io_port"), |
| 219 | | m_maincpu(*this, "maincpu"), |
| 220 | | m_i2cmem(*this, "i2cmem"), |
| 221 | | m_gfxdecode(*this, "gfxdecode"), |
| 222 | | m_palette(*this, "palette") |
| 223 | | { |
| 224 | | } |
| 225 | | |
| 226 | | required_shared_ptr<UINT8> m_cmos_ram; |
| 227 | | required_shared_ptr<UINT8> m_program_ram; |
| 228 | | required_shared_ptr<UINT8> m_s3000_ram; |
| 221 | m_sb000_ram(*this, "sb000_ram"),
|
| 222 | m_sd000_ram(*this, "sd000_ram"),
|
| 223 | m_sf000_ram(*this, "sf000_ram"),
|
| 224 | m_io_port(*this, "io_port")
|
| 225 | {
|
| 226 | }
|
| 227 | |
| 228 | required_device<cpu_device> m_maincpu;
|
| 229 | required_device<r6545_1_device> m_crtc;
|
| 230 | required_device<i2cmem_device> m_i2cmem;
|
| 231 | required_device<screen_device> m_screen;
|
| 232 | required_device<gfxdecode_device> m_gfxdecode;
|
| 233 | required_device<palette_device> m_palette;
|
| 234 |
|
| 235 | required_shared_ptr<UINT8> m_cmos_ram;
|
| 236 | required_shared_ptr<UINT8> m_program_ram;
|
| 237 | required_shared_ptr<UINT8> m_s3000_ram;
|
| 229 | 238 | required_shared_ptr<UINT8> m_s5000_ram; |
| 230 | 239 | required_shared_ptr<UINT8> m_videoram; |
| 231 | 240 | required_shared_ptr<UINT8> m_s7000_ram; |
| 232 | 241 | required_shared_ptr<UINT8> m_sb000_ram; |
| 233 | | required_shared_ptr<UINT8> m_sd000_ram; |
| 234 | | required_shared_ptr<UINT8> m_sf000_ram; |
| 235 | | required_shared_ptr<UINT8> m_io_port; |
| 236 | | tilemap_t *m_bg_tilemap; |
| 237 | | UINT8 m_wingboard; |
| 238 | | UINT8 m_doorcycle; |
| 242 | required_shared_ptr<UINT8> m_sd000_ram;
|
| 243 | required_shared_ptr<UINT8> m_sf000_ram;
|
| 244 | required_shared_ptr<UINT8> m_io_port;
|
| 245 |
|
| 246 | tilemap_t *m_bg_tilemap;
|
| 247 | UINT8 m_wingboard;
|
| 248 | UINT8 m_doorcycle;
|
| 239 | 249 | UINT16 door_wait; |
| 240 | 250 | UINT8 m_jumper_e16_e17; |
| 241 | 251 | UINT16 m_vid_address; |
| r241518 | r241519 | |
| 257 | 267 | UINT8 m_bv_last_enable_state; |
| 258 | 268 | UINT8 m_bv_enable_state; |
| 259 | 269 | UINT8 m_bv_enable_count; |
| 260 | | UINT8 m_bv_data_bit; |
| 261 | | UINT8 m_bv_loop_count; |
| 262 | | UINT16 id023_data; |
| 263 | | DECLARE_WRITE8_MEMBER(peplus_bgcolor_w); |
| 264 | | DECLARE_WRITE8_MEMBER(peplus_crtc_display_w); |
| 265 | | DECLARE_WRITE8_MEMBER(peplus_io_w); |
| 266 | | DECLARE_WRITE8_MEMBER(peplus_duart_w); |
| 267 | | DECLARE_WRITE8_MEMBER(peplus_cmos_w); |
| 268 | | DECLARE_WRITE8_MEMBER(peplus_s3000_w); |
| 269 | | DECLARE_WRITE8_MEMBER(peplus_s5000_w); |
| 270 | | DECLARE_WRITE8_MEMBER(peplus_s7000_w); |
| 271 | | DECLARE_WRITE8_MEMBER(peplus_sb000_w); |
| 272 | | DECLARE_WRITE8_MEMBER(peplus_sd000_w); |
| 273 | | DECLARE_WRITE8_MEMBER(peplus_sf000_w); |
| 274 | | DECLARE_WRITE8_MEMBER(peplus_output_bank_a_w); |
| 275 | | DECLARE_WRITE8_MEMBER(peplus_output_bank_b_w); |
| 276 | | DECLARE_WRITE8_MEMBER(peplus_output_bank_c_w); |
| 277 | | DECLARE_READ8_MEMBER(peplus_io_r); |
| 278 | | DECLARE_READ8_MEMBER(peplus_duart_r); |
| 279 | | DECLARE_READ8_MEMBER(peplus_cmos_r); |
| 280 | | DECLARE_READ8_MEMBER(peplus_s3000_r); |
| 281 | | DECLARE_READ8_MEMBER(peplus_s5000_r); |
| 282 | | DECLARE_READ8_MEMBER(peplus_s7000_r); |
| 283 | | DECLARE_READ8_MEMBER(peplus_sb000_r); |
| 284 | | DECLARE_READ8_MEMBER(peplus_sd000_r); |
| 285 | | DECLARE_READ8_MEMBER(peplus_sf000_r); |
| 286 | | DECLARE_READ8_MEMBER(peplus_bgcolor_r); |
| 287 | | DECLARE_READ8_MEMBER(peplus_dropdoor_r); |
| 288 | | DECLARE_READ8_MEMBER(peplus_watchdog_r); |
| 270 | UINT8 m_bv_data_bit;
|
| 271 | UINT8 m_bv_loop_count;
|
| 272 | UINT16 id023_data;
|
| 273 |
|
| 274 | DECLARE_WRITE8_MEMBER(peplus_bgcolor_w);
|
| 275 | DECLARE_WRITE8_MEMBER(peplus_crtc_display_w);
|
| 276 | DECLARE_WRITE8_MEMBER(peplus_duart_w);
|
| 277 | DECLARE_WRITE8_MEMBER(peplus_cmos_w);
|
| 278 | DECLARE_WRITE8_MEMBER(peplus_output_bank_a_w);
|
| 279 | DECLARE_WRITE8_MEMBER(peplus_output_bank_b_w);
|
| 280 | DECLARE_WRITE8_MEMBER(peplus_output_bank_c_w);
|
| 281 | DECLARE_READ8_MEMBER(peplus_duart_r);
|
| 282 | DECLARE_READ8_MEMBER(peplus_bgcolor_r);
|
| 283 | DECLARE_READ8_MEMBER(peplus_dropdoor_r);
|
| 284 | DECLARE_READ8_MEMBER(peplus_watchdog_r);
|
| 289 | 285 | DECLARE_CUSTOM_INPUT_MEMBER(peplus_input_r); |
| 290 | 286 | DECLARE_WRITE8_MEMBER(peplus_crtc_mode_w); |
| 291 | 287 | DECLARE_WRITE_LINE_MEMBER(crtc_vsync); |
| r241518 | r241519 | |
| 300 | 296 | MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr); |
| 301 | 297 | virtual void machine_reset(); |
| 302 | 298 | virtual void video_start(); |
| 303 | | UINT32 screen_update_peplus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 304 | | void peplus_load_superdata(const char *bank_name); |
| 305 | | DECLARE_PALETTE_INIT(peplus); |
| 306 | | required_device<cpu_device> m_maincpu; |
| 307 | | required_device<i2cmem_device> m_i2cmem; |
| 308 | | required_device<gfxdecode_device> m_gfxdecode; |
| 309 | | required_device<palette_device> m_palette; |
| 310 | | |
| 311 | | protected: |
| 312 | | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 299 | UINT32 screen_update_peplus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
| 300 | void peplus_load_superdata(const char *bank_name);
|
| 301 | DECLARE_PALETTE_INIT(peplus);
|
| 302 | void handle_lightpen();
|
| 303 | |
| 304 | protected:
|
| 305 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
| 313 | 306 | }; |
| 314 | 307 | |
| 315 | 308 | static const UINT8 id_022[8] = { 0x00, 0x01, 0x04, 0x09, 0x13, 0x16, 0x18, 0x00 }; |
| r241518 | r241519 | |
| 389 | 382 | |
| 390 | 383 | void peplus_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 391 | 384 | { |
| 392 | | switch (id) |
| 393 | | { |
| 394 | | case TIMER_ASSERT_LP: |
| 395 | | downcast<mc6845_device *>((device_t*)ptr)->assert_light_pen_input(); |
| 396 | | break; |
| 397 | | default: |
| 398 | | assert_always(FALSE, "Unknown id in peplus_state::device_timer"); |
| 385 | switch (id)
|
| 386 | {
|
| 387 | case TIMER_ASSERT_LP:
|
| 388 | m_crtc->assert_light_pen_input();
|
| 389 | break;
|
| 390 | default:
|
| 391 | assert_always(FALSE, "Unknown id in peplus_state::device_timer");
|
| 399 | 392 | } |
| 400 | | } |
| 401 | | |
| 402 | | |
| 403 | | static void handle_lightpen( mc6845_device *device ) |
| 393 | }
|
| 394 | |
| 395 | |
| 396 | void peplus_state::handle_lightpen()
|
| 397 | {
|
| 398 | int x_val = ioport("TOUCH_X")->read_safe(0x00);
|
| 399 | int y_val = ioport("TOUCH_Y")->read_safe(0x00);
|
| 400 | const rectangle &vis_area = m_screen->visible_area();
|
| 401 | int xt, yt;
|
| 402 | |
| 403 | xt = x_val * vis_area.width() / 1024 + vis_area.min_x;
|
| 404 | yt = y_val * vis_area.height() / 1024 + vis_area.min_y;
|
| 405 | |
| 406 | timer_set(m_screen->time_until_pos(yt, xt), TIMER_ASSERT_LP, 0);
|
| 407 | }
|
| 408 | |
| 409 | WRITE_LINE_MEMBER(peplus_state::crtc_vsync)
|
| 410 | {
|
| 411 | m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
|
| 412 | handle_lightpen();
|
| 413 | }
|
| 414 | |
| 415 | WRITE8_MEMBER(peplus_state::peplus_crtc_display_w)
|
| 404 | 416 | { |
| 405 | | peplus_state *state = device->machine().driver_data<peplus_state>(); |
| 406 | | int x_val = device->machine().root_device().ioport("TOUCH_X")->read_safe(0x00); |
| 407 | | int y_val = device->machine().root_device().ioport("TOUCH_Y")->read_safe(0x00); |
| 408 | | const rectangle &vis_area = device->screen().visible_area(); |
| 409 | | int xt, yt; |
| 410 | | |
| 411 | | xt = x_val * vis_area.width() / 1024 + vis_area.min_x; |
| 412 | | yt = y_val * vis_area.height() / 1024 + vis_area.min_y; |
| 413 | | |
| 414 | | state->timer_set(device->screen().time_until_pos(yt, xt), peplus_state::TIMER_ASSERT_LP, 0, device); |
| 415 | | } |
| 416 | | |
| 417 | | WRITE_LINE_MEMBER(peplus_state::crtc_vsync) |
| 418 | | { |
| 419 | | mc6845_device *device = machine().device<mc6845_device>("crtc"); |
| 420 | | m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 421 | | handle_lightpen(device); |
| 422 | | } |
| 423 | | |
| 424 | | WRITE8_MEMBER(peplus_state::peplus_crtc_display_w) |
| 425 | | { |
| 426 | 417 | UINT8 *videoram = m_videoram; |
| 427 | 418 | videoram[m_vid_address] = data; |
| 428 | 419 | m_palette_ram[m_vid_address] = m_io_port[1]; |
| 429 | 420 | m_palette_ram2[m_vid_address] = m_io_port[3]; |
| 430 | 421 | |
| 431 | | m_bg_tilemap->mark_tile_dirty(m_vid_address); |
| 432 | | |
| 433 | | /* An access here triggers a device read !*/ |
| 434 | | machine().device<mc6845_device>("crtc")->register_r(space, 0); |
| 435 | | } |
| 436 | | |
| 437 | | WRITE8_MEMBER(peplus_state::peplus_io_w) |
| 422 | m_bg_tilemap->mark_tile_dirty(m_vid_address);
|
| 423 | |
| 424 | /* An access here triggers a device read !*/
|
| 425 | m_crtc->register_r(space, 0);
|
| 426 | }
|
| 427 | |
| 428 | WRITE8_MEMBER(peplus_state::peplus_duart_w)
|
| 438 | 429 | { |
| 439 | | m_io_port[offset] = data; |
| 440 | | } |
| 441 | | |
| 442 | | WRITE8_MEMBER(peplus_state::peplus_duart_w) |
| 443 | | { |
| 444 | 430 | // Used for Slot Accounting System Communication |
| 445 | 431 | } |
| 446 | 432 | |
| r241518 | r241519 | |
| 455 | 441 | peplus_load_superdata(bank_name); |
| 456 | 442 | } |
| 457 | 443 | |
| 458 | | m_cmos_ram[offset] = data; |
| 459 | | } |
| 460 | | |
| 461 | | WRITE8_MEMBER(peplus_state::peplus_s3000_w) |
| 462 | | { |
| 463 | | m_s3000_ram[offset] = data; |
| 464 | | } |
| 465 | | |
| 466 | | WRITE8_MEMBER(peplus_state::peplus_s5000_w) |
| 467 | | { |
| 468 | | m_s5000_ram[offset] = data; |
| 469 | | } |
| 470 | | |
| 471 | | WRITE8_MEMBER(peplus_state::peplus_s7000_w) |
| 472 | | { |
| 473 | | m_s7000_ram[offset] = data; |
| 474 | | } |
| 475 | | |
| 476 | | WRITE8_MEMBER(peplus_state::peplus_sb000_w) |
| 477 | | { |
| 478 | | m_sb000_ram[offset] = data; |
| 479 | | } |
| 480 | | |
| 481 | | WRITE8_MEMBER(peplus_state::peplus_sd000_w) |
| 482 | | { |
| 483 | | m_sd000_ram[offset] = data; |
| 484 | | } |
| 485 | | |
| 486 | | WRITE8_MEMBER(peplus_state::peplus_sf000_w) |
| 487 | | { |
| 488 | | m_sf000_ram[offset] = data; |
| 489 | | } |
| 490 | | |
| 491 | | WRITE8_MEMBER(peplus_state::peplus_output_bank_a_w) |
| 492 | | { |
| 493 | | output_set_value("pe_bnka0",(data >> 0) & 1); /* Coin Lockout */ |
| 444 | m_cmos_ram[offset] = data;
|
| 445 | }
|
| 446 | |
| 447 | WRITE8_MEMBER(peplus_state::peplus_output_bank_a_w)
|
| 448 | {
|
| 449 | output_set_value("pe_bnka0",(data >> 0) & 1); /* Coin Lockout */
|
| 494 | 450 | output_set_value("pe_bnka1",(data >> 1) & 1); /* Diverter */ |
| 495 | 451 | output_set_value("pe_bnka2",(data >> 2) & 1); /* Bell */ |
| 496 | 452 | output_set_value("pe_bnka3",(data >> 3) & 1); /* N/A */ |
| r241518 | r241519 | |
| 539 | 495 | |
| 540 | 496 | |
| 541 | 497 | /**************** |
| 542 | | * Read Handlers * |
| 543 | | ****************/ |
| 544 | | |
| 545 | | READ8_MEMBER(peplus_state::peplus_io_r) |
| 546 | | { |
| 547 | | return m_io_port[offset]; |
| 548 | | } |
| 549 | | |
| 550 | | READ8_MEMBER(peplus_state::peplus_duart_r) |
| 551 | | { |
| 552 | | // Used for Slot Accounting System Communication |
| 553 | | return 0x00; |
| 554 | | } |
| 555 | | |
| 556 | | READ8_MEMBER(peplus_state::peplus_cmos_r) |
| 557 | | { |
| 558 | | return m_cmos_ram[offset]; |
| 559 | | } |
| 560 | | |
| 561 | | READ8_MEMBER(peplus_state::peplus_s3000_r) |
| 562 | | { |
| 563 | | return m_s3000_ram[offset]; |
| 564 | | } |
| 565 | | |
| 566 | | READ8_MEMBER(peplus_state::peplus_s5000_r) |
| 567 | | { |
| 568 | | return m_s5000_ram[offset]; |
| 569 | | } |
| 570 | | |
| 571 | | READ8_MEMBER(peplus_state::peplus_s7000_r) |
| 572 | | { |
| 573 | | return m_s7000_ram[offset]; |
| 574 | | } |
| 575 | | |
| 576 | | READ8_MEMBER(peplus_state::peplus_sb000_r) |
| 577 | | { |
| 578 | | return m_sb000_ram[offset]; |
| 579 | | } |
| 580 | | |
| 581 | | READ8_MEMBER(peplus_state::peplus_sd000_r) |
| 582 | | { |
| 583 | | return m_sd000_ram[offset]; |
| 584 | | } |
| 585 | | |
| 586 | | READ8_MEMBER(peplus_state::peplus_sf000_r) |
| 587 | | { |
| 588 | | return m_sf000_ram[offset]; |
| 589 | | } |
| 590 | | |
| 591 | | /* Last Color in Every Palette is bgcolor */ |
| 592 | | READ8_MEMBER(peplus_state::peplus_bgcolor_r) |
| 593 | | { |
| 498 | * Read Handlers *
|
| 499 | ****************/
|
| 500 | |
| 501 | READ8_MEMBER(peplus_state::peplus_duart_r)
|
| 502 | {
|
| 503 | // Used for Slot Accounting System Communication
|
| 504 | return 0x00;
|
| 505 | }
|
| 506 | |
| 507 | /* Last Color in Every Palette is bgcolor */
|
| 508 | READ8_MEMBER(peplus_state::peplus_bgcolor_r)
|
| 509 | {
|
| 594 | 510 | return m_palette->pen_color(15); // Return bgcolor from First Palette |
| 595 | 511 | } |
| 596 | 512 | |
| r241518 | r241519 | |
| 1053 | 969 | static ADDRESS_MAP_START( peplus_map, AS_PROGRAM, 8, peplus_state ) |
| 1054 | 970 | AM_RANGE(0x0000, 0xffff) AM_ROM AM_SHARE("prograram") |
| 1055 | 971 | ADDRESS_MAP_END |
| 1056 | | |
| 1057 | | static ADDRESS_MAP_START( peplus_iomap, AS_IO, 8, peplus_state ) |
| 1058 | | // Battery-backed RAM (0x1000-0x01fff Extended RAM for Superboards Only) |
| 1059 | | AM_RANGE(0x0000, 0x1fff) AM_READWRITE(peplus_cmos_r, peplus_cmos_w) AM_SHARE("cmos") |
| 1060 | | |
| 1061 | | // CRT Controller |
| 1062 | | AM_RANGE(0x2008, 0x2008) AM_WRITE(peplus_crtc_mode_w) |
| 972 | |
| 973 | static ADDRESS_MAP_START( peplus_iomap, AS_IO, 8, peplus_state )
|
| 974 | // Battery-backed RAM (0x1000-0x01fff Extended RAM for Superboards Only)
|
| 975 | AM_RANGE(0x0000, 0x1fff) AM_RAM_WRITE(peplus_cmos_w) AM_SHARE("cmos")
|
| 976 | |
| 977 | // CRT Controller
|
| 978 | AM_RANGE(0x2008, 0x2008) AM_WRITE(peplus_crtc_mode_w)
|
| 1063 | 979 | AM_RANGE(0x2080, 0x2080) AM_DEVREADWRITE("crtc", mc6845_device, status_r, address_w) |
| 1064 | 980 | AM_RANGE(0x2081, 0x2081) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 1065 | | AM_RANGE(0x2083, 0x2083) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(peplus_crtc_display_w) |
| 981 | AM_RANGE(0x2083, 0x2083) AM_DEVREAD("crtc", mc6845_device, register_r) AM_WRITE(peplus_crtc_display_w)
|
| 982 | |
| 983 | // Superboard Data
|
| 984 | AM_RANGE(0x3000, 0x3fff) AM_RAM AM_SHARE("s3000_ram")
|
| 985 | |
| 986 | // Sound and Dipswitches
|
| 987 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("aysnd", ay8910_device, address_w)
|
| 988 | AM_RANGE(0x4004, 0x4004) AM_READ_PORT("SW1")/* likely ay8910 input port, not direct */ AM_DEVWRITE("aysnd", ay8910_device, data_w)
|
| 989 | |
| 990 | // Superboard Data
|
| 991 | AM_RANGE(0x5000, 0x5fff) AM_RAM AM_SHARE("s5000_ram")
|
| 992 | |
| 993 | // Background Color Latch
|
| 994 | AM_RANGE(0x6000, 0x6000) AM_READ(peplus_bgcolor_r) AM_WRITE(peplus_bgcolor_w)
|
| 1066 | 995 | |
| 1067 | | // Superboard Data |
| 1068 | | AM_RANGE(0x3000, 0x3fff) AM_READWRITE(peplus_s3000_r, peplus_s3000_w) AM_SHARE("s3000_ram") |
| 1069 | | |
| 1070 | | // Sound and Dipswitches |
| 1071 | | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("aysnd", ay8910_device, address_w) |
| 1072 | | AM_RANGE(0x4004, 0x4004) AM_READ_PORT("SW1")/* likely ay8910 input port, not direct */ AM_DEVWRITE("aysnd", ay8910_device, data_w) |
| 1073 | | |
| 1074 | | // Superboard Data |
| 1075 | | AM_RANGE(0x5000, 0x5fff) AM_READWRITE(peplus_s5000_r, peplus_s5000_w) AM_SHARE("s5000_ram") |
| 1076 | | |
| 1077 | | // Background Color Latch |
| 1078 | | AM_RANGE(0x6000, 0x6000) AM_READ(peplus_bgcolor_r) AM_WRITE(peplus_bgcolor_w) |
| 1079 | | |
| 1080 | 996 | // Bogus Location for Video RAM |
| 1081 | | AM_RANGE(0x06001, 0x06400) AM_RAM AM_SHARE("videoram") |
| 997 | AM_RANGE(0x06001, 0x06400) AM_RAM AM_SHARE("videoram")
|
| 998 | |
| 999 | // Superboard Data
|
| 1000 | AM_RANGE(0x7000, 0x7fff) AM_RAM AM_SHARE("s7000_ram")
|
| 1001 | |
| 1002 | // Input Bank A, Output Bank C
|
| 1003 | AM_RANGE(0x8000, 0x8000) AM_READ(peplus_input_bank_a_r) AM_WRITE(peplus_output_bank_c_w)
|
| 1082 | 1004 | |
| 1083 | | // Superboard Data |
| 1084 | | AM_RANGE(0x7000, 0x7fff) AM_READWRITE(peplus_s7000_r, peplus_s7000_w) AM_SHARE("s7000_ram") |
| 1085 | | |
| 1086 | | // Input Bank A, Output Bank C |
| 1087 | | AM_RANGE(0x8000, 0x8000) AM_READ(peplus_input_bank_a_r) AM_WRITE(peplus_output_bank_c_w) |
| 1088 | | |
| 1089 | 1005 | // Drop Door, I2C EEPROM Writes |
| 1090 | 1006 | AM_RANGE(0x9000, 0x9000) AM_READ(peplus_dropdoor_r) AM_WRITE(i2c_nvram_w) |
| 1091 | 1007 | |
| 1092 | 1008 | // Input Banks B & C, Output Bank B |
| 1093 | | AM_RANGE(0xa000, 0xa000) AM_READ(peplus_input0_r) AM_WRITE(peplus_output_bank_b_w) |
| 1094 | | |
| 1095 | | // Superboard Data |
| 1096 | | AM_RANGE(0xb000, 0xbfff) AM_READWRITE(peplus_sb000_r, peplus_sb000_w) AM_SHARE("sb000_ram") |
| 1097 | | |
| 1098 | | // Output Bank A |
| 1099 | | AM_RANGE(0xc000, 0xc000) AM_READ(peplus_watchdog_r) AM_WRITE(peplus_output_bank_a_w) |
| 1100 | | |
| 1101 | | // Superboard Data |
| 1102 | | AM_RANGE(0xd000, 0xdfff) AM_READWRITE(peplus_sd000_r, peplus_sd000_w) AM_SHARE("sd000_ram") |
| 1103 | | |
| 1104 | | // DUART |
| 1105 | | AM_RANGE(0xe000, 0xe00f) AM_READWRITE(peplus_duart_r, peplus_duart_w) |
| 1106 | | |
| 1107 | | // Superboard Data |
| 1108 | | AM_RANGE(0xf000, 0xffff) AM_READWRITE(peplus_sf000_r, peplus_sf000_w) AM_SHARE("sf000_ram") |
| 1109 | | |
| 1110 | | /* Ports start here */ |
| 1111 | | AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P3) AM_READ(peplus_io_r) AM_WRITE(peplus_io_w) AM_SHARE("io_port") |
| 1112 | | ADDRESS_MAP_END |
| 1113 | | |
| 1114 | | |
| 1009 | AM_RANGE(0xa000, 0xa000) AM_READ(peplus_input0_r) AM_WRITE(peplus_output_bank_b_w)
|
| 1010 | |
| 1011 | // Superboard Data
|
| 1012 | AM_RANGE(0xb000, 0xbfff) AM_RAM AM_SHARE("sb000_ram")
|
| 1013 | |
| 1014 | // Output Bank A
|
| 1015 | AM_RANGE(0xc000, 0xc000) AM_READ(peplus_watchdog_r) AM_WRITE(peplus_output_bank_a_w)
|
| 1016 | |
| 1017 | // Superboard Data
|
| 1018 | AM_RANGE(0xd000, 0xdfff) AM_RAM AM_SHARE("sd000_ram")
|
| 1019 | |
| 1020 | // DUART
|
| 1021 | AM_RANGE(0xe000, 0xe00f) AM_READWRITE(peplus_duart_r, peplus_duart_w)
|
| 1022 | |
| 1023 | // Superboard Data
|
| 1024 | AM_RANGE(0xf000, 0xffff) AM_RAM AM_SHARE("sf000_ram")
|
| 1025 | |
| 1026 | /* Ports start here */
|
| 1027 | AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P3) AM_RAM AM_SHARE("io_port")
|
| 1028 | ADDRESS_MAP_END
|
| 1029 | |
| 1030 | |
| 1115 | 1031 | /************************* |
| 1116 | 1032 | * Input ports * |
| 1117 | 1033 | *************************/ |