src/mess/devices/snapquik.h
| r2428 | r2429 | |
| 6 | 6 | |
| 7 | 7 | *********************************************************************/ |
| 8 | 8 | |
| 9 | | #ifndef SNAPQUIK_H |
| 10 | | #define SNAPQUIK_H |
| 9 | #ifndef __SNAPQUIK_H__ |
| 10 | #define __SNAPQUIK_H__ |
| 11 | 11 | |
| 12 | | #include "device.h" |
| 13 | 12 | #include "image.h" |
| 14 | 13 | |
| 15 | 14 | |
| 15 | |
| 16 | /*************************************************************************** |
| 17 | CONSTANTS |
| 18 | ***************************************************************************/ |
| 19 | |
| 16 | 20 | enum |
| 17 | 21 | { |
| 18 | | MESS_DEVINFO_PTR_SNAPSHOT_LOAD = MESS_DEVINFO_PTR_DEV_SPECIFIC, |
| 19 | | MESS_DEVINFO_PTR_QUICKLOAD_LOAD = MESS_DEVINFO_PTR_DEV_SPECIFIC, |
| 20 | | |
| 21 | | MESS_DEVINFO_FLOAT_SNAPSHOT_DELAY = MESS_DEVINFO_FLOAT_DEV_SPECIFIC, |
| 22 | | MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY = MESS_DEVINFO_FLOAT_DEV_SPECIFIC |
| 22 | DEVINFO_FCT_SNAPSHOT_QUICKLOAD_LOAD = DEVINFO_FCT_DEVICE_SPECIFIC |
| 23 | 23 | }; |
| 24 | 24 | |
| 25 | |
| 26 | |
| 27 | /*************************************************************************** |
| 28 | MACROS |
| 29 | ***************************************************************************/ |
| 30 | |
| 31 | #define SNAPSHOT DEVICE_GET_INFO_NAME(snapshot) |
| 32 | #define QUICKLOAD DEVICE_GET_INFO_NAME(quickload) |
| 33 | |
| 34 | #define SNAPSHOT_LOAD_NAME(name) snapshot_load_##name |
| 35 | #define SNAPSHOT_LOAD(name) int SNAPSHOT_LOAD_NAME(name)(const device_config *image, const char *file_type, int snapshot_size) |
| 36 | |
| 37 | #define QUICKLOAD_LOAD_NAME(name) quickload_load_##name |
| 38 | #define QUICKLOAD_LOAD(name) int QUICKLOAD_LOAD_NAME(name)(const device_config *image, const char *file_type, int quickload_size) |
| 39 | |
| 40 | #define TAG_SNAPSHOT "snapshot" |
| 41 | #define TAG_QUICKLOAD "quickload" |
| 42 | |
| 43 | |
| 44 | |
| 45 | /*************************************************************************** |
| 46 | TYPE DEFINITIONS |
| 47 | ***************************************************************************/ |
| 48 | |
| 25 | 49 | typedef int (*snapquick_load_func)(const device_config *device, const char *file_type, int file_size); |
| 26 | 50 | |
| 27 | | #define SNAPSHOT_LOAD(name) int snapshot_load_##name(const device_config *image, const char *file_type, int snapshot_size) |
| 28 | | #define QUICKLOAD_LOAD(name) int quickload_load_##name(const device_config *image, const char *file_type, int quickload_size) |
| 51 | typedef struct _snapquick_config snapquick_config; |
| 52 | struct _snapquick_config |
| 53 | { |
| 54 | snapquick_load_func load; /* loading function */ |
| 55 | const char * file_extensions; /* file extensions */ |
| 56 | seconds_t delay_seconds; /* loading delay (seconds) */ |
| 57 | attoseconds_t delay_attoseconds; /* loading delay (attoseconds) */ |
| 58 | }; |
| 29 | 59 | |
| 30 | | void snapshot_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 31 | | void quickload_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 32 | 60 | |
| 33 | 61 | |
| 34 | | #endif /* SNAPQUIK_H */ |
| 62 | /*************************************************************************** |
| 63 | SNAPSHOT DEVICE CONFIGURATION MACROS |
| 64 | ***************************************************************************/ |
| 65 | |
| 66 | #define MDRV_SNAPSHOT_ADD(_load, _file_extensions, _delay) \ |
| 67 | MDRV_DEVICE_ADD(TAG_SNAPSHOT, SNAPSHOT) \ |
| 68 | MDRV_DEVICE_CONFIG_DATAPTR(snapquick_config, load, SNAPSHOT_LOAD_NAME(_load)) \ |
| 69 | MDRV_DEVICE_CONFIG_DATAPTR(snapquick_config, file_extensions, _file_extensions) \ |
| 70 | MDRV_DEVICE_CONFIG_DATA64(snapquick_config, delay_seconds, (seconds_t) (_delay)) \ |
| 71 | MDRV_DEVICE_CONFIG_DATA64(snapquick_config, delay_attoseconds, (attoseconds_t) (((_delay) - (int)(_delay)) * ATTOSECONDS_PER_SECOND)) \ |
| 72 | |
| 73 | |
| 74 | |
| 75 | /*************************************************************************** |
| 76 | QUICKLOAD DEVICE CONFIGURATION MACROS |
| 77 | ***************************************************************************/ |
| 78 | |
| 79 | #define MDRV_QUICKLOAD_ADD(_load, _file_extensions, _delay) \ |
| 80 | MDRV_DEVICE_ADD(TAG_QUICKLOAD, QUICKLOAD) \ |
| 81 | MDRV_DEVICE_CONFIG_DATAPTR(snapquick_config, load, QUICKLOAD_LOAD_NAME(_load)) \ |
| 82 | MDRV_DEVICE_CONFIG_DATAPTR(snapquick_config, file_extensions, _file_extensions) \ |
| 83 | MDRV_DEVICE_CONFIG_DATA64(snapquick_config, delay_seconds, (seconds_t) (_delay)) \ |
| 84 | MDRV_DEVICE_CONFIG_DATA64(snapquick_config, delay_attoseconds, (attoseconds_t) (((_delay) - (int)(_delay)) * ATTOSECONDS_PER_SECOND)) \ |
| 85 | |
| 86 | #define MDRV_QUICKLOAD_REMOVE \ |
| 87 | MDRV_DEVICE_REMOVE(TAG_QUICKLOAD, QUICKLOAD) |
| 88 | |
| 89 | |
| 90 | |
| 91 | /*************************************************************************** |
| 92 | FUNCTION PROTOTYPES |
| 93 | ***************************************************************************/ |
| 94 | |
| 95 | /* device getinfo function */ |
| 96 | DEVICE_GET_INFO(snapshot); |
| 97 | |
| 98 | /* device getinfo function */ |
| 99 | DEVICE_GET_INFO(quickload); |
| 100 | |
| 101 | |
| 102 | |
| 103 | #endif /* __SNAPQUIK_H__ */ |
src/mess/devices/z80bin.c
| r2428 | r2429 | |
| 5 | 5 | A binary quickload format used by the Microbee, the Exidy Sorcerer |
| 6 | 6 | VZ200/300 and the Super 80 |
| 7 | 7 | |
| 8 | | NOTE: INIT_FAIL == 1, INIT_PASS == 0, EOF == 0xffffffff |
| 9 | | |
| 10 | | Return status: 0 = good data, 1 = corrupted quickload file. |
| 11 | | |
| 12 | 8 | *********************************************************************/ |
| 13 | 9 | |
| 14 | 10 | #include "driver.h" |
| r2428 | r2429 | |
| 17 | 13 | #include "snapquik.h" |
| 18 | 14 | |
| 19 | 15 | |
| 16 | |
| 17 | /*************************************************************************** |
| 18 | INLINE FUNCTIONS |
| 19 | ***************************************************************************/ |
| 20 | |
| 21 | /*************************************************************************** |
| 22 | IMPLEMENTATION |
| 23 | ***************************************************************************/ |
| 24 | |
| 25 | /*------------------------------------------------- |
| 26 | z80bin_load_file - this is a public function |
| 27 | that really should be static |
| 28 | -------------------------------------------------*/ |
| 29 | |
| 20 | 30 | int z80bin_load_file(const device_config *image, const char *file_type, UINT16 *exec_addr, UINT16 *start_addr, UINT16 *end_addr ) |
| 21 | 31 | { |
| 22 | 32 | int ch; |
| 23 | 33 | UINT16 args[3]; |
| 24 | 34 | UINT16 i=0, j, size; |
| 25 | 35 | UINT8 data; |
| 26 | | char * pgmname; |
| 27 | | pgmname = (char *) malloc(256); |
| 36 | char pgmname[256]; |
| 37 | char message[256]; |
| 28 | 38 | |
| 29 | 39 | image_fseek(image, 7, SEEK_SET); |
| 30 | 40 | |
| r2428 | r2429 | |
| 32 | 42 | { |
| 33 | 43 | if (ch == EOF) |
| 34 | 44 | { |
| 35 | | ui_popup_time(10,"QUICKLOAD: Unexpected EOF while getting file name"); /* 10 seconds */ |
| 36 | | free(pgmname); |
| 45 | image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file name"); |
| 37 | 46 | return INIT_FAIL; |
| 38 | 47 | } |
| 39 | 48 | |
| 40 | | if (ch) |
| 49 | if (ch != '\0') |
| 41 | 50 | { |
| 51 | if (i >= (ARRAY_LENGTH(pgmname) - 1)) |
| 52 | return INIT_FAIL; |
| 53 | |
| 42 | 54 | pgmname[i] = ch; /* build program name */ |
| 43 | 55 | i++; |
| 44 | 56 | } |
| 45 | 57 | } |
| 46 | 58 | |
| 47 | | pgmname[i]=0; /* terminate string with a null */ |
| 59 | pgmname[i] = '\0'; /* terminate string with a null */ |
| 48 | 60 | |
| 49 | 61 | if (image_fread(image, args, sizeof(args)) != sizeof(args)) |
| 50 | 62 | { |
| 51 | | ui_popup_time(10,"QUICKLOAD: %s\nUnexpected EOF while getting file size",pgmname); |
| 52 | | free(pgmname); |
| 63 | image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file size"); |
| 53 | 64 | return INIT_FAIL; |
| 54 | 65 | } |
| 55 | 66 | |
| 56 | | exec_addr[0] = LITTLE_ENDIANIZE_INT16(args[0]); |
| 57 | | start_addr[0] = LITTLE_ENDIANIZE_INT16(args[1]); |
| 67 | exec_addr[0] = LITTLE_ENDIANIZE_INT16(args[0]); |
| 68 | start_addr[0] = LITTLE_ENDIANIZE_INT16(args[1]); |
| 58 | 69 | end_addr[0] = LITTLE_ENDIANIZE_INT16(args[2]); |
| 59 | 70 | |
| 60 | 71 | size = (end_addr[0] - start_addr[0] + 1) & 0xffff; |
| 61 | 72 | |
| 62 | | popmessage("%s\nsize=%04X : start=%04X : end=%04X : exec=%04X",pgmname,size,start_addr[0],end_addr[0],exec_addr[0]); |
| 73 | logerror("%s\nsize=%04X : start=%04X : end=%04X : exec=%04X",pgmname,size,start_addr[0],end_addr[0],exec_addr[0]); |
| 63 | 74 | |
| 64 | 75 | for (i = 0; i < size; i++) |
| 65 | 76 | { |
| 66 | 77 | j = (start_addr[0] + i) & 0xffff; |
| 67 | 78 | if (image_fread(image, &data, 1) != 1) |
| 68 | 79 | { |
| 69 | | ui_popup_time(10,"QUICKLOAD: %s\nUnexpected EOF while writing byte to %04X",pgmname,j); |
| 70 | | free(pgmname); |
| 80 | snprintf(message, ARRAY_LENGTH(message), "%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j); |
| 81 | image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, message); |
| 71 | 82 | return INIT_FAIL; |
| 72 | 83 | } |
| 73 | 84 | program_write_byte(j, data); |
| 74 | 85 | } |
| 75 | 86 | |
| 76 | | free(pgmname); |
| 77 | | |
| 78 | 87 | return INIT_PASS; |
| 79 | 88 | } |
| 80 | 89 | |
| 81 | 90 | |
| 91 | |
| 92 | /*------------------------------------------------- |
| 93 | QUICKLOAD_LOAD( z80bin ) |
| 94 | -------------------------------------------------*/ |
| 95 | |
| 82 | 96 | static QUICKLOAD_LOAD( z80bin ) |
| 83 | 97 | { |
| 84 | 98 | UINT16 exec_addr, start_addr, end_addr; |
| r2428 | r2429 | |
| 86 | 100 | if (z80bin_load_file( image, file_type, &exec_addr, &start_addr, &end_addr ) == INIT_FAIL) |
| 87 | 101 | return INIT_FAIL; |
| 88 | 102 | |
| 89 | | if (exec_addr == 0xffff) return INIT_PASS; /* non-executable data file */ |
| 90 | | cpunum_set_reg(0, REG_PC, exec_addr); /* start program */ |
| 103 | if (exec_addr != 0xffff) /* non-executable data file */ |
| 104 | cpunum_set_reg(0, REG_PC, exec_addr); /* start program */ |
| 105 | |
| 91 | 106 | return INIT_PASS; |
| 92 | 107 | } |
| 93 | 108 | |
| 94 | 109 | |
| 95 | | void z80bin_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 110 | |
| 111 | /*------------------------------------------------- |
| 112 | DEVICE_GET_INFO(z80bin) |
| 113 | -------------------------------------------------*/ |
| 114 | |
| 115 | DEVICE_GET_INFO(z80bin) |
| 96 | 116 | { |
| 97 | 117 | /* quickload */ |
| 98 | 118 | switch(state) |
| 99 | 119 | { |
| 100 | 120 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 101 | | case MESS_DEVINFO_STR_DEV_FILE: strcpy(info->s = device_temp_str(), __FILE__); break; |
| 102 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin"); break; |
| 121 | case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; |
| 122 | case DEVINFO_STR_IMAGE_FILE_EXTENSIONS: info->s = "bin"; break; |
| 103 | 123 | |
| 104 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 105 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_z80bin; break; |
| 124 | /* --- the following bits of info are returned as pointers to functions --- */ |
| 125 | case DEVINFO_FCT_SNAPSHOT_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_z80bin; break; |
| 106 | 126 | |
| 107 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 127 | default: DEVICE_GET_INFO_CALL(quickload); break; |
| 108 | 128 | } |
| 109 | 129 | } |
| 110 | 130 | |
src/mess/devices/snapquik.c
| r2428 | r2429 | |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "snapquik.h" |
| 11 | #include "z80bin.h" |
| 11 | 12 | |
| 12 | 13 | |
| 13 | | /* ----------------------------------------------------------------------- */ |
| 14 | 14 | |
| 15 | | struct snapquick_info |
| 15 | /*************************************************************************** |
| 16 | TYPE DEFINITIONS |
| 17 | ***************************************************************************/ |
| 18 | |
| 19 | typedef struct _snapquick_token snapquick_token; |
| 20 | struct _snapquick_token |
| 16 | 21 | { |
| 17 | | const device_config *img; |
| 18 | | int file_size; |
| 19 | | struct snapquick_info *next; |
| 22 | emu_timer *timer; |
| 23 | snapquick_load_func load; |
| 20 | 24 | }; |
| 21 | 25 | |
| 22 | | static struct snapquick_info *snapquick_infolist; |
| 23 | 26 | |
| 24 | 27 | |
| 28 | /*************************************************************************** |
| 29 | INLINE FUNCTIONS |
| 30 | ***************************************************************************/ |
| 25 | 31 | |
| 26 | | static TIMER_CALLBACK(snapquick_processsnapshot) |
| 32 | /*------------------------------------------------- |
| 33 | assert_is_snapshot_or_quickload - asserts/confirms |
| 34 | that a given device is a snapshot or quickload |
| 35 | -------------------------------------------------*/ |
| 36 | |
| 37 | INLINE void assert_is_snapshot_or_quickload(const device_config *device) |
| 27 | 38 | { |
| 28 | | struct snapquick_info *si = (struct snapquick_info *) ptr; |
| 29 | | snapquick_load_func loadproc; |
| 30 | | const char *file_type; |
| 31 | | const struct IODevice *dev; |
| 39 | assert(device != NULL); |
| 40 | assert(device->inline_config != NULL); |
| 41 | assert((device->type == SNAPSHOT) || (device->type == QUICKLOAD) |
| 42 | || (device->type == Z80BIN)); |
| 43 | } |
| 32 | 44 | |
| 33 | | dev = mess_device_from_core_device(si->img); |
| 34 | | loadproc = (snapquick_load_func) mess_device_get_info_fct(&dev->devclass, MESS_DEVINFO_PTR_SNAPSHOT_LOAD); |
| 35 | | file_type = image_filetype(si->img); |
| 36 | | loadproc(si->img, file_type, si->file_size); |
| 37 | | image_unload(si->img); |
| 45 | |
| 46 | |
| 47 | /*------------------------------------------------- |
| 48 | get_token - safely gets the snapshot/quickload data |
| 49 | -------------------------------------------------*/ |
| 50 | |
| 51 | INLINE snapquick_token *get_token(const device_config *device) |
| 52 | { |
| 53 | assert_is_snapshot_or_quickload(device); |
| 54 | return (snapquick_token *) device->token; |
| 38 | 55 | } |
| 39 | 56 | |
| 40 | 57 | |
| 41 | 58 | |
| 42 | | static DEVICE_IMAGE_LOAD( snapquick ) |
| 59 | /*------------------------------------------------- |
| 60 | get_config - safely gets the bitbanger config |
| 61 | -------------------------------------------------*/ |
| 62 | |
| 63 | INLINE const snapquick_config *get_config(const device_config *device) |
| 43 | 64 | { |
| 44 | | const struct IODevice *dev; |
| 45 | | struct snapquick_info *si; |
| 46 | | double delay; |
| 47 | | int file_size; |
| 65 | assert_is_snapshot_or_quickload(device); |
| 66 | return (const snapquick_config *) device->inline_config; |
| 67 | } |
| 48 | 68 | |
| 49 | | file_size = image_length(image); |
| 50 | | if (file_size <= 0) |
| 51 | | return INIT_FAIL; |
| 52 | 69 | |
| 53 | | si = (struct snapquick_info *) image_malloc(image, sizeof(struct snapquick_info)); |
| 54 | | if (!si) |
| 55 | | return INIT_FAIL; |
| 56 | 70 | |
| 57 | | dev = mess_device_from_core_device(image); |
| 58 | | assert(dev); |
| 71 | /*************************************************************************** |
| 72 | IMPLEMENTATION |
| 73 | ***************************************************************************/ |
| 59 | 74 | |
| 60 | | si->img = image; |
| 61 | | si->file_size = file_size; |
| 62 | | si->next = snapquick_infolist; |
| 63 | | snapquick_infolist = si; |
| 75 | /*------------------------------------------------- |
| 76 | TIMER_CALLBACK(process_snapshot_or_quickload) |
| 77 | -------------------------------------------------*/ |
| 64 | 78 | |
| 65 | | delay = mess_device_get_info_double(&dev->devclass, MESS_DEVINFO_FLOAT_SNAPSHOT_DELAY); |
| 79 | static TIMER_CALLBACK(process_snapshot_or_quickload) |
| 80 | { |
| 81 | const device_config *device = (const device_config *) ptr; |
| 82 | snapquick_token *token = get_token(device); |
| 66 | 83 | |
| 67 | | timer_set(double_to_attotime(delay), si, 0, snapquick_processsnapshot); |
| 68 | | return INIT_PASS; |
| 84 | /* invoke the load */ |
| 85 | (*token->load)(device, |
| 86 | image_filetype(device), |
| 87 | image_length(device)); |
| 88 | |
| 89 | /* unload the device */ |
| 90 | image_unload(device); |
| 69 | 91 | } |
| 70 | 92 | |
| 71 | 93 | |
| 72 | 94 | |
| 73 | | static DEVICE_IMAGE_UNLOAD( snapquick ) |
| 95 | /*------------------------------------------------- |
| 96 | DEVICE_START( snapquick ) |
| 97 | -------------------------------------------------*/ |
| 98 | |
| 99 | static DEVICE_START( snapquick ) |
| 74 | 100 | { |
| 75 | | struct snapquick_info **si = &snapquick_infolist; |
| 101 | snapquick_token *token = get_token(device); |
| 76 | 102 | |
| 77 | | while(*si && ((*si)->img != image)) |
| 78 | | si = &(*si)->next; |
| 79 | | if (*si) |
| 80 | | *si = (*si)->next; |
| 103 | /* allocate a timer */ |
| 104 | token->timer = timer_alloc(process_snapshot_or_quickload, (void *) device); |
| 105 | |
| 106 | /* locate the load function */ |
| 107 | token->load = (snapquick_load_func) device_get_info_fct(device, DEVINFO_FCT_SNAPSHOT_QUICKLOAD_LOAD); |
| 81 | 108 | } |
| 82 | 109 | |
| 83 | 110 | |
| 84 | 111 | |
| 85 | | /* ----------------------------------------------------------------------- */ |
| 112 | /*------------------------------------------------- |
| 113 | DEVICE_IMAGE_LOAD( snapquick ) |
| 114 | -------------------------------------------------*/ |
| 86 | 115 | |
| 87 | | static void snapquick_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 116 | static DEVICE_IMAGE_LOAD( snapquick ) |
| 88 | 117 | { |
| 118 | const snapquick_config *config = get_config(image); |
| 119 | snapquick_token *token = get_token(image); |
| 120 | |
| 121 | /* adjust the timer */ |
| 122 | timer_adjust_oneshot( |
| 123 | token->timer, |
| 124 | attotime_make(config->delay_seconds, config->delay_attoseconds), |
| 125 | 0); |
| 126 | |
| 127 | return INIT_PASS; |
| 128 | } |
| 129 | |
| 130 | |
| 131 | |
| 132 | /*------------------------------------------------- |
| 133 | DEVICE_GET_INFO(snapquick) - device getinfo |
| 134 | function |
| 135 | -------------------------------------------------*/ |
| 136 | |
| 137 | static DEVICE_GET_INFO(snapquick) |
| 138 | { |
| 89 | 139 | switch(state) |
| 90 | 140 | { |
| 91 | 141 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 92 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 93 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 94 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 0; break; |
| 95 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 0; break; |
| 142 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(snapquick_token); break; |
| 143 | case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(snapquick_config); break; |
| 144 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; |
| 145 | case DEVINFO_INT_IMAGE_READABLE: info->i = 1; break; |
| 146 | case DEVINFO_INT_IMAGE_WRITEABLE: info->i = 0; break; |
| 147 | case DEVINFO_INT_IMAGE_CREATABLE: info->i = 0; break; |
| 96 | 148 | |
| 97 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 98 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(snapquick); break; |
| 99 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(snapquick); break; |
| 149 | /* --- the following bits of info are returned as pointers to functions --- */ |
| 150 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(snapquick); break; |
| 151 | case DEVINFO_FCT_IMAGE_LOAD: info->f = (genf *) DEVICE_IMAGE_LOAD_NAME(snapquick); break; |
| 152 | case DEVINFO_FCT_SNAPSHOT_QUICKLOAD_LOAD: info->f = (genf *) get_config(device)->load; break; |
| 100 | 153 | |
| 101 | 154 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 102 | | case MESS_DEVINFO_STR_DEV_FILE: strcpy(info->s = device_temp_str(), __FILE__); break; |
| 155 | case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; |
| 156 | case DEVINFO_STR_IMAGE_FILE_EXTENSIONS: info->s = get_config(device)->file_extensions; break; |
| 103 | 157 | } |
| 104 | 158 | } |
| 105 | 159 | |
| 106 | 160 | |
| 107 | 161 | |
| 108 | | void snapshot_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 162 | /*------------------------------------------------- |
| 163 | DEVICE_GET_INFO(snapshot) - device getinfo |
| 164 | function |
| 165 | -------------------------------------------------*/ |
| 166 | |
| 167 | DEVICE_GET_INFO(snapshot) |
| 109 | 168 | { |
| 110 | 169 | switch(state) |
| 111 | 170 | { |
| 112 | 171 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 113 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_SNAPSHOT; break; |
| 172 | case DEVINFO_INT_IMAGE_TYPE: info->i = IO_SNAPSHOT; break; |
| 114 | 173 | |
| 115 | | /* --- the following bits of info are returned as doubles --- */ |
| 116 | | case MESS_DEVINFO_FLOAT_SNAPSHOT_DELAY: info->d = 0.0; break; |
| 174 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 175 | case DEVINFO_STR_NAME: info->s = "Snapshot"; break; |
| 176 | case DEVINFO_STR_FAMILY: info->s = "Snapshot"; break; |
| 117 | 177 | |
| 118 | | default: snapquick_device_getinfo(devclass, state, info); |
| 178 | default: DEVICE_GET_INFO_CALL(snapquick); break; |
| 119 | 179 | } |
| 120 | 180 | } |
| 121 | 181 | |
| 122 | 182 | |
| 123 | 183 | |
| 124 | | void quickload_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 184 | /*------------------------------------------------- |
| 185 | DEVICE_GET_INFO(quickload) - device getinfo |
| 186 | function |
| 187 | -------------------------------------------------*/ |
| 188 | |
| 189 | DEVICE_GET_INFO(quickload) |
| 125 | 190 | { |
| 126 | 191 | switch(state) |
| 127 | 192 | { |
| 128 | 193 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 129 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_QUICKLOAD; break; |
| 194 | case DEVINFO_INT_IMAGE_TYPE: info->i = IO_QUICKLOAD; break; |
| 130 | 195 | |
| 131 | | /* --- the following bits of info are returned as doubles --- */ |
| 132 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = 0.0; break; |
| 196 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 197 | case DEVINFO_STR_NAME: info->s = "Quickload"; break; |
| 198 | case DEVINFO_STR_FAMILY: info->s = "Quickload"; break; |
| 133 | 199 | |
| 134 | | default: snapquick_device_getinfo(devclass, state, info); |
| 200 | default: DEVICE_GET_INFO_CALL(snapquick); break; |
| 135 | 201 | } |
| 136 | 202 | } |
| 137 | | |
src/mess/drivers/cbmb.c
| r2428 | r2429 | |
| 658 | 658 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 659 | 659 | MDRV_SOUND_ADD(SID6581, 1000000) |
| 660 | 660 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 661 | |
| 662 | /* devices */ |
| 663 | MDRV_QUICKLOAD_ADD(cbmb, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS) |
| 661 | 664 | MACHINE_DRIVER_END |
| 662 | 665 | |
| 663 | 666 | |
| r2428 | r2429 | |
| 701 | 704 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 702 | 705 | MDRV_SOUND_ADD(SID6581, 1000000) |
| 703 | 706 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 707 | |
| 708 | /* devices */ |
| 709 | MDRV_QUICKLOAD_ADD(cbm500, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS) |
| 704 | 710 | MACHINE_DRIVER_END |
| 705 | 711 | |
| 706 | 712 | static void cbmb_cbmcartslot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| r2428 | r2429 | |
| 714 | 720 | } |
| 715 | 721 | } |
| 716 | 722 | |
| 717 | | static void cbmb_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 718 | | { |
| 719 | | switch(state) |
| 720 | | { |
| 721 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 722 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "p00,prg"); break; |
| 723 | 723 | |
| 724 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 725 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_cbmb; break; |
| 726 | | |
| 727 | | /* --- the following bits of info are returned as doubles --- */ |
| 728 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = CBM_QUICKLOAD_DELAY; break; |
| 729 | | |
| 730 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 731 | | } |
| 732 | | } |
| 733 | | |
| 734 | 724 | SYSTEM_CONFIG_START(cbmb) |
| 735 | 725 | CONFIG_DEVICE(cbmb_cbmcartslot_getinfo) |
| 736 | | CONFIG_DEVICE(cbmb_quickload_getinfo) |
| 737 | 726 | SYSTEM_CONFIG_END |
| 738 | 727 | |
| 739 | | static void cbm500_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 740 | | { |
| 741 | | switch(state) |
| 742 | | { |
| 743 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 744 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "p00,prg"); break; |
| 745 | | |
| 746 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 747 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_cbm500; break; |
| 748 | | |
| 749 | | /* --- the following bits of info are returned as doubles --- */ |
| 750 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = CBM_QUICKLOAD_DELAY; break; |
| 751 | | |
| 752 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 753 | | } |
| 754 | | } |
| 755 | | |
| 756 | 728 | SYSTEM_CONFIG_START(cbm500) |
| 757 | 729 | CONFIG_DEVICE(cbmb_cbmcartslot_getinfo) |
| 758 | | CONFIG_DEVICE(cbm500_quickload_getinfo) |
| 759 | 730 | SYSTEM_CONFIG_END |
| 760 | 731 | |
| 761 | 732 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
src/mess/drivers/mbee.c
| r2428 | r2429 | |
| 57 | 57 | #include "devices/cassette.h" |
| 58 | 58 | #include "devices/z80bin.h" |
| 59 | 59 | |
| 60 | static SNAPSHOT_LOAD( mbee ); |
| 61 | static QUICKLOAD_LOAD( mbee ); |
| 62 | |
| 60 | 63 | static size_t mbee_size; |
| 61 | 64 | |
| 62 | 65 | static ADDRESS_MAP_START(mbee_mem, ADDRESS_SPACE_PROGRAM, 8) |
| r2428 | r2429 | |
| 307 | 310 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 308 | 311 | MDRV_SOUND_ADD(SPEAKER, 0) |
| 309 | 312 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 313 | |
| 314 | /* devices */ |
| 315 | MDRV_SNAPSHOT_ADD(mbee, "mwb", 0.5) |
| 316 | MDRV_QUICKLOAD_ADD(mbee, "bin", 0) |
| 310 | 317 | MACHINE_DRIVER_END |
| 311 | 318 | |
| 312 | 319 | |
| r2428 | r2429 | |
| 340 | 347 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 341 | 348 | MDRV_SOUND_ADD(SPEAKER, 0) |
| 342 | 349 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 350 | |
| 351 | /* devices */ |
| 352 | MDRV_SNAPSHOT_ADD(mbee, "mwb", 0.5) |
| 353 | MDRV_QUICKLOAD_ADD(mbee, "bin", 0) |
| 343 | 354 | MACHINE_DRIVER_END |
| 344 | 355 | |
| 345 | 356 | |
| r2428 | r2429 | |
| 459 | 470 | return INIT_PASS; |
| 460 | 471 | } |
| 461 | 472 | |
| 462 | | static void mbee_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 463 | | { |
| 464 | | /* quickload */ |
| 465 | | switch(state) |
| 466 | | { |
| 467 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 468 | | case MESS_DEVINFO_STR_DEV_FILE: strcpy(info->s = device_temp_str(), __FILE__); break; |
| 469 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin"); break; |
| 470 | | |
| 471 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 472 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_mbee; break; |
| 473 | | |
| 474 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 475 | | } |
| 476 | | } |
| 477 | | |
| 478 | 473 | static SNAPSHOT_LOAD( mbee ) |
| 479 | 474 | { |
| 480 | 475 | UINT16 i, j; |
| r2428 | r2429 | |
| 500 | 495 | return INIT_PASS; |
| 501 | 496 | } |
| 502 | 497 | |
| 503 | | static void mbee_snapshot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 504 | | { |
| 505 | | /* snapshot */ |
| 506 | | switch(state) |
| 507 | | { |
| 508 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 509 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "mwb"); break; |
| 510 | | |
| 511 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 512 | | case MESS_DEVINFO_PTR_SNAPSHOT_LOAD: info->f = (genf *) snapshot_load_mbee; break; |
| 513 | | |
| 514 | | /* --- the following bits of info are returned as doubles --- */ |
| 515 | | case MESS_DEVINFO_FLOAT_SNAPSHOT_DELAY: info->d = 0.5; break; |
| 516 | | |
| 517 | | default: snapshot_device_getinfo(devclass, state, info); break; |
| 518 | | } |
| 519 | | } |
| 520 | | |
| 521 | 498 | static void mbee_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 522 | 499 | { |
| 523 | 500 | /* cassette */ |
| r2428 | r2429 | |
| 570 | 547 | SYSTEM_CONFIG_START(mbee) |
| 571 | 548 | CONFIG_DEVICE(mbee_cassette_getinfo) |
| 572 | 549 | CONFIG_DEVICE(mbee_cartslot_getinfo) |
| 573 | | CONFIG_DEVICE(mbee_quickload_getinfo) |
| 574 | | CONFIG_DEVICE(mbee_snapshot_getinfo) |
| 575 | 550 | SYSTEM_CONFIG_END |
| 576 | 551 | |
| 577 | 552 | SYSTEM_CONFIG_START(mbeeic) |
| 578 | 553 | CONFIG_DEVICE(mbee_cassette_getinfo) |
| 579 | 554 | CONFIG_DEVICE(mbee_cartslot_getinfo) |
| 580 | 555 | CONFIG_DEVICE(mbee_floppy_getinfo) |
| 581 | | CONFIG_DEVICE(mbee_quickload_getinfo) |
| 582 | | CONFIG_DEVICE(mbee_snapshot_getinfo) |
| 583 | 556 | SYSTEM_CONFIG_END |
| 584 | 557 | |
| 585 | 558 | |
src/mess/drivers/coco.c
| r2428 | r2429 | |
| 654 | 654 | |
| 655 | 655 | /* printer */ |
| 656 | 656 | MDRV_DEVICE_ADD("printer", PRINTER) |
| 657 | |
| 658 | /* snapshot/quickload */ |
| 659 | MDRV_SNAPSHOT_ADD(coco_pak, "pak", 0) |
| 657 | 660 | MACHINE_DRIVER_END |
| 658 | 661 | |
| 659 | 662 | static MACHINE_DRIVER_START( dragon64 ) |
| r2428 | r2429 | |
| 677 | 680 | |
| 678 | 681 | /* printer */ |
| 679 | 682 | MDRV_DEVICE_ADD("printer", PRINTER) |
| 683 | |
| 684 | /* snapshot/quickload */ |
| 685 | MDRV_SNAPSHOT_ADD(coco_pak, "pak", 0) |
| 680 | 686 | MACHINE_DRIVER_END |
| 681 | 687 | |
| 682 | 688 | static MACHINE_DRIVER_START( d64plus ) |
| r2428 | r2429 | |
| 700 | 706 | |
| 701 | 707 | /* printer */ |
| 702 | 708 | MDRV_DEVICE_ADD("printer", PRINTER) |
| 709 | |
| 710 | /* snapshot/quickload */ |
| 711 | MDRV_SNAPSHOT_ADD(coco_pak, "pak", 0) |
| 703 | 712 | MACHINE_DRIVER_END |
| 704 | 713 | |
| 705 | 714 | static MACHINE_DRIVER_START( dgnalpha ) |
| r2428 | r2429 | |
| 726 | 735 | |
| 727 | 736 | /* printer */ |
| 728 | 737 | MDRV_DEVICE_ADD("printer", PRINTER) |
| 738 | |
| 739 | /* snapshot/quickload */ |
| 740 | MDRV_SNAPSHOT_ADD(coco_pak, "pak", 0) |
| 729 | 741 | MACHINE_DRIVER_END |
| 730 | 742 | |
| 731 | 743 | static MACHINE_DRIVER_START( tanodr64 ) |
| r2428 | r2429 | |
| 749 | 761 | |
| 750 | 762 | /* printer */ |
| 751 | 763 | MDRV_DEVICE_ADD("printer", PRINTER) |
| 764 | |
| 765 | /* snapshot/quickload */ |
| 766 | MDRV_SNAPSHOT_ADD(coco_pak, "pak", 0) |
| 752 | 767 | MACHINE_DRIVER_END |
| 753 | 768 | |
| 754 | 769 | static MACHINE_DRIVER_START( coco ) |
| r2428 | r2429 | |
| 772 | 787 | |
| 773 | 788 | /* bitbanger/printer */ |
| 774 | 789 | MDRV_IMPORT_FROM( coco_bitbanger ) |
| 790 | |
| 791 | /* snapshot/quickload */ |
| 792 | MDRV_SNAPSHOT_ADD(coco_pak, "pak", 0) |
| 793 | MDRV_QUICKLOAD_ADD(coco, "bin", 0.5) |
| 775 | 794 | MACHINE_DRIVER_END |
| 776 | 795 | |
| 777 | 796 | static MACHINE_DRIVER_START( coco2 ) |
| r2428 | r2429 | |
| 795 | 814 | |
| 796 | 815 | /* bitbanger/printer */ |
| 797 | 816 | MDRV_IMPORT_FROM( coco_bitbanger ) |
| 817 | |
| 818 | /* snapshot/quickload */ |
| 819 | MDRV_SNAPSHOT_ADD(coco_pak, "pak", 0) |
| 820 | MDRV_QUICKLOAD_ADD(coco, "bin", 0.5) |
| 798 | 821 | MACHINE_DRIVER_END |
| 799 | 822 | |
| 800 | 823 | static MACHINE_DRIVER_START( coco2b ) |
| r2428 | r2429 | |
| 818 | 841 | |
| 819 | 842 | /* bitbanger/printer */ |
| 820 | 843 | MDRV_IMPORT_FROM( coco_bitbanger ) |
| 844 | |
| 845 | /* snapshot/quickload */ |
| 846 | MDRV_SNAPSHOT_ADD(coco_pak, "pak", 0) |
| 847 | MDRV_QUICKLOAD_ADD(coco, "bin", 0.5) |
| 821 | 848 | MACHINE_DRIVER_END |
| 822 | 849 | |
| 823 | 850 | static MACHINE_DRIVER_START( coco3 ) |
| r2428 | r2429 | |
| 851 | 878 | /* bitbanger/printer */ |
| 852 | 879 | MDRV_IMPORT_FROM( coco_bitbanger ) |
| 853 | 880 | |
| 881 | /* snapshot/quickload */ |
| 882 | MDRV_SNAPSHOT_ADD(coco3_pak, "pak", 0) |
| 883 | MDRV_QUICKLOAD_ADD(coco, "bin", 0.5) |
| 884 | |
| 854 | 885 | /* devices */ |
| 855 | 886 | MDRV_DEVICE_ADD("vhd", COCO_VHD) |
| 856 | 887 | MACHINE_DRIVER_END |
| r2428 | r2429 | |
| 1016 | 1047 | |
| 1017 | 1048 | |
| 1018 | 1049 | |
| 1019 | | static void coco_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 1020 | | { |
| 1021 | | /* quickload */ |
| 1022 | | switch(state) |
| 1023 | | { |
| 1024 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1025 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin"); break; |
| 1026 | | |
| 1027 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1028 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_coco; break; |
| 1029 | | |
| 1030 | | /* --- the following bits of info are returned as doubles --- */ |
| 1031 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = 0.5; break; |
| 1032 | | |
| 1033 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 1034 | | } |
| 1035 | | } |
| 1036 | | |
| 1037 | | |
| 1038 | | |
| 1039 | 1050 | static void coco_cartslot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 1040 | 1051 | { |
| 1041 | 1052 | switch(state) |
| r2428 | r2429 | |
| 1076 | 1087 | |
| 1077 | 1088 | |
| 1078 | 1089 | |
| 1079 | | static void coco_snapshot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 1080 | | { |
| 1081 | | switch(state) |
| 1082 | | { |
| 1083 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1084 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "pak"); break; |
| 1085 | | |
| 1086 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1087 | | case MESS_DEVINFO_PTR_SNAPSHOT_LOAD: info->f = (genf *) snapshot_load_coco_pak; break; |
| 1088 | | |
| 1089 | | default: snapshot_device_getinfo(devclass, state, info); break; |
| 1090 | | } |
| 1091 | | } |
| 1092 | | |
| 1093 | | |
| 1094 | | |
| 1095 | | static void coco3_snapshot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 1096 | | { |
| 1097 | | switch(state) |
| 1098 | | { |
| 1099 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1100 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "pak"); break; |
| 1101 | | |
| 1102 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1103 | | case MESS_DEVINFO_PTR_SNAPSHOT_LOAD: info->f = (genf *) snapshot_load_coco3_pak; break; |
| 1104 | | |
| 1105 | | default: snapshot_device_getinfo(devclass, state, info); break; |
| 1106 | | } |
| 1107 | | } |
| 1108 | | |
| 1109 | 1090 | /************************************* |
| 1110 | 1091 | * |
| 1111 | 1092 | * CoCo sysconfig structures |
| r2428 | r2429 | |
| 1116 | 1097 | SYSTEM_CONFIG_START( generic_coco ) |
| 1117 | 1098 | CONFIG_DEVICE( coco_cassette_getinfo ) |
| 1118 | 1099 | CONFIG_DEVICE( coco_floppy_getinfo ) |
| 1119 | | CONFIG_DEVICE( coco_quickload_getinfo ) |
| 1120 | 1100 | SYSTEM_CONFIG_END |
| 1121 | 1101 | |
| 1122 | 1102 | SYSTEM_CONFIG_START( generic_coco12 ) |
| 1123 | 1103 | CONFIG_IMPORT_FROM( generic_coco ) |
| 1124 | 1104 | CONFIG_DEVICE( coco_cartslot_getinfo ) |
| 1125 | | CONFIG_DEVICE( coco_snapshot_getinfo ) |
| 1126 | 1105 | SYSTEM_CONFIG_END |
| 1127 | 1106 | |
| 1128 | 1107 | /* These have to be split up, as the CoCo has a bitbanger */ |
| r2428 | r2429 | |
| 1131 | 1110 | CONFIG_DEVICE( coco_cassette_getinfo ) |
| 1132 | 1111 | CONFIG_DEVICE( coco_floppy_getinfo ) |
| 1133 | 1112 | CONFIG_DEVICE( coco_cartslot_getinfo ) |
| 1134 | | CONFIG_DEVICE( coco_snapshot_getinfo ) |
| 1135 | 1113 | SYSTEM_CONFIG_END |
| 1136 | 1114 | |
| 1137 | 1115 | |
| r2428 | r2429 | |
| 1166 | 1144 | SYSTEM_CONFIG_START(coco3) |
| 1167 | 1145 | CONFIG_IMPORT_FROM ( generic_coco ) |
| 1168 | 1146 | CONFIG_DEVICE( coco3_cartslot_getinfo ) |
| 1169 | | CONFIG_DEVICE( coco3_snapshot_getinfo ) |
| 1170 | 1147 | CONFIG_RAM (128 * 1024) |
| 1171 | 1148 | CONFIG_RAM_DEFAULT (512 * 1024) |
| 1172 | 1149 | CONFIG_RAM (2048 * 1024) |
src/mess/drivers/spectrum.c
| r2428 | r2429 | |
| 1998 | 1998 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1999 | 1999 | MDRV_SOUND_ADD(SPEAKER, 0) |
| 2000 | 2000 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 2001 | |
| 2002 | /* devices */ |
| 2003 | MDRV_SNAPSHOT_ADD(spectrum, "sna,z80,sp", 0) |
| 2004 | MDRV_QUICKLOAD_ADD(spectrum, "scr", 0) |
| 2001 | 2005 | MACHINE_DRIVER_END |
| 2002 | 2006 | |
| 2003 | 2007 | |
| r2428 | r2429 | |
| 2289 | 2293 | } |
| 2290 | 2294 | } |
| 2291 | 2295 | |
| 2292 | | static void spectrum_common_snapshot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 2293 | | { |
| 2294 | | /* snapshot */ |
| 2295 | | switch(state) |
| 2296 | | { |
| 2297 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 2298 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "sna,z80,sp"); break; |
| 2299 | | |
| 2300 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 2301 | | case MESS_DEVINFO_PTR_SNAPSHOT_LOAD: info->f = (genf *) snapshot_load_spectrum; break; |
| 2302 | | |
| 2303 | | default: snapshot_device_getinfo(devclass, state, info); break; |
| 2304 | | } |
| 2305 | | } |
| 2306 | | |
| 2307 | | static void spectrum_common_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 2308 | | { |
| 2309 | | /* quickload */ |
| 2310 | | switch(state) |
| 2311 | | { |
| 2312 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 2313 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "scr"); break; |
| 2314 | | |
| 2315 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 2316 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_spectrum; break; |
| 2317 | | |
| 2318 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 2319 | | } |
| 2320 | | } |
| 2321 | | |
| 2322 | 2296 | SYSTEM_CONFIG_START(spectrum_common) |
| 2323 | 2297 | CONFIG_DEVICE(spectrum_common_cassette_getinfo) |
| 2324 | | CONFIG_DEVICE(spectrum_common_snapshot_getinfo) |
| 2325 | | CONFIG_DEVICE(spectrum_common_quickload_getinfo) |
| 2326 | 2298 | SYSTEM_CONFIG_END |
| 2327 | 2299 | |
| 2328 | 2300 | SYSTEM_CONFIG_START(spectrum) |
src/mess/drivers/super80.c
| r2428 | r2429 | |
| 10 | 10 | #include "sound/speaker.h" |
| 11 | 11 | #include "deprecat.h" /* "Machine" needed for z80pio interrupt */ |
| 12 | 12 | |
| 13 | static QUICKLOAD_LOAD( super80 ); |
| 14 | |
| 13 | 15 | static UINT8 super80_mhz=2; /* state of bit 2 of port F0 */ |
| 14 | 16 | static UINT16 vidpg=0xfe00; /* Home position of video page being displayed */ |
| 15 | 17 | static UINT8 int_sw; /* internal 1 mhz flipflop */ |
| r2428 | r2429 | |
| 814 | 816 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 815 | 817 | MDRV_SOUND_ADD(SPEAKER, 0) |
| 816 | 818 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 819 | |
| 820 | /* quickload */ |
| 821 | MDRV_QUICKLOAD_ADD(super80, "bin", 0) |
| 817 | 822 | MACHINE_DRIVER_END |
| 818 | 823 | |
| 819 | 824 | static MACHINE_DRIVER_START( super80d ) |
| r2428 | r2429 | |
| 860 | 865 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 861 | 866 | MDRV_SOUND_ADD(SPEAKER, 0) |
| 862 | 867 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 868 | |
| 869 | /* quickload */ |
| 870 | MDRV_QUICKLOAD_ADD(super80, "bin", 0) |
| 863 | 871 | MACHINE_DRIVER_END |
| 864 | 872 | |
| 865 | 873 | static void driver_init_common( void ) |
| r2428 | r2429 | |
| 963 | 971 | return INIT_PASS; |
| 964 | 972 | } |
| 965 | 973 | |
| 966 | | static void super80_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 967 | | { |
| 968 | | /* quickload */ |
| 969 | | switch(state) |
| 970 | | { |
| 971 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 972 | | case MESS_DEVINFO_STR_DEV_FILE: strcpy(info->s = device_temp_str(), __FILE__); break; |
| 973 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin"); break; |
| 974 | | |
| 975 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 976 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_super80; break; |
| 977 | | |
| 978 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 979 | | } |
| 980 | | } |
| 981 | | |
| 982 | 974 | static DEVICE_IMAGE_LOAD( super80_cart ) |
| 983 | 975 | { |
| 984 | 976 | /* int size = mame_fsize(fp); |
| r2428 | r2429 | |
| 1027 | 1019 | default: cassette_device_getinfo(devclass, state, info); break; |
| 1028 | 1020 | } |
| 1029 | 1021 | } |
| 1030 | | INPUT_PORTS_START(0) |
| 1031 | | INPUT_PORTS_END |
| 1032 | 1022 | |
| 1033 | 1023 | SYSTEM_CONFIG_START(super80) |
| 1034 | 1024 | CONFIG_DEVICE(super80_cassette_getinfo) |
| 1035 | 1025 | CONFIG_DEVICE(super80_cartslot_getinfo) |
| 1036 | | CONFIG_DEVICE(super80_quickload_getinfo) |
| 1037 | 1026 | SYSTEM_CONFIG_END |
| 1038 | 1027 | |
| 1039 | 1028 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
src/mess/drivers/pet.c
| r2428 | r2429 | |
| 821 | 821 | ROM_LOAD ("324878-02.bin", 0x?000, 0x2000, CRC(5e00476d)) |
| 822 | 822 | #endif |
| 823 | 823 | |
| 824 | | static MACHINE_DRIVER_START( pet ) |
| 824 | static MACHINE_DRIVER_START( pet_general ) |
| 825 | 825 | /* basic machine hardware */ |
| 826 | 826 | MDRV_CPU_ADD_TAG("main", M6502, 7833600) /* 7.8336 Mhz */ |
| 827 | 827 | MDRV_CPU_PROGRAM_MAP(pet_mem, 0) |
| r2428 | r2429 | |
| 845 | 845 | MACHINE_DRIVER_END |
| 846 | 846 | |
| 847 | 847 | |
| 848 | static MACHINE_DRIVER_START( pet ) |
| 849 | MDRV_IMPORT_FROM( pet_general ) |
| 850 | MDRV_QUICKLOAD_ADD(cbm_pet, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS) |
| 851 | MACHINE_DRIVER_END |
| 852 | |
| 853 | |
| 854 | static MACHINE_DRIVER_START( pet1 ) |
| 855 | MDRV_IMPORT_FROM( pet_general ) |
| 856 | MDRV_QUICKLOAD_ADD(cbm_pet1, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS) |
| 857 | MACHINE_DRIVER_END |
| 858 | |
| 859 | |
| 848 | 860 | static MACHINE_DRIVER_START( pet40 ) |
| 849 | 861 | MDRV_IMPORT_FROM( pet ) |
| 850 | 862 | MDRV_CPU_MODIFY( "main" ) |
| r2428 | r2429 | |
| 928 | 940 | } |
| 929 | 941 | } |
| 930 | 942 | |
| 931 | | static void pet_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 932 | | { |
| 933 | | switch(state) |
| 934 | | { |
| 935 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 936 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "p00,prg"); break; |
| 937 | | |
| 938 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 939 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_cbm_pet; break; |
| 940 | | |
| 941 | | /* --- the following bits of info are returned as doubles --- */ |
| 942 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = CBM_QUICKLOAD_DELAY; break; |
| 943 | | |
| 944 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 945 | | } |
| 946 | | } |
| 947 | | |
| 948 | | static void pet1_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 949 | | { |
| 950 | | switch(state) |
| 951 | | { |
| 952 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 953 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "p00,prg"); break; |
| 954 | | |
| 955 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 956 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_cbm_pet1; break; |
| 957 | | |
| 958 | | /* --- the following bits of info are returned as doubles --- */ |
| 959 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = CBM_QUICKLOAD_DELAY; break; |
| 960 | | |
| 961 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 962 | | } |
| 963 | | } |
| 964 | | |
| 965 | 943 | SYSTEM_CONFIG_START(pet) |
| 966 | 944 | CONFIG_DEVICE(pet_cbmcartslot_getinfo) |
| 967 | 945 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| 968 | | CONFIG_DEVICE(pet1_quickload_getinfo) |
| 969 | 946 | CONFIG_RAM(4 * 1024) |
| 970 | 947 | CONFIG_RAM(8 * 1024) |
| 971 | 948 | CONFIG_RAM(16 * 1024) |
| r2428 | r2429 | |
| 975 | 952 | SYSTEM_CONFIG_START(pet2) |
| 976 | 953 | CONFIG_DEVICE(pet_cbmcartslot_getinfo) |
| 977 | 954 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| 978 | | CONFIG_DEVICE(pet_quickload_getinfo) |
| 979 | 955 | CONFIG_RAM(4 * 1024) |
| 980 | 956 | CONFIG_RAM(8 * 1024) |
| 981 | 957 | CONFIG_RAM(16 * 1024) |
| r2428 | r2429 | |
| 996 | 972 | SYSTEM_CONFIG_START(pet4) |
| 997 | 973 | CONFIG_DEVICE(pet4_cbmcartslot_getinfo) |
| 998 | 974 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| 999 | | CONFIG_DEVICE(pet_quickload_getinfo) |
| 1000 | 975 | CONFIG_RAM(4 * 1024) |
| 1001 | 976 | CONFIG_RAM(8 * 1024) |
| 1002 | 977 | CONFIG_RAM(16 * 1024) |
| r2428 | r2429 | |
| 1006 | 981 | SYSTEM_CONFIG_START(pet4_32) |
| 1007 | 982 | CONFIG_DEVICE(pet4_cbmcartslot_getinfo) |
| 1008 | 983 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| 1009 | | CONFIG_DEVICE(pet_quickload_getinfo) |
| 1010 | 984 | CONFIG_RAM_DEFAULT(32 * 1024) |
| 1011 | 985 | SYSTEM_CONFIG_END |
| 1012 | 986 | |
| 1013 | 987 | /* YEAR NAME COMPAT PARENT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 1014 | | COMP (1977, pet, 0, 0, pet, pet, pet1, pet, "Commodore Business Machines Co.", "PET2001/CBM20xx Series (Basic 1)", GAME_NO_SOUND) |
| 988 | COMP (1977, pet, 0, 0, pet1, pet, pet1, pet, "Commodore Business Machines Co.", "PET2001/CBM20xx Series (Basic 1)", GAME_NO_SOUND) |
| 1015 | 989 | COMP (1979, cbm30, 0, pet, pet, pet, pet, pet2, "Commodore Business Machines Co.", "Commodore 30xx (Basic 2)", GAME_NO_SOUND) |
| 1016 | 990 | COMP (1979, cbm30b, 0, pet, pet, petb, petb, pet2, "Commodore Business Machines Co.", "Commodore 30xx (Basic 2) (business keyboard)",GAME_NO_SOUND) |
| 1017 | 991 | COMP (1982, cbm40, 0, pet, pet40, pet, pet40, pet4, "Commodore Business Machines Co.", "Commodore 40xx FAT (CRTC) 60Hz", GAME_NO_SOUND) |
src/mess/drivers/c16.c
| r2428 | r2429 | |
| 719 | 719 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 720 | 720 | MDRV_SOUND_ADD_TAG("sid", SID8580, TED7360PAL_CLOCK/4) |
| 721 | 721 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 722 | |
| 723 | /* devices */ |
| 724 | MDRV_QUICKLOAD_ADD(cbm_c16, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS) |
| 722 | 725 | MACHINE_DRIVER_END |
| 723 | 726 | |
| 724 | 727 | |
| r2428 | r2429 | |
| 820 | 823 | } |
| 821 | 824 | } |
| 822 | 825 | |
| 823 | | static void c16_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 824 | | { |
| 825 | | switch(state) |
| 826 | | { |
| 827 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 828 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "p00,prg"); break; |
| 829 | | |
| 830 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 831 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_cbm_c16; break; |
| 832 | | |
| 833 | | /* --- the following bits of info are returned as doubles --- */ |
| 834 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = CBM_QUICKLOAD_DELAY; break; |
| 835 | | |
| 836 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 837 | | } |
| 838 | | } |
| 839 | | |
| 840 | 826 | SYSTEM_CONFIG_START(c16) |
| 841 | 827 | CONFIG_DEVICE(c16cart_device_getinfo) |
| 842 | 828 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| 843 | | CONFIG_DEVICE(c16_quickload_getinfo) |
| 844 | 829 | CONFIG_DEVICE(vc20tape_device_getinfo) |
| 845 | 830 | CONFIG_RAM(16 * 1024) |
| 846 | 831 | CONFIG_RAM(32 * 1024) |
| r2428 | r2429 | |
| 849 | 834 | |
| 850 | 835 | SYSTEM_CONFIG_START(c16c) |
| 851 | 836 | CONFIG_DEVICE(c16cart_device_getinfo) |
| 852 | | CONFIG_DEVICE(c16_quickload_getinfo) |
| 853 | 837 | CONFIG_DEVICE(vc20tape_device_getinfo) |
| 854 | 838 | CONFIG_DEVICE(c1551_device_getinfo) |
| 855 | 839 | CONFIG_RAM(16 * 1024) |
| r2428 | r2429 | |
| 859 | 843 | |
| 860 | 844 | SYSTEM_CONFIG_START(c16v) |
| 861 | 845 | CONFIG_DEVICE(c16cart_device_getinfo) |
| 862 | | CONFIG_DEVICE(c16_quickload_getinfo) |
| 863 | 846 | CONFIG_DEVICE(vc20tape_device_getinfo) |
| 864 | 847 | CONFIG_DEVICE(vc1541_device_getinfo) |
| 865 | 848 | CONFIG_RAM(16 * 1024) |
| r2428 | r2429 | |
| 870 | 853 | SYSTEM_CONFIG_START(plus) |
| 871 | 854 | CONFIG_DEVICE(c16cart_device_getinfo) |
| 872 | 855 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| 873 | | CONFIG_DEVICE(c16_quickload_getinfo) |
| 874 | 856 | CONFIG_DEVICE(vc20tape_device_getinfo) |
| 875 | 857 | CONFIG_RAM_DEFAULT(64 * 1024) |
| 876 | 858 | SYSTEM_CONFIG_END |
| 877 | 859 | |
| 878 | 860 | SYSTEM_CONFIG_START(plusc) |
| 879 | 861 | CONFIG_DEVICE(c16cart_device_getinfo) |
| 880 | | CONFIG_DEVICE(c16_quickload_getinfo) |
| 881 | 862 | CONFIG_DEVICE(vc20tape_device_getinfo) |
| 882 | 863 | CONFIG_DEVICE(c1551_device_getinfo) |
| 883 | 864 | CONFIG_RAM_DEFAULT(64 * 1024) |
| r2428 | r2429 | |
| 885 | 866 | |
| 886 | 867 | SYSTEM_CONFIG_START(plusv) |
| 887 | 868 | CONFIG_DEVICE(c16cart_device_getinfo) |
| 888 | | CONFIG_DEVICE(c16_quickload_getinfo) |
| 889 | 869 | CONFIG_DEVICE(vc20tape_device_getinfo) |
| 890 | 870 | CONFIG_DEVICE(vc1541_device_getinfo) |
| 891 | 871 | CONFIG_RAM_DEFAULT(64 * 1024) |
src/mess/drivers/microtan.c
| r2428 | r2429 | |
| 243 | 243 | MDRV_SOUND_ADD(AY8910, 1000000) |
| 244 | 244 | MDRV_SOUND_CONFIG(ay8910_interface) |
| 245 | 245 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 246 | |
| 247 | // snapshot/quickload |
| 248 | MDRV_SNAPSHOT_ADD(microtan, "m65", 0.5) |
| 249 | MDRV_QUICKLOAD_ADD(microtan_hexfile, "hex", 0.5) |
| 246 | 250 | MACHINE_DRIVER_END |
| 247 | 251 | |
| 248 | 252 | ROM_START( microtan ) |
| r2428 | r2429 | |
| 274 | 278 | } |
| 275 | 279 | } |
| 276 | 280 | |
| 277 | | static void microtan_snapshot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 278 | | { |
| 279 | | /* snapshot */ |
| 280 | | switch(state) |
| 281 | | { |
| 282 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 283 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "m65"); break; |
| 284 | | |
| 285 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 286 | | case MESS_DEVINFO_PTR_SNAPSHOT_LOAD: info->f = (genf *) snapshot_load_microtan; break; |
| 287 | | |
| 288 | | /* --- the following bits of info are returned as doubles --- */ |
| 289 | | case MESS_DEVINFO_FLOAT_SNAPSHOT_DELAY: info->d = 0.5; break; |
| 290 | | |
| 291 | | default: snapshot_device_getinfo(devclass, state, info); break; |
| 292 | | } |
| 293 | | } |
| 294 | | |
| 295 | | static void microtan_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 296 | | { |
| 297 | | /* quickload */ |
| 298 | | switch(state) |
| 299 | | { |
| 300 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 301 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "hex"); break; |
| 302 | | |
| 303 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 304 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_microtan_hexfile; break; |
| 305 | | |
| 306 | | /* --- the following bits of info are returned as doubles --- */ |
| 307 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = 0.5; break; |
| 308 | | |
| 309 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 310 | | } |
| 311 | | } |
| 312 | | |
| 313 | 281 | SYSTEM_CONFIG_START( microtan ) |
| 314 | 282 | CONFIG_DEVICE(microtan_cassette_getinfo) |
| 315 | | CONFIG_DEVICE(microtan_snapshot_getinfo) |
| 316 | | CONFIG_DEVICE(microtan_quickload_getinfo) |
| 317 | 283 | SYSTEM_CONFIG_END |
| 318 | 284 | |
| 319 | 285 | // YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME |
src/mess/drivers/vtech1.c
| r2428 | r2429 | |
| 115 | 115 | #include "formats/vt_cas.h" |
| 116 | 116 | |
| 117 | 117 | |
| 118 | static QUICKLOAD_LOAD(vtech1); |
| 119 | |
| 118 | 120 | /****************************************************************************** |
| 119 | 121 | Address Maps |
| 120 | 122 | ******************************************************************************/ |
| r2428 | r2429 | |
| 327 | 329 | |
| 328 | 330 | /* printer */ |
| 329 | 331 | MDRV_DEVICE_ADD("printer", PRINTER) |
| 332 | |
| 333 | /* snapshot/quickload */ |
| 334 | MDRV_SNAPSHOT_ADD(vtech1, "vz", 0.5) |
| 335 | MDRV_QUICKLOAD_ADD(vtech1, "bin", 0) |
| 330 | 336 | MACHINE_DRIVER_END |
| 331 | 337 | |
| 332 | 338 | static MACHINE_DRIVER_START(laser200) |
| r2428 | r2429 | |
| 446 | 452 | return INIT_PASS; |
| 447 | 453 | } |
| 448 | 454 | |
| 449 | | static void vtech1_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 450 | | { |
| 451 | | /* quickload */ |
| 452 | | switch(state) |
| 453 | | { |
| 454 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 455 | | case MESS_DEVINFO_STR_DEV_FILE: strcpy(info->s = device_temp_str(), __FILE__); break; |
| 456 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin"); break; |
| 457 | | |
| 458 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 459 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_vtech1; break; |
| 460 | | |
| 461 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 462 | | } |
| 463 | | } |
| 464 | | |
| 465 | 455 | static void vtech1_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 466 | 456 | { |
| 467 | 457 | /* cassette */ |
| r2428 | r2429 | |
| 477 | 467 | } |
| 478 | 468 | } |
| 479 | 469 | |
| 480 | | static void vtech1_snapshot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 481 | | { |
| 482 | | /* snapshot */ |
| 483 | | switch(state) |
| 484 | | { |
| 485 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 486 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "vz"); break; |
| 487 | | |
| 488 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 489 | | case MESS_DEVINFO_PTR_SNAPSHOT_LOAD: info->f = (genf *) snapshot_load_vtech1; break; |
| 490 | | |
| 491 | | /* --- the following bits of info are returned as doubles --- */ |
| 492 | | case MESS_DEVINFO_FLOAT_SNAPSHOT_DELAY: info->d = 0.5; break; |
| 493 | | |
| 494 | | default: snapshot_device_getinfo(devclass, state, info); break; |
| 495 | | } |
| 496 | | } |
| 497 | | |
| 498 | 470 | static void vtech1_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 499 | 471 | { |
| 500 | 472 | /* floppy */ |
| r2428 | r2429 | |
| 530 | 502 | SYSTEM_CONFIG_START(vtech1) |
| 531 | 503 | CONFIG_DEVICE(cartslot_device_getinfo) |
| 532 | 504 | CONFIG_DEVICE(vtech1_cassette_getinfo) |
| 533 | | CONFIG_DEVICE(vtech1_snapshot_getinfo) |
| 534 | 505 | CONFIG_DEVICE(vtech1_floppy_getinfo) |
| 535 | | CONFIG_DEVICE(vtech1_quickload_getinfo) |
| 536 | 506 | CONFIG_RAM_DEFAULT (66 * 1024) /* with 64K memory expansion */ |
| 537 | 507 | CONFIG_RAM (4098 * 1024) /* with 4MB memory expansion */ |
| 538 | 508 | SYSTEM_CONFIG_END |
src/mess/drivers/psx.c
| r2428 | r2429 | |
| 802 | 802 | MDRV_SOUND_CONFIG( psxspu_interface ) |
| 803 | 803 | MDRV_SOUND_ROUTE( 0, "left", 1.00 ) |
| 804 | 804 | MDRV_SOUND_ROUTE( 1, "right", 1.00 ) |
| 805 | |
| 806 | /* quickload */ |
| 807 | MDRV_QUICKLOAD_ADD(psx_exe_load, "exe,psx", 0) |
| 805 | 808 | MACHINE_DRIVER_END |
| 806 | 809 | |
| 807 | 810 | static MACHINE_DRIVER_START( psxpal ) |
| r2428 | r2429 | |
| 832 | 835 | MDRV_SOUND_CONFIG( psxspu_interface ) |
| 833 | 836 | MDRV_SOUND_ROUTE( 0, "left", 1.00 ) |
| 834 | 837 | MDRV_SOUND_ROUTE( 1, "right", 1.00 ) |
| 838 | |
| 839 | /* quickload */ |
| 840 | MDRV_QUICKLOAD_ADD(psx_exe_load, "exe,psx", 0) |
| 835 | 841 | MACHINE_DRIVER_END |
| 836 | 842 | |
| 837 | 843 | ROM_START( psj ) |
| r2428 | r2429 | |
| 921 | 927 | ROMX_LOAD( "ps-41a.bin", 0x0000000, 0x080000, CRC(502224b6) SHA1(14df4f6c1e367ce097c11deae21566b4fe5647a9), ROM_BIOS(2) ) |
| 922 | 928 | ROM_END |
| 923 | 929 | |
| 924 | | static void psx_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 925 | | { |
| 926 | | /* quickload */ |
| 927 | | switch(state) |
| 928 | | { |
| 929 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 930 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "exe,psx"); break; |
| 931 | | |
| 932 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 933 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_psx_exe_load; break; |
| 934 | | |
| 935 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 936 | | } |
| 937 | | } |
| 938 | | |
| 939 | | SYSTEM_CONFIG_START( psx ) |
| 940 | | CONFIG_DEVICE(psx_quickload_getinfo) |
| 941 | | SYSTEM_CONFIG_END |
| 942 | | |
| 943 | 930 | /* |
| 944 | 931 | The version number & release date is stored in ascii text at the end of every bios, except for scph1000. |
| 945 | 932 | There is also a BCD encoded date at offset 0x100, but this is set to 22091994 for versions prior to 2.2 |
| r2428 | r2429 | |
| 975 | 962 | */ |
| 976 | 963 | |
| 977 | 964 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 978 | | CONS( 1994, psj, 0, 0, psxntsc, psx, psx, psx, "Sony Computer Entertainment Inc.", "Sony PlayStation (Japan)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 979 | | CONS( 1995, pse, psj, 0, psxpal, psx, psx, psx, "Sony Computer Entertainment Inc.", "Sony PlayStation (Europe)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 980 | | CONS( 1995, psu, psj, 0, psxntsc, psx, psx, psx, "Sony Computer Entertainment Inc.", "Sony PlayStation (USA)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 981 | | CONS( 1995, psa, psj, 0, psxntsc, psx, psx, psx, "Sony Computer Entertainment Inc.", "Sony PlayStation (Asia-Pacific)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 965 | CONS( 1994, psj, 0, 0, psxntsc, psx, psx, 0, "Sony Computer Entertainment Inc.", "Sony PlayStation (Japan)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 966 | CONS( 1995, pse, psj, 0, psxpal, psx, psx, 0, "Sony Computer Entertainment Inc.", "Sony PlayStation (Europe)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 967 | CONS( 1995, psu, psj, 0, psxntsc, psx, psx, 0, "Sony Computer Entertainment Inc.", "Sony PlayStation (USA)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 968 | CONS( 1995, psa, psj, 0, psxntsc, psx, psx, 0, "Sony Computer Entertainment Inc.", "Sony PlayStation (Asia-Pacific)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
src/mess/drivers/trs80.c
| r2428 | r2429 | |
| 351 | 351 | MDRV_SOUND_ADD(SPEAKER, 0) |
| 352 | 352 | MDRV_SOUND_CONFIG(speaker_interface) |
| 353 | 353 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 354 | |
| 355 | /* devices */ |
| 356 | MDRV_QUICKLOAD_ADD(trs80_cmd, "cmd", 0.5) |
| 354 | 357 | MACHINE_DRIVER_END |
| 355 | 358 | |
| 356 | 359 | |
| r2428 | r2429 | |
| 469 | 472 | } |
| 470 | 473 | } |
| 471 | 474 | |
| 472 | | static void trs80_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 473 | | { |
| 474 | | /* quickload */ |
| 475 | | switch(state) |
| 476 | | { |
| 477 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 478 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "cmd"); break; |
| 479 | | |
| 480 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 481 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_trs80_cmd; break; |
| 482 | | |
| 483 | | /* --- the following bits of info are returned as doubles --- */ |
| 484 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = 0.5; break; |
| 485 | | |
| 486 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 487 | | } |
| 488 | | } |
| 489 | | |
| 490 | 475 | SYSTEM_CONFIG_START(trs80) |
| 491 | | CONFIG_DEVICE(trs80_quickload_getinfo) |
| 492 | 476 | CONFIG_DEVICE(trs80_cassette_getinfo) |
| 493 | 477 | SYSTEM_CONFIG_END |
| 494 | 478 | |
| r2428 | r2429 | |
| 518 | 502 | |
| 519 | 503 | |
| 520 | 504 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 521 | | COMP( 1977, trs80, 0, 0, level1, trs80, trs80, trs80, "Tandy Radio Shack", "TRS-80 Model I (Level I Basic)" , 0) |
| 505 | COMP( 1977, trs80, 0, 0, level1, trs80, trs80, trs80, "Tandy Radio Shack", "TRS-80 Model I (Level I Basic)" , 0) |
| 522 | 506 | COMP( 1978, trs80l2, trs80, 0, model1, trs80, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model I (Radio Shack Level II Basic)" , 0) |
| 523 | 507 | COMP( 1978, trs80l2a, trs80, 0, model1, trs80, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model I (R/S L2 Basic)" , 0) |
| 524 | 508 | COMP( 1980, sys80, trs80, 0, model1, trs80, trs80, trs8012, "EACA Computers Ltd.","System-80" , 0) |
src/mess/drivers/primo.c
| r2428 | r2429 | |
| 249 | 249 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 250 | 250 | MDRV_SOUND_ADD(SPEAKER, 0) |
| 251 | 251 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 252 | |
| 253 | /* snapshot/quickload */ |
| 254 | MDRV_SNAPSHOT_ADD(primo, "pss", 0) |
| 255 | MDRV_QUICKLOAD_ADD(primo, "pp", 0) |
| 252 | 256 | MACHINE_DRIVER_END |
| 253 | 257 | |
| 254 | 258 | static MACHINE_DRIVER_START( primoa48 ) |
| r2428 | r2429 | |
| 363 | 367 | } |
| 364 | 368 | } |
| 365 | 369 | |
| 366 | | static void primo_snapshot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 367 | | { |
| 368 | | /* snapshot */ |
| 369 | | switch(state) |
| 370 | | { |
| 371 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 372 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "pss"); break; |
| 373 | | |
| 374 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 375 | | case MESS_DEVINFO_PTR_SNAPSHOT_LOAD: info->f = (genf *) snapshot_load_primo; break; |
| 376 | | |
| 377 | | default: snapshot_device_getinfo(devclass, state, info); break; |
| 378 | | } |
| 379 | | } |
| 380 | | |
| 381 | | static void primo_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 382 | | { |
| 383 | | /* quickload */ |
| 384 | | switch(state) |
| 385 | | { |
| 386 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 387 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "pp"); break; |
| 388 | | |
| 389 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 390 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_primo; break; |
| 391 | | |
| 392 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 393 | | } |
| 394 | | } |
| 395 | | |
| 396 | 370 | static void primo_cartslot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 397 | 371 | { |
| 398 | 372 | /* cartslot */ |
| r2428 | r2429 | |
| 408 | 382 | } |
| 409 | 383 | } |
| 410 | 384 | |
| 411 | | #ifdef UNUSED_FUNCTION |
| 412 | | static void primo_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 413 | | { |
| 414 | | /* snapshot */ |
| 415 | | switch(state) |
| 416 | | { |
| 417 | | default: cbmfloppy_device_getinfo(devclass, state, info); break; |
| 418 | | } |
| 419 | | } |
| 420 | | #endif /* UNUSED_FUNCTION */ |
| 421 | | |
| 422 | 385 | SYSTEM_CONFIG_START( primoa ) |
| 423 | 386 | CONFIG_DEVICE(primo_cassette_getinfo) |
| 424 | | CONFIG_DEVICE(primo_snapshot_getinfo) |
| 425 | | CONFIG_DEVICE(primo_quickload_getinfo) |
| 426 | 387 | CONFIG_DEVICE(primo_cartslot_getinfo) |
| 427 | 388 | SYSTEM_CONFIG_END |
| 428 | 389 | |
src/mess/drivers/ti85.c
| r2428 | r2429 | |
| 374 | 374 | MACHINE_DRIVER_END |
| 375 | 375 | |
| 376 | 376 | |
| 377 | static MACHINE_DRIVER_START( ti85d ) |
| 378 | MDRV_IMPORT_FROM( ti85 ) |
| 379 | MDRV_SNAPSHOT_ADD(ti8x, "sav", 0) |
| 380 | MACHINE_DRIVER_END |
| 381 | |
| 382 | |
| 377 | 383 | static MACHINE_DRIVER_START( ti86 ) |
| 378 | 384 | MDRV_IMPORT_FROM( ti85 ) |
| 379 | 385 | MDRV_CPU_MODIFY("main") |
| r2428 | r2429 | |
| 385 | 391 | MDRV_NVRAM_HANDLER( ti86 ) |
| 386 | 392 | MACHINE_DRIVER_END |
| 387 | 393 | |
| 394 | |
| 395 | static MACHINE_DRIVER_START( ti86d ) |
| 396 | MDRV_IMPORT_FROM( ti86 ) |
| 397 | MDRV_SNAPSHOT_ADD(ti8x, "sav", 0) |
| 398 | MACHINE_DRIVER_END |
| 399 | |
| 400 | |
| 388 | 401 | ROM_START (ti81) |
| 389 | 402 | ROM_REGION (0x18000, REGION_CPU1,0) |
| 390 | 403 | ROM_SYSTEM_BIOS( 0, "v18", "V 1.8" ) |
| r2428 | r2429 | |
| 463 | 476 | ROMX_LOAD( "ti83pv112.bin", 0x10000, 0x80000, CRC(ddca5026) SHA1(6615df5554076b6b81bd128bf847d2ff046e556b), ROM_BIOS(3) ) |
| 464 | 477 | ROM_END |
| 465 | 478 | |
| 466 | | static void ti85_snapshot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 467 | | { |
| 468 | | /* snapshot */ |
| 469 | | switch(state) |
| 470 | | { |
| 471 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 472 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "sav"); break; |
| 473 | | |
| 474 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 475 | | case MESS_DEVINFO_PTR_SNAPSHOT_LOAD: info->f = (genf *) snapshot_load_ti8x; break; |
| 476 | | |
| 477 | | default: snapshot_device_getinfo(devclass, state, info); break; |
| 478 | | } |
| 479 | | } |
| 480 | | |
| 481 | 479 | static void ti85_serial_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 482 | 480 | { |
| 483 | 481 | /* serial */ |
| r2428 | r2429 | |
| 502 | 500 | |
| 503 | 501 | SYSTEM_CONFIG_START(ti85) |
| 504 | 502 | CONFIG_DEVICE(ti85_serial_getinfo) |
| 505 | | CONFIG_DEVICE(ti85_snapshot_getinfo) |
| 506 | 503 | SYSTEM_CONFIG_END |
| 507 | 504 | |
| 508 | | static void ti86_snapshot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 509 | | { |
| 510 | | /* snapshot */ |
| 511 | | switch(state) |
| 512 | | { |
| 513 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 514 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "sav"); break; |
| 515 | | |
| 516 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 517 | | case MESS_DEVINFO_PTR_SNAPSHOT_LOAD: info->f = (genf *) snapshot_load_ti8x; break; |
| 518 | | |
| 519 | | default: snapshot_device_getinfo(devclass, state, info); break; |
| 520 | | } |
| 521 | | } |
| 522 | | |
| 523 | 505 | static void ti86_serial_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 524 | 506 | { |
| 525 | 507 | /* serial */ |
| r2428 | r2429 | |
| 544 | 526 | |
| 545 | 527 | SYSTEM_CONFIG_START(ti86) |
| 546 | 528 | CONFIG_DEVICE(ti86_serial_getinfo) |
| 547 | | CONFIG_DEVICE(ti86_snapshot_getinfo) |
| 548 | 529 | SYSTEM_CONFIG_END |
| 549 | 530 | |
| 550 | 531 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 551 | 532 | COMP( 1990, ti81, 0, 0, ti81, ti81, 0, NULL, "Texas Instruments", "TI-81", 0 ) |
| 552 | | COMP( 1992, ti85, 0, 0, ti85, ti85, 0, ti85, "Texas Instruments", "TI-85", 0 ) |
| 533 | COMP( 1992, ti85, 0, 0, ti85d, ti85, 0, ti85, "Texas Instruments", "TI-85", 0 ) |
| 553 | 534 | COMP( 1993, ti82, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-82", GAME_NOT_WORKING ) |
| 554 | 535 | COMP( 1996, ti83, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83", GAME_NOT_WORKING ) |
| 555 | | COMP( 1997, ti86, 0, 0, ti86, ti85, 0, ti86, "Texas Instruments", "TI-86", 0 ) |
| 536 | COMP( 1997, ti86, 0, 0, ti86d, ti85, 0, ti86, "Texas Instruments", "TI-86", 0 ) |
| 556 | 537 | COMP( 1999, ti83p, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83 Plus", GAME_NOT_WORKING ) |
| 557 | 538 | /* |
| 558 | 539 | COMP( 2001, ti83pse, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83 Plus Silver Edition", GAME_NOT_WORKING ) |
src/mess/drivers/c64.c
| r2428 | r2429 | |
| 654 | 654 | MDRV_SOUND_ADD_TAG("sid", SID6581, VIC6567_CLOCK) |
| 655 | 655 | MDRV_SOUND_CONFIG(c64_sound_interface) |
| 656 | 656 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 657 | | |
| 658 | 657 | MDRV_SOUND_ADD_TAG("dac", DAC, 0) |
| 659 | 658 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 659 | |
| 660 | /* devices */ |
| 661 | MDRV_QUICKLOAD_ADD(cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS) |
| 660 | 662 | MACHINE_DRIVER_END |
| 661 | 663 | |
| 662 | 664 | |
| r2428 | r2429 | |
| 693 | 695 | static MACHINE_DRIVER_START( c64gs ) |
| 694 | 696 | MDRV_IMPORT_FROM( c64pal ) |
| 695 | 697 | MDRV_SOUND_REMOVE( "dac" ) |
| 698 | MDRV_QUICKLOAD_REMOVE |
| 696 | 699 | MACHINE_DRIVER_END |
| 697 | 700 | |
| 698 | 701 | |
| r2428 | r2429 | |
| 721 | 724 | } |
| 722 | 725 | } |
| 723 | 726 | |
| 724 | | static void c64_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 725 | | { |
| 726 | | switch(state) |
| 727 | | { |
| 728 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 729 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "p00,prg,t64"); break; |
| 730 | | |
| 731 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 732 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_cbm_c64; break; |
| 733 | | |
| 734 | | /* --- the following bits of info are returned as doubles --- */ |
| 735 | | case MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY: info->d = CBM_QUICKLOAD_DELAY; break; |
| 736 | | |
| 737 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 738 | | } |
| 739 | | } |
| 740 | | |
| 741 | 727 | SYSTEM_CONFIG_START(c64) |
| 742 | 728 | CONFIG_DEVICE(c64_cbmcartslot_getinfo) |
| 743 | 729 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| 744 | | CONFIG_DEVICE(c64_quickload_getinfo) |
| 745 | 730 | CONFIG_DEVICE(vc20tape_device_getinfo) |
| 746 | 731 | SYSTEM_CONFIG_END |
| 747 | 732 | |
| 748 | 733 | SYSTEM_CONFIG_START(sx64) |
| 749 | 734 | CONFIG_DEVICE(c64_cbmcartslot_getinfo) |
| 750 | | CONFIG_DEVICE(c64_quickload_getinfo) |
| 751 | 735 | CONFIG_DEVICE(vc1541_device_getinfo) |
| 752 | 736 | SYSTEM_CONFIG_END |
| 753 | 737 | |
| r2428 | r2429 | |
| 767 | 751 | |
| 768 | 752 | SYSTEM_CONFIG_START(ultimax) |
| 769 | 753 | CONFIG_DEVICE(ultimax_cbmcartslot_getinfo) |
| 770 | | CONFIG_DEVICE(c64_quickload_getinfo) |
| 771 | 754 | CONFIG_DEVICE(vc20tape_device_getinfo) |
| 772 | 755 | SYSTEM_CONFIG_END |
| 773 | 756 | |
src/mess/drivers/kc.c
| r2428 | r2429 | |
| 124 | 124 | AM_RANGE(0x0000, 0x0ffff) AM_READWRITE( kc85_4_port_r, kc85_4_port_w ) |
| 125 | 125 | ADDRESS_MAP_END |
| 126 | 126 | |
| 127 | | |
| 128 | | #ifdef UNUSED_FUNCTION |
| 129 | | static READ8_HANDLER(kc85_4d_port_r) |
| 130 | | { |
| 131 | | int port; |
| 132 | | |
| 133 | | port = offset & 0x0ff; |
| 134 | | |
| 135 | | switch (port) |
| 136 | | { |
| 137 | | case 0x080: |
| 138 | | return kc85_module_r(machine, offset); |
| 139 | | |
| 140 | | case 0x085: |
| 141 | | case 0x084: |
| 142 | | return kc85_4_84_r(machine, offset); |
| 143 | | |
| 144 | | |
| 145 | | case 0x086: |
| 146 | | case 0x087: |
| 147 | | return kc85_4_86_r(machine, offset); |
| 148 | | |
| 149 | | case 0x088: |
| 150 | | case 0x089: |
| 151 | | return kc85_pio_data_r(machine, port-0x088); |
| 152 | | case 0x08a: |
| 153 | | case 0x08b: |
| 154 | | return kc85_pio_control_r(machine, port-0x08a); |
| 155 | | case 0x08c: |
| 156 | | case 0x08d: |
| 157 | | case 0x08e: |
| 158 | | case 0x08f: |
| 159 | | return kc85_ctc_r(machine, port-0x08c); |
| 160 | | case 0x0f0: |
| 161 | | case 0x0f1: |
| 162 | | case 0x0f2: |
| 163 | | case 0x0f3: |
| 164 | | return kc85_disc_interface_ram_r(machine, offset); |
| 165 | | |
| 166 | | } |
| 167 | | |
| 168 | | logerror("unhandled port r: %04x\n",offset); |
| 169 | | return 0x0ff; |
| 170 | | } |
| 171 | | |
| 172 | | static WRITE8_HANDLER(kc85_4d_port_w) |
| 173 | | { |
| 174 | | int port; |
| 175 | | |
| 176 | | port = offset & 0x0ff; |
| 177 | | |
| 178 | | switch (port) |
| 179 | | { |
| 180 | | case 0x080: |
| 181 | | kc85_module_w(offset,data); |
| 182 | | return; |
| 183 | | |
| 184 | | case 0x085: |
| 185 | | case 0x084: |
| 186 | | kc85_4_84_w(offset,data); |
| 187 | | return; |
| 188 | | |
| 189 | | case 0x086: |
| 190 | | case 0x087: |
| 191 | | kc85_4_86_w(offset,data); |
| 192 | | return; |
| 193 | | |
| 194 | | case 0x088: |
| 195 | | case 0x089: |
| 196 | | kc85_4_pio_data_w(port-0x088, data); |
| 197 | | return; |
| 198 | | |
| 199 | | case 0x08a: |
| 200 | | case 0x08b: |
| 201 | | kc85_pio_control_w(port-0x08a, data); |
| 202 | | return; |
| 203 | | |
| 204 | | case 0x08c: |
| 205 | | case 0x08d: |
| 206 | | case 0x08e: |
| 207 | | case 0x08f: |
| 208 | | kc85_ctc_w(port-0x08c, data); |
| 209 | | return; |
| 210 | | |
| 211 | | case 0x0f0: |
| 212 | | case 0x0f1: |
| 213 | | case 0x0f2: |
| 214 | | case 0x0f3: |
| 215 | | kc85_disc_interface_ram_w(offset,data); |
| 216 | | return; |
| 217 | | } |
| 218 | | |
| 219 | | logerror("unhandled port w: %04x\n",offset); |
| 220 | | } |
| 221 | | |
| 222 | | ADDRESS_MAP_START(kc85_4d_io, ADDRESS_SPACE_IO, 8) |
| 223 | | AM_RANGE(0x0000, 0x0ffff) AM_READWRITE(kc85_4d_port_r, kc85_4d_port_w) |
| 224 | | ADDRESS_MAP_END |
| 225 | | #endif |
| 226 | | |
| 227 | 127 | static ADDRESS_MAP_START(kc85_4_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 228 | 128 | AM_RANGE(0x0000, 0x3fff) AM_READWRITE(SMH_BANK1, SMH_BANK7) |
| 229 | 129 | AM_RANGE(0x4000, 0x7fff) AM_READWRITE(SMH_BANK2, SMH_BANK8) |
| r2428 | r2429 | |
| 370 | 270 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 371 | 271 | MDRV_SOUND_ADD(SPEAKER, 0) |
| 372 | 272 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 273 | |
| 274 | /* devices */ |
| 275 | MDRV_QUICKLOAD_ADD(kc, "kcc", 0) |
| 373 | 276 | MACHINE_DRIVER_END |
| 374 | 277 | |
| 375 | 278 | |
| r2428 | r2429 | |
| 432 | 335 | } |
| 433 | 336 | } |
| 434 | 337 | |
| 435 | | static void kc85_quickload_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 436 | | { |
| 437 | | /* quickload */ |
| 438 | | switch(state) |
| 439 | | { |
| 440 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 441 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "kcc"); break; |
| 442 | | |
| 443 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 444 | | case MESS_DEVINFO_PTR_QUICKLOAD_LOAD: info->f = (genf *) quickload_load_kc; break; |
| 445 | | |
| 446 | | default: quickload_device_getinfo(devclass, state, info); break; |
| 447 | | } |
| 448 | | } |
| 449 | | |
| 450 | 338 | SYSTEM_CONFIG_START(kc85) |
| 451 | 339 | CONFIG_RAM_DEFAULT (64 * 1024) |
| 452 | 340 | CONFIG_DEVICE(kc85_cassette_getinfo) |
| 453 | | CONFIG_DEVICE(kc85_quickload_getinfo) |
| 454 | 341 | SYSTEM_CONFIG_END |
| 455 | 342 | |
| 456 | 343 | static void kc85d_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |