src/mess/includes/cbmb.h
| r1819 | r1820 | |
| 130 | 130 | |
| 131 | 131 | /*----------- defined in video/cbmb.c -----------*/ |
| 132 | 132 | |
| 133 | READ8_HANDLER( cbmb_mc6845_register_r ); |
| 134 | WRITE8_HANDLER( cbmb_mc6845_register_w ); |
| 135 | WRITE8_HANDLER( cbmb_mc6845_address_w ); |
| 136 | VIDEO_START( cbmb_crtc ); |
| 137 | VIDEO_UPDATE( cbmb_crtc ); |
| 133 | 138 | MC6845_UPDATE_ROW( cbm600_update_row ); |
| 134 | 139 | MC6845_UPDATE_ROW( cbm700_update_row ); |
| 140 | void cbmb_display_enable_changed(running_machine *machine, mc6845_t *mc6845, int display_enabled); |
| 135 | 141 | |
| 136 | 142 | void cbm600_vh_init(void); |
| 137 | 143 | void cbm700_vh_init(void); |
| 138 | | extern VIDEO_START( cbm700 ); |
| 144 | VIDEO_START( cbm700 ); |
| 139 | 145 | |
| 140 | 146 | void cbmb_vh_set_font(int font); |
| 141 | 147 | |
src/mess/video/cbmb.c
| r1819 | r1820 | |
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | static int cbmb_font=0; |
| 14 | static mc6845_t *mc6845; |
| 14 | 15 | |
| 16 | VIDEO_START( cbmb_crtc ) { |
| 17 | mc6845 = devtag_get_token(machine, MC6845, "crtc"); |
| 18 | } |
| 19 | |
| 20 | VIDEO_UPDATE( cbmb_crtc ) { |
| 21 | mc6845_update(mc6845, bitmap, cliprect); |
| 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | READ8_HANDLER( cbmb_mc6845_register_r ) { |
| 26 | return mc6845_register_r( mc6845 ); |
| 27 | } |
| 28 | |
| 29 | WRITE8_HANDLER( cbmb_mc6845_register_w ) { |
| 30 | mc6845_register_w( mc6845, data ); |
| 31 | } |
| 32 | |
| 33 | WRITE8_HANDLER( cbmb_mc6845_address_w ) { |
| 34 | mc6845_address_w( mc6845, data ); |
| 35 | } |
| 36 | |
| 15 | 37 | void cbm600_vh_init(void) |
| 16 | 38 | { |
| 17 | 39 | UINT8 *gfx = memory_region(REGION_GFX1); |
| r1819 | r1820 | |
| 40 | 62 | { |
| 41 | 63 | int i; |
| 42 | 64 | |
| 65 | mc6845 = devtag_get_token(machine, MC6845, "crtc"); |
| 66 | |
| 43 | 67 | /* remove pixel column 9 for character codes 0 - 175 and 224 - 255 */ |
| 44 | 68 | for( i = 0; i < 256; i++) |
| 45 | 69 | { |
| r1819 | r1820 | |
| 85 | 109 | } |
| 86 | 110 | } |
| 87 | 111 | |
| 112 | void cbmb_display_enable_changed(running_machine *machine, mc6845_t *mc6845, int display_enabled) |
| 113 | { |
| 114 | } |
| 115 | |
src/mess/machine/cbmb.c
| r1819 | r1820 | |
| 20 | 20 | #include "includes/vc20tape.h" |
| 21 | 21 | #include "includes/cbmieeeb.h" |
| 22 | 22 | #include "video/vic6567.h" |
| 23 | | #include "video/mc6845.h" |
| 24 | 23 | |
| 25 | 24 | |
| 26 | 25 | static TIMER_CALLBACK(cbmb_frame_interrupt); |
| r1819 | r1820 | |
| 249 | 248 | cbm_ieee_open(); |
| 250 | 249 | } |
| 251 | 250 | |
| 252 | | static void cbmb_display_enable_changed(running_machine *machine, mc6845_t *mc6845, int display_enabled) |
| 253 | | { |
| 254 | | } |
| 255 | | |
| 256 | | //static const struct mscrtc6845_config cbm600_crtc= { 1600000 /*?*/, cbmb_vh_cursor }; |
| 257 | | static const mc6845_interface cbm600_crtc = { |
| 258 | | 0, |
| 259 | | 1600000 /*?*/, |
| 260 | | 8 /*?*/, |
| 261 | | NULL, |
| 262 | | cbm600_update_row, |
| 263 | | NULL, |
| 264 | | cbmb_display_enable_changed |
| 265 | | }; |
| 266 | | |
| 267 | 251 | void cbm600_driver_init (void) |
| 268 | 252 | { |
| 269 | 253 | cbmb_common_driver_init (); |
| 270 | 254 | cbm_ntsc = 1; |
| 271 | 255 | cbm600_vh_init(); |
| 272 | | crtc6845_config( 0, &cbm600_crtc); |
| 273 | 256 | } |
| 274 | 257 | |
| 275 | 258 | void cbm600pal_driver_init (void) |
| r1819 | r1820 | |
| 277 | 260 | cbmb_common_driver_init (); |
| 278 | 261 | cbm_ntsc = 0; |
| 279 | 262 | cbm600_vh_init(); |
| 280 | | crtc6845_config( 0, &cbm600_crtc); |
| 281 | 263 | } |
| 282 | 264 | |
| 283 | 265 | void cbm600hu_driver_init (void) |
| 284 | 266 | { |
| 285 | 267 | cbmb_common_driver_init (); |
| 286 | 268 | cbm_ntsc = 0; |
| 287 | | crtc6845_config( 0, &cbm600_crtc); |
| 288 | 269 | } |
| 289 | 270 | |
| 290 | | //static const struct mscrtc6845_config cbm700_crtc= { 2000000 /*?*/, cbmb_vh_cursor }; |
| 291 | | static const mc6845_interface cbm700_crtc = { |
| 292 | | 0, |
| 293 | | 2000000 /*?*/, |
| 294 | | 9 /*?*/, |
| 295 | | NULL, |
| 296 | | cbm700_update_row, |
| 297 | | NULL, |
| 298 | | cbmb_display_enable_changed |
| 299 | | }; |
| 300 | | |
| 301 | 271 | void cbm700_driver_init (void) |
| 302 | 272 | { |
| 303 | 273 | cbmb_common_driver_init (); |
| 304 | 274 | cbm700 = 1; |
| 305 | 275 | cbm_ntsc = 0; |
| 306 | 276 | cbm700_vh_init(); |
| 307 | | crtc6845_config( 0, &cbm700_crtc); |
| 308 | 277 | } |
| 309 | 278 | |
| 310 | 279 | void cbm500_driver_init (void) |
src/mess/drivers/cbmb.c
| r1819 | r1820 | |
| 187 | 187 | /* {0xfc000, 0xfcfff, MRA8_ROM }, */ |
| 188 | 188 | AM_RANGE(0xfd000, 0xfd7ff) AM_READ( MRA8_ROM ) |
| 189 | 189 | // AM_RANGE(0xfd800, 0xfd8ff) |
| 190 | | AM_RANGE(0xfd801, 0xfd801) AM_MIRROR( 0xfe ) AM_READ( crtc6845_0_register_r ) |
| 190 | AM_RANGE(0xfd801, 0xfd801) AM_MIRROR( 0xfe ) AM_READ( cbmb_mc6845_register_r ) |
| 191 | 191 | /* disk units */ |
| 192 | 192 | AM_RANGE(0xfda00, 0xfdaff) AM_READ( sid6581_0_port_r ) |
| 193 | 193 | /* db00 coprocessor */ |
| r1819 | r1820 | |
| 209 | 209 | AM_RANGE(0xf6000, 0xf7fff) AM_WRITE( MWA8_ROM ) |
| 210 | 210 | AM_RANGE(0xf8000, 0xfbfff) AM_WRITE( MWA8_ROM) AM_BASE( &cbmb_basic ) |
| 211 | 211 | AM_RANGE(0xfd000, 0xfd7ff) AM_WRITE( MWA8_RAM) AM_BASE( &videoram) AM_SIZE(&videoram_size ) /* VIDEORAM */ |
| 212 | | AM_RANGE(0xfd800, 0xfd800) AM_MIRROR( 0xfe ) AM_WRITE( crtc6845_0_address_w ) |
| 213 | | AM_RANGE(0xfd801, 0xfd801) AM_MIRROR( 0xfe ) AM_WRITE( crtc6845_0_register_w ) |
| 212 | AM_RANGE(0xfd800, 0xfd800) AM_MIRROR( 0xfe ) AM_WRITE( cbmb_mc6845_address_w ) |
| 213 | AM_RANGE(0xfd801, 0xfd801) AM_MIRROR( 0xfe ) AM_WRITE( cbmb_mc6845_register_w ) |
| 214 | 214 | /* disk units */ |
| 215 | 215 | AM_RANGE(0xfda00, 0xfdaff) AM_WRITE( sid6581_0_port_w) |
| 216 | 216 | /* db00 coprocessor */ |
| r1819 | r1820 | |
| 600 | 600 | |
| 601 | 601 | #endif |
| 602 | 602 | |
| 603 | static const mc6845_interface cbm600_crtc = { |
| 604 | 0, |
| 605 | XTAL_18MHz / 8 /*?*/, /* I do not know if this is correct, please verify */ |
| 606 | 8 /*?*/, |
| 607 | NULL, |
| 608 | cbm600_update_row, |
| 609 | NULL, |
| 610 | cbmb_display_enable_changed, |
| 611 | NULL, |
| 612 | NULL |
| 613 | }; |
| 603 | 614 | |
| 615 | static const mc6845_interface cbm700_crtc = { |
| 616 | 0, |
| 617 | XTAL_18MHz / 8 /*?*/, /* I do not know if this is correct, please verify */ |
| 618 | 9 /*?*/, |
| 619 | NULL, |
| 620 | cbm700_update_row, |
| 621 | NULL, |
| 622 | cbmb_display_enable_changed, |
| 623 | NULL, |
| 624 | NULL |
| 625 | }; |
| 626 | |
| 627 | |
| 604 | 628 | static MACHINE_DRIVER_START( cbm600 ) |
| 605 | 629 | /* basic machine hardware */ |
| 606 | 630 | MDRV_CPU_ADD_TAG("main", M6509, 7833600) /* 7.8336 Mhz */ |
| r1819 | r1820 | |
| 620 | 644 | MDRV_PALETTE_LENGTH(sizeof (cbm700_palette) / sizeof (cbm700_palette[0]) / 3) |
| 621 | 645 | MDRV_PALETTE_INIT( cbm700 ) |
| 622 | 646 | |
| 623 | | MDRV_VIDEO_UPDATE( crtc6845 ) |
| 647 | MDRV_DEVICE_ADD("crtc", MC6845) |
| 648 | MDRV_DEVICE_CONFIG( cbm600_crtc ) |
| 624 | 649 | |
| 650 | MDRV_VIDEO_START( cbmb_crtc ) |
| 651 | MDRV_VIDEO_UPDATE( cbmb_crtc ) |
| 652 | |
| 625 | 653 | /* sound hardware */ |
| 626 | 654 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 627 | 655 | MDRV_SOUND_ADD(SID6581, 1000000) |
| r1819 | r1820 | |
| 643 | 671 | MDRV_SCREEN_VISIBLE_AREA(0, 720 - 1, 0, 350 - 1) |
| 644 | 672 | MDRV_GFXDECODE( cbm700 ) |
| 645 | 673 | |
| 674 | MDRV_DEVICE_MODIFY("crtc", MC6845) |
| 675 | MDRV_DEVICE_CONFIG( cbm700_crtc ) |
| 676 | |
| 646 | 677 | MDRV_VIDEO_START( cbm700 ) |
| 647 | 678 | MACHINE_DRIVER_END |
| 648 | 679 | |