trunk/src/mess/machine/64h156.c
| r19390 | r19391 | |
| 388 | 388 | device_execute_interface(mconfig, *this), |
| 389 | 389 | m_icount(0), |
| 390 | 390 | m_image(*this->owner(), FLOPPY_0), |
| 391 | m_track_buffer(*this, "track_buffer"), |
| 392 | m_speed_buffer(*this, "speed_buffer"), |
| 391 | 393 | m_side(0), |
| 392 | | m_track_buffer(NULL), |
| 393 | 394 | m_track_len(0), |
| 394 | 395 | m_buffer_pos(0), |
| 395 | 396 | m_bit_pos(0), |
| r19390 | r19391 | |
| 429 | 430 | m_icountptr = &m_icount; |
| 430 | 431 | |
| 431 | 432 | // allocate track buffer |
| 432 | | m_track_buffer = auto_alloc_array(machine(), UINT8, G64_BUFFER_SIZE); |
| 433 | | m_speed_buffer = auto_alloc_array(machine(), UINT8, G64_SPEED_BLOCK_SIZE); |
| 433 | m_track_buffer.allocate(G64_BUFFER_SIZE); |
| 434 | m_speed_buffer.allocate(G64_SPEED_BLOCK_SIZE); |
| 434 | 435 | |
| 435 | 436 | // resolve callbacks |
| 436 | 437 | m_out_atn_func.resolve(m_out_atn_cb, *this); |
| r19390 | r19391 | |
| 440 | 441 | // register for state saving |
| 441 | 442 | save_item(NAME(m_shift)); |
| 442 | 443 | save_item(NAME(m_side)); |
| 443 | | save_pointer(NAME(m_track_buffer), G64_BUFFER_SIZE); |
| 444 | | save_pointer(NAME(m_speed_buffer), G64_SPEED_BLOCK_SIZE); |
| 445 | 444 | save_item(NAME(m_track_len)); |
| 446 | 445 | save_item(NAME(m_buffer_pos)); |
| 447 | 446 | save_item(NAME(m_bit_pos)); |
trunk/src/mess/machine/wangpc_lvc.c
| r19390 | r19391 | |
| 189 | 189 | device_t(mconfig, WANGPC_LVC, "Wang PC Low Resolution Video Card", tag, owner, clock), |
| 190 | 190 | device_wangpcbus_card_interface(mconfig, *this), |
| 191 | 191 | m_crtc(*this, MC6845_TAG), |
| 192 | m_video_ram(*this, "video_ram"), |
| 192 | 193 | m_option(0), |
| 193 | 194 | m_irq(CLEAR_LINE) |
| 194 | 195 | { |
| r19390 | r19391 | |
| 202 | 203 | void wangpc_lvc_device::device_start() |
| 203 | 204 | { |
| 204 | 205 | // allocate memory |
| 205 | | m_video_ram = auto_alloc_array(machine(), UINT16, RAM_SIZE); |
| 206 | m_video_ram.allocate(RAM_SIZE); |
| 206 | 207 | |
| 207 | 208 | // state saving |
| 208 | | save_pointer(NAME(m_video_ram), RAM_SIZE); |
| 209 | 209 | save_item(NAME(m_option)); |
| 210 | 210 | save_item(NAME(m_scroll)); |
| 211 | 211 | save_item(NAME(m_irq)); |
trunk/src/mess/machine/comx_ram.c
| r19390 | r19391 | |
| 36 | 36 | |
| 37 | 37 | comx_ram_device::comx_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 38 | 38 | device_t(mconfig, COMX_RAM, "COMX-35 RAM Card", tag, owner, clock), |
| 39 | | device_comx_expansion_card_interface(mconfig, *this) |
| 39 | device_comx_expansion_card_interface(mconfig, *this), |
| 40 | m_ram(*this, "ram") |
| 40 | 41 | { |
| 41 | 42 | } |
| 42 | 43 | |
| r19390 | r19391 | |
| 47 | 48 | |
| 48 | 49 | void comx_ram_device::device_start() |
| 49 | 50 | { |
| 50 | | m_ram = auto_alloc_array(machine(), UINT8, RAM_SIZE); |
| 51 | | |
| 52 | | // state saving |
| 53 | | save_pointer(NAME(m_ram), RAM_SIZE); |
| 51 | m_ram.allocate(RAM_SIZE); |
| 54 | 52 | } |
| 55 | 53 | |
| 56 | 54 | |
| r19390 | r19391 | |
| 73 | 71 | |
| 74 | 72 | if (offset >= 0xc000 && offset < 0xd000) |
| 75 | 73 | { |
| 76 | | data = m_ram[(m_ram_bank << 12) | (offset & 0xfff)]; |
| 74 | data = m_ram[(m_bank << 12) | (offset & 0xfff)]; |
| 77 | 75 | } |
| 78 | 76 | |
| 79 | 77 | return data; |
| r19390 | r19391 | |
| 88 | 86 | { |
| 89 | 87 | if (offset >= 0xc000 && offset < 0xd000) |
| 90 | 88 | { |
| 91 | | m_ram[(m_ram_bank << 12) | (offset & 0xfff)] = data; |
| 89 | m_ram[(m_bank << 12) | (offset & 0xfff)] = data; |
| 92 | 90 | } |
| 93 | 91 | } |
| 94 | 92 | |
| r19390 | r19391 | |
| 101 | 99 | { |
| 102 | 100 | if (offset == 1) |
| 103 | 101 | { |
| 104 | | m_ram_bank = (data >> 4) & 0x03; |
| 102 | m_bank = (data >> 4) & 0x03; |
| 105 | 103 | } |
| 106 | 104 | } |
trunk/src/mess/machine/wangpc_mvc.c
| r19390 | r19391 | |
| 209 | 209 | device_t(mconfig, WANGPC_MVC, "Wang PC Medium Resolution Video Card", tag, owner, clock), |
| 210 | 210 | device_wangpcbus_card_interface(mconfig, *this), |
| 211 | 211 | m_crtc(*this, MC6845_TAG), |
| 212 | m_video_ram(*this, "video_ram"), |
| 213 | m_char_ram(*this, "char_ram"), |
| 214 | m_bitmap_ram(*this, "bitmap_ram"), |
| 212 | 215 | m_option(0), |
| 213 | 216 | m_irq(CLEAR_LINE) |
| 214 | 217 | { |
| r19390 | r19391 | |
| 222 | 225 | void wangpc_mvc_device::device_start() |
| 223 | 226 | { |
| 224 | 227 | // allocate memory |
| 225 | | m_video_ram = auto_alloc_array(machine(), UINT16, VIDEO_RAM_SIZE); |
| 226 | | m_char_ram = auto_alloc_array(machine(), UINT16, CHAR_RAM_SIZE); |
| 227 | | m_bitmap_ram = auto_alloc_array(machine(), UINT16, BITMAP_RAM_SIZE); |
| 228 | m_video_ram.allocate(VIDEO_RAM_SIZE); |
| 229 | m_char_ram.allocate(CHAR_RAM_SIZE); |
| 230 | m_bitmap_ram.allocate(BITMAP_RAM_SIZE); |
| 228 | 231 | |
| 229 | 232 | // state saving |
| 230 | | save_pointer(NAME(m_video_ram), VIDEO_RAM_SIZE); |
| 231 | | save_pointer(NAME(m_char_ram), CHAR_RAM_SIZE); |
| 232 | | save_pointer(NAME(m_bitmap_ram), BITMAP_RAM_SIZE); |
| 233 | 233 | save_item(NAME(m_option)); |
| 234 | 234 | save_item(NAME(m_irq)); |
| 235 | 235 | } |
trunk/src/mess/machine/adam_fdc.c
| r19390 | r19391 | |
| 174 | 174 | |
| 175 | 175 | adam_fdc_device::adam_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 176 | 176 | : device_t(mconfig, ADAM_FDC, "Adam FDC", tag, owner, clock), |
| 177 | | device_adamnet_card_interface(mconfig, *this), |
| 178 | | m_maincpu(*this, M6801_TAG), |
| 179 | | m_fdc(*this, WD2793_TAG), |
| 180 | | m_floppy0(*this, WD2793_TAG":0"), |
| 181 | | m_ram(*this, "ram"), |
| 182 | | m_image0(NULL) |
| 177 | device_adamnet_card_interface(mconfig, *this), |
| 178 | m_maincpu(*this, M6801_TAG), |
| 179 | m_fdc(*this, WD2793_TAG), |
| 180 | m_floppy0(*this, WD2793_TAG":0"), |
| 181 | m_floppy(NULL), |
| 182 | m_ram(*this, "ram"), |
| 183 | m_sw3(*this, "SW3") |
| 183 | 184 | { |
| 184 | 185 | } |
| 185 | 186 | |
| r19390 | r19391 | |
| 190 | 191 | |
| 191 | 192 | void adam_fdc_device::device_start() |
| 192 | 193 | { |
| 193 | | m_fdc->setup_intrq_cb(wd2793_t::line_cb(FUNC(adam_fdc_device::fdc_intrq_w), this)); |
| 194 | m_fdc->setup_intrq_cb(wd_fdc_t::line_cb(FUNC(adam_fdc_device::fdc_intrq_w), this)); |
| 194 | 195 | } |
| 195 | 196 | |
| 196 | 197 | |
| r19390 | r19391 | |
| 236 | 237 | data |= m_fdc->drq_r() ? 0x04 : 0x00; |
| 237 | 238 | |
| 238 | 239 | // drive select |
| 239 | | data |= ioport("SW3")->read() << 7; |
| 240 | data |= m_sw3->read() << 7; |
| 240 | 241 | |
| 241 | 242 | return data; |
| 242 | 243 | } |
| r19390 | r19391 | |
| 270 | 271 | m_fdc->dden_w(BIT(data, 3)); |
| 271 | 272 | |
| 272 | 273 | // drive select |
| 273 | | m_image0 = NULL; |
| 274 | m_floppy = NULL; |
| 274 | 275 | |
| 275 | 276 | if (BIT(data, 5)) |
| 276 | 277 | { |
| 277 | | m_image0 = m_floppy0->get_device(); |
| 278 | m_floppy = m_floppy0->get_device(); |
| 278 | 279 | } |
| 279 | 280 | |
| 280 | | m_fdc->set_floppy(m_image0); |
| 281 | m_fdc->set_floppy(m_floppy); |
| 281 | 282 | |
| 282 | 283 | // motor enable |
| 283 | | if (m_image0) m_image0->mon_w(!BIT(data, 6)); |
| 284 | if (m_floppy) m_floppy->mon_w(!BIT(data, 6)); |
| 284 | 285 | } |
| 285 | 286 | |
| 286 | 287 | |
trunk/src/mess/machine/wangpc_emb.c
| r19390 | r19391 | |
| 46 | 46 | |
| 47 | 47 | wangpc_emb_device::wangpc_emb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 48 | 48 | device_t(mconfig, WANGPC_EMB, "Wang PC-PM031-B", tag, owner, clock), |
| 49 | | device_wangpcbus_card_interface(mconfig, *this) |
| 49 | device_wangpcbus_card_interface(mconfig, *this), |
| 50 | m_ram(*this, "ram") |
| 50 | 51 | { |
| 51 | 52 | } |
| 52 | 53 | |
| r19390 | r19391 | |
| 58 | 59 | void wangpc_emb_device::device_start() |
| 59 | 60 | { |
| 60 | 61 | // allocate memory |
| 61 | | m_ram = auto_alloc_array(machine(), UINT16, RAM_SIZE); |
| 62 | m_ram.allocate(RAM_SIZE); |
| 62 | 63 | |
| 63 | 64 | // state saving |
| 64 | | save_pointer(NAME(m_ram), RAM_SIZE); |
| 65 | 65 | save_item(NAME(m_option)); |
| 66 | 66 | save_item(NAME(m_parity_error)); |
| 67 | 67 | save_item(NAME(m_parity_odd)); |
trunk/src/mess/includes/tiki100.h
| r19390 | r19391 | |
| 40 | 40 | m_fdc(*this, FD1797_TAG), |
| 41 | 41 | m_ram(*this, RAM_TAG), |
| 42 | 42 | m_floppy0(*this, FD1797_TAG":0"), |
| 43 | | m_floppy1(*this, FD1797_TAG":1") |
| 43 | m_floppy1(*this, FD1797_TAG":1"), |
| 44 | m_video_ram(*this, "video_ram") |
| 44 | 45 | { } |
| 45 | 46 | |
| 46 | 47 | required_device<cpu_device> m_maincpu; |
| r19390 | r19391 | |
| 49 | 50 | required_device<ram_device> m_ram; |
| 50 | 51 | required_device<floppy_connector> m_floppy0; |
| 51 | 52 | required_device<floppy_connector> m_floppy1; |
| 53 | optional_shared_ptr<UINT8> m_video_ram; |
| 52 | 54 | |
| 53 | 55 | virtual void machine_start(); |
| 54 | 56 | |
| 55 | | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 57 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 56 | 58 | |
| 57 | 59 | DECLARE_READ8_MEMBER( gfxram_r ); |
| 58 | 60 | DECLARE_WRITE8_MEMBER( gfxram_w ); |
| r19390 | r19391 | |
| 72 | 74 | int m_vire; |
| 73 | 75 | |
| 74 | 76 | /* video state */ |
| 75 | | UINT8 *m_video_ram; |
| 76 | 77 | UINT8 m_scroll; |
| 77 | 78 | UINT8 m_mode; |
| 78 | 79 | UINT8 m_palette; |
trunk/src/mess/includes/abc1600.h
| r19390 | r19391 | |
| 73 | 73 | m_bus0i(*this, BUS0I_TAG), |
| 74 | 74 | m_bus0x(*this, BUS0X_TAG), |
| 75 | 75 | m_bus1(*this, BUS1_TAG), |
| 76 | | m_bus2(*this, BUS2_TAG) |
| 76 | m_bus2(*this, BUS2_TAG), |
| 77 | m_segment_ram(*this, "segment_ram"), |
| 78 | m_page_ram(*this, "page_ram"), |
| 79 | m_video_ram(*this, "video_ram") |
| 77 | 80 | { } |
| 78 | 81 | |
| 79 | 82 | required_device<cpu_device> m_maincpu; |
| r19390 | r19391 | |
| 93 | 96 | required_device<abc1600bus_slot_device> m_bus0x; |
| 94 | 97 | required_device<abc1600bus_slot_device> m_bus1; |
| 95 | 98 | required_device<abc1600bus_slot_device> m_bus2; |
| 99 | optional_shared_ptr<UINT8> m_segment_ram; |
| 100 | optional_shared_ptr<UINT16> m_page_ram; |
| 101 | optional_shared_ptr<UINT16> m_video_ram; |
| 96 | 102 | |
| 97 | 103 | virtual void machine_start(); |
| 98 | 104 | virtual void machine_reset(); |
| r19390 | r19391 | |
| 196 | 202 | // memory access controller |
| 197 | 203 | int m_ifc2; |
| 198 | 204 | UINT8 m_task; |
| 199 | | UINT8 m_segment_ram[0x400]; |
| 200 | | UINT16 m_page_ram[0x400]; |
| 201 | 205 | |
| 202 | 206 | // DMA |
| 203 | 207 | UINT8 m_dmamap[8]; |
| r19390 | r19391 | |
| 218 | 222 | const UINT8 *m_wrmsk_rom; // write mask ROM |
| 219 | 223 | const UINT8 *m_shinf_rom; // shifter info ROM |
| 220 | 224 | const UINT8 *m_drmsk_rom; // data read mask ROM |
| 221 | | UINT16 *m_video_ram; // video RAM |
| 222 | 225 | int m_endisp; // enable display |
| 223 | 226 | int m_clocks_disabled; // clocks disabled |
| 224 | 227 | UINT16 m_gmdi; // video RAM data latch |
| r19390 | r19391 | |
| 244 | 247 | int m_rmc; // row match count |
| 245 | 248 | int m_cmc; // column match count |
| 246 | 249 | int m_amm; // active mover mask |
| 247 | | UINT32 screen_update_abc1600(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 248 | 250 | }; |
| 249 | 251 | |
| 250 | 252 | |
trunk/src/mess/includes/v1050.h
| r19390 | r19391 | |
| 78 | 78 | m_timer_ack(*this, TIMER_ACK_TAG), |
| 79 | 79 | m_timer_rst(*this, TIMER_RST_TAG), |
| 80 | 80 | m_sasibus(*this, SASIBUS_TAG ":host"), |
| 81 | | m_video_ram(*this, "video_ram") |
| 81 | m_video_ram(*this, "video_ram"), |
| 82 | m_attr_ram(*this, "attr_ram") |
| 82 | 83 | { } |
| 83 | 84 | |
| 84 | 85 | required_device<cpu_device> m_maincpu; |
| r19390 | r19391 | |
| 99 | 100 | required_device<timer_device> m_timer_ack; |
| 100 | 101 | required_device<timer_device> m_timer_rst; |
| 101 | 102 | required_device<scsicb_device> m_sasibus; |
| 103 | required_shared_ptr<UINT8> m_video_ram; |
| 104 | optional_shared_ptr<UINT8> m_attr_ram; |
| 102 | 105 | |
| 103 | 106 | virtual void machine_start(); |
| 104 | 107 | virtual void machine_reset(); |
| r19390 | r19391 | |
| 164 | 167 | UINT8 m_bank; // bank register |
| 165 | 168 | |
| 166 | 169 | // video state |
| 167 | | required_shared_ptr<UINT8> m_video_ram; // video RAM |
| 168 | | UINT8 *m_attr_ram; // attribute RAM |
| 169 | 170 | UINT8 m_attr; // attribute latch |
| 170 | 171 | |
| 171 | 172 | // sasi state |
trunk/src/mess/includes/mikromik.h
| r19390 | r19391 | |
| 61 | 61 | required_device<ram_device> m_ram; |
| 62 | 62 | required_shared_ptr<UINT8> m_video_ram; |
| 63 | 63 | |
| 64 | | |
| 65 | 64 | virtual void machine_start(); |
| 66 | 65 | virtual void machine_reset(); |
| 67 | 66 | |
| 68 | 67 | virtual void video_start(); |
| 69 | | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 68 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 70 | 69 | |
| 71 | 70 | DECLARE_READ8_MEMBER( mmu_r ); |
| 72 | 71 | DECLARE_WRITE8_MEMBER( mmu_w ); |
| r19390 | r19391 | |
| 102 | 101 | const UINT8 *m_key_rom; |
| 103 | 102 | |
| 104 | 103 | // video state |
| 105 | | bitmap_ind16 m_bitmap; |
| 104 | bitmap_rgb32 m_bitmap; |
| 106 | 105 | const UINT8 *m_char_rom; |
| 107 | 106 | int m_llen; |
| 108 | 107 | |
| r19390 | r19391 | |
| 116 | 115 | int m_recall; |
| 117 | 116 | int m_dack3; |
| 118 | 117 | int m_tc; |
| 119 | | UINT32 screen_update_mm1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 118 | UINT32 screen_update_mm1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 120 | 119 | TIMER_DEVICE_CALLBACK_MEMBER(kbclk_tick); |
| 121 | 120 | DECLARE_FLOPPY_FORMATS( floppy_formats ); |
| 122 | 121 | }; |
trunk/src/mess/includes/pc1512.h
| r19390 | r19391 | |
| 8 | 8 | #include "cpu/i86/i86.h" |
| 9 | 9 | #include "cpu/mcs48/mcs48.h" |
| 10 | 10 | #include "formats/pc_dsk.h" |
| 11 | | #include "formats/mfi_dsk.h" |
| 12 | | #include "imagedev/flopdrv.h" |
| 13 | 11 | #include "machine/am9517a.h" |
| 14 | 12 | #include "machine/ctronics.h" |
| 15 | 13 | #include "machine/ins8250.h" |
| r19390 | r19391 | |
| 59 | 57 | m_floppy0(*this, PC_FDC_XT_TAG ":0:525dd" ), |
| 60 | 58 | m_floppy1(*this, PC_FDC_XT_TAG ":1:525dd" ), |
| 61 | 59 | m_bus(*this, ISA_BUS_TAG), |
| 60 | m_video_ram(*this, "video_ram"), |
| 62 | 61 | m_pit1(0), |
| 63 | 62 | m_pit2(0), |
| 64 | 63 | m_status1(0), |
| r19390 | r19391 | |
| 94 | 93 | required_device<floppy_image_device> m_floppy0; |
| 95 | 94 | optional_device<floppy_image_device> m_floppy1; |
| 96 | 95 | required_device<isa8_device> m_bus; |
| 96 | optional_shared_ptr<UINT8> m_video_ram; |
| 97 | 97 | |
| 98 | 98 | virtual void machine_start(); |
| 99 | 99 | virtual void machine_reset(); |
| r19390 | r19391 | |
| 196 | 196 | UINT8 m_printer_control; |
| 197 | 197 | |
| 198 | 198 | // video state |
| 199 | | UINT8 *m_video_ram; |
| 200 | | UINT8 *m_char_rom; |
| 199 | const UINT8 *m_char_rom; |
| 201 | 200 | int m_toggle; |
| 202 | 201 | int m_lpen; |
| 203 | 202 | int m_blink; |
trunk/src/mess/includes/tmc600.h
| r19390 | r19391 | |
| 31 | 31 | m_vis(*this, CDP1869_TAG), |
| 32 | 32 | m_cassette(*this, CASSETTE_TAG), |
| 33 | 33 | m_ram(*this, RAM_TAG), |
| 34 | | m_page_ram(*this, "page_ram") |
| 34 | m_page_ram(*this, "page_ram"), |
| 35 | m_color_ram(*this, "color_ram") |
| 35 | 36 | { } |
| 36 | 37 | |
| 37 | 38 | required_device<cosmac_device> m_maincpu; |
| 38 | 39 | required_device<cdp1869_device> m_vis; |
| 39 | 40 | required_device<cassette_image_device> m_cassette; |
| 40 | 41 | required_device<ram_device> m_ram; |
| 42 | required_shared_ptr<UINT8> m_page_ram; |
| 43 | optional_shared_ptr<UINT8> m_color_ram; |
| 41 | 44 | |
| 42 | 45 | virtual void machine_start(); |
| 43 | 46 | |
| r19390 | r19391 | |
| 60 | 63 | int m_vismac_bkg_latch; // background color latch |
| 61 | 64 | int m_blink; // cursor blink |
| 62 | 65 | |
| 63 | | required_shared_ptr<UINT8> m_page_ram; // page memory |
| 64 | | UINT8 *m_color_ram; // color memory |
| 65 | | UINT8 *m_char_rom; // character generator ROM |
| 66 | const UINT8 *m_char_rom; |
| 66 | 67 | |
| 67 | 68 | // keyboard state |
| 68 | 69 | int m_keylatch; // key latch |
trunk/src/mess/video/v1050.c
| r19390 | r19391 | |
| 53 | 53 | static MC6845_UPDATE_ROW( v1050_update_row ) |
| 54 | 54 | { |
| 55 | 55 | v1050_state *state = device->machine().driver_data<v1050_state>(); |
| 56 | | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 57 | 56 | |
| 58 | 57 | int column, bit; |
| 59 | 58 | |
| r19390 | r19391 | |
| 80 | 79 | /* display blank */ |
| 81 | 80 | if (attr & V1050_ATTR_BLANK) color = 0; |
| 82 | 81 | |
| 83 | | bitmap.pix32(y, x) = palette[color]; |
| 82 | bitmap.pix32(y, x) = RGB_MONOCHROME_GREEN_HIGHLIGHT[color]; |
| 84 | 83 | |
| 85 | 84 | data <<= 1; |
| 86 | 85 | } |
| r19390 | r19391 | |
| 108 | 107 | NULL |
| 109 | 108 | }; |
| 110 | 109 | |
| 111 | | /* Palette */ |
| 112 | | |
| 113 | | static PALETTE_INIT( v1050 ) |
| 114 | | { |
| 115 | | palette_set_color(machine, 0, RGB_BLACK); /* black */ |
| 116 | | palette_set_color_rgb(machine, 1, 0x00, 0xc0, 0x00); /* green */ |
| 117 | | palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00); /* bright green */ |
| 118 | | } |
| 119 | | |
| 120 | 110 | /* Video Start */ |
| 121 | 111 | |
| 122 | 112 | void v1050_state::video_start() |
| 123 | 113 | { |
| 124 | 114 | /* allocate memory */ |
| 125 | | m_attr_ram = auto_alloc_array(machine(), UINT8, V1050_VIDEORAM_SIZE); |
| 115 | m_attr_ram.allocate(V1050_VIDEORAM_SIZE); |
| 126 | 116 | |
| 127 | 117 | /* register for state saving */ |
| 128 | 118 | save_item(NAME(m_attr)); |
| 129 | | save_pointer(NAME(m_attr_ram), V1050_VIDEORAM_SIZE); |
| 130 | 119 | } |
| 131 | 120 | |
| 132 | 121 | /* Machine Drivers */ |
| r19390 | r19391 | |
| 141 | 130 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) |
| 142 | 131 | MCFG_SCREEN_SIZE(640, 400) |
| 143 | 132 | MCFG_SCREEN_VISIBLE_AREA(0,640-1, 0, 400-1) |
| 144 | | |
| 145 | | MCFG_PALETTE_LENGTH(3) |
| 146 | | MCFG_PALETTE_INIT(v1050) |
| 147 | 133 | MACHINE_CONFIG_END |
trunk/src/mess/drivers/tiki100.c
| r19390 | r19391 | |
| 374 | 374 | |
| 375 | 375 | /* Video */ |
| 376 | 376 | |
| 377 | | UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 377 | UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 378 | 378 | { |
| 379 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 379 | 380 | UINT16 addr = (m_scroll << 7); |
| 380 | 381 | int sx, y, pixel, mode = (m_mode >> 4) & 0x03; |
| 381 | 382 | |
| r19390 | r19391 | |
| 392 | 393 | { |
| 393 | 394 | int x = (sx * 8) + pixel; |
| 394 | 395 | |
| 395 | | bitmap.pix16(y, x) = 0; |
| 396 | bitmap.pix32(y, x) = palette[0]; |
| 396 | 397 | } |
| 397 | 398 | break; |
| 398 | 399 | |
| r19390 | r19391 | |
| 402 | 403 | int x = (sx * 8) + pixel; |
| 403 | 404 | int color = BIT(data, 0); |
| 404 | 405 | |
| 405 | | bitmap.pix16(y, x) = color; |
| 406 | bitmap.pix32(y, x) = palette[color]; |
| 406 | 407 | |
| 407 | 408 | data >>= 1; |
| 408 | 409 | } |
| r19390 | r19391 | |
| 414 | 415 | int x = (sx * 8) + (pixel * 2); |
| 415 | 416 | int color = data & 0x03; |
| 416 | 417 | |
| 417 | | bitmap.pix16(y, x) = color; |
| 418 | | bitmap.pix16(y, x + 1) = color; |
| 418 | bitmap.pix32(y, x) = palette[color]; |
| 419 | bitmap.pix32(y, x + 1) = palette[color]; |
| 419 | 420 | |
| 420 | 421 | data >>= 2; |
| 421 | 422 | } |
| r19390 | r19391 | |
| 427 | 428 | int x = (sx * 8) + (pixel * 4); |
| 428 | 429 | int color = data & 0x0f; |
| 429 | 430 | |
| 430 | | bitmap.pix16(y, x) = color; |
| 431 | | bitmap.pix16(y, x + 1) = color; |
| 432 | | bitmap.pix16(y, x + 2) = color; |
| 433 | | bitmap.pix16(y, x + 3) = color; |
| 431 | bitmap.pix32(y, x) = palette[color]; |
| 432 | bitmap.pix32(y, x + 1) = palette[color]; |
| 433 | bitmap.pix32(y, x + 2) = palette[color]; |
| 434 | bitmap.pix32(y, x + 3) = palette[color]; |
| 434 | 435 | |
| 435 | 436 | data >>= 4; |
| 436 | 437 | } |
| r19390 | r19391 | |
| 546 | 547 | void tiki100_state::machine_start() |
| 547 | 548 | { |
| 548 | 549 | /* allocate video RAM */ |
| 549 | | m_video_ram = auto_alloc_array(machine(), UINT8, TIKI100_VIDEORAM_SIZE); |
| 550 | m_video_ram.allocate(TIKI100_VIDEORAM_SIZE); |
| 550 | 551 | |
| 551 | 552 | /* setup memory banking */ |
| 552 | 553 | UINT8 *ram = m_ram->pointer(); |
| r19390 | r19391 | |
| 565 | 566 | /* register for state saving */ |
| 566 | 567 | save_item(NAME(m_rome)); |
| 567 | 568 | save_item(NAME(m_vire)); |
| 568 | | save_pointer(NAME(m_video_ram), TIKI100_VIDEORAM_SIZE); |
| 569 | 569 | save_item(NAME(m_scroll)); |
| 570 | 570 | save_item(NAME(m_mode)); |
| 571 | 571 | save_item(NAME(m_palette)); |
| r19390 | r19391 | |
| 641 | 641 | /* System Drivers */ |
| 642 | 642 | |
| 643 | 643 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 644 | | COMP( 1984, kontiki, 0, 0, tiki100, tiki100, driver_device, 0, "Kontiki Data A/S", "KONTIKI 100", GAME_SUPPORTS_SAVE ) |
| 645 | | COMP( 1984, tiki100, kontiki, 0, tiki100, tiki100, driver_device, 0, "Tiki Data A/S", "TIKI 100", GAME_SUPPORTS_SAVE ) |
| 644 | COMP( 1984, kontiki, 0, 0, tiki100, tiki100, driver_device, 0, "Kontiki Data A/S", "KONTIKI 100", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 645 | COMP( 1984, tiki100, kontiki, 0, tiki100, tiki100, driver_device, 0, "Tiki Data A/S", "TIKI 100", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
trunk/src/mess/drivers/xor100.c
| r19390 | r19391 | |
| 159 | 159 | m_terminal->write(space, 0, data); |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | READ8_MEMBER( xor100_state::fdc_r ) |
| 163 | { |
| 164 | return m_fdc->gen_r(offset) ^ 0xff; |
| 165 | } |
| 166 | |
| 167 | WRITE8_MEMBER( xor100_state::fdc_w ) |
| 168 | { |
| 169 | m_fdc->gen_w(offset, data ^ 0xff); |
| 170 | } |
| 171 | |
| 162 | 172 | READ8_MEMBER( xor100_state::fdc_wait_r ) |
| 163 | 173 | { |
| 164 | 174 | /* |
| r19390 | r19391 | |
| 178 | 188 | |
| 179 | 189 | if (!m_fdc_irq && !m_fdc_drq) |
| 180 | 190 | { |
| 181 | | /* TODO: this is really connected to the Z80 _RDY line */ |
| 182 | | m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); |
| 191 | fatalerror("Z80 WAIT not supported by MAME core\n"); |
| 192 | m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); |
| 183 | 193 | } |
| 184 | 194 | |
| 185 | 195 | return !m_fdc_irq << 7; |
| r19390 | r19391 | |
| 263 | 273 | AM_RANGE(0x0a, 0x0a) AM_READ(prom_disable_r) |
| 264 | 274 | AM_RANGE(0x0b, 0x0b) AM_READ_PORT("DSW0") AM_WRITE(baud_w) |
| 265 | 275 | AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write) |
| 266 | | AM_RANGE(0xf8, 0xfb) AM_DEVREADWRITE(WD1795_TAG, fd1795_t, read, write) // TODO inverted data bus |
| 276 | AM_RANGE(0xf8, 0xfb) AM_READWRITE(fdc_r, fdc_w) |
| 267 | 277 | AM_RANGE(0xfc, 0xfc) AM_READWRITE(fdc_wait_r, fdc_dcont_w) |
| 268 | 278 | AM_RANGE(0xfd, 0xfd) AM_WRITE(fdc_dsel_w) |
| 269 | 279 | ADDRESS_MAP_END |
| r19390 | r19391 | |
| 484 | 494 | |
| 485 | 495 | if (state) |
| 486 | 496 | { |
| 487 | | /* TODO: this is really connected to the Z80 _RDY line */ |
| 488 | | m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); |
| 497 | fatalerror("Z80 WAIT not supported by MAME core\n"); |
| 498 | m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); |
| 489 | 499 | } |
| 490 | 500 | } |
| 491 | 501 | |
| r19390 | r19391 | |
| 495 | 505 | |
| 496 | 506 | if (state) |
| 497 | 507 | { |
| 498 | | /* TODO: this is really connected to the Z80 _RDY line */ |
| 499 | | m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); |
| 508 | fatalerror("Z80 WAIT not supported by MAME core\n"); |
| 509 | m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); |
| 500 | 510 | } |
| 501 | 511 | } |
| 502 | 512 | |