| Previous | 15994 Revisions | Next |
| r7512 Friday 5th March, 2010 at 14:14:06 UTC by Fabio Priuli |
|---|
| with these, MESS should compile again... |
| [src/mess/drivers] | 4004clk.c cdi.c einstein.c elwro800.c fk1.c mc10.c mod8.c ngp.c sord.c supracan.c vboy.c vii.c vtech1.c z9001.c |
| [src/mess/includes] | samcoupe.h spectrum.h |
| r7511 | r7512 | |
|---|---|---|
| 74 | 74 | UINT8 *screen_location; |
| 75 | 75 | |
| 76 | 76 | int ROMSelection; |
| 77 | ||
| 78 | /* for elwro800 */ | |
| 79 | /* RAM mapped at 0 */ | |
| 80 | UINT8 ram_at_0000; | |
| 81 | ||
| 82 | /* NR signal */ | |
| 83 | UINT8 NR; | |
| 84 | UINT8 df_on_databus; | |
| 77 | 85 | }; |
| 78 | 86 | |
| 79 | 87 |
| r7511 | r7512 | |
|---|---|---|
| 20 | 20 | #define SAM_MIDIOUT_INT 0x10 |
| 21 | 21 | |
| 22 | 22 | |
| 23 | typedef struct _coupe_asic coupe_asic; | |
| 24 | struct _coupe_asic | |
| 23 | class coupe_asic | |
| 25 | 24 | { |
| 25 | public: | |
| 26 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, coupe_asic(machine)); } | |
| 27 | ||
| 28 | coupe_asic(running_machine &machine) { } | |
| 29 | ||
| 26 | 30 | UINT8 lmpr, hmpr, vmpr; /* memory pages */ |
| 27 | 31 | UINT8 lext, hext; /* extended memory page */ |
| 28 | 32 | UINT8 border; /* border */ |
| r7511 | r7512 | |
|---|---|---|
| 53 | 53 | #define TILE_X_FLIP 0x0004 |
| 54 | 54 | #define TILE_Y_FLIP 0x0008 |
| 55 | 55 | |
| 56 | typedef struct _vii_state vii_state; | |
| 57 | struct _vii_state | |
| 56 | class vii_state | |
| 58 | 57 | { |
| 58 | public: | |
| 59 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, vii_state(machine)); } | |
| 60 | ||
| 61 | vii_state(running_machine &machine) { } | |
| 62 | ||
| 59 | 63 | UINT16 *ram; |
| 60 | 64 | UINT16 *cart; |
| 61 | 65 | UINT16 *rowscroll; |
| r7511 | r7512 | |
|---|---|---|
| 91 | 91 | TYPE DEFINITIONS |
| 92 | 92 | ***************************************************************************/ |
| 93 | 93 | |
| 94 | typedef struct _einstein_state einstein_state; | |
| 95 | struct _einstein_state | |
| 94 | class einstein_state | |
| 96 | 95 | { |
| 96 | public: | |
| 97 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, einstein_state(machine)); } | |
| 98 | ||
| 99 | einstein_state(running_machine &machine) { } | |
| 100 | ||
| 97 | 101 | running_device *color_screen; |
| 98 | 102 | running_device *ctc; |
| 99 | 103 |
| r7511 | r7512 | |
|---|---|---|
| 45 | 45 | UINT16 BKCOL; |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | typedef struct _vboy_state vboy_state; | |
| 49 | struct _vboy_state | |
| 48 | class vboy_state | |
| 50 | 49 | { |
| 50 | public: | |
| 51 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, vboy_state(machine)); } | |
| 52 | ||
| 53 | vboy_state(running_machine &machine) { } | |
| 54 | ||
| 51 | 55 | UINT16 *font; |
| 52 | 56 | UINT16 *bgmap; |
| 53 | 57 | UINT16 *l_frame_0; |
| r7511 | r7512 | |
|---|---|---|
| 13 | 13 | #include "machine/msm8251.h" |
| 14 | 14 | #include "devices/messram.h" |
| 15 | 15 | |
| 16 | typedef struct _fk1_state fk1_state; | |
| 17 | struct _fk1_state | |
| 16 | class fk1_state | |
| 18 | 17 | { |
| 18 | public: | |
| 19 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, fk1_state(machine)); } | |
| 20 | ||
| 21 | fk1_state(running_machine &machine) { } | |
| 22 | ||
| 19 | 23 | UINT8 video_rol; |
| 20 | 24 | UINT8 int_vector; |
| 21 | 25 | }; |
| r7511 | r7512 | |
|---|---|---|
| 153 | 153 | TYPE DEFINITIONS |
| 154 | 154 | ***************************************************************************/ |
| 155 | 155 | |
| 156 | typedef struct _vtech1_state vtech1_state; | |
| 157 | struct _vtech1_state | |
| 156 | class vtech1_state | |
| 158 | 157 | { |
| 158 | public: | |
| 159 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, vtech1_state(machine)); } | |
| 160 | ||
| 161 | vtech1_state(running_machine &machine) { } | |
| 162 | ||
| 159 | 163 | /* devices */ |
| 160 | 164 | running_device *mc6847; |
| 161 | 165 | running_device *speaker; |
| r7511 | r7512 | |
|---|---|---|
| 559 | 559 | BYTE68K deltaUV[BYTE68K_MAX + 1]; |
| 560 | 560 | }; |
| 561 | 561 | |
| 562 | typedef struct _cdi_state cdi_state; | |
| 563 | struct _cdi_state | |
| 562 | class cdi_state | |
| 564 | 563 | { |
| 564 | public: | |
| 565 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, cdi_state(machine)); } | |
| 566 | ||
| 567 | cdi_state(running_machine &machine) { } | |
| 568 | ||
| 565 | 569 | UINT16 *planea; |
| 566 | 570 | UINT16 *planeb; |
| 567 | 571 |
| r7511 | r7512 | |
|---|---|---|
| 11 | 11 | #include "cpu/i8008/i8008.h" |
| 12 | 12 | #include "machine/teleprinter.h" |
| 13 | 13 | |
| 14 | typedef struct _mod8_state mod8_state; | |
| 15 | struct _mod8_state | |
| 14 | class mod8_state | |
| 16 | 15 | { |
| 16 | public: | |
| 17 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, mod8_state(machine)); } | |
| 18 | ||
| 19 | mod8_state(running_machine &machine) { } | |
| 20 | ||
| 17 | 21 | UINT16 tty_data; |
| 18 | 22 | UINT8 tty_key_data; |
| 19 | 23 | int tty_cnt; |
| r7511 | r7512 | |
|---|---|---|
| 9 | 9 | #include "emu.h" |
| 10 | 10 | #include "cpu/z80/z80.h" |
| 11 | 11 | |
| 12 | typedef struct _z9001_state z9001_state; | |
| 13 | struct _z9001_state | |
| 12 | class z9001_state | |
| 14 | 13 | { |
| 14 | public: | |
| 15 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, z9001_state(machine)); } | |
| 16 | ||
| 17 | z9001_state(running_machine &machine) { } | |
| 18 | ||
| 15 | 19 | UINT8 *videoram; |
| 16 | 20 | }; |
| 17 | 21 |
| r7511 | r7512 | |
|---|---|---|
| 58 | 58 | /* PI-5 interface is required. mode 2 of the 8255 is used to communicate with the FD-5 */ |
| 59 | 59 | |
| 60 | 60 | |
| 61 | typedef struct _sord_state sord_state; | |
| 62 | struct _sord_state | |
| 61 | class sord_state | |
| 63 | 62 | { |
| 63 | public: | |
| 64 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, sord_state(machine)); } | |
| 65 | ||
| 66 | sord_state(running_machine &machine) { } | |
| 67 | ||
| 64 | 68 | UINT8 fd5_databus; |
| 65 | 69 | int fd5_port_0x020_data; |
| 66 | 70 | int obfa; |
| r7511 | r7512 | |
|---|---|---|
| 117 | 117 | }; |
| 118 | 118 | |
| 119 | 119 | |
| 120 | typedef struct _ngp_state ngp_state; | |
| 121 | struct _ngp_state { | |
| 120 | class ngp_state | |
| 121 | { | |
| 122 | public: | |
| 123 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, ngp_state(machine)); } | |
| 124 | ||
| 125 | ngp_state(running_machine &machine) { } | |
| 126 | ||
| 122 | 127 | UINT8 io_reg[0x40]; |
| 123 | 128 | UINT8 old_to3; |
| 124 | 129 | emu_timer* seconds_timer; |
| r7511 | r7512 | |
|---|---|---|
| 21 | 21 | TYPE DEFINITIONS |
| 22 | 22 | ***************************************************************************/ |
| 23 | 23 | |
| 24 | typedef struct _mc10_state mc10_state; | |
| 25 | struct _mc10_state | |
| 24 | class mc10_state | |
| 26 | 25 | { |
| 26 | public: | |
| 27 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, mc10_state(machine)); } | |
| 28 | ||
| 29 | mc10_state(running_machine &machine) { } | |
| 30 | ||
| 27 | 31 | running_device *mc6847; |
| 28 | 32 | running_device *dac; |
| 29 | 33 | running_device *cassette; |
| r7511 | r7512 | |
|---|---|---|
| 65 | 65 | UINT16 control; |
| 66 | 66 | }; |
| 67 | 67 | |
| 68 | typedef struct _supracan_state supracan_state; | |
| 69 | struct _supracan_state | |
| 68 | class supracan_state | |
| 70 | 69 | { |
| 70 | public: | |
| 71 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, supracan_state(machine)); } | |
| 72 | ||
| 73 | supracan_state(running_machine &machine) { } | |
| 74 | ||
| 71 | 75 | acan_dma_regs_t acan_dma_regs; |
| 72 | 76 | acan_sprdma_regs_t acan_sprdma_regs; |
| 73 | 77 |
| r7511 | r7512 | |
|---|---|---|
| 11 | 11 | #include "sound/dac.h" |
| 12 | 12 | #include "4004clk.lh" |
| 13 | 13 | |
| 14 | typedef struct __4004clk_state _4004clk_state; | |
| 15 | struct __4004clk_state | |
| 14 | class _4004clk_state | |
| 16 | 15 | { |
| 16 | public: | |
| 17 | static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, _4004clk_state(machine)); } | |
| 18 | ||
| 19 | _4004clk_state(running_machine &machine) { } | |
| 20 | ||
| 17 | 21 | UINT16 nixie[16]; |
| 18 | 22 | UINT8 timer; |
| 19 | 23 | running_device *dac; |
| r7511 | r7512 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | /************************************* |
| 34 | 34 | * |
| 35 | * State/Globals | |
| 36 | * | |
| 37 | *************************************/ | |
| 38 | ||
| 39 | typedef struct _elwro800_state elwro800_state; | |
| 40 | struct _elwro800_state | |
| 41 | { | |
| 42 | spectrum_state spectrum; | |
| 43 | ||
| 44 | /* RAM mapped at 0 */ | |
| 45 | UINT8 ram_at_0000; | |
| 46 | ||
| 47 | /* NR signal */ | |
| 48 | UINT8 NR; | |
| 49 | UINT8 df_on_databus; | |
| 50 | }; | |
| 51 | ||
| 52 | /************************************* | |
| 53 | * | |
| 54 | 35 | * When RAM is mapped at 0x0000 - 0x1fff (in CP/J mode), reading a location 66 with /M1=0 |
| 55 | 36 | * (effectively reading NMI vector) is hardwired to return 0xDF (RST #18) |
| 56 | 37 | * (note that in CP/J mode address 66 is used for FCB) |
| r7511 | r7512 | |
| 58 | 39 | *************************************/ |
| 59 | 40 | static DIRECT_UPDATE_HANDLER(elwro800_direct_handler) |
| 60 | 41 | { |
| 61 | e | |
| 42 | spectrum | |
| 62 | 43 | if (state->ram_at_0000 && address == 0x66) |
| 63 | 44 | { |
| 64 | 45 | direct->raw = direct->decrypted = &state->df_on_databus; |
| r7511 | r7512 | |
| 109 | 90 | UINT8 *messram = messram_get_ptr(devtag_get_device(machine, "messram")); |
| 110 | 91 | UINT8 cs; |
| 111 | 92 | UINT8 ls175; |
| 112 | e | |
| 93 | spectrum | |
| 113 | 94 | |
| 114 | 95 | ls175 = BITSWAP8(data, 7, 6, 5, 4, 4, 5, 7, 6) & 0x0f; |
| 115 | 96 | |
| r7511 | r7512 | |
| 151 | 132 | if (BIT(ls175,2)) |
| 152 | 133 | { |
| 153 | 134 | // relok |
| 154 | state->s | |
| 135 | state->s | |
| 155 | 136 | } |
| 156 | 137 | else |
| 157 | 138 | { |
| 158 | state->s | |
| 139 | state->s | |
| 159 | 140 | } |
| 160 | 141 | |
| 161 | 142 | state->NR = BIT(ls175,3); |
| r7511 | r7512 | |
| 227 | 208 | { |
| 228 | 209 | UINT8 *prom = memory_region(space->machine, "proms"); |
| 229 | 210 | UINT8 cs = prom[offset & 0x1ff]; |
| 230 | e | |
| 211 | spectrum | |
| 231 | 212 | |
| 232 | 213 | if (!BIT(cs,0)) |
| 233 | 214 | { |
| r7511 | r7512 | |
| 510 | 491 | |
| 511 | 492 | static MACHINE_RESET(elwro800) |
| 512 | 493 | { |
| 513 | e | |
| 494 | spectrum | |
| 514 | 495 | UINT8 *messram = messram_get_ptr(devtag_get_device(machine, "messram")); |
| 515 | 496 | |
| 516 | 497 | state->df_on_databus = 0xdf; |
| r7511 | r7512 | |
| 518 | 499 | |
| 519 | 500 | memory_set_bankptr(machine, "bank3", messram + 0x4000); |
| 520 | 501 | |
| 521 | state->spectrum.port_7ffd_data = 0; | |
| 522 | state->spectrum.port_1ffd_data = -1; | |
| 502 | state->port_7ffd_data = 0; | |
| 503 | state->port_1ffd_data = -1; | |
| 523 | 504 | |
| 524 | 505 | // this is a reset of ls175 in mmu |
| 525 | 506 | elwro800jr_mmu_w(machine, 0); |
| r7511 | r7512 | |
| 572 | 553 | |
| 573 | 554 | static MACHINE_DRIVER_START( elwro800 ) |
| 574 | 555 | |
| 575 | MDRV_DRIVER_DATA(e | |
| 556 | MDRV_DRIVER_DATA(spectrum | |
| 576 | 557 | |
| 577 | 558 | /* basic machine hardware */ |
| 578 | 559 | MDRV_CPU_ADD("maincpu",Z80, 3500000) /* 3.5 MHz */ |
| Previous | 15994 Revisions | Next |