src/mess/video/733_asr.h
| r2785 | r2786 | |
| 16 | 16 | |
| 17 | 17 | extern PALETTE_INIT ( asr733 ) ; |
| 18 | 18 | |
| 19 | | void asr733_init(void); |
| 19 | void asr733_init(running_machine *machine); |
| 20 | 20 | int asr733_init_term(running_machine *machine, int unit, void (*int_callback)(int state)); |
| 21 | 21 | |
| 22 | 22 | void asr733_reset(int unit); |
| r2785 | r2786 | |
| 24 | 24 | int asr733_cru_r(int offset, int unit); |
| 25 | 25 | void asr733_cru_w(running_machine *machine, int offset, int data, int unit); |
| 26 | 26 | |
| 27 | | READ8_HANDLER(asr733_0_cru_r); |
| 27 | READ8_HANDLER(asr733_0_cru_r); |
| 28 | 28 | WRITE8_HANDLER(asr733_0_cru_w); |
| 29 | 29 | |
| 30 | 30 | void asr733_refresh(running_machine *machine, bitmap_t *bitmap, int unit, int x, int y); |
src/mess/machine/99_dsk.c
| r2785 | r2786 | |
| 438 | 438 | /* |
| 439 | 439 | Reset fdc card, set up handlers |
| 440 | 440 | */ |
| 441 | | void ti99_fdc_reset(void) |
| 441 | void ti99_fdc_reset(running_machine *machine) |
| 442 | 442 | { |
| 443 | 443 | ti99_disk_DSR = memory_region(region_dsr) + offset_fdc_dsr; |
| 444 | 444 | DSEL = 0; |
| r2785 | r2786 | |
| 855 | 855 | /* |
| 856 | 856 | Reset fdc card, set up handlers |
| 857 | 857 | */ |
| 858 | | void ti99_bwg_reset(void) |
| 858 | void ti99_bwg_reset(running_machine *machine) |
| 859 | 859 | { |
| 860 | 860 | ti99_disk_DSR = memory_region(region_dsr) + offset_bwg_dsr; |
| 861 | 861 | bwg_ram = memory_region(region_dsr) + offset_bwg_ram; |
| r2785 | r2786 | |
| 1227 | 1227 | /* |
| 1228 | 1228 | Reset fdc card, set up handlers |
| 1229 | 1229 | */ |
| 1230 | | void ti99_hfdc_reset(void) |
| 1230 | void ti99_hfdc_reset(running_machine *machine) |
| 1231 | 1231 | { |
| 1232 | 1232 | ti99_disk_DSR = memory_region(region_dsr) + offset_hfdc_dsr; |
| 1233 | 1233 | hfdc_ram = memory_region(region_dsr) + offset_hfdc_ram; |
src/mess/machine/99_dsk.h
| r2785 | r2786 | |
| 1 | 1 | FLOPPY_OPTIONS_EXTERN(ti99); |
| 2 | 2 | |
| 3 | 3 | void ti99_floppy_controllers_init_all(running_machine *machine); |
| 4 | | void ti99_fdc_reset(void); |
| 4 | void ti99_fdc_reset(running_machine *machine); |
| 5 | 5 | #if HAS_99CCFDC |
| 6 | | void ti99_ccfdc_reset(void); |
| 6 | void ti99_ccfdc_reset(running_machine *machine); |
| 7 | 7 | #endif |
| 8 | | void ti99_bwg_reset(void); |
| 9 | | void ti99_hfdc_reset(void); |
| 8 | void ti99_bwg_reset(running_machine *machine); |
| 9 | void ti99_hfdc_reset(running_machine *machine); |
src/mess/machine/994x_ser.c
| r2785 | r2786 | |
| 35 | 35 | static void rs232_cru_w(running_machine *machine, int offset, int data); |
| 36 | 36 | static READ8_HANDLER(rs232_mem_r); |
| 37 | 37 | static WRITE8_HANDLER(rs232_mem_w); |
| 38 | static void ti99_rs232_cleanup(running_machine *machine); |
| 38 | 39 | |
| 39 | 40 | /* pointer to the rs232 ROM data */ |
| 40 | 41 | static UINT8 *rs232_DSR; |
| r2785 | r2786 | |
| 160 | 161 | /* |
| 161 | 162 | Initializes rs232 card, set up handlers |
| 162 | 163 | */ |
| 163 | | void ti99_rs232_init(void) |
| 164 | void ti99_rs232_init(running_machine *machine) |
| 164 | 165 | { |
| 165 | 166 | rs232_DSR = memory_region(region_dsr) + offset_rs232_dsr; |
| 166 | 167 | tms9902_init(0, &tms9902_params); |
| 167 | 168 | tms9902_init(1, &tms9902_params); |
| 169 | |
| 170 | add_exit_callback(machine, ti99_rs232_cleanup); |
| 168 | 171 | } |
| 169 | 172 | |
| 170 | 173 | /* |
| 171 | 174 | Reset rs232 card, set up handlers |
| 172 | 175 | */ |
| 173 | | void ti99_rs232_reset(void) |
| 176 | void ti99_rs232_reset(running_machine *machine) |
| 174 | 177 | { |
| 175 | 178 | rs232_DSR = memory_region(region_dsr) + offset_rs232_dsr; |
| 176 | 179 | |
| r2785 | r2786 | |
| 190 | 193 | /* |
| 191 | 194 | rs232 card clean-up |
| 192 | 195 | */ |
| 193 | | void ti99_rs232_cleanup(void) |
| 196 | static void ti99_rs232_cleanup(running_machine *machine) |
| 194 | 197 | { |
| 195 | 198 | tms9902_cleanup(0); |
| 196 | 199 | tms9902_cleanup(1); |
src/mess/machine/geneve.c
| r2785 | r2786 | |
| 210 | 210 | determine which one to use. */ |
| 211 | 211 | ti99_peb_init(); |
| 212 | 212 | ti99_floppy_controllers_init_all(machine); |
| 213 | | ti99_ide_init(); |
| 214 | | ti99_rs232_init(); |
| 215 | | ti99_usbsm_init(); |
| 213 | ti99_ide_init(machine); |
| 214 | ti99_rs232_init(machine); |
| 215 | ti99_usbsm_init(machine); |
| 216 | 216 | mm58274c_init(machine, 0, 1); |
| 217 | 217 | add_exit_callback(machine, machine_stop_geneve); |
| 218 | 218 | } |
| r2785 | r2786 | |
| 267 | 267 | { |
| 268 | 268 | static const spchroms_interface speech_intf = { region_speech_rom }; |
| 269 | 269 | |
| 270 | | spchroms_config(& speech_intf); |
| 270 | spchroms_config(machine, &speech_intf); |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | switch (fdc_kind) |
| 274 | 274 | { |
| 275 | 275 | case fdc_kind_TI: |
| 276 | | ti99_fdc_reset(); |
| 276 | ti99_fdc_reset(machine); |
| 277 | 277 | break; |
| 278 | 278 | #if HAS_99CCFDC |
| 279 | 279 | case fdc_kind_CC: |
| 280 | | ti99_ccfdc_reset(); |
| 280 | ti99_ccfdc_reset(machine); |
| 281 | 281 | break; |
| 282 | 282 | #endif |
| 283 | 283 | case fdc_kind_BwG: |
| 284 | | ti99_bwg_reset(); |
| 284 | ti99_bwg_reset(machine); |
| 285 | 285 | break; |
| 286 | 286 | case fdc_kind_hfdc: |
| 287 | | ti99_hfdc_reset(); |
| 287 | ti99_hfdc_reset(machine); |
| 288 | 288 | break; |
| 289 | 289 | case fdc_kind_none: |
| 290 | 290 | break; |
| r2785 | r2786 | |
| 292 | 292 | |
| 293 | 293 | if (has_ide) |
| 294 | 294 | { |
| 295 | | ti99_ide_reset(TRUE); |
| 295 | ti99_ide_reset(machine, TRUE); |
| 296 | 296 | ti99_ide_load_memcard(); |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | if (has_rs232) |
| 300 | | ti99_rs232_reset(); |
| 300 | ti99_rs232_reset(machine); |
| 301 | 301 | |
| 302 | 302 | if (has_usb_sm) |
| 303 | 303 | ti99_usbsm_reset(machine, TRUE); |
| r2785 | r2786 | |
| 308 | 308 | if (has_ide) |
| 309 | 309 | ti99_ide_save_memcard(); |
| 310 | 310 | |
| 311 | | if (has_rs232) |
| 312 | | ti99_rs232_cleanup(); |
| 313 | | |
| 314 | 311 | tms9901_cleanup(0); |
| 315 | 312 | } |
| 316 | 313 | |
src/mess/machine/99_ide.c
| r2785 | r2786 | |
| 97 | 97 | /* |
| 98 | 98 | Initializes the ide card, set up handlers |
| 99 | 99 | */ |
| 100 | | void ti99_ide_init() |
| 100 | void ti99_ide_init(running_machine *machine) |
| 101 | 101 | { |
| 102 | 102 | rtc65271_init(memory_region(region_dsr) + offset_ide_ram2, clk_interrupt_callback); |
| 103 | 103 | ti99_ide_RAM = memory_region(region_dsr) + offset_ide_ram; |
| r2785 | r2786 | |
| 106 | 106 | /* |
| 107 | 107 | Reset ide card, set up handlers |
| 108 | 108 | */ |
| 109 | | void ti99_ide_reset(int in_tms9995_mode) |
| 109 | void ti99_ide_reset(running_machine *machine, int in_tms9995_mode) |
| 110 | 110 | { |
| 111 | 111 | ti99_peb_set_card_handlers(0x1000, & ide_handlers); |
| 112 | 112 | |
src/mess/machine/99_hsgpl.c
| r2785 | r2786 | |
| 134 | 134 | }; |
| 135 | 135 | |
| 136 | 136 | |
| 137 | | static int ti99_hsgpl_file_load(mame_file *file) |
| 137 | static int ti99_hsgpl_file_load(running_machine *machine, mame_file *file) |
| 138 | 138 | { |
| 139 | 139 | UINT8 version; |
| 140 | 140 | |
| r2785 | r2786 | |
| 207 | 207 | |
| 208 | 208 | |
| 209 | 209 | |
| 210 | | int ti99_hsgpl_load_memcard(void) |
| 210 | int ti99_hsgpl_load_memcard(running_machine *machine) |
| 211 | 211 | { |
| 212 | 212 | file_error filerr; |
| 213 | 213 | mame_file *file; |
| r2785 | r2786 | |
| 215 | 215 | filerr = mame_fopen(SEARCHPATH_MEMCARD, "hsgpl.nv", OPEN_FLAG_READ, &file); |
| 216 | 216 | if (filerr != FILERR_NONE) |
| 217 | 217 | return /*1*/0; |
| 218 | | if (ti99_hsgpl_file_load(file)) |
| 218 | if (ti99_hsgpl_file_load(machine, file)) |
| 219 | 219 | { |
| 220 | 220 | mame_fclose(file); |
| 221 | 221 | return 1; |
| r2785 | r2786 | |
| 225 | 225 | return 0; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | | int ti99_hsgpl_save_memcard(void) |
| 228 | int ti99_hsgpl_save_memcard(running_machine *machine) |
| 229 | 229 | { |
| 230 | 230 | file_error filerr; |
| 231 | 231 | mame_file *file; |
| r2785 | r2786 | |
| 250 | 250 | /* |
| 251 | 251 | Initialize hsgpl card, set up handlers |
| 252 | 252 | */ |
| 253 | | void ti99_hsgpl_init(void) |
| 253 | void ti99_hsgpl_init(running_machine *machine) |
| 254 | 254 | { |
| 255 | 255 | hsgpl.GRAM_ptr = memory_region(region_hsgpl) + offset_hsgpl_gram; |
| 256 | 256 | hsgpl.RAM6_ptr = memory_region(region_hsgpl) + offset_hsgpl_ram6; |
| r2785 | r2786 | |
| 268 | 268 | /* |
| 269 | 269 | Reset hsgpl card |
| 270 | 270 | */ |
| 271 | | void ti99_hsgpl_reset(void) |
| 271 | void ti99_hsgpl_reset(running_machine *machine) |
| 272 | 272 | { |
| 273 | 273 | hsgpl.addr = 0; |
| 274 | 274 | hsgpl.raddr_LSB = 0; |
src/mess/machine/99_hsgpl.h
| r2785 | r2786 | |
| 1 | 1 | /*DEVICE_IMAGE_LOAD(ti99_hsgpl); |
| 2 | 2 | DEVICE_IMAGE_UNLOAD(ti99_hsgpl);*/ |
| 3 | | int ti99_hsgpl_load_memcard(void); |
| 4 | | int ti99_hsgpl_save_memcard(void); |
| 3 | int ti99_hsgpl_load_memcard(running_machine *machine); |
| 4 | int ti99_hsgpl_save_memcard(running_machine *machine); |
| 5 | 5 | |
| 6 | | void ti99_hsgpl_init(void); |
| 7 | | void ti99_hsgpl_reset(void); |
| 6 | void ti99_hsgpl_init(running_machine *machine); |
| 7 | void ti99_hsgpl_reset(running_machine *machine); |
| 8 | 8 | |
| 9 | 9 | READ16_HANDLER ( ti99_hsgpl_gpl_r ); |
| 10 | 10 | WRITE16_HANDLER ( ti99_hsgpl_gpl_w ); |
src/mess/machine/ti99_4x.c
| r2785 | r2786 | |
| 728 | 728 | determine which one to use. */ |
| 729 | 729 | ti99_peb_init(); |
| 730 | 730 | ti99_floppy_controllers_init_all(machine); |
| 731 | | ti99_ide_init(); |
| 732 | | ti99_rs232_init(); |
| 733 | | ti99_hsgpl_init(); |
| 734 | | ti99_usbsm_init(); |
| 731 | ti99_ide_init(machine); |
| 732 | ti99_rs232_init(machine); |
| 733 | ti99_hsgpl_init(machine); |
| 734 | ti99_usbsm_init(machine); |
| 735 | 735 | } |
| 736 | 736 | |
| 737 | 737 | |
| r2785 | r2786 | |
| 817 | 817 | { |
| 818 | 818 | static const spchroms_interface speech_intf = { region_speech_rom }; |
| 819 | 819 | |
| 820 | | spchroms_config(& speech_intf); |
| 820 | spchroms_config(machine, &speech_intf); |
| 821 | 821 | |
| 822 | 822 | if (ti99_model != model_99_8) |
| 823 | 823 | { |
| r2785 | r2786 | |
| 867 | 867 | switch (fdc_kind) |
| 868 | 868 | { |
| 869 | 869 | case fdc_kind_TI: |
| 870 | | ti99_fdc_reset(); |
| 870 | ti99_fdc_reset(machine); |
| 871 | 871 | break; |
| 872 | 872 | #if HAS_99CCFDC |
| 873 | 873 | case fdc_kind_CC: |
| 874 | | ti99_ccfdc_reset(); |
| 874 | ti99_ccfdc_reset(machine); |
| 875 | 875 | break; |
| 876 | 876 | #endif |
| 877 | 877 | case fdc_kind_BwG: |
| 878 | | ti99_bwg_reset(); |
| 878 | ti99_bwg_reset(machine); |
| 879 | 879 | break; |
| 880 | 880 | case fdc_kind_hfdc: |
| 881 | | ti99_hfdc_reset(); |
| 881 | ti99_hfdc_reset(machine); |
| 882 | 882 | break; |
| 883 | 883 | case fdc_kind_none: |
| 884 | 884 | break; |
| 885 | 885 | } |
| 886 | 886 | |
| 887 | 887 | if (has_ide) { |
| 888 | | ti99_ide_reset(ti99_model == model_99_8); |
| 888 | ti99_ide_reset(machine, ti99_model == model_99_8); |
| 889 | 889 | ti99_ide_load_memcard(); |
| 890 | 890 | } |
| 891 | 891 | |
| 892 | 892 | if (has_rs232) |
| 893 | | ti99_rs232_reset(); |
| 893 | ti99_rs232_reset(machine); |
| 894 | 894 | |
| 895 | 895 | if (has_hsgpl) { |
| 896 | | ti99_hsgpl_reset(); |
| 897 | | ti99_hsgpl_load_memcard(); |
| 896 | ti99_hsgpl_reset(machine); |
| 897 | ti99_hsgpl_load_memcard(machine); |
| 898 | 898 | } |
| 899 | 899 | else |
| 900 | 900 | hsgpl_crdena = 0; |