| Previous | 15994 Revisions | Next |
| r1439 Wednesday 26th December, 2007 at 20:26:06 UTC by Nathan Woods |
|---|
| Const changes [Atari Ace] |
| [docs] | messnew.txt |
| [src/emu/cpu/f8] | f3853.c f3853.h |
| [src/emu/cpu/z80gb] | z80gb.h |
| [src/emu/sound] | sidenvel.c sidenvel.h speaker.h |
| [src/mame/includes] | amiga.h |
| [src/mame/machine] | amiga.c |
| [src/mess] | artworkx.c mess.c mess.h messdriv.c |
| [src/mess/audio] | arcadia.c dai.c dave.c dave.h odyssey2.c sblaster.c vc4000.c |
| [src/mess/devices] | dsk.c mflopimg.c |
| [src/mess/drivers] | a2600.c a310.c a7800.c abc80.c abc80x.c amiga.c amstrad.c apexc.c apple1.c apple2.c apple2gs.c aquarius.c arcadia.c at.c atari.c atarist.c avigo.c bbc.c bebox.c c128.c c64.c c65.c cbmb.c cgenie.c channelf.c coco.c compis.c comquest.c dai.c dgn_beta.c einstein.c enterp.c exidy.c gamecom.c gb.c geneve.c glasgow.c hp48.c intv.c ip20.c ip22.c jaguar.c jupiter.c kaypro.c kc.c lynx.c mac.c microtan.c mk1.c mk2.c mpf1.c msx.c mtx.c n64.c nascom1.c nc.c nes.c oric.c p2000t.c pc.c pc8801.c pcw.c pcw16.c pet.c pmd85.c pocketc.c primo.c psx.c saturn.c sg1000.c snes.c sord.c spectrum.c ssystem3.c studio2.c super80.c svi318.c svision.c thomson.c ti990_10.c ti99_2.c ti99_4p.c ti99_4x.c ti99_8.c tm990189.c tmc1800.c tmc2000e.c tmc600.c trs80.c tutor.c tx0.c vectrex.c vip.c vtech1.c wswan.c x68k.c zx.c |
| [src/mess/formats] | a26_cas.c apf_apt.c cassimg.c cassimg.h coco_cas.c coco_cas.h csw_cas.c flopimg.c flopimg.h fmsx_cas.c ioprocs.c ioprocs.h lviv_lvt.c mz_cas.c oric_tap.c pc_dsk.c pmd_pmd.c primoptp.c sord_cas.c svi_cas.c thom_cas.c thom_dsk.c ti85_ser.c ti85_ser.h tzx_cas.c uef_cas.c vt_cas.c wavfile.c wavfile.h zx81_p.c |
| [src/mess/includes] | arcadia.h cbmdrive.h centroni.h dai.h galaxy.h hp48.h i8271.h ibmpc.h lviv.h msm8251.h odyssey2.h osborne1.h pc1500.h pce.h pclpt.h pmd85.h pocketc.h primo.h tc8521.h ted7360.h ti85.h vc4000.h vdc8563.h vic4567.h vic6560.h vic6567.h |
| [src/mess/machine] | 99_ide.c atom.c bbc.c bebox.c cbmb.c cbmdrive.c centroni.c cgenie.c coco.c compis.c concept.c cpm_bios.c cpm_bios.h cpm_disk.c d88.c dai.c dgn_beta.c gb.c hd63450.c hd63450.h i8271.c ibmpc.c kaypro.c kc.c kim1.c lisa.c lviv.c mac.c mbee.c microtan.c msm8251.c msx.c msx_slot.c mz700.c ncr5380.c ncr5380.h nec765.c nes_mmc.c oric.c osborne1.c osi.c pc8801.c pc_fdc.c pc_hdc.c pce.c pclpt.c pdp1.c pet.c pmd85.c rp5c15.c rp5c15.h rriot.c rriot.h serial.c svi318.c tc8521.c thomson.c uart8250.c vc1541.c vc20.c wswan.c z80dart.c z80dart.h |
| [src/mess/osd/winui] | cfgfile.c messui.c |
| [src/mess/tools/imgtool] | filtbas.c iflopimg.c imgtoolx.h main.c |
| [src/mess/tools/imgtool/modules] | crt.c d64.c t64.c thomson.c ti85.c xsa.c |
| [src/mess/tools/messtest] | core.c |
| [src/mess/video] | 733_asr.c 911_key.h 911_vdt.c 911_vdt.h abc80.c amstrad.c avigo.c bbc.c bbctext.h cdp1864.c cgapal.c channelf.c dai.c dgn_beta.c epnick.c exidy.c galaxy.c gb.c hp48.c i82720.c kc.c lviv.c nc.c odyssey2.c pc_aga.c pc_aga.h pc_cga.c pc_cga.h pc_mda.c pc_mda.h pc_t1t.c pcw.c pcw16.c pmd85.c pocketc.c primo.c saa5050.c saa505x.c ssystem3.c ted7360.c ti85.c tms3556.c trs80.c vdc8563.c vectrex.c vic4567.c vic6560.c vic6567.c vtech1.c vtech2.c z88.c |
| [src/osd/winui] | columnedit.h dijoystick.c dijoystick.h dxdecode.c mui_opts.c picker.c picker.h winui.c |
| r1438 | r1439 | |
|---|---|---|
| 1529 | 1529 | * |
| 1530 | 1530 | *************************************/ |
| 1531 | 1531 | |
| 1532 | void amiga_add_autoconfig(amiga_autoconfig_device *device) | |
| 1532 | void amiga_add_autoconfig(const amiga_autoconfig_device *device) | |
| 1533 | 1533 | { |
| 1534 | 1534 | autoconfig_device *dev, **d; |
| 1535 | 1535 |
| r1438 | r1439 | |
|---|---|---|
| 390 | 390 | void amiga_serial_in_w(UINT16 data); |
| 391 | 391 | attotime amiga_get_serial_char_period(void); |
| 392 | 392 | |
| 393 | void amiga_add_autoconfig(amiga_autoconfig_device *device); | |
| 393 | void amiga_add_autoconfig(const amiga_autoconfig_device *device); | |
| 394 | 394 | READ16_HANDLER( amiga_autoconfig_r ); |
| 395 | 395 | WRITE16_HANDLER( amiga_autoconfig_w ); |
| 396 | 396 |
| r1438 | r1439 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | INT_PTR InternalColumnDialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam, |
| 18 | 18 | int nColumnMax, int *shown, int *order, |
| 19 | LPCTSTR *names, void (*pfnGetRealColumnOrder)(int *), | |
| 19 | const LPCTSTR *names, void (*pfnGetRealColumnOrder)(int *), | |
| 20 | 20 | void (*pfnGetColumnInfo)(int *pnOrder, int *pnShown), |
| 21 | 21 | void (*pfnSetColumnInfo)(int *pnOrder, int *pnShown)); |
| 22 | 22 |
| r1438 | r1439 | |
|---|---|---|
| 50 | 50 | External variables |
| 51 | 51 | ***************************************************************************/ |
| 52 | 52 | |
| 53 | struct OSDJoystick DIJoystick = | |
| 53 | const struct OSDJoystick DIJoystick = | |
| 54 | 54 | { |
| 55 | 55 | DIJoystick_init, /* init */ |
| 56 | 56 | DIJoystick_exit, /* exit */ |
| r1438 | r1439 | |
|---|---|---|
| 86 | 86 | int *pnColumnsShown; |
| 87 | 87 | int *pnColumnsOrder; |
| 88 | 88 | UINT_PTR nTimer; |
| 89 | LPCTSTR *ppszColumnNames; | |
| 89 | const LPCTSTR *ppszColumnNames; | |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | 92 | |
| r1438 | r1439 | |
| 1581 | 1581 | |
| 1582 | 1582 | |
| 1583 | 1583 | |
| 1584 | LPCTSTR *Picker_GetColumnNames(HWND hwndPicker) | |
| 1584 | const LPCTSTR *Picker_GetColumnNames(HWND hwndPicker) | |
| 1585 | 1585 | { |
| 1586 | 1586 | struct PickerInfo *pPickerInfo; |
| 1587 | 1587 | pPickerInfo = GetPickerInfo(hwndPicker); |
| r1438 | r1439 | |
|---|---|---|
| 62 | 62 | BOOL (*Available)(void); |
| 63 | 63 | }; |
| 64 | 64 | |
| 65 | extern struct OSDJoystick DIJoystick; | |
| 65 | extern const struct OSDJoystick DIJoystick; | |
| 66 | 66 | |
| 67 | 67 | extern int DIJoystick_GetNumPhysicalJoysticks(void); |
| 68 | 68 | extern TCHAR* DIJoystick_GetPhysicalJoystickName(int num_joystick); |
| r1438 | r1439 | |
|---|---|---|
| 51 | 51 | BOOL bOldControl; |
| 52 | 52 | BOOL bXPControl; |
| 53 | 53 | int nColumnCount; |
| 54 | LPCTSTR *ppszColumnNames; | |
| 54 | const LPCTSTR *ppszColumnNames; | |
| 55 | 55 | }; |
| 56 | 56 | |
| 57 | 57 | enum |
| r1438 | r1439 | |
| 93 | 93 | // Accessors |
| 94 | 94 | const struct PickerCallbacks *Picker_GetCallbacks(HWND hwndPicker); |
| 95 | 95 | int Picker_GetColumnCount(HWND hwndPicker); |
| 96 | LPCTSTR *Picker_GetColumnNames(HWND hwndPicker); | |
| 96 | const LPCTSTR *Picker_GetColumnNames(HWND hwndPicker); | |
| 97 | 97 | |
| 98 | 98 | #endif // PICKER_H |
| r1438 | r1439 | |
|---|---|---|
| 405 | 405 | // Screen shot Page tab control text |
| 406 | 406 | // these must match the order of the options flags in options.h |
| 407 | 407 | // (TAB_...) |
| 408 | static const char* image_tabs_long_name[MAX_TAB_TYPES] = | |
| 408 | static const char *const image_tabs_long_name[MAX_TAB_TYPES] = | |
| 409 | 409 | { |
| 410 | 410 | "Snapshot ", |
| 411 | 411 | "Flyer ", |
| r1438 | r1439 | |
| 417 | 417 | "History ", |
| 418 | 418 | }; |
| 419 | 419 | |
| 420 | static const char* image_tabs_short_name[MAX_TAB_TYPES] = | |
| 420 | static const char *const image_tabs_short_name[MAX_TAB_TYPES] = | |
| 421 | 421 | { |
| 422 | 422 | "snapshot", |
| 423 | 423 | "flyer", |
| r1438 | r1439 | |
|---|---|---|
| 32 | 32 | } ERRORCODE, * LPERRORCODE; |
| 33 | 33 | |
| 34 | 34 | /***************************************************************/ |
| 35 | static ERRORCODE | |
| 35 | static const ERRORCODE | |
| 36 | 36 | { |
| 37 | 37 | { DDERR_ALREADYINITIALIZED, "DDERR_ALREADYINITIALIZED"}, |
| 38 | 38 | { DDERR_CANNOTATTACHSURFACE, "DDERR_CANNOTATTACHSURFACE"}, |
| r1438 | r1439 | |
|---|---|---|
| 423 | 423 | typedef struct |
| 424 | 424 | { |
| 425 | 425 | RECT rect; /* Client rect of window; must be initialized before first resize */ |
| 426 | ResizeItem* items; /* Array of subitems to be resized */ | |
| 426 | const ResizeItem* items; /* Array of subitems to be resized */ | |
| 427 | 427 | } Resize; |
| 428 | 428 | |
| 429 | 429 | static void ResizeWindow(HWND hParent, Resize *r); |
| r1438 | r1439 | |
| 500 | 500 | static PDIRWATCHER s_pWatcher; |
| 501 | 501 | |
| 502 | 502 | /* use a joystick subsystem in the gui? */ |
| 503 | static struct OSDJoystick* g_pJoyGUI = NULL; | |
| 503 | static const struct OSDJoystick* g_pJoyGUI = NULL; | |
| 504 | 504 | |
| 505 | 505 | /* store current keyboard state (in internal codes) here */ |
| 506 | 506 | static input_code keyboard_state[ 2048 ]; /* __code_max #defines the number of internal key_codes */ |
| r1438 | r1439 | |
| 631 | 631 | char name[40]; // functionality name (optional) |
| 632 | 632 | input_seq is; // the input sequence (the keys pressed) |
| 633 | 633 | UINT func_id; // the identifier |
| 634 | input_seq* (*getiniptr)(void);// pointer to function to get the value from .ini file | |
| 634 | input_seq* (*const getiniptr)(void);// pointer to function to get the value from .ini file | |
| 635 | 635 | } GUISequence; |
| 636 | 636 | |
| 637 | static GUISequence GUISequenceControl[]= | |
| 637 | static const GUISequence GUISequenceControl[]= | |
| 638 | 638 | { |
| 639 | 639 | {"gui_key_up", SEQ_DEF_0, ID_UI_UP, Get_ui_key_up }, |
| 640 | 640 | {"gui_key_down", SEQ_DEF_0, ID_UI_DOWN, Get_ui_key_down }, |
| r1438 | r1439 | |
| 818 | 818 | static MYBITMAPINFO bmDesc; |
| 819 | 819 | |
| 820 | 820 | /* List view Column text */ |
| 821 | LPCTSTR column_names[COLUMN_MAX] = | |
| 821 | const LPCTSTR column_names[COLUMN_MAX] = | |
| 822 | 822 | { |
| 823 | 823 | #ifdef MESS |
| 824 | 824 | TEXT("System"), |
| r1438 | r1439 | |
| 1952 | 1952 | |
| 1953 | 1953 | for (i = 0; i < NUM_GUI_SEQUENCES; i++) |
| 1954 | 1954 | { |
| 1955 | input_seq *is1; | |
| 1955 | const input_seq *is1; | |
| 1956 | 1956 | input_seq *is2; |
| 1957 | 1957 | is1 = &(GUISequenceControl[i].is); |
| 1958 | 1958 | is2 = GUISequenceControl[i].getiniptr(); |
| r1438 | r1439 | |
| 2711 | 2711 | int cmkindex = 0, dx, dy, dx1, dtempx; |
| 2712 | 2712 | HWND hControl; |
| 2713 | 2713 | RECT parent_rect, rect; |
| 2714 | ResizeItem *ri; | |
| 2714 | const ResizeItem *ri; | |
| 2715 | 2715 | POINT p = {0, 0}; |
| 2716 | 2716 | |
| 2717 | 2717 | if (hParent == NULL) |
| r1438 | r1439 | |
| 3425 | 3425 | |
| 3426 | 3426 | for (i = 0; i < NUM_GUI_SEQUENCES; i++) |
| 3427 | 3427 | { |
| 3428 | input_seq *is = &(GUISequenceControl[i].is); | |
| 3428 | const input_seq *is = &(GUISequenceControl[i].is); | |
| 3429 | 3429 | |
| 3430 | 3430 | if (GUI_seq_pressed(is)) |
| 3431 | 3431 | { |
| r1438 | r1439 | |
|---|---|---|
| 4 | 4 | #include "cpuintrf.h" |
| 5 | 5 | |
| 6 | 6 | typedef struct { |
| 7 | UINT16 *regs; | |
| 7 | const UINT16 *regs; | |
| 8 | 8 | UINT8 features; |
| 9 | 9 | void (*timer_callback)(int cycles); |
| 10 | 10 | } Z80GB_CONFIG; |
| r1438 | r1439 | |
|---|---|---|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | |
| 75 | void f3853_init(F3853_CONFIG *config) | |
| 75 | void f3853_init(const F3853_CONFIG *config) | |
| 76 | 76 | { |
| 77 | 77 | UINT8 reg=0xfe; |
| 78 | 78 | int i; |
| r1438 | r1439 | |
|---|---|---|
| 12 | 12 | void (*interrupt_request)(UINT16 addr, int level); |
| 13 | 13 | } F3853_CONFIG; |
| 14 | 14 | |
| 15 | void f3853_init(F3853_CONFIG *config); | |
| 15 | void f3853_init(const F3853_CONFIG *config); | |
| 16 | 16 | void f3853_reset(void); |
| 17 | 17 | |
| 18 | 18 | // ports 0x0c - 0x0f |
| r1438 | r1439 | |
|---|---|---|
| 15 | 15 | struct Speaker_interface |
| 16 | 16 | { |
| 17 | 17 | int num_level; /* optional: number of levels (if not two) */ |
| 18 | INT16 *levels; /* optional: pointer to level lookup table */ | |
| 18 | const INT16 *levels; /* optional: pointer to level lookup table */ | |
| 19 | 19 | }; |
| 20 | 20 | |
| 21 | 21 | void speaker_level_w (int which, int new_level); |
| r1438 | r1439 | |
|---|---|---|
| 214 | 214 | INLINE UINT16 enveEmuShortAttack(sidOperator*); |
| 215 | 215 | |
| 216 | 216 | |
| 217 | ptr2sidUwordFunc enveModeTable[] = | |
| 217 | const ptr2sidUwordFunc enveModeTable[] = | |
| 218 | 218 | { |
| 219 | 219 | /* 0 */ |
| 220 | 220 | &enveEmuStartAttack, &enveEmuStartRelease, |
| r1438 | r1439 | |
|---|---|---|
| 10 | 10 | void enveEmuResetOperator(sidOperator* pVoice); |
| 11 | 11 | |
| 12 | 12 | |
| 13 | extern ptr2sidUwordFunc enveModeTable[]; // -> envelope.cpp | |
| 13 | extern const ptr2sidUwordFunc enveModeTable[]; // -> envelope.cpp | |
| 14 | 14 | extern const UINT8 masterVolumeLevels[16]; // -> envelope.cpp |
| 15 | 15 | |
| 16 | 16 | static const UINT8 ENVE_STARTATTACK = 0; |
| r1438 | r1439 | |
|---|---|---|
| 210 | 210 | |
| 211 | 211 | |
| 212 | 212 | |
| 213 | static floppy_interface mess_floppy_interface = | |
| 213 | static const floppy_interface mess_floppy_interface = | |
| 214 | 214 | { |
| 215 | 215 | flopimg_seek_callback, |
| 216 | 216 | flopimg_get_sectors_per_track, |
| r1438 | r1439 | |
| 246 | 246 | |
| 247 | 247 | /* ----------------------------------------------------------------------- */ |
| 248 | 248 | |
| 249 | struct io_procs mess_ioprocs = | |
| 249 | const struct io_procs mess_ioprocs = | |
| 250 | 250 | { |
| 251 | 251 | NULL, |
| 252 | 252 | image_fseek_thunk, |
| r1438 | r1439 | |
|---|---|---|
| 40 | 40 | static void dsk_write_sector_data_from_buffer(mess_image *img, int sector_index, int side, const char *ptr, int length, int ddam); |
| 41 | 41 | static void dsk_read_sector_data_into_buffer(mess_image *img, int sector_index, int side, char *ptr, int length); |
| 42 | 42 | |
| 43 | static floppy_interface dsk_floppy_interface = | |
| 43 | static const floppy_interface dsk_floppy_interface = | |
| 44 | 44 | { |
| 45 | 45 | dsk_seek_callback, |
| 46 | 46 | dsk_get_sectors_per_track, |
| r1438 | r1439 | |
|---|---|---|
| 25 | 25 | UINT8 *mess_ram; |
| 26 | 26 | UINT8 mess_ram_default_value = 0xCD; |
| 27 | 27 | |
| 28 | char mess_disclaimer[] = | |
| 28 | const char mess_disclaimer[] = | |
| 29 | 29 | "MESS is an emulator: it reproduces, more or less faithfully, the behaviour of\n" |
| 30 | 30 | "several computer and console systems. But hardware is useless without software\n" |
| 31 | 31 | "so a file dump of the ROM, cartridges, discs, and cassettes which run on that\n" |
| r1438 | r1439 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | void mess_options_init(core_options *opts); |
| 49 | 49 | |
| 50 | extern char mess_disclaimer[]; | |
| 50 | extern const char mess_disclaimer[]; | |
| 51 | 51 | |
| 52 | 52 | UINT32 hash_data_extract_crc32(const char *d); |
| 53 | 53 |
| r1438 | r1439 | |
|---|---|---|
| 229 | 229 | |
| 230 | 230 | static input_code messtest_token_to_code(const char *token) |
| 231 | 231 | { |
| 232 | static struct | |
| 232 | static const struct | |
| 233 | 233 | { |
| 234 | 234 | int code; |
| 235 | 235 | const char * codename; |
| r1438 | r1439 | |
|---|---|---|
| 68 | 68 | return stream_size((imgtool_stream *) file); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | static struct io_procs imgtool_ioprocs = | |
| 71 | static const struct io_procs imgtool_ioprocs = | |
| 72 | 72 | { |
| 73 | 73 | imgtool_floppy_closeproc, |
| 74 | 74 | imgtool_floppy_seekproc, |
| r1438 | r1439 | |
| 77 | 77 | imgtool_floppy_filesizeproc |
| 78 | 78 | }; |
| 79 | 79 | |
| 80 | static struct io_procs imgtool_noclose_ioprocs = | |
| 80 | static const struct io_procs imgtool_noclose_ioprocs = | |
| 81 | 81 | { |
| 82 | 82 | NULL, |
| 83 | 83 | imgtool_floppy_seekproc, |
| r1438 | r1439 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | #define WAVEMODULE(name_,humanname_,ext_,eoln_,flags_,zeropulse,onepulse,threshpulse,waveflags,blockheader,blockheadersize,\ |
| 41 | 41 | initalt,nextfile,readfilechunk) \ |
| 42 | static struct WaveExtra waveextra_##name = \ | |
| 42 | static const struct WaveExtra waveextra_##name = \ | |
| 43 | 43 | { \ |
| 44 | 44 | (initalt), \ |
| 45 | 45 | (nextfile), \ |
| r1438 | r1439 | |
|---|---|---|
| 19 | 19 | { |
| 20 | 20 | UINT8 shift; |
| 21 | 21 | UINT8 base; |
| 22 | const char **tokens; | |
| 22 | const char *const *tokens; | |
| 23 | 23 | int num_tokens; |
| 24 | 24 | }; |
| 25 | 25 | |
| r1438 | r1439 | |
| 140 | 140 | |
| 141 | 141 | /* ----------------------------------------------------------------------- */ |
| 142 | 142 | |
| 143 | static const char *cocobas_statements[] = | |
| 143 | static const char *const cocobas_statements[] = | |
| 144 | 144 | { |
| 145 | 145 | "FOR", /* 0x80 */ |
| 146 | 146 | "GO", /* 0x81 */ |
| r1438 | r1439 | |
| 265 | 265 | "ATTR" /* 0xf8 */ |
| 266 | 266 | }; |
| 267 | 267 | |
| 268 | static const char *cocobas_functions[] = | |
| 268 | static const char *const cocobas_functions[] = | |
| 269 | 269 | { |
| 270 | 270 | "SGN", /* 0xff80 */ |
| 271 | 271 | "INT", /* 0xff81 */ |
| r1438 | r1439 | |
| 314 | 314 | "ERLIN" /* 0xffac */ |
| 315 | 315 | }; |
| 316 | 316 | |
| 317 | static const char *dragonbas_statements[] = | |
| 317 | static const char *const dragonbas_statements[] = | |
| 318 | 318 | { |
| 319 | 319 | "FOR", /* 0x80 */ |
| 320 | 320 | "GO", /* 0x81 */ |
| r1438 | r1439 | |
| 415 | 415 | "DSKO$" /* 0xe0 */ |
| 416 | 416 | }; |
| 417 | 417 | |
| 418 | static const char *dragonbas_functions[] = | |
| 418 | static const char *const dragonbas_functions[] = | |
| 419 | 419 | { |
| 420 | 420 | "SGN", /* 0xff80 */ |
| 421 | 421 | "INT", /* 0xff81 */ |
| r1438 | r1439 | |
| 458 | 458 | "MKN$" /* 0xffa6 */ |
| 459 | 459 | }; |
| 460 | 460 | |
| 461 | static const char *vzbas[] = | |
| 461 | static const char *const vzbas[] = | |
| 462 | 462 | { |
| 463 | 463 | "END", /* 0x80 */ |
| 464 | 464 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 594 | 594 | /* ----------------------------------------------------------------------- * |
| 595 | 595 | * CBM machines * |
| 596 | 596 | * ----------------------------------------------------------------------- */ |
| 597 | static const char *basic_10[] = /* "BASIC 1.0" - supported by pet */ | |
| 597 | static const char *const basic_10[] = /* "BASIC 1.0" - supported by pet */ | |
| 598 | 598 | { |
| 599 | 599 | "END", /* 0x80 */ |
| 600 | 600 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 726 | 726 | "{PI}" /* 0xff - A single character shaped as greek lowercase 'PI' */ |
| 727 | 727 | }; |
| 728 | 728 | |
| 729 | static const char *basic_20[] = /* "BASIC 2.0" - supported by vic20 & clones, c64 & clones, cbm30xx series */ | |
| 729 | static const char *const basic_20[] = /* "BASIC 2.0" - supported by vic20 & clones, c64 & clones, cbm30xx series */ | |
| 730 | 730 | { |
| 731 | 731 | "END", /* 0x80 */ |
| 732 | 732 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 858 | 858 | "{PI}" /* 0xff - A single character shaped as greek lowercase 'PI' */ |
| 859 | 859 | }; |
| 860 | 860 | |
| 861 | static const char *basic_20_super_expander_vic[] = /* "BASIC 2.0 with Super Expander" - supported by vic20 & clones */ | |
| 861 | static const char *const basic_20_super_expander_vic[] = /* "BASIC 2.0 with Super Expander" - supported by vic20 & clones */ | |
| 862 | 862 | { |
| 863 | 863 | "END", /* 0x80 */ |
| 864 | 864 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 990 | 990 | "{PI}" /* 0xff - A single character shaped as greek lowercase 'PI' */ |
| 991 | 991 | }; |
| 992 | 992 | |
| 993 | static const char *basic_20_turtle_basic_10[] = /* "BASIC 2.0 with Turtle BASIC 1.0" - supported by vic20 & clones */ | |
| 993 | static const char *const basic_20_turtle_basic_10[] = /* "BASIC 2.0 with Turtle BASIC 1.0" - supported by vic20 & clones */ | |
| 994 | 994 | { |
| 995 | 995 | "END", /* 0x80 */ |
| 996 | 996 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 1122 | 1122 | "{PI}" /* 0xff - A single character shaped as greek lowercase 'PI' */ |
| 1123 | 1123 | }; |
| 1124 | 1124 | |
| 1125 | static const char *basic_20_speech_basic_27[] = /* "BASIC 2.0 with Speech BASIC 2.7" - supported by c64 & clones */ | |
| 1125 | static const char *const basic_20_speech_basic_27[] = /* "BASIC 2.0 with Speech BASIC 2.7" - supported by c64 & clones */ | |
| 1126 | 1126 | { |
| 1127 | 1127 | "END", /* 0x80 */ |
| 1128 | 1128 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 1254 | 1254 | "{PI}" /* 0xff - A single character shaped as greek lowercase 'PI' */ |
| 1255 | 1255 | }; |
| 1256 | 1256 | |
| 1257 | static const char *basic_20_at_basic[] = /* "BASIC 2.0 with @BASIC" - supported by c64 & clones */ | |
| 1257 | static const char *const basic_20_at_basic[] = /* "BASIC 2.0 with @BASIC" - supported by c64 & clones */ | |
| 1258 | 1258 | { |
| 1259 | 1259 | "END", /* 0x80 */ |
| 1260 | 1260 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 1386 | 1386 | "{PI}" /* 0xff - A single character shaped as greek lowercase 'PI' */ |
| 1387 | 1387 | }; |
| 1388 | 1388 | |
| 1389 | static const char *basic_20_simon_s_basic[] = /* "BASIC 2.0 with Simon's BASIC" - supported by c64 & clones */ | |
| 1389 | static const char *const basic_20_simon_s_basic[] = /* "BASIC 2.0 with Simon's BASIC" - supported by c64 & clones */ | |
| 1390 | 1390 | { |
| 1391 | 1391 | "END", /* 0x80 */ |
| 1392 | 1392 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 1646 | 1646 | "OUT" /* 0x647f */ |
| 1647 | 1647 | }; |
| 1648 | 1648 | |
| 1649 | static const char *basic_20_exp_40[] = /* "BASIC 2.0 with BASIC 4.0 Expansion" - supported by c64 & clones */ | |
| 1649 | static const char *const basic_20_exp_40[] = /* "BASIC 2.0 with BASIC 4.0 Expansion" - supported by c64 & clones */ | |
| 1650 | 1650 | { |
| 1651 | 1651 | "END", /* 0x80 */ |
| 1652 | 1652 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 1778 | 1778 | "{PI}" /* 0xff - A single character shaped as greek lowercase 'PI' */ |
| 1779 | 1779 | }; |
| 1780 | 1780 | |
| 1781 | static const char *basic_35[] = /* "BASIC 3.5" - supported by c16 & clones, except c364 */ | |
| 1781 | static const char *const basic_35[] = /* "BASIC 3.5" - supported by c16 & clones, except c364 */ | |
| 1782 | 1782 | { |
| 1783 | 1783 | "END", /* 0x80 */ |
| 1784 | 1784 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 1910 | 1910 | "{PI}" /* 0xff - A single character shaped as greek lowercase 'PI' */ |
| 1911 | 1911 | }; |
| 1912 | 1912 | |
| 1913 | static const char *basic_35_magic_voice[] = /* "BASIC 3.5 with Magic Voice Speech Synthesizer" - supported by c364 */ | |
| 1913 | static const char *const basic_35_magic_voice[] = /* "BASIC 3.5 with Magic Voice Speech Synthesizer" - supported by c364 */ | |
| 1914 | 1914 | { |
| 1915 | 1915 | "END", /* 0x80 */ |
| 1916 | 1916 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 2053 | 2053 | "SAY" /* 0xfe0a */ |
| 2054 | 2054 | }; |
| 2055 | 2055 | |
| 2056 | static const char *basic_40[] = /* "BASIC 4.0" - supported by cbm40xx & cbm80xx series, cbm500, cbm600 & clones */ | |
| 2056 | static const char *const basic_40[] = /* "BASIC 4.0" - supported by cbm40xx & cbm80xx series, cbm500, cbm600 & clones */ | |
| 2057 | 2057 | { |
| 2058 | 2058 | "END", /* 0x80 */ |
| 2059 | 2059 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 2185 | 2185 | "{PI}" /* 0xff - A single character shaped as greek lowercase 'PI' */ |
| 2186 | 2186 | }; |
| 2187 | 2187 | |
| 2188 | static const char *basic_70[] = /* "BASIC 7.0" - supported by c128 & clones */ | |
| 2188 | static const char *const basic_70[] = /* "BASIC 7.0" - supported by c128 & clones */ | |
| 2189 | 2189 | { |
| 2190 | 2190 | "END", /* 0x80 */ |
| 2191 | 2191 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
| 2367 | 2367 | "SLOW" /* 0xfe26 */ |
| 2368 | 2368 | }; |
| 2369 | 2369 | |
| 2370 | static const char *basic_100[] = /* "BASIC 10.0" - supported by c65 & clones */ | |
| 2370 | static const char *const basic_100[] = /* "BASIC 10.0" - supported by c65 & clones */ | |
| 2371 | 2371 | { |
| 2372 | 2372 | "END", /* 0x80 */ |
| 2373 | 2373 | "FOR", /* 0x81 */ |
| r1438 | r1439 | |
|---|---|---|
| 21 | 21 | |
| 22 | 22 | /* ---------------------------------------------------------------------- */ |
| 23 | 23 | |
| 24 | static void writeusage(FILE *f, int write_word_usage, struct command *c, char *argv[]) | |
| 24 | static void writeusage(FILE *f, int write_word_usage, const struct command *c, char *argv[]) | |
| 25 | 25 | { |
| 26 | 26 | fprintf(f, "%s %s %s %s\n", |
| 27 | 27 | (write_word_usage ? "Usage:" : " "), |
| r1438 | r1439 | |
| 871 | 871 | |
| 872 | 872 | /* ----------------------------------------------------------------------- */ |
| 873 | 873 | |
| 874 | static struct command cmds[] = | |
| 874 | static const struct command cmds[] = | |
| 875 | 875 | { |
| 876 | 876 | { "create", cmd_create, "<format> <imagename> [--(createoption)=value]", 2, 8, 0}, |
| 877 | 877 | { "dir", cmd_dir, "<format> <imagename> [path]", 2, 3, 0 }, |
| r1438 | r1439 | |
| 897 | 897 | { |
| 898 | 898 | int i; |
| 899 | 899 | int result; |
| 900 | struct command *c; | |
| 900 | const struct command *c; | |
| 901 | 901 | const char *sample_format = "coco_jvc_rsdos"; |
| 902 | 902 | |
| 903 | 903 | #ifdef MAME_DEBUG |
| r1438 | r1439 | |
|---|---|---|
| 1184 | 1184 | |
| 1185 | 1185 | /* character codes >= 128 are reserved for BASIC keywords */ |
| 1186 | 1186 | |
| 1187 | static const char* thombas7[2][128] = { | |
| 1187 | static const char *const thombas7[2][128] = { | |
| 1188 | 1188 | { /* statements */ |
| 1189 | 1189 | "END", "FOR", "NEXT", "DATA", "DIM", "READ", "LET", "GO", "RUN", "IF", |
| 1190 | 1190 | "RESTORE", "RETURN", "REM", "'", "STOP", "ELSE", "TRON", "TROFF", "DEFSTR", |
| r1438 | r1439 | |
| 1214 | 1214 | }; |
| 1215 | 1215 | |
| 1216 | 1216 | /* MO5: some keywords ar missing; DOS and TUNE are added */ |
| 1217 | static const char* thombas5[2][128] = { | |
| 1217 | static const char *const thombas5[2][128] = { | |
| 1218 | 1218 | { /* statements */ |
| 1219 | 1219 | "END", "FOR", "NEXT", "DATA", "DIM", "READ", NULL, "GO", "RUN", "IF", |
| 1220 | 1220 | "RESTORE", "RETURN", "REM", "'", "STOP", "ELSE", "TRON", "TROFF", "DEFSTR", |
| r1438 | r1439 | |
| 1248 | 1248 | /* DENSITY is missing on BASIC 512 & BASIC 128 for MO6 but, otherwise, they |
| 1249 | 1249 | have the same tokens |
| 1250 | 1250 | */ |
| 1251 | static const char* thombas128[2][128] = { | |
| 1251 | static const char *const thombas128[2][128] = { | |
| 1252 | 1252 | { /* statements */ |
| 1253 | 1253 | "END", "FOR", "NEXT", "DATA", "DIM", "READ", "LET", "GO", "RUN", "IF", |
| 1254 | 1254 | "RESTORE", "RETURN", "REM", "'", "STOP", "ELSE", "TRON", "TROFF", "DEFSTR", |
| r1438 | r1439 | |
| 1401 | 1401 | const char *name, |
| 1402 | 1402 | const char *fork, |
| 1403 | 1403 | imgtool_stream *dst, |
| 1404 | const char* table[2][128]) | |
| 1404 | const char *const table[2][128]) | |
| 1405 | 1405 | { |
| 1406 | 1406 | imgtool_stream *org = stream_open_mem( NULL, 0 ); |
| 1407 | 1407 | imgtoolerr_t err; |
| r1438 | r1439 | |
| 1472 | 1472 | const char *fork, |
| 1473 | 1473 | imgtool_stream *src, |
| 1474 | 1474 | option_resolution *opts, |
| 1475 | const char* table[2][128]) | |
| 1475 | const char *const table[2][128]) | |
| 1476 | 1476 | { |
| 1477 | 1477 | return IMGTOOLERR_UNIMPLEMENTED; |
| 1478 | 1478 | } |
| r1438 | r1439 | |
|---|---|---|
| 305 | 305 | $4050: |
| 306 | 306 | */ |
| 307 | 307 | |
| 308 | static const char *hardware_types[]={ | |
| 308 | static const char *const hardware_types[]={ | |
| 309 | 309 | "Normal cartridge", |
| 310 | 310 | "Action Replay", |
| 311 | 311 | "KCS Power Cartridge", |
| r1438 | r1439 | |
| 330 | 330 | char name[0x20]; |
| 331 | 331 | } crt_header; |
| 332 | 332 | |
| 333 | static const char *chip_types[]={ "ROM", "RAM", "FLASH" }; | |
| 333 | static const char *const chip_types[]={ "ROM", "RAM", "FLASH" }; | |
| 334 | 334 | typedef struct { |
| 335 | 335 | char id[4]; // CHIP |
| 336 | 336 | bigulong packet_length; |
| r1438 | r1439 | |
| 376 | 376 | |IMAGE_USES_EXROM_LINE|IMAGE_USES_LABEL, //flags |
| 377 | 377 | */ |
| 378 | 378 | |
| 379 | static struct OptionTemplate c64crt_fileeopts[] = | |
| 379 | static const struct OptionTemplate c64crt_fileeopts[] = | |
| 380 | 380 | { |
| 381 | 381 | { "ftype", NULL, IMGOPTION_FLAG_TYPE_INTEGER, 0, 0xffff, NULL }, /* [0] */ |
| 382 | 382 | { "faddr", NULL, IMGOPTION_FLAG_TYPE_INTEGER, 0, 0xffff, NULL }, /* [1] */ |
| r1438 | r1439 | |
| 388 | 388 | #define C64CRT_FILEOPTION_FADDR 1 |
| 389 | 389 | #define C64CRT_FILEOPTION_FBANK 2 |
| 390 | 390 | |
| 391 | static struct OptionTemplate c64crt_createopts[] = | |
| 391 | static const struct OptionTemplate c64crt_createopts[] = | |
| 392 | 392 | { |
| 393 | 393 | { "hardwaretype", NULL, IMGOPTION_FLAG_TYPE_INTEGER, 0, 0xffff, NULL }, /* [0] */ |
| 394 | 394 | { "gameline", NULL, IMGOPTION_FLAG_TYPE_INTEGER, 0, 0x00ff, NULL }, /* [1] */ |
| r1438 | r1439 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | #define HEADER(file) ((ti85_header*)file->data) |
| 74 | 74 | |
| 75 | static struct OptionTemplate ti85_fileoptions[] = | |
| 75 | static const struct OptionTemplate ti85_fileoptions[] = | |
| 76 | 76 | { |
| 77 | 77 | { "ftype", "File type", IMGOPTION_FLAG_TYPE_INTEGER | IMGOPTION_FLAG_HASDEFAULT,0,27,"12"}, |
| 78 | 78 | { NULL, 0, 0, 0, 0 } |
| 79 | 79 | }; |
| 80 | 80 | |
| 81 | static struct OptionTemplate ti85_createoptions[] = | |
| 81 | static const struct OptionTemplate ti85_createoptions[] = | |
| 82 | 82 | { |
| 83 | 83 | { "comment", "Comment", IMGOPTION_FLAG_TYPE_STRING | IMGOPTION_FLAG_HASDEFAULT,0,0,"TI-85 file created with ImgTool"}, |
| 84 | 84 | { NULL, NULL, 0, 0, 0, 0 } |
| r1438 | r1439 | |
|---|---|---|
| 78 | 78 | unsigned char unused2[0x2d]; // zer0 |
| 79 | 79 | } D71_HEADER; |
| 80 | 80 | |
| 81 | static D64_HEADER d64_header={ | |
| 81 | static const D64_HEADER d64_header={ | |
| 82 | 82 | 18,1,'A', |
| 83 | 83 | 0, // 1571 0x80 |
| 84 | 84 | { { 0 } }, |
| r1438 | r1439 | |
| 117 | 117 | unsigned char unused1[227]; // zero |
| 118 | 118 | } D81_HEADER; |
| 119 | 119 | |
| 120 | static D81_HEADER d81_header={ | |
| 120 | static const D81_HEADER d81_header={ | |
| 121 | 121 | 40,3,'D', |
| 122 | 122 | 0, |
| 123 | 123 | { '\xa0','\xa0','\xa0','\xa0','\xa0','\xa0','\xa0','\xa0', |
| r1438 | r1439 | |
| 133 | 133 | struct { unsigned char free, map[5]; } bam[40]; |
| 134 | 134 | } D81_BAM; |
| 135 | 135 | |
| 136 | static D81_BAM d81_bam={ | |
| 136 | static const D81_BAM d81_bam={ | |
| 137 | 137 | 40, 2,0x44, 0xbb, |
| 138 | 138 | }; |
| 139 | 139 | |
| r1438 | r1439 | |
| 517 | 517 | static int d64_read_sector(imgtool_image *img, UINT8 head, UINT8 track, UINT8 sector, int offset, void *buffer, int length); |
| 518 | 518 | static int d64_write_sector(imgtool_image *img, UINT8 head, UINT8 track, UINT8 sector, int offset, const void *buffer, int length); |
| 519 | 519 | |
| 520 | static struct OptionTemplate d64_createopts[] = | |
| 520 | static const struct OptionTemplate d64_createopts[] = | |
| 521 | 521 | { |
| 522 | 522 | { "label", NULL, IMGOPTION_FLAG_TYPE_STRING | IMGOPTION_FLAG_HASDEFAULT, 0, 0, NULL }, /* [3] */ |
| 523 | 523 | { NULL, NULL, 0, 0, 0, 0 } |
| r1438 | r1439 | |
|---|---|---|
| 115 | 115 | static int t64_image_deletefile(imgtool_image *img, const char *fname); |
| 116 | 116 | static int t64_image_create(const imgtool_module *mod, imgtool_stream *f, const ResolvedOption *_options); |
| 117 | 117 | |
| 118 | static struct OptionTemplate t64_createopts[] = | |
| 118 | static const struct OptionTemplate t64_createopts[] = | |
| 119 | 119 | { |
| 120 | 120 | { "entries", NULL, IMGOPTION_FLAG_TYPE_INTEGER, 0, 3, NULL }, /* [0] */ |
| 121 | 121 | { "label", NULL, IMGOPTION_FLAG_TYPE_STRING | IMGOPTION_FLAG_HASDEFAULT, 0, 0, NULL }, /* [1] */ |
| r1438 | r1439 | |
|---|---|---|
| 209 | 209 | static unsigned updhufcnt; |
| 210 | 210 | static unsigned cpdist[tblsize+1]; |
| 211 | 211 | static unsigned cpdbmask[tblsize]; |
| 212 | static unsigned cpdext[] = { /* Extra bits for distance codes */ | |
| 212 | static const unsigned cpdext[] = { /* Extra bits for distance codes */ | |
| 213 | 213 | 0, 0, 0, 0, 1, 2, 3, 4, |
| 214 | 214 | 5, 6, 7, 8, 9, 10, 11, 12}; |
| 215 | 215 |
| r1438 | r1439 | |
|---|---|---|
| 75 | 75 | |
| 76 | 76 | |
| 77 | 77 | |
| 78 | struct CustomSound_interface vc4000_sound_interface = | |
| 78 | const struct CustomSound_interface vc4000_sound_interface = | |
| 79 | 79 | { |
| 80 | 80 | vc4000_custom_start |
| 81 | 81 | }; |
| r1438 | r1439 | |
|---|---|---|
| 18 | 18 | #define STEP 0x08000 |
| 19 | 19 | |
| 20 | 20 | static DAVE dave; |
| 21 | static DAVE_INTERFACE *dave_iface; | |
| 21 | static const DAVE_INTERFACE *dave_iface; | |
| 22 | 22 | |
| 23 | 23 | //static unsigned char Dave_IntRegRead(void); |
| 24 | 24 | //static void Dave_IntRegWrite(unsigned char); |
| r1438 | r1439 | |
| 652 | 652 | return dave.Regs[RegIndex & 0x01f]; |
| 653 | 653 | } |
| 654 | 654 | |
| 655 | void Dave_SetIFace(struct DAVE_INTERFACE *newInterface) | |
| 655 | void Dave_SetIFace(const struct DAVE_INTERFACE *newInterface) | |
| 656 | 656 | { |
| 657 | 657 | dave_iface = newInterface; |
| 658 | 658 | } |
| r1438 | r1439 | |
|---|---|---|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | #if 0 |
| 172 | struct CustomSound_interface soundblaster_interface = { | |
| 172 | const struct CustomSound_interface soundblaster_interface = { | |
| 173 | 173 | soundblaster_start, |
| 174 | 174 | soundblaster_stop, |
| 175 | 175 | soundblaster_update |
| r1438 | r1439 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | sound_stream *odyssey2_sh_channel; |
| 13 | 13 | |
| 14 | struct CustomSound_interface odyssey2_sound_interface = | |
| 14 | const struct CustomSound_interface odyssey2_sound_interface = | |
| 15 | 15 | { |
| 16 | 16 | odyssey2_sh_start |
| 17 | 17 | }; |
| r1438 | r1439 | |
|---|---|---|
| 102 | 102 | |
| 103 | 103 | extern void Dave_SetInt(int); |
| 104 | 104 | |
| 105 | void Dave_SetIFace(struct DAVE_INTERFACE *newInterface); | |
| 105 | void Dave_SetIFace(const struct DAVE_INTERFACE *newInterface); | |
| 106 | 106 | void Dave_Interrupt(void); |
| 107 | 107 | |
| 108 | 108 | #endif |
| r1438 | r1439 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | |
| 81 | 81 | |
| 82 | struct CustomSound_interface arcadia_sound_interface = | |
| 82 | const struct CustomSound_interface arcadia_sound_interface = | |
| 83 | 83 | { |
| 84 | 84 | arcadia_custom_start |
| 85 | 85 | }; |
| r1438 | r1439 | |
|---|---|---|
| 29 | 29 | 500, 1000, 1500, 2000, |
| 30 | 30 | 2500, 3000, 3500, 4000}; |
| 31 | 31 | |
| 32 | struct CustomSound_interface dai_sound_interface = | |
| 32 | const struct CustomSound_interface dai_sound_interface = | |
| 33 | 33 | { |
| 34 | 34 | dai_sh_start, |
| 35 | 35 | NULL, |
| r1438 | r1439 | |
|---|---|---|
| 111 | 111 | |
| 112 | 112 | extern VIDEO_START( vic6560 ); |
| 113 | 113 | extern VIDEO_UPDATE( vic6560 ); |
| 114 | extern unsigned char vic6560_palette[16 * 3]; | |
| 114 | extern const unsigned char vic6560_palette[16 * 3]; | |
| 115 | 115 | |
| 116 | 116 | /* to be inserted in GameDriver-Structure */ |
| 117 | extern struct CustomSound_interface vic6560_sound_interface; | |
| 117 | extern const struct CustomSound_interface vic6560_sound_interface; | |
| 118 | 118 | |
| 119 | 119 | extern INTERRUPT_GEN( vic656x_raster_interrupt ); |
| 120 | 120 |
| r1438 | r1439 | |
|---|---|---|
| 71 | 71 | extern MACHINE_RESET( hp48 ); |
| 72 | 72 | |
| 73 | 73 | /* in video/hp48.c */ |
| 74 | extern unsigned short hp48_colortable[0x20][2]; | |
| 74 | extern const unsigned short hp48_colortable[0x20][2]; | |
| 75 | 75 | |
| 76 | 76 | extern PALETTE_INIT( hp48 ); |
| 77 | 77 | extern VIDEO_START( hp48 ); |
| r1438 | r1439 | |
|---|---|---|
| 14 | 14 | extern UINT8 dai_osc_volume[3]; |
| 15 | 15 | |
| 16 | 16 | /* video/dai.c */ |
| 17 | extern unsigned char dai_palette[16*3]; | |
| 18 | extern unsigned short dai_colortable[1][16]; | |
| 17 | extern const unsigned char dai_palette[16*3]; | |
| 18 | extern const unsigned short dai_colortable[1][16]; | |
| 19 | 19 | VIDEO_START( dai ); |
| 20 | 20 | VIDEO_UPDATE( dai ); |
| 21 | 21 | PALETTE_INIT( dai ); |
| 22 | 22 | void dai_update_palette (UINT8); |
| 23 | 23 | |
| 24 | 24 | /* audio/dai.c */ |
| 25 | extern struct CustomSound_interface dai_sound_interface; | |
| 25 | extern const struct CustomSound_interface dai_sound_interface; | |
| 26 | 26 | extern void dai_sh_change_clock(double); |
| 27 | 27 | |
| 28 | 28 | #endif /* DAI_H */ |
| r1438 | r1439 | |
|---|---|---|
| 146 | 146 | #define I8271_STATUS_NON_DMA_REQUEST 0x004 |
| 147 | 147 | |
| 148 | 148 | /* initialise emulation */ |
| 149 | void i8271_init(i8271_interface *); | |
| 149 | void i8271_init(const i8271_interface *); | |
| 150 | 150 | /* reset */ |
| 151 | 151 | void i8271_reset(void); |
| 152 | 152 |
| r1438 | r1439 | |
|---|---|---|
| 11 | 11 | void (*alarm_output_callback)(int); |
| 12 | 12 | }; |
| 13 | 13 | |
| 14 | void tc8521_init(struct tc8521_interface *); | |
| 14 | void tc8521_init(const struct tc8521_interface *); | |
| 15 | 15 | |
| 16 | 16 | void tc8521_load_stream(mame_file *file); |
| 17 | 17 | void tc8521_save_stream(mame_file *file); |
| r1438 | r1439 | |
|---|---|---|
| 2 | 2 | extern PALETTE_INIT( pocketc ); |
| 3 | 3 | extern VIDEO_START( pocketc ); |
| 4 | 4 | |
| 5 | extern unsigned short pocketc_colortable[8][2]; | |
| 5 | extern const unsigned short pocketc_colortable[8][2]; | |
| 6 | 6 | |
| 7 | 7 | typedef const char *POCKETC_FIGURE[]; |
| 8 | 8 | void pocketc_draw_special(mame_bitmap *bitmap, |
| r1438 | r1439 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | /* in mess/video/ */ |
| 13 | extern unsigned char pc1500_palette[242][3]; | |
| 14 | extern unsigned short pc1500_colortable[1][2]; | |
| 13 | extern const unsigned char pc1500_palette[242][3]; | |
| 14 | extern const unsigned short pc1500_colortable[1][2]; | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | void pc1500_init_colors (unsigned char *sys_palette, |
| r1438 | r1439 | |
|---|---|---|
| 23 | 23 | |
| 24 | 24 | void pc_lpt_config(int nr, const PC_LPT_CONFIG *config); |
| 25 | 25 | |
| 26 | void pc_lpt_set_device(int nr, CENTRONICS_DEVICE *device); | |
| 26 | void pc_lpt_set_device(int nr, const CENTRONICS_DEVICE *device); | |
| 27 | 27 | |
| 28 | 28 | /* line definitions in centroni.h */ |
| 29 | 29 | /* only those lines in mask are modified */ |
| r1438 | r1439 | |
|---|---|---|
| 20 | 20 | extern VIDEO_START( arcadia ); |
| 21 | 21 | extern VIDEO_UPDATE( arcadia ); |
| 22 | 22 | |
| 23 | extern struct CustomSound_interface arcadia_sound_interface; | |
| 23 | extern const struct CustomSound_interface arcadia_sound_interface; | |
| 24 | 24 | extern void arcadia_soundport_w (int mode, int data); |
| r1438 | r1439 | |
|---|---|---|
| 15 | 15 | /* video/pmd85.c */ |
| 16 | 16 | extern VIDEO_START( pmd85 ); |
| 17 | 17 | extern VIDEO_UPDATE( pmd85 ); |
| 18 | extern unsigned char pmd85_palette[3*3]; | |
| 19 | extern unsigned short pmd85_colortable[1][3]; | |
| 18 | extern const unsigned char pmd85_palette[3*3]; | |
| 19 | extern const unsigned short pmd85_colortable[1][3]; | |
| 20 | 20 | extern PALETTE_INIT( pmd85 ); |
| r1438 | r1439 | |
|---|---|---|
| 10 | 10 | /* video/lviv.c */ |
| 11 | 11 | extern VIDEO_START( lviv ); |
| 12 | 12 | extern VIDEO_UPDATE( lviv ); |
| 13 | extern unsigned char lviv_palette[8*3]; | |
| 13 | extern const unsigned char lviv_palette[8*3]; | |
| 14 | 14 | extern unsigned short lviv_colortable[1][4]; |
| 15 | 15 | extern PALETTE_INIT( lviv ); |
| 16 | 16 | extern void lviv_update_palette (UINT8); |
| r1438 | r1439 | |
|---|---|---|
| 3 | 3 | |
| 4 | 4 | #include "vic6567.h" |
| 5 | 5 | |
| 6 | extern unsigned char vic3_palette[0x100 * 3]; | |
| 6 | extern const unsigned char vic3_palette[0x100 * 3]; | |
| 7 | 7 | |
| 8 | 8 | extern void vic4567_init (int pal, int (*dma_read) (int), |
| 9 | 9 | int (*dma_read_color) (int), void (*irq) (int), |
| r1438 | r1439 | |
|---|---|---|
| 51 | 51 | UINT8 centronics_read_data(int nr); |
| 52 | 52 | int centronics_read_handshake(int nr); |
| 53 | 53 | |
| 54 | extern CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE; | |
| 54 | extern const CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE; | |
| 55 | 55 | |
| 56 | 56 | #ifdef __cplusplus |
| 57 | 57 | } |
| r1438 | r1439 | |
|---|---|---|
| 1 | 1 | #include "machine/8255ppi.h" |
| 2 | 2 | |
| 3 | extern ppi8255_interface pc_ppi8255_interface; | |
| 3 | extern const ppi8255_interface pc_ppi8255_interface; | |
| 4 | 4 | |
| 5 | 5 | READ8_HANDLER( pc_rtc_r ); |
| 6 | 6 | WRITE8_HANDLER( pc_rtc_w ); |
| r1438 | r1439 | |
|---|---|---|
| 66 | 66 | CBM_Drive; |
| 67 | 67 | |
| 68 | 68 | #define D64_MAX_TRACKS 35 |
| 69 | extern int d64_sectors_per_track[D64_MAX_TRACKS]; | |
| 69 | extern const int d64_sectors_per_track[D64_MAX_TRACKS]; | |
| 70 | 70 | int d64_tracksector2offset (int track, int sector); |
| 71 | 71 | #define D64_TRACK_ID1 (d64_tracksector2offset(18,0)+162) |
| 72 | 72 | #define D64_TRACK_ID2 (d64_tracksector2offset(18,0)+163) |
| r1438 | r1439 | |
|---|---|---|
| 20 | 20 | extern VIDEO_START( vdc8563 ); |
| 21 | 21 | extern VIDEO_UPDATE( vdc8563 ); |
| 22 | 22 | |
| 23 | extern unsigned char vdc8563_palette[16 * 3]; | |
| 23 | extern const unsigned char vdc8563_palette[16 * 3]; | |
| 24 | 24 | |
| 25 | 25 | /* to be called when writting to port */ |
| 26 | 26 | extern WRITE8_HANDLER ( vdc8563_port_w ); |
| r1438 | r1439 | |
|---|---|---|
| 1 | 1 | #ifndef __OSBORNE1_H |
| 2 | 2 | #define __OSBORNE1_H |
| 3 | 3 | |
| 4 | extern struct z80_irq_daisy_chain osborne1_daisy_chain[]; | |
| 4 | extern const struct z80_irq_daisy_chain osborne1_daisy_chain[]; | |
| 5 | 5 | |
| 6 | 6 | WRITE8_HANDLER( osborne1_0000_w ); |
| 7 | 7 | WRITE8_HANDLER( osborne1_1000_w ); |
| r1438 | r1439 | |
|---|---|---|
| 50 | 50 | extern VIDEO_UPDATE( vic2 ); |
| 51 | 51 | extern INTERRUPT_GEN( vic2_raster_irq ); |
| 52 | 52 | |
| 53 | extern unsigned char vic2_palette[16 * 3]; | |
| 53 | extern const unsigned char vic2_palette[16 * 3]; | |
| 54 | 54 | |
| 55 | 55 | /* to be inserted in GameDriver-Structure */ |
| 56 | 56 |
| r1438 | r1439 | |
|---|---|---|
| 40 | 40 | /* video/odyssey2.c */ |
| 41 | 41 | extern int odyssey2_vh_hpos; |
| 42 | 42 | |
| 43 | extern UINT8 odyssey2_colors[]; | |
| 43 | extern const UINT8 odyssey2_colors[]; | |
| 44 | 44 | |
| 45 | 45 | VIDEO_START( odyssey2 ); |
| 46 | 46 | VIDEO_UPDATE( odyssey2 ); |
| r1438 | r1439 | |
| 54 | 54 | |
| 55 | 55 | /* audio/odyssey2.c */ |
| 56 | 56 | extern sound_stream *odyssey2_sh_channel; |
| 57 | extern struct CustomSound_interface odyssey2_sound_interface; | |
| 57 | extern const struct CustomSound_interface odyssey2_sound_interface; | |
| 58 | 58 | void *odyssey2_sh_start(int clock, const struct CustomSound_interface *config); |
| 59 | 59 | void odyssey2_sh_update( void *param,stream_sample_t **inputs, stream_sample_t **_buffer,int length ); |
| 60 | 60 |
| r1438 | r1439 | |
|---|---|---|
| 18 | 18 | /* video/pmd85.c */ |
| 19 | 19 | extern VIDEO_START( primo ); |
| 20 | 20 | extern VIDEO_UPDATE( primo ); |
| 21 | extern unsigned char primo_palette[2*3]; | |
| 22 | extern unsigned short primo_colortable[1][2]; | |
| 21 | extern const unsigned char primo_palette[2*3]; | |
| 22 | extern const unsigned short primo_colortable[1][2]; | |
| 23 | 23 | extern PALETTE_INIT( primo ); |
| 24 | 24 | extern UINT16 primo_video_memory_base; |
| r1438 | r1439 | |
|---|---|---|
| 47 | 47 | VIDEO_START( ti85 ); |
| 48 | 48 | VIDEO_UPDATE( ti85 ); |
| 49 | 49 | PALETTE_INIT( ti85 ); |
| 50 | extern unsigned char ti85_palette[32*7][3]; | |
| 51 | extern unsigned short ti85_colortable[32][7]; | |
| 50 | extern const unsigned char ti85_palette[32*7][3]; | |
| 51 | extern const unsigned short ti85_colortable[32][7]; | |
| 52 | 52 |
| r1438 | r1439 | |
|---|---|---|
| 46 | 46 | |
| 47 | 47 | extern VIDEO_START( ted7360 ); |
| 48 | 48 | extern VIDEO_UPDATE( ted7360 ); |
| 49 | extern unsigned char ted7360_palette[16 * 8 * 3]; | |
| 49 | extern const unsigned char ted7360_palette[16 * 8 * 3]; | |
| 50 | 50 | |
| 51 | 51 | /* to be inserted in GameDriver-Structure */ |
| 52 | extern struct CustomSound_interface ted7360_sound_interface; | |
| 52 | extern const struct CustomSound_interface ted7360_sound_interface; | |
| 53 | 53 | |
| 54 | 54 | /* to be called when writting to port */ |
| 55 | 55 | extern WRITE8_HANDLER ( ted7360_port_w ); |
| r1438 | r1439 | |
|---|---|---|
| 19 | 19 | WRITE8_HANDLER ( pce_joystick_w ); |
| 20 | 20 | READ8_HANDLER ( pce_joystick_r ); |
| 21 | 21 | |
| 22 | extern struct MSM5205interface pce_cd_msm5205_interface; | |
| 22 | extern const struct MSM5205interface pce_cd_msm5205_interface; | |
| 23 | 23 | WRITE8_HANDLER( pce_cd_bram_w ); |
| 24 | 24 | WRITE8_HANDLER( pce_cd_intf_w ); |
| 25 | 25 | READ8_HANDLER( pce_cd_intf_r ); |
| r1438 | r1439 | |
|---|---|---|
| 14 | 14 | extern VIDEO_START( vc4000 ); |
| 15 | 15 | extern VIDEO_UPDATE( vc4000 ); |
| 16 | 16 | |
| 17 | extern struct CustomSound_interface vc4000_sound_interface; | |
| 17 | extern const struct CustomSound_interface vc4000_sound_interface; | |
| 18 | 18 | |
| 19 | 19 | void vc4000_soundport_w (int mode, int data); |
| r1438 | r1439 | |
|---|---|---|
| 74 | 74 | |
| 75 | 75 | |
| 76 | 76 | /* init chip, set interface, and do main setup */ |
| 77 | void msm8251_init(struct msm8251_interface *); | |
| 77 | void msm8251_init(const struct msm8251_interface *); | |
| 78 | 78 | /* reset the chip */ |
| 79 | 79 | void msm8251_reset(void); |
| 80 | 80 |
| r1438 | r1439 | |
|---|---|---|
| 11 | 11 | extern WRITE8_HANDLER( galaxy_latch_w ); |
| 12 | 12 | |
| 13 | 13 | /* video/galaxy.c */ |
| 14 | extern gfx_layout galaxy_charlayout; | |
| 15 | extern unsigned char galaxy_palette[2*3]; | |
| 16 | extern unsigned short galaxy_colortable[1][2]; | |
| 14 | extern const gfx_layout galaxy_charlayout; | |
| 15 | extern const unsigned char galaxy_palette[2*3]; | |
| 16 | extern const unsigned short galaxy_colortable[1][2]; | |
| 17 | 17 | extern PALETTE_INIT( galaxy ); |
| 18 | 18 | extern VIDEO_START( galaxy ); |
| 19 | 19 | extern VIDEO_UPDATE( galaxy ); |
| r1438 | r1439 | |
|---|---|---|
| 24 | 24 | * needs little more testing with working dipswitches */ |
| 25 | 25 | /*#define GFX */ |
| 26 | 26 | |
| 27 | unsigned char vic6560_palette[] = | |
| 27 | const unsigned char vic6560_palette[] = | |
| 28 | 28 | { |
| 29 | 29 | /* ripped from vice, a very excellent emulator */ |
| 30 | 30 | /* black, white, red, cyan */ |
| r1438 | r1439 | |
| 37 | 37 | 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xa0, 0xff, 0xff, 0xff, 0x00 |
| 38 | 38 | }; |
| 39 | 39 | |
| 40 | struct CustomSound_interface vic6560_sound_interface = | |
| 40 | const struct CustomSound_interface vic6560_sound_interface = | |
| 41 | 41 | { |
| 42 | 42 | vic6560_custom_start |
| 43 | 43 | }; |
| r1438 | r1439 | |
| 122 | 122 | 8 * 8 |
| 123 | 123 | }; |
| 124 | 124 | |
| 125 | static UINT8 pointermask[] = | |
| 125 | static const UINT8 pointermask[] = | |
| 126 | 126 | { |
| 127 | 127 | 0x00, 0x70, 0x60, 0x50, 0x08, 0x04, 0x00, 0x00, /* blackmask */ |
| 128 | 128 | 0xf0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00 /* whitemask */ |
| r1438 | r1439 | |
|---|---|---|
| 164 | 164 | static void beta_Set_VSync(int offset, int data); |
| 165 | 165 | static void beta_Set_DE(int offset, int data); |
| 166 | 166 | |
| 167 | static struct m6845_interface | |
| 167 | static const struct m6845_interface | |
| 168 | 168 | beta_m6845_interface= { |
| 169 | 169 | 0, // Memory Address register |
| 170 | 170 | beta_Set_RA, // Row Address register |
| r1438 | r1439 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | #include "includes/hp48.h" |
| 6 | 6 | |
| 7 | static | |
| 7 | static const | |
| 8 | 8 | { |
| 9 | 9 | 49,70,64, /* background */ |
| 10 | 10 | 40,35,55, /* symbol color */ |
| r1438 | r1439 | |
| 13 | 13 | }; |
| 14 | 14 | |
| 15 | 15 | /* 32 contrast steps */ |
| 16 | ||
| 16 | cons | |
| 17 | 17 | { 0, 2 }, |
| 18 | 18 | { 0, 2 }, |
| 19 | 19 | { 0, 2 }, |
| r1438 | r1439 | |
|---|---|---|
| 64 | 64 | GFXDECODE_ENTRY( vdt911_chr_region, vdt911_frenchWP_chr_offset, fontlayout_7bit, 0, 4 ) |
| 65 | 65 | GFXDECODE_END |
| 66 | 66 | |
| 67 | unsigned char vdt911_palette[vdt911_palette_size*3] = | |
| 67 | const unsigned char vdt911_palette[vdt911_palette_size*3] = | |
| 68 | 68 | { |
| 69 | 69 | 0x00,0x00,0x00, /* black */ |
| 70 | 70 | 0xC0,0xC0,0xC0, /* low intensity */ |
| 71 | 71 | 0xFF,0xFF,0xFF /* high intensity */ |
| 72 | 72 | }; |
| 73 | 73 | |
| 74 | unsigned short vdt911_colortable[vdt911_colortable_size] = | |
| 74 | const unsigned short vdt911_colortable[vdt911_colortable_size] = | |
| 75 | 75 | { |
| 76 | 76 | 0, 2, /* high intensity */ |
| 77 | 77 | 0, 1, /* low intensity */ |
| r1438 | r1439 | |
| 518 | 518 | } |
| 519 | 519 | } |
| 520 | 520 | |
| 521 | static unsigned char (*key_translate[])[91] = | |
| 521 | static const unsigned char (*key_translate[])[91] = | |
| 522 | 522 | { /* array must use same order as vdt911_model_t!!! */ |
| 523 | 523 | /* US */ |
| 524 | 524 | US_key_translate, |
| r1438 | r1439 | |
|---|---|---|
| 1380 | 1380 | */ |
| 1381 | 1381 | |
| 1382 | 1382 | |
| 1383 | static unsigned char COMPIS_palette[16*3] = | |
| 1383 | static const unsigned char COMPIS_palette[16*3] = | |
| 1384 | 1384 | { |
| 1385 | 1385 | 0, 0, 0, |
| 1386 | 1386 | 0, 0, 0, |
| r1438 | r1439 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | GFXDECODE_EXTERN( vdt911_gfxdecodeinfo ); |
| 24 | 24 | |
| 25 | extern unsigned char vdt911_palette[]; | |
| 26 | extern unsigned short vdt911_colortable[]; | |
| 25 | extern const unsigned char vdt911_palette[]; | |
| 26 | extern const unsigned short vdt911_colortable[]; | |
| 27 | 27 | enum |
| 28 | 28 | { |
| 29 | 29 | vdt911_palette_size = 3 /** 3*/, |
| r1438 | r1439 | |
|---|---|---|
| 25 | 25 | #define LOG_DAI_VIDEO_LINE(_mode, _unit, _resolution, _repeat, _scan) |
| 26 | 26 | #endif |
| 27 | 27 | |
| 28 | unsigned char dai_palette[16*3] = | |
| 28 | const unsigned char dai_palette[16*3] = | |
| 29 | 29 | { |
| 30 | 30 | 0x00, 0x00, 0x00, /* 0 Black */ |
| 31 | 31 | 0x00, 0x00, 0x8b, /* 1 Dark Blue */ |
| r1438 | r1439 | |
| 45 | 45 | 0xff, 0xff, 0xff, /* 15 White */ |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | unsigned short dai_colortable[1][16] = | |
| 48 | const unsigned short dai_colortable[1][16] = | |
| 49 | 49 | { |
| 50 | 50 | { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } |
| 51 | 51 | }; |
| r1438 | r1439 | |
|---|---|---|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /* two colours */ |
| 22 | static unsigned short nc_colour_table[NC_NUM_COLOURS] = | |
| 22 | static const unsigned short nc_colour_table[NC_NUM_COLOURS] = | |
| 23 | 23 | { |
| 24 | 24 | 0, 1,2,3 |
| 25 | 25 | }; |
| r1438 | r1439 | |
|---|---|---|
| 88 | 88 | |
| 89 | 89 | /* Normal Character Set */ |
| 90 | 90 | |
| 91 | static char teletext_saa5050_characters[96*60]={ | |
| 91 | static const char teletext_saa5050_characters[96*60]={ | |
| 92 | 92 | // 0x20 ' ' |
| 93 | 93 | 0,0,0,0,0,0, |
| 94 | 94 | 0,0,0,0,0,0, |
| r1438 | r1439 | |
| 1150 | 1150 | |
| 1151 | 1151 | /* Graphics Character Set */ |
| 1152 | 1152 | |
| 1153 | static char teletext_graphics[96*60]={ | |
| 1153 | static const char teletext_graphics[96*60]={ | |
| 1154 | 1154 | // 0x20 |
| 1155 | 1155 | 0,0,0,0,0,0, |
| 1156 | 1156 | 0,0,0,0,0,0, |
| r1438 | r1439 | |
| 2211 | 2211 | |
| 2212 | 2212 | /* Separated Graphics Character Set */ |
| 2213 | 2213 | |
| 2214 | static char teletext_separated_graphics[96*60]={ | |
| 2214 | static const char teletext_separated_graphics[96*60]={ | |
| 2215 | 2215 | // Character ' ' (32) |
| 2216 | 2216 | 0,0,0,0,0,0, |
| 2217 | 2217 | 0,0,0,0,0,0, |
| r1438 | r1439 | |
| 3369 | 3369 | static int teletext_data; |
| 3370 | 3370 | static int teletext_LOSE; |
| 3371 | 3371 | |
| 3372 | static char *tt_lookup=teletext_saa5050_characters; | |
| 3373 | static char *tt_graphics=teletext_graphics; | |
| 3372 | static const char *tt_lookup=teletext_saa5050_characters; | |
| 3373 | static const char *tt_graphics=teletext_graphics; | |
| 3374 | 3374 | static int tt_colour=7; |
| 3375 | 3375 | static int tt_rcolour; |
| 3376 | 3376 | static int tt_bgcolour=0; |
| r1438 | r1439 | |
|---|---|---|
| 3 | 3 | |
| 4 | 4 | The only difference is that the US # character is a Pound character in UK. |
| 5 | 5 | */ |
| 6 | static unsigned char US_key_translate[4][91] = | |
| 6 | static const unsigned char US_key_translate[4][91] = | |
| 7 | 7 | { |
| 8 | 8 | { /* lower case */ |
| 9 | 9 | 0x92, |
| r1438 | r1439 | |
| 451 | 451 | /* |
| 452 | 452 | key translation table for French terminals |
| 453 | 453 | */ |
| 454 | static unsigned char French_key_translate[4][91] = | |
| 454 | static const unsigned char French_key_translate[4][91] = | |
| 455 | 455 | { |
| 456 | 456 | { /* lower case */ |
| 457 | 457 | 0x92, |
| r1438 | r1439 | |
| 899 | 899 | /* |
| 900 | 900 | key translation table for German terminals |
| 901 | 901 | */ |
| 902 | static unsigned char German_key_translate[4][91] = | |
| 902 | static const unsigned char German_key_translate[4][91] = | |
| 903 | 903 | { |
| 904 | 904 | { /* lower case */ |
| 905 | 905 | 0x92, |
| r1438 | r1439 | |
| 1347 | 1347 | /* |
| 1348 | 1348 | key translation table for Swedish/Finnish terminals |
| 1349 | 1349 | */ |
| 1350 | static unsigned char Swedish_key_translate[4][91] = | |
| 1350 | static const unsigned char Swedish_key_translate[4][91] = | |
| 1351 | 1351 | { |
| 1352 | 1352 | { /* lower case */ |
| 1353 | 1353 | 0x92, |
| r1438 | r1439 | |
| 1795 | 1795 | /* |
| 1796 | 1796 | key translation table for Norwegian/Danish terminals |
| 1797 | 1797 | */ |
| 1798 | static unsigned char Norwegian_key_translate[4][91] = | |
| 1798 | static const unsigned char Norwegian_key_translate[4][91] = | |
| 1799 | 1799 | { |
| 1800 | 1800 | { /* lower case */ |
| 1801 | 1801 | 0x92, |
| r1438 | r1439 | |
| 2243 | 2243 | /* |
| 2244 | 2244 | key translation table for Japanese katakana terminals |
| 2245 | 2245 | */ |
| 2246 | static unsigned char Japanese_key_translate[6][91] = | |
| 2246 | static const unsigned char Japanese_key_translate[6][91] = | |
| 2247 | 2247 | { |
| 2248 | 2248 | { /* lower case */ |
| 2249 | 2249 | 0x92, |
| r1438 | r1439 | |
| 2912 | 2912 | /* |
| 2913 | 2913 | key translation table for Arabic terminals |
| 2914 | 2914 | */ |
| 2915 | static unsigned char Arabic_key_translate[6][91] = | |
| 2915 | static const unsigned char Arabic_key_translate[6][91] = | |
| 2916 | 2916 | { |
| 2917 | 2917 | { /* lower case */ |
| 2918 | 2918 | 0x92, |
| r1438 | r1439 | |
| 3581 | 3581 | /* |
| 3582 | 3582 | key translation table for French word-processing terminals |
| 3583 | 3583 | */ |
| 3584 | static unsigned char FrenchWP_key_translate[4][91] = | |
| 3584 | static const unsigned char FrenchWP_key_translate[4][91] = | |
| 3585 | 3585 | { |
| 3586 | 3586 | { /* lower case */ |
| 3587 | 3587 | 0x92, |
| r1438 | r1439 | |
|---|---|---|
| 11 | 11 | 203d: 0 BUSY, 1 PRINT, 3 JAPAN, 4 SMALL, 5 SHIFT, 6 DEF |
| 12 | 12 | 207c: 1 DEF 1 RAD 2 GRAD 5 ERROR 6 FLAG */ |
| 13 | 13 | |
| 14 | static unsigned char pocketc_palette[] = | |
| 14 | static const unsigned char pocketc_palette[] = | |
| 15 | 15 | { |
| 16 | 16 | 99,107,99, |
| 17 | 17 | 94,111,103, |
| r1438 | r1439 | |
| 21 | 21 | 0, 0, 0 |
| 22 | 22 | }; |
| 23 | 23 | |
| 24 | unsigned short pocketc_colortable[8][2] = { | |
| 24 | const unsigned short pocketc_colortable[8][2] = { | |
| 25 | 25 | { 0, 4 }, |
| 26 | 26 | { 0, 4 }, |
| 27 | 27 | { 0, 4 }, |
| r1438 | r1439 | |
|---|---|---|
| 101 | 101 | static TIMER_CALLBACK(gb_lcd_timer_proc); |
| 102 | 102 | static void gb_lcd_switch_on( void ); |
| 103 | 103 | |
| 104 | static unsigned char palette[] = | |
| 104 | static const unsigned char palette[] = | |
| 105 | 105 | { |
| 106 | 106 | /* Simple black and white palette */ |
| 107 | 107 | /* 0xFF,0xFF,0xFF, |
| r1438 | r1439 | |
| 122 | 122 | 0x41,0x41,0x41, /* Dark */ |
| 123 | 123 | }; |
| 124 | 124 | |
| 125 | static unsigned char palette_megaduck[] = { | |
| 125 | static const unsigned char palette_megaduck[] = { | |
| 126 | 126 | 0x6B, 0xA6, 0x4A, 0x43, 0x7A, 0x63, 0x25, 0x59, 0x55, 0x12, 0x42, 0x4C |
| 127 | 127 | }; |
| 128 | 128 |
| r1438 | r1439 | |
|---|---|---|
| 23 | 23 | ***************************************************************************/ |
| 24 | 24 | |
| 25 | 25 | /* two colours */ |
| 26 | static unsigned short z88_colour_table[Z88_NUM_COLOURS] = | |
| 26 | static const unsigned short z88_colour_table[Z88_NUM_COLOURS] = | |
| 27 | 27 | { |
| 28 | 28 | 0, 1, 2 |
| 29 | 29 | }; |
| r1438 | r1439 | |
|---|---|---|
| 6 | 6 | int pcw16_video_control; |
| 7 | 7 | |
| 8 | 8 | /* 16 colours, + 1 for border */ |
| 9 | static unsigned short pcw16_colour_table[PCW16_NUM_COLOURS] = | |
| 9 | static const unsigned short pcw16_colour_table[PCW16_NUM_COLOURS] = | |
| 10 | 10 | { |
| 11 | 11 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 12 | 12 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, |
| r1438 | r1439 | |
|---|---|---|
| 1 | 1 | /* Normal Character Set */ |
| 2 | 2 | |
| 3 | static char teletext_characters[96*60]={ | |
| 3 | static const char teletext_characters[96*60]={ | |
| 4 | 4 | // 0x20 ' ' |
| 5 | 5 | 0,0,0,0,0,0, |
| 6 | 6 | 0,0,0,0,0,0, |
| r1438 | r1439 | |
| 1062 | 1062 | |
| 1063 | 1063 | /* Graphics Character Set */ |
| 1064 | 1064 | |
| 1065 | static char teletext_graphics[96*60]={ | |
| 1065 | static const char teletext_graphics[96*60]={ | |
| 1066 | 1066 | // 0x20 |
| 1067 | 1067 | 0,0,0,0,0,0, |
| 1068 | 1068 | 0,0,0,0,0,0, |
| r1438 | r1439 | |
| 2123 | 2123 | |
| 2124 | 2124 | /* Separated Graphics Character Set */ |
| 2125 | 2125 | |
| 2126 | static char teletext_separated_graphics[96*60]={ | |
| 2126 | static const char teletext_separated_graphics[96*60]={ | |
| 2127 | 2127 | // Character ' ' (32) |
| 2128 | 2128 | 0,0,0,0,0,0, |
| 2129 | 2129 | 0,0,0,0,0,0, |
| r1438 | r1439 | |
|---|---|---|
| 44 | 44 | /* the mapping doesn't change - EP uses 0..256 index's for |
| 45 | 45 | colour specification - don't know if I require this for the |
| 46 | 46 | driver or not. */ |
| 47 | static unsigned short nick_colour_table[256]= | |
| 47 | static const unsigned short nick_colour_table[256]= | |
| 48 | 48 | { |
| 49 | 49 | 0,1,2,3,4,5,6,7,8, |
| 50 | 50 | 9,10,11,12,13,14,15,16, |
| r1438 | r1439 | |
|---|---|---|
| 32 | 32 | static WRITE8_HANDLER ( v_via_ca2_w ); |
| 33 | 33 | static WRITE8_HANDLER ( v_via_cb2_w ); |
| 34 | 34 | |
| 35 | static struct via6522_interface vectrex_via6522_interface = | |
| 35 | static const struct via6522_interface vectrex_via6522_interface = | |
| 36 | 36 | { |
| 37 | 37 | v_via_pa_r, v_via_pb_r, /* read PA/B */ |
| 38 | 38 | 0, 0, 0, 0, /* read ca1, cb1, ca2, cb2 */ |
| r1438 | r1439 | |
| 444 | 444 | |
| 445 | 445 | *****************************************************************/ |
| 446 | 446 | |
| 447 | static struct via6522_interface spectrum1_via6522_interface = | |
| 447 | static const struct via6522_interface spectrum1_via6522_interface = | |
| 448 | 448 | { |
| 449 | 449 | /*inputs : A/B,CA/B1,CA/B2 */ v_via_pa_r, s1_via_pb_r, 0, 0, 0, 0, |
| 450 | 450 | /*outputs: A/B,CA/B1,CA/B2 */ v_via_pa_w, v_via_pb_w, 0, 0, v_via_ca2_w, v_via_cb2_w, |
| r1438 | r1439 | |
|---|---|---|
| 13 | 13 | #include "video/generic.h" |
| 14 | 14 | #include "includes/pmd85.h" |
| 15 | 15 | |
| 16 | unsigned char pmd85_palette[3*3] = | |
| 16 | const unsigned char pmd85_palette[3*3] = | |
| 17 | 17 | { |
| 18 | 18 | 0x00, 0x00, 0x00, |
| 19 | 19 | 0x7f, 0x7f, 0x7f, |
| 20 | 20 | 0xff, 0xff, 0xff |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | unsigned short pmd85_colortable[1][3] ={ | |
| 23 | const unsigned short pmd85_colortable[1][3] ={ | |
| 24 | 24 | { 0, 1, 2 } |
| 25 | 25 | }; |
| 26 | 26 |
| r1438 | r1439 | |
|---|---|---|
| 6 | 6 | static int abc80_bank; |
| 7 | 7 | static int abc80_row; |
| 8 | 8 | |
| 9 | static unsigned short abc80_colortable[] = | |
| 9 | static const unsigned short abc80_colortable[] = | |
| 10 | 10 | { |
| 11 | 11 | 0x00, 0x01, |
| 12 | 12 | 0x01, 0x00, |
| r1438 | r1439 | |
|---|---|---|
| 13 | 13 | #include "includes/lviv.h" |
| 14 | 14 | #include "mslegacy.h" |
| 15 | 15 | |
| 16 | unsigned char lviv_palette[8*3] = | |
| 16 | const unsigned char lviv_palette[8*3] = | |
| 17 | 17 | { |
| 18 | 18 | 0x00, 0x00, 0x00, |
| 19 | 19 | 0x00, 0x00, 0xa4, |
| r1438 | r1439 | |
|---|---|---|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /* two colours */ |
| 23 | static unsigned short exidy_colour_table[EXIDY_NUM_COLOURS] = | |
| 23 | static const unsigned short exidy_colour_table[EXIDY_NUM_COLOURS] = | |
| 24 | 24 | { |
| 25 | 25 | 0, 1 |
| 26 | 26 | }; |
| 27 | 27 | |
| 28 | 28 | /* black/white */ |
| 29 | static unsigned char exidy_palette[EXIDY_NUM_COLOURS * 3] = | |
| 29 | static const unsigned char exidy_palette[EXIDY_NUM_COLOURS * 3] = | |
| 30 | 30 | { |
| 31 | 31 | 0x000, 0x000, 0x000, |
| 32 | 32 | 0x0ff, 0x0ff, 0x0ff |
| r1438 | r1439 | |
|---|---|---|
| 28 | 28 | extern unsigned char pcw_vdu_video_control_register; |
| 29 | 29 | |
| 30 | 30 | /* two colours */ |
| 31 | static unsigned short pcw_colour_table[PCW_NUM_COLOURS] = | |
| 31 | static const unsigned short pcw_colour_table[PCW_NUM_COLOURS] = | |
| 32 | 32 | { |
| 33 | 33 | 0, 1 |
| 34 | 34 | }; |
| r1438 | r1439 | |
|---|---|---|
| 14 | 14 | #define VIC3_BITPLANE_IADDR(x) ( x&1 ? VIC3_BITPLANE_IADDR_HELPER(x)+0x10000 \ |
| 15 | 15 | : VIC3_BITPLANE_IADDR_HELPER(x) ) |
| 16 | 16 | |
| 17 | unsigned char vic3_palette[0x100*3]={0}; | |
| 17 | const unsigned char vic3_palette[0x100*3]={0}; | |
| 18 | 18 | |
| 19 | 19 | static struct { |
| 20 | 20 | struct { |
| r1438 | r1439 | |
|---|---|---|
| 7 | 7 | UINT8 channelf_row_reg = 0; |
| 8 | 8 | UINT8 channelf_col_reg = 0; |
| 9 | 9 | |
| 10 | static UINT8 channelf_palette[] = { | |
| 10 | static const UINT8 channelf_palette[] = { | |
| 11 | 11 | 0x00, 0x00, 0x00, /* black */ |
| 12 | 12 | 0xff, 0xff, 0xff, /* white */ |
| 13 | 13 | 0xff, 0x00, 0x00, /* red */ |
| r1438 | r1439 | |
|---|---|---|
| 21 | 21 | #define MDA_LOG(n,m,a) |
| 22 | 22 | #endif |
| 23 | 23 | |
| 24 | unsigned char mda_palette[4][3] = { | |
| 24 | const unsigned char mda_palette[4][3] = { | |
| 25 | 25 | { 0x00,0x00,0x00 }, |
| 26 | 26 | { 0x00,0x55,0x00 }, |
| 27 | 27 | { 0x00,0xaa,0x00 }, |
| 28 | 28 | { 0x00,0xff,0x00 } |
| 29 | 29 | }; |
| 30 | 30 | |
| 31 | gfx_layout pc_mda_charlayout = | |
| 31 | const gfx_layout pc_mda_charlayout = | |
| 32 | 32 | { |
| 33 | 33 | 9,32, /* 9 x 32 characters (9 x 15 is the default, but..) */ |
| 34 | 34 | 256, /* 256 characters */ |
| r1438 | r1439 | |
| 55 | 55 | (maximal 4 colors) |
| 56 | 56 | PC200 uses different attributes from IBM. |
| 57 | 57 | */ |
| 58 | unsigned short mda_colortable[] = | |
| 58 | const unsigned short mda_colortable[] = | |
| 59 | 59 | { |
| 60 | 60 | 0, 0, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 0, 0,10, 0,10, 0,10, 0,10, 0,10, 0,10, 0,10, |
| 61 | 61 | 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0,10, 0,10, 0,10, 0,10, 0,10, 0,10, 0,10, 0,10, |
| r1438 | r1439 | |
| 148 | 148 | dirtybuffer[cursor->pos*2]=1; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | static struct mscrtc6845_config config= { 14318180 /*?*/, pc_mda_cursor }; | |
| 151 | static const struct mscrtc6845_config config= { 14318180 /*?*/, pc_mda_cursor }; | |
| 152 | 152 | |
| 153 | 153 | |
| 154 | 154 | /* This code seems to go through hoops to accomodate differing GfxElement |
| r1438 | r1439 | |
|---|---|---|
| 9 | 9 | * |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | unsigned char cga_palette[1328][3] = | |
| 12 | const unsigned char cga_palette[1328][3] = | |
| 13 | 13 | { |
| 14 | 14 | /* RGB colours */ |
| 15 | 15 | { 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0xaa }, { 0x00, 0xaa, 0x00 }, { 0x00, 0xaa, 0xaa }, |
| r1438 | r1439 | |
|---|---|---|
| 17 | 17 | WRITE8_HANDLER ( pc_MDA_w ); |
| 18 | 18 | READ8_HANDLER ( pc_MDA_r ); |
| 19 | 19 | |
| 20 | extern unsigned char mda_palette[4][3]; | |
| 21 | extern gfx_layout pc_mda_charlayout; | |
| 22 | extern gfx_layout pc_mda_gfxlayout_1bpp; | |
| 20 | extern const unsigned char mda_palette[4][3]; | |
| 21 | extern const gfx_layout pc_mda_charlayout; | |
| 22 | extern const gfx_layout pc_mda_gfxlayout_1bpp; | |
| 23 | 23 | GFXDECODE_EXTERN( pc_mda_gfxdecodeinfo ); |
| 24 | extern unsigned short mda_colortable[256*2+1*2]; | |
| 24 | extern const unsigned short mda_colortable[256*2+1*2]; | |
| 25 | 25 | |
| 26 | 26 | PALETTE_INIT( pc_mda ); |
| 27 | 27 |
| r1438 | r1439 | |
|---|---|---|
| 33 | 33 | |
| 34 | 34 | **************************************************************************/ |
| 35 | 35 | |
| 36 | static unsigned short pcjr_colortable[] = | |
| 36 | static const unsigned short pcjr_colortable[] = | |
| 37 | 37 | { |
| 38 | 38 | 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0,10, 0,11, 0,12, 0,13, 0,14, 0,15, |
| 39 | 39 | 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1,10, 1,11, 1,12, 1,13, 1,14, 1,15, |
| r1438 | r1439 | |
| 214 | 214 | dirtybuffer[cursor->pos*2] = 1; |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | static struct mscrtc6845_config config= { 14318180 /*?*/, pc_t1t_cursor }; | |
| 217 | static const struct mscrtc6845_config config= { 14318180 /*?*/, pc_t1t_cursor }; | |
| 218 | 218 | |
| 219 | 219 | |
| 220 | 220 | static VIDEO_START( pc_t1t ) |
| r1438 | r1439 | |
|---|---|---|
| 57 | 57 | black gray orange yellow dardgrey vio red lgreen |
| 58 | 58 | lred lgray brown blue white green cyan lblue |
| 59 | 59 | */ |
| 60 | unsigned char vdc8563_palette[] = | |
| 60 | const unsigned char vdc8563_palette[] = | |
| 61 | 61 | { |
| 62 | 62 | #if 0 |
| 63 | 63 | 0x00, 0x00, 0x00, /* black */ |
| r1438 | r1439 | |
|---|---|---|
| 10 | 10 | static pc_video_update_proc pc_aga_choosevideomode(int *width, int *height, struct mscrtc6845 *crtc); |
| 11 | 11 | |
| 12 | 12 | |
| 13 | gfx_layout europc_cga_charlayout = | |
| 13 | const gfx_layout europc_cga_charlayout = | |
| 14 | 14 | { |
| 15 | 15 | 8,16, /* 8 x 32 characters */ |
| 16 | 16 | 256, /* 256 characters */ |
| r1438 | r1439 | |
| 26 | 26 | 8*16 /* every char takes 8 bytes */ |
| 27 | 27 | }; |
| 28 | 28 | |
| 29 | gfx_layout europc_mda_charlayout = | |
| 29 | const gfx_layout europc_mda_charlayout = | |
| 30 | 30 | { |
| 31 | 31 | 9,32, /* 9 x 32 characters (9 x 15 is the default, but..) */ |
| 32 | 32 | 256, /* 256 characters */ |
| r1438 | r1439 | |
| 44 | 44 | 8*16 |
| 45 | 45 | }; |
| 46 | 46 | |
| 47 | static gfx_layout pc200_mda_charlayout = | |
| 47 | static const gfx_layout pc200_mda_charlayout = | |
| 48 | 48 | { |
| 49 | 49 | 9,32, /* 9 x 32 characters (9 x 15 is the default, but..) */ |
| 50 | 50 | 256, /* 256 characters */ |
| r1438 | r1439 | |
| 60 | 60 | 8*16 /* every char takes 8 bytes (upper half) */ |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | static gfx_layout pc200_cga_charlayout = | |
| 63 | static const gfx_layout pc200_cga_charlayout = | |
| 64 | 64 | { |
| 65 | 65 | 8,16, /* 8 x 16 characters */ |
| 66 | 66 | 256, /* 256 characters */ |
| r1438 | r1439 | |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | |
| 203 | static struct mscrtc6845_config config= { 14318180 /*?*/, pc_aga_cursor }; | |
| 203 | static const struct mscrtc6845_config config= { 14318180 /*?*/, pc_aga_cursor }; | |
| 204 | 204 | |
| 205 | 205 | VIDEO_START( pc_aga ) |
| 206 | 206 | { |
| r1438 | r1439 | |
|---|---|---|
| 91 | 91 | ***************************************************************************/ |
| 92 | 92 | |
| 93 | 93 | /* In cgapal.c; it's quite big */ |
| 94 | extern unsigned char cga_palette[16 * CGA_PALETTE_SETS][3]; | |
| 94 | extern const unsigned char cga_palette[16 * CGA_PALETTE_SETS][3]; | |
| 95 | 95 | |
| 96 | 96 | |
| 97 | unsigned short cga_colortable[] = | |
| 97 | const unsigned short cga_colortable[] = | |
| 98 | 98 | { |
| 99 | 99 | /* Text modes */ |
| 100 | 100 | 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0,10, 0,11, 0,12, 0,13, 0,14, 0,15, |
| r1438 | r1439 | |
| 148 | 148 | 12,11,12,15, 13,11,12,15, 14,11,12,15, 15,11,12,15, |
| 149 | 149 | }; |
| 150 | 150 | |
| 151 | gfx_layout CGA_charlayout = | |
| 151 | const gfx_layout CGA_charlayout = | |
| 152 | 152 | { |
| 153 | 153 | 8,16, /* 8 x 16 characters */ |
| 154 | 154 | 256, /* 256 characters */ |
| r1438 | r1439 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | #include "driver.h" |
| 22 | 22 | |
| 23 | extern gfx_layout europc_cga_charlayout; | |
| 24 | extern gfx_layout europc_mda_charlayout; | |
| 23 | extern const gfx_layout europc_cga_charlayout; | |
| 24 | extern const gfx_layout europc_mda_charlayout; | |
| 25 | 25 | GFXDECODE_EXTERN( europc_gfxdecodeinfo ); |
| 26 | 26 | GFXDECODE_EXTERN( aga_gfxdecodeinfo ); |
| 27 | 27 |
| r1438 | r1439 | |
|---|---|---|
| 5 | 5 | #define CGA_PALETTE_SETS 83 /* one for colour, one for mono, |
| 6 | 6 | * 81 for colour composite */ |
| 7 | 7 | |
| 8 | extern unsigned char cga_palette[CGA_PALETTE_SETS * 16][3]; | |
| 9 | extern unsigned short cga_colortable[256*2 + 16*2 + 96*4]; | |
| 10 | extern gfx_layout CGA_charlayout; | |
| 11 | extern gfx_layout CGA_gfxlayout_1bpp; | |
| 12 | extern gfx_layout CGA_gfxlayout_2bpp; | |
| 8 | extern const unsigned char cga_palette[CGA_PALETTE_SETS * 16][3]; | |
| 9 | extern const unsigned short cga_colortable[256*2 + 16*2 + 96*4]; | |
| 10 | extern const gfx_layout CGA_charlayout; | |
| 11 | extern const gfx_layout CGA_gfxlayout_1bpp; | |
| 12 | extern const gfx_layout CGA_gfxlayout_2bpp; | |
| 13 | 13 | |
| 14 | 14 | MACHINE_DRIVER_EXTERN( pcvideo_cga ); |
| 15 | 15 |
| r1438 | r1439 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | static CDP1864_VIDEO_CONFIG cdp1864; |
| 24 | 24 | |
| 25 | static int cdp1864_bgcolseq[] = { 2, 0, 1, 4 }; | |
| 25 | static const int cdp1864_bgcolseq[] = { 2, 0, 1, 4 }; | |
| 26 | 26 | |
| 27 | 27 | int cdp1864_efx; |
| 28 | 28 |
| r1438 | r1439 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | UINT8 ssystem3_led[5]= {0}; |
| 12 | 12 | |
| 13 | static unsigned char ssystem3_palette[] = | |
| 13 | static const unsigned char ssystem3_palette[] = | |
| 14 | 14 | { |
| 15 | 15 | 0,12,12, |
| 16 | 16 | 80,82,75, |
| 17 | 17 | 0,12,12 |
| 18 | 18 | }; |
| 19 | 19 | |
| 20 | static unsigned short ssystem3_colortable[1][2] = { | |
| 20 | static const unsigned short ssystem3_colortable[1][2] = { | |
| 21 | 21 | { 0, 1 }, |
| 22 | 22 | }; |
| 23 | 23 |
| r1438 | r1439 | |
|---|---|---|
| 40 | 40 | static UINT32 vtech1_palette_mono[16]; |
| 41 | 41 | |
| 42 | 42 | /* note - Juergen's colors do not match the colors in the m6847 code */ |
| 43 | static UINT8 vtech1_palette[] = | |
| 43 | static const UINT8 vtech1_palette[] = | |
| 44 | 44 | { |
| 45 | 45 | 0, 224, 0, /* green */ |
| 46 | 46 | 208, 255, 0, /* yellow (greenish) */ |
| r1438 | r1439 | |
|---|---|---|
| 1057 | 1057 | } |
| 1058 | 1058 | /* The cursor is not used on Amstrad. The CURSOR signal is available on the Expansion port for other hardware to use. */ |
| 1059 | 1059 | |
| 1060 | static struct m6845_interface amstrad6845= { | |
| 1060 | static const struct m6845_interface amstrad6845= { | |
| 1061 | 1061 | amstrad_Set_MA, // Memory Address register |
| 1062 | 1062 | amstrad_Set_RA, // Row Address register |
| 1063 | 1063 | amstrad_Set_HS, // Horizontal status |
| r1438 | r1439 | |
|---|---|---|
| 45 | 45 | 8 * 8 |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | static UINT8 pointermask[] = | |
| 48 | static const UINT8 pointermask[] = | |
| 49 | 49 | { |
| 50 | 50 | 0x00, 0x70, 0x60, 0x50, 0x08, 0x04, 0x00, 0x00, /* blackmask */ |
| 51 | 51 | 0xf0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00 /* whitemask */ |
| r1438 | r1439 | |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | /* two colours */ |
| 142 | static unsigned short avigo_colour_table[AVIGO_NUM_COLOURS] = | |
| 142 | static const unsigned short avigo_colour_table[AVIGO_NUM_COLOURS] = | |
| 143 | 143 | { |
| 144 | 144 | 0, 1 |
| 145 | 145 | }; |
| 146 | 146 | |
| 147 | 147 | /* black/white */ |
| 148 | static unsigned char avigo_palette[AVIGO_NUM_COLOURS * 3] = | |
| 148 | static const unsigned char avigo_palette[AVIGO_NUM_COLOURS * 3] = | |
| 149 | 149 | { |
| 150 | 150 | 0x0ff, 0x0ff, 0x0ff, |
| 151 | 151 | 0x000, 0x000, 0x000 |
| r1438 | r1439 | |
|---|---|---|
| 155 | 155 | #define FOREGROUNDCOLOR (vic2.reg[0x24]&0xf) |
| 156 | 156 | #define FRAMECOLOR (vic2.reg[0x20]&0xf) |
| 157 | 157 | |
| 158 | unsigned char vic2_palette[] = | |
| 158 | const unsigned char vic2_palette[] = | |
| 159 | 159 | { |
| 160 | 160 | /* black, white, red, cyan */ |
| 161 | 161 | /* purple, green, blue, yellow */ |
| r1438 | r1439 | |
|---|---|---|
| 77 | 77 | /* Special translation if video RAM with only 7 bits is present |
| 78 | 78 | * I don't know if it's entirely correct, but it's close ;-) |
| 79 | 79 | */ |
| 80 | static UINT8 translate_videoram[2][256] = { | |
| 80 | static const UINT8 translate_videoram[2][256] = { | |
| 81 | 81 | { |
| 82 | 82 | 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, |
| 83 | 83 | 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f, |
| r1438 | r1439 | |
|---|---|---|
| 18 | 18 | light back / grid colors |
| 19 | 19 | black, blue, green, light green, red, violet, orange, light grey */ |
| 20 | 20 | |
| 21 | UINT8 odyssey2_colors[] = | |
| 21 | const UINT8 odyssey2_colors[] = | |
| 22 | 22 | { |
| 23 | 23 | /* Background,Grid Dim */ |
| 24 | 24 | 0x00,0x00,0x00, |
| r1438 | r1439 | |
| 51 | 51 | 0xff,0xff,0xff /* White */ |
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | static UINT8 o2_shape[0x40][8]={ | |
| 54 | static const UINT8 o2_shape[0x40][8]={ | |
| 55 | 55 | { 0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00 }, // 0 |
| 56 | 56 | { 0x18,0x38,0x18,0x18,0x18,0x18,0x3C,0x00 }, |
| 57 | 57 | { 0x3C,0x66,0x0C,0x18,0x30,0x60,0x7E,0x00 }, |
| r1438 | r1439 | |
|---|---|---|
| 15 | 15 | |
| 16 | 16 | UINT16 primo_video_memory_base; |
| 17 | 17 | |
| 18 | unsigned char primo_palette[2*3] = | |
| 18 | const unsigned char primo_palette[2*3] = | |
| 19 | 19 | { |
| 20 | 20 | 0x00, 0x00, 0x00, |
| 21 | 21 | 0xff, 0xff, 0xff |
| 22 | 22 | }; |
| 23 | 23 | |
| 24 | unsigned short primo_colortable[1][2] = | |
| 24 | const unsigned short primo_colortable[1][2] = | |
| 25 | 25 | { |
| 26 | 26 | { 0, 1 } |
| 27 | 27 | }; |
| r1438 | r1439 | |
|---|---|---|
| 61 | 61 | #define TMS3556_MODE_BITMAP 2 |
| 62 | 62 | #define TMS3556_MODE_MIXED 3 |
| 63 | 63 | |
| 64 | /*static const char *tms3556_mode_names[] = { "DISPLAY OFF", "TEXT", "GRAPHIC", "MIXED" };*/ | |
| 64 | /*static const char *const tms3556_mode_names[] = { "DISPLAY OFF", "TEXT", "GRAPHIC", "MIXED" };*/ | |
| 65 | 65 | |
| 66 | 66 | static PALETTE_INIT(tms3556); |
| 67 | 67 | static VIDEO_UPDATE(tms3556); |
| r1438 | r1439 | |
|---|---|---|
| 31 | 31 | |
| 32 | 32 | static UINT8 * ti85_frames; |
| 33 | 33 | |
| 34 | unsigned char ti85_palette[32*7][3] = | |
| 34 | const unsigned char ti85_palette[32*7][3] = | |
| 35 | 35 | { |
| 36 | 36 | { 0xae, 0xcd, 0xb0 }, { 0xaa, 0xc9, 0xae }, { 0xa6, 0xc5, 0xad }, { 0xa3, 0xc1, 0xab }, { 0x9f, 0xbd, 0xaa }, { 0x9b, 0xb9, 0xa8 }, { 0x98, 0xb5, 0xa7 }, //0x00 |
| 37 | 37 | { 0xae, 0xcd, 0xb0 }, { 0xa9, 0xc8, 0xae }, { 0xa4, 0xc3, 0xac }, { 0xa0, 0xbe, 0xaa }, { 0x9b, 0xb9, 0xa8 }, { 0x96, 0xb4, 0xa6 }, { 0x92, 0xaf, 0xa4 }, //0x01 |
| r1438 | r1439 | |
| 67 | 67 | { 0x57, 0x74, 0x8c }, { 0x56, 0x73, 0x8b }, { 0x55, 0x72, 0x8b }, { 0x55, 0x71, 0x8b }, { 0x54, 0x70, 0x8a }, { 0x53, 0x6f, 0x8a }, { 0x53, 0x6f, 0x8a } //0x1f |
| 68 | 68 | }; |
| 69 | 69 | |
| 70 | unsigned short ti85_colortable[32][7] = | |
| 70 | const unsigned short ti85_colortable[32][7] = | |
| 71 | 71 | { |
| 72 | 72 | { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 }, |
| 73 | 73 | { 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d }, |
| r1438 | r1439 | |
|---|---|---|
| 431 | 431 | #define MULTICOLOR2 (ted7360[0x18]&0x7f) |
| 432 | 432 | #define FRAMECOLOR (ted7360[0x19]&0x7f) |
| 433 | 433 | |
| 434 | unsigned char ted7360_palette[] = | |
| 434 | const unsigned char ted7360_palette[] = | |
| 435 | 435 | { |
| 436 | 436 | /* black, white, red, cyan */ |
| 437 | 437 | /* purple, green, blue, yellow */ |
| r1438 | r1439 | |
| 480 | 480 | 0xd1, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xed, 0xff, 0xbc |
| 481 | 481 | }; |
| 482 | 482 | |
| 483 | struct CustomSound_interface ted7360_sound_interface = | |
| 483 | const struct CustomSound_interface ted7360_sound_interface = | |
| 484 | 484 | { |
| 485 | 485 | ted7360_custom_start |
| 486 | 486 | }; |
| r1438 | r1439 | |
| 522 | 522 | 8 * 8 |
| 523 | 523 | }; |
| 524 | 524 | |
| 525 | static UINT8 cursormask[] = | |
| 525 | static const UINT8 cursormask[] = | |
| 526 | 526 | {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; |
| 527 | 527 | static gfx_element *cursorelement; |
| 528 | 528 |
| r1438 | r1439 | |
|---|---|---|
| 74 | 74 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_lolayout, 0, 128 ) |
| 75 | 75 | GFXDECODE_END |
| 76 | 76 | |
| 77 | static | |
| 77 | static const | |
| 78 | 78 | { |
| 79 | 79 | 0x00, 0x00, 0x00, /* black */ |
| 80 | 80 | 0xff, 0x00, 0x00, /* red */ |
| r1438 | r1439 | |
| 86 | 86 | 0xff, 0xff, 0xff /* white */ |
| 87 | 87 | }; |
| 88 | 88 | |
| 89 | static | |
| 89 | static cons | |
| 90 | 90 | { |
| 91 | 91 | 0,1, 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, |
| 92 | 92 | 1,0, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7, |
| r1438 | r1439 | |
|---|---|---|
| 79 | 79 | AM_enint_mask = 1 << 6 |
| 80 | 80 | }; |
| 81 | 81 | |
| 82 | static unsigned char asr_palette[asr733_palette_size*3] = | |
| 82 | static const unsigned char asr_palette[asr733_palette_size*3] = | |
| 83 | 83 | { |
| 84 | 84 | 255, 255, 255, |
| 85 | 85 | 0, 0, 0 |
| 86 | 86 | }; |
| 87 | 87 | |
| 88 | static unsigned short asr_colortable[asr733_colortable_size] = | |
| 88 | static const unsigned short asr_colortable[asr733_colortable_size] = | |
| 89 | 89 | { |
| 90 | 90 | 0, 1 |
| 91 | 91 | }; |
| r1438 | r1439 | |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | |
| 437 | static unsigned char key_translate[3][51] = | |
| 437 | static const unsigned char key_translate[3][51] = | |
| 438 | 438 | { |
| 439 | 439 | { /* unshifted */ |
| 440 | 440 | '1', |
| r1438 | r1439 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | static int horizontal_pos = 0x0b; |
| 16 | 16 | |
| 17 | gfx_layout galaxy_charlayout = | |
| 17 | const gfx_layout galaxy_charlayout = | |
| 18 | 18 | { |
| 19 | 19 | 8, 13, /* 8x8 characters */ |
| 20 | 20 | 128, /* 128 characters */ |
| r1438 | r1439 | |
| 27 | 27 | 8 /* each character takes 1 consecutive byte */ |
| 28 | 28 | }; |
| 29 | 29 | |
| 30 | unsigned char galaxy_palette[2*3] = | |
| 30 | const unsigned char galaxy_palette[2*3] = | |
| 31 | 31 | { |
| 32 | 32 | 0xff, 0xff, 0xff, /* White */ |
| 33 | 33 | 0x00, 0x00, 0x00 /* Black */ |
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | unsigned short galaxy_colortable[1][2] = | |
| 36 | const unsigned short galaxy_colortable[1][2] = | |
| 37 | 37 | { |
| 38 | 38 | {0, 1} |
| 39 | 39 | }; |
| r1438 | r1439 | |
|---|---|---|
| 247 | 247 | static int videoULA_teletext_normal_select; |
| 248 | 248 | static int videoULA_flash_colour_select; |
| 249 | 249 | |
| 250 | static int pixels_per_byte_set[8]={ 2,4,8,16,1,2,4,8 }; | |
| 250 | static const int pixels_per_byte_set[8]={ 2,4,8,16,1,2,4,8 }; | |
| 251 | 251 | static int pixels_per_byte; |
| 252 | 252 | |
| 253 | static int emulation_pixels_per_real_pixel_set[4]={ 8,4,2,1 }; | |
| 253 | static const int emulation_pixels_per_real_pixel_set[4]={ 8,4,2,1 }; | |
| 254 | 254 | static int emulation_pixels_per_real_pixel; |
| 255 | 255 | |
| 256 | 256 | static int emulation_pixels_per_byte; |
| 257 | 257 | |
| 258 | static int width_of_cursor_set[8]={ 0,0,1,2,1,0,2,4 }; | |
| 258 | static const int width_of_cursor_set[8]={ 0,0,1,2,1,0,2,4 }; | |
| 259 | 259 | static int emulation_cursor_size=1; |
| 260 | 260 | static int cursor_state=0; |
| 261 | 261 |
| r1438 | r1439 | |
|---|---|---|
| 54 | 54 | dirtybuffer = (UINT8*) auto_malloc(videoram_size); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | static int offs_2[192] = { | |
| 57 | static const int offs_2[192] = { | |
| 58 | 58 | 0x0000,0x0800,0x1000,0x1800,0x2000,0x2800,0x3000,0x3800, |
| 59 | 59 | 0x0100,0x0900,0x1100,0x1900,0x2100,0x2900,0x3100,0x3900, |
| 60 | 60 | 0x0200,0x0a00,0x1200,0x1a00,0x2200,0x2a00,0x3200,0x3a00, |
| r1438 | r1439 | |
| 81 | 81 | 0x07a0,0x0fa0,0x17a0,0x1fa0,0x27a0,0x2fa0,0x37a0,0x3fa0 |
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | static int offs_1[192] = { | |
| 84 | static const int offs_1[192] = { | |
| 85 | 85 | 0x2000,0x2080,0x2800,0x2880,0x3000,0x3080,0x3800,0x3880, |
| 86 | 86 | 0x2100,0x2180,0x2900,0x2980,0x3100,0x3180,0x3900,0x3980, |
| 87 | 87 | 0x2200,0x2280,0x2a00,0x2a80,0x3200,0x3280,0x3a00,0x3a80, |
| r1438 | r1439 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | /* KC85/4 and KC85/3 common graphics hardware */ |
| 16 | 16 | |
| 17 | static unsigned short kc85_colour_table[KC85_PALETTE_SIZE] = | |
| 17 | static const unsigned short kc85_colour_table[KC85_PALETTE_SIZE] = | |
| 18 | 18 | { |
| 19 | 19 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 20 | 20 | 16, 17, 18, 19, 20, 21, 22, 23 |
| r1438 | r1439 | |
| 57 | 57 | */ |
| 58 | 58 | |
| 59 | 59 | |
| 60 | static unsigned char kc85_palette[KC85_PALETTE_SIZE * 3] = | |
| 60 | static const unsigned char kc85_palette[KC85_PALETTE_SIZE * 3] = | |
| 61 | 61 | { |
| 62 | 62 | /* 3 bit colour value. bit 2->green, bit 1->red, bit 0->blue */ |
| 63 | 63 |
| r1438 | r1439 | |
|---|---|---|
| 44 | 44 | #undef TESTDRIVER |
| 45 | 45 | #define DRIVER(NAME) |
| 46 | 46 | #define TESTDRIVER(NAME) &driver_##NAME, |
| 47 | const game_driver *test_drivers[] = | |
| 47 | const game_driver *const test_drivers[] = | |
| 48 | 48 | { |
| 49 | 49 | #include "messdriv.c" |
| 50 | 50 | 0 /* end of array */ |
| r1438 | r1439 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | static BOOL SettingsFileName(DWORD nSettingsFile, char *buffer, size_t bufsize) |
| 34 | 34 | { |
| 35 | extern FOLDERDATA g_folderData[]; | |
| 35 | extern const FOLDERDATA g_folderData[]; | |
| 36 | 36 | extern LPEXFOLDERDATA ExtraFolderData[]; |
| 37 | 37 | char *ptr; |
| 38 | 38 | int i; |
| r1438 | r1439 | |
|---|---|---|
| 49 | 49 | static void SoftwareTabView_OnMoveSize(void); |
| 50 | 50 | static void SetupSoftwareTabView(void); |
| 51 | 51 | |
| 52 | static LPCTSTR mess_column_names[] = | |
| 52 | static const LPCTSTR mess_column_names[] = | |
| 53 | 53 | { |
| 54 | 54 | TEXT("Software"), |
| 55 | 55 | TEXT("Goodname"), |
| r1438 | r1439 | |
| 1064 | 1064 | { |
| 1065 | 1065 | INT_PTR result = 0; |
| 1066 | 1066 | int nColumnCount = Picker_GetColumnCount(MyColumnDialogProc_hwndPicker); |
| 1067 | LPCTSTR *ppszColumnNames = Picker_GetColumnNames(MyColumnDialogProc_hwndPicker); | |
| 1067 | const LPCTSTR *ppszColumnNames = Picker_GetColumnNames(MyColumnDialogProc_hwndPicker); | |
| 1068 | 1068 | |
| 1069 | 1069 | result = InternalColumnDialogProc(hDlg, Msg, wParam, lParam, nColumnCount, |
| 1070 | 1070 | MyColumnDialogProc_shown, MyColumnDialogProc_order, ppszColumnNames, |
| r1438 | r1439 | |
|---|---|---|
| 97 | 97 | int enabled = TRUE; |
| 98 | 98 | int item_count = 0; |
| 99 | 99 | |
| 100 | static const char *cust_files[] = | |
| 100 | static const char *const cust_files[] = | |
| 101 | 101 | { |
| 102 | 102 | "ctrlr.png", "ctrlr.ini", |
| 103 | 103 | "keyboard.png", "keyboard.ini" |
| r1438 | r1439 | |
|---|---|---|
| 68 | 68 | static UINT8 *ws_bios_bank = NULL; |
| 69 | 69 | static UINT8 wswan_bios_disabled; |
| 70 | 70 | UINT8 ws_portram[256]; |
| 71 | static UINT8 ws_portram_init[256] = | |
| 71 | static const UINT8 ws_portram_init[256] = | |
| 72 | 72 | { |
| 73 | 73 | 0x00, 0x00, 0x00/*?*/, 0xbb, 0x00, 0x00, 0x00, 0x26, 0xfe, 0xde, 0xf9, 0xfb, 0xdb, 0xd7, 0x7f, 0xf5, |
| 74 | 74 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x9e, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x99, 0xfd, 0xb7, 0xdf, |
| r1438 | r1439 | |
| 117 | 117 | EA 00 00 FF FF jmp FFFFh:0000h |
| 118 | 118 | |
| 119 | 119 | */ |
| 120 | static UINT8 ws_fake_bios_code[] = { | |
| 120 | static const UINT8 ws_fake_bios_code[] = { | |
| 121 | 121 | 0xfc, 0xbc, 0x00, 0x20, 0x68, 0x00, 0x00, 0x07, 0x68, 0x00, 0xf0, 0x1f, 0xbf, 0x00, 0x04, 0xbe, |
| 122 | 122 | 0xe0, 0xff, 0xb9, 0x10, 0x00, 0xf3, 0xa4, 0xb0, 0x2f, 0xe6, 0xc0, 0xea, 0x00, 0x04, 0x00, 0x00, |
| 123 | 123 | 0xe4, 0xa0, 0x0c, 0x01, 0xe6, 0xa0, 0xea, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, |
| r1438 | r1439 | |
|---|---|---|
| 1173 | 1173 | |
| 1174 | 1174 | #ifdef MAME_DEBUG |
| 1175 | 1175 | |
| 1176 | static const char *os9syscalls[] = | |
| 1176 | static const char *const os9syscalls[] = | |
| 1177 | 1177 | { |
| 1178 | 1178 | "F$Link", /* Link to Module */ |
| 1179 | 1179 | "F$Load", /* Load Module from File */ |
| r1438 | r1439 | |
|---|---|---|
| 798 | 798 | /* Black: ignore */ |
| 799 | 799 | //color = color_typewriter_black; |
| 800 | 800 | { |
| 801 | static char black[5] = { '\033', '[', '3', '0', 'm' }; | |
| 801 | static const char black[5] = { '\033', '[', '3', '0', 'm' }; | |
| 802 | 802 | image_fwrite(typewriter.fd, black, sizeof(black)); |
| 803 | 803 | } |
| 804 | 804 | break; |
| r1438 | r1439 | |
| 807 | 807 | /* Red: ignore */ |
| 808 | 808 | //color = color_typewriter_red; |
| 809 | 809 | { |
| 810 | static char red[5] = { '\033', '[', '3', '1', 'm' }; | |
| 810 | static const char red[5] = { '\033', '[', '3', '1', 'm' }; | |
| 811 | 811 | image_fwrite(typewriter.fd, red, sizeof(red)); |
| 812 | 812 | } |
| 813 | 813 | break; |
| r1438 | r1439 | |
| 825 | 825 | case 077: |
| 826 | 826 | /* Carriage Return */ |
| 827 | 827 | { |
| 828 | static char line_end[2] = { '\r', '\n' }; | |
| 828 | static const char line_end[2] = { '\r', '\n' }; | |
| 829 | 829 | image_fwrite(typewriter.fd, line_end, sizeof(line_end)); |
| 830 | 830 | } |
| 831 | 831 | break; |
| r1438 | r1439 | |
|---|---|---|
| 1745 | 1745 | |
| 1746 | 1746 | static void nec765_setup_command(void) |
| 1747 | 1747 | { |
| 1748 | static const char *commands[] = | |
| 1748 | static const char *const commands[] = | |
| 1749 | 1749 | { |
| 1750 | 1750 | NULL, /* [00] */ |
| 1751 | 1751 | NULL, /* [01] */ |
| r1438 | r1439 | |
|---|---|---|
| 188 | 188 | void uart8250_w(int n, offs_t idx, UINT8 data) |
| 189 | 189 | { |
| 190 | 190 | #ifdef VERBOSE_COM |
| 191 | static char P[8] = "NONENHNL"; /* names for parity select */ | |
| 191 | static const char P[8] = "NONENHNL"; /* names for parity select */ | |
| 192 | 192 | #endif |
| 193 | 193 | int tmp; |
| 194 | 194 |
| r1438 | r1439 | |
|---|---|---|
| 96 | 96 | 2000000. |
| 97 | 97 | }; |
| 98 | 98 | |
| 99 | static ppi8255_interface dai_ppi82555_intf = | |
| 99 | static const ppi8255_interface dai_ppi82555_intf = | |
| 100 | 100 | { |
| 101 | 101 | 1, /* 1 chip */ |
| 102 | 102 | { NULL, NULL }, /* Port A read */ |
| r1438 | r1439 | |
| 104 | 104 | { NULL, NULL }, /* Port C read */ |
| 105 | 105 | }; |
| 106 | 106 | |
| 107 | static struct pit8253_config dai_pit8253_intf = | |
| 107 | static const struct pit8253_config dai_pit8253_intf = | |
| 108 | 108 | { |
| 109 | 109 | TYPE8253, |
| 110 | 110 | { |
| r1438 | r1439 | |
|---|---|---|
| 77 | 77 | static void mac_via_irq(int state); |
| 78 | 78 | static offs_t mac_dasm_override(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); |
| 79 | 79 | |
| 80 | static struct via6522_interface mac_via6522_intf = | |
| 80 | static const struct via6522_interface mac_via6522_intf = | |
| 81 | 81 | { |
| 82 | 82 | mac_via_in_a, mac_via_in_b, |
| 83 | 83 | NULL, NULL, |
| r1438 | r1439 | |
| 1386 | 1386 | mac_driver_init(MODEL_MAC_512KE); |
| 1387 | 1387 | } |
| 1388 | 1388 | |
| 1389 | static SCSIConfigTable dev_table = | |
| 1389 | static const SCSIConfigTable dev_table = | |
| 1390 | 1390 | { |
| 1391 | 1391 | 2, /* 2 SCSI devices */ |
| 1392 | 1392 | { { SCSI_ID_5, 1, SCSI_DEVICE_HARDDISK }, /* SCSI ID 5, using CHD 1, and it's a harddisk */ |
| 1393 | 1393 | { SCSI_ID_6, 0, SCSI_DEVICE_HARDDISK } } /* SCSI ID 6, using CHD 0, and it's a harddisk */ |
| 1394 | 1394 | }; |
| 1395 | 1395 | |
| 1396 | static struct NCR5380interface macplus_5380intf = | |
| 1396 | static const struct NCR5380interface macplus_5380intf = | |
| 1397 | 1397 | { |
| 1398 | 1398 | &dev_table, // SCSI device table |
| 1399 | 1399 | NULL // IRQ (unconnected on the Mac Plus) |
| r1438 | r1439 | |
|---|---|---|
| 26 | 26 | |
| 27 | 27 | #define VERBOSE (0) |
| 28 | 28 | |
| 29 | static const char *rnames[] = | |
| 29 | static const char *const rnames[] = | |
| 30 | 30 | { |
| 31 | 31 | "Current data", |
| 32 | 32 | "Initiator cmd", |
| r1438 | r1439 | |
| 38 | 38 | "Reset parity" |
| 39 | 39 | }; |
| 40 | 40 | |
| 41 | static const char *wnames[] = | |
| 41 | static const char *const wnames[] = | |
| 42 | 42 | { |
| 43 | 43 | "Output data", |
| 44 | 44 | "Initiator cmd", |
| r1438 | r1439 | |
| 57 | 57 | } SCSIDev; |
| 58 | 58 | |
| 59 | 59 | static SCSIDev devices[8]; // SCSI IDs 0-7 |
| 60 | static struct NCR5380interface *intf; | |
| 60 | static const struct NCR5380interface *intf; | |
| 61 | 61 | |
| 62 | 62 | static UINT8 n5380_Registers[8]; |
| 63 | 63 | static UINT8 last_id; |
| r1438 | r1439 | |
| 334 | 334 | return rv; |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | extern void ncr5380_init( struct NCR5380interface *interface ) | |
| 337 | extern void ncr5380_init( const struct NCR5380interface *interface ) | |
| 338 | 338 | { |
| 339 | 339 | int i; |
| 340 | 340 |
| r1438 | r1439 | |
|---|---|---|
| 15 | 15 | static void d88image_read_sector_data_into_buffer(mess_image *img, int side, int index1, char *ptr, int length); |
| 16 | 16 | static void d88image_write_sector_data_from_buffer(mess_image *img, int side, int index1, const char *ptr, int length,int ddam); |
| 17 | 17 | |
| 18 | static floppy_interface d88image_floppy_interface= | |
| 18 | static const floppy_interface d88image_floppy_interface= | |
| 19 | 19 | { |
| 20 | 20 | d88image_seek_callback, |
| 21 | 21 | d88image_get_sectors_per_track, /* done */ |
| r1438 | r1439 | |
|---|---|---|
| 250 | 250 | static void cbmb_display_enable_changed(int display_enabled) { |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | //static struct mscrtc6845_config cbm600_crtc= { 1600000 /*?*/, cbmb_vh_cursor }; | |
| 253 | //static const struct mscrtc6845_config cbm600_crtc= { 1600000 /*?*/, cbmb_vh_cursor }; | |
| 254 | 254 | const static crtc6845_interface cbm600_crtc = { |
| 255 | 255 | 0, |
| 256 | 256 | 1600000 /*?*/, |
| r1438 | r1439 | |
| 284 | 284 | crtc6845_config( 0, &cbm600_crtc); |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | //static struct mscrtc6845_config cbm700_crtc= { 2000000 /*?*/, cbmb_vh_cursor }; | |
| 287 | //static const struct mscrtc6845_config cbm700_crtc= { 2000000 /*?*/, cbmb_vh_cursor }; | |
| 288 | 288 | const static crtc6845_interface cbm700_crtc = { |
| 289 | 289 | 0, |
| 290 | 290 | 2000000 /*?*/, |
| r1438 | r1439 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | struct NCR5380interface |
| 12 | 12 | { |
| 13 | SCSIConfigTable *scsidevs; /* SCSI devices */ | |
| 13 | const SCSIConfigTable *scsidevs; /* SCSI devices */ | |
| 14 | 14 | void (*irq_callback)(int state); /* irq callback */ |
| 15 | 15 | }; |
| 16 | 16 | |
| r1438 | r1439 | |
| 36 | 36 | #define R5380_OUTDATA_DTACK (R5380_OUTDATA | 0x10) |
| 37 | 37 | #define R5380_CURDATA_DTACK (R5380_CURDATA | 0x10) |
| 38 | 38 | |
| 39 | extern void ncr5380_init( struct NCR5380interface *interface ); | |
| 39 | extern void ncr5380_init( const struct NCR5380interface *interface ); | |
| 40 | 40 | extern void ncr5380_read_data(int bytes, UINT8 *pData); |
| 41 | 41 | extern void ncr5380_write_data(int bytes, UINT8 *pData); |
| 42 | 42 | extern void *ncr5380_get_device(int id); |
| r1438 | r1439 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | UINT8 *mbee_workram; |
| 38 | 38 | |
| 39 | static z80pio_interface pio_intf = | |
| 39 | static const z80pio_interface pio_intf = | |
| 40 | 40 | { |
| 41 | 41 | pio_interrupt, /* callback when change interrupt status */ |
| 42 | 42 | 0, /* portA ready active callback (do not support yet)*/ |
| r1438 | r1439 | |
|---|---|---|
| 1564 | 1564 | } |
| 1565 | 1565 | } |
| 1566 | 1566 | |
| 1567 | static char PAC_HEADER[] = "PAC2 BACKUP DATA"; | |
| 1567 | static const char PAC_HEADER[] = "PAC2 BACKUP DATA"; | |
| 1568 | 1568 | #define PAC_HEADER_LEN (16) |
| 1569 | 1569 | |
| 1570 | 1570 | MSX_SLOT_LOADSRAM(fmpac) |
| r1438 | r1439 | |
|---|---|---|
| 53 | 53 | return image_from_devtype_and_index(IO_FLOPPY, i8271.drive); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | void i8271_init(i8271_interface *iface) | |
| 56 | void i8271_init(const i8271_interface *iface) | |
| 57 | 57 | { |
| 58 | 58 | memset(&i8271, 0, sizeof(I8271)); |
| 59 | 59 |
| r1438 | r1439 | |
|---|---|---|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | void rp5c15_init(struct rp5c15_interface* intf) | |
| 100 | void rp5c15_init(const struct rp5c15_interface* intf) | |
| 101 | 101 | { |
| 102 | 102 | mame_system_time systm; |
| 103 | 103 | mame_system_tm time; |
| r1438 | r1439 | |
|---|---|---|
| 3051 | 3051 | |
| 3052 | 3052 | #ifdef MAME_DEBUG |
| 3053 | 3053 | |
| 3054 | static const char *os9syscalls[] = | |
| 3054 | static const char *const os9syscalls[] = | |
| 3055 | 3055 | { |
| 3056 | 3056 | "F$Link", /* Link to Module */ |
| 3057 | 3057 | "F$Load", /* Load Module from File */ |
| r1438 | r1439 | |
|---|---|---|
| 54 | 54 | void (*alarm_callback)(int state); |
| 55 | 55 | }; // Ricoh RP5C15 |
| 56 | 56 | |
| 57 | void rp5c15_init(struct rp5c15_interface*); | |
| 57 | void rp5c15_init(const struct rp5c15_interface*); | |
| 58 | 58 | |
| 59 | 59 | void rtc_add_second(void); |
| 60 | 60 | void rtc_add_minute(void); |
| r1438 | r1439 | |
|---|---|---|
| 101 | 101 | //#define VERBOSE |
| 102 | 102 | |
| 103 | 103 | /* mask data with these values when writing */ |
| 104 | static unsigned char rtc_write_masks[16*4]= | |
| 104 | static const unsigned char rtc_write_masks[16*4]= | |
| 105 | 105 | { |
| 106 | 106 | 0x0f,0x07,0x0f,0x07,0x0f,0x03,0x07,0x0f,0x03,0x0f,0x03,0x0f,0x0f,0x0f, 0x0f, 0x0f, |
| 107 | 107 | 0x00,0x00,0x0f,0x07,0x0f,0x03,0x07,0x0f,0x03,0x00,0x01,0x03,0x00,0x0f, 0x0f, 0x0f, |
| r1438 | r1439 | |
| 291 | 291 | |
| 292 | 292 | |
| 293 | 293 | |
| 294 | void tc8521_init(struct tc8521_interface *intf) | |
| 294 | void tc8521_init(const struct tc8521_interface *intf) | |
| 295 | 295 | { |
| 296 | 296 | memset(&rtc, 0, sizeof(struct tc8521)); |
| 297 | 297 | memset(&rtc.interface, 0, sizeof(struct tc8521_interface)); |
| r1438 | r1439 | |
|---|---|---|
| 721 | 721 | } |
| 722 | 722 | |
| 723 | 723 | #ifdef MAME_DEBUG |
| 724 | static const char *sgbcmds[26] = | |
| 724 | static const char *const sgbcmds[26] = | |
| 725 | 725 | { |
| 726 | 726 | "PAL01 ", |
| 727 | 727 | "PAL23 ", |
| r1438 | r1439 | |
| 1307 | 1307 | |
| 1308 | 1308 | DEVICE_LOAD(gb_cart) |
| 1309 | 1309 | { |
| 1310 | static const char *CartTypes[] = | |
| 1310 | static const char *const CartTypes[] = | |
| 1311 | 1311 | { |
| 1312 | 1312 | "ROM ONLY", |
| 1313 | 1313 | "ROM+MBC1", |
| r1438 | r1439 | |
| 1348 | 1348 | }; |
| 1349 | 1349 | |
| 1350 | 1350 | /*** Following are some known manufacturer codes *************************/ |
| 1351 | static struct | |
| 1351 | static const struct | |
| 1352 | 1352 | { |
| 1353 | 1353 | UINT16 Code; |
| 1354 | 1354 | const char *Name; |
| r1438 | r1439 | |
|---|---|---|
| 47 | 47 | static void via_irq_func(int state); |
| 48 | 48 | |
| 49 | 49 | |
| 50 | static struct via6522_interface concept_via6522_intf = | |
| 50 | static const struct via6522_interface concept_via6522_intf = | |
| 51 | 51 | { /* main via */ |
| 52 | 52 | via_in_a, via_in_b, |
| 53 | 53 | NULL, NULL, |
| r1438 | r1439 | |
|---|---|---|
| 64 | 64 | ".................."; |
| 65 | 65 | |
| 66 | 66 | |
| 67 | static const char *keys[24] = | |
| 67 | static const char *const keys[24] = | |
| 68 | 68 | { |
| 69 | 69 | "aaaaaaaaaaaaaaaaaaaaaaaa" \ |
| 70 | 70 | "aaaaaaaaaaaaaaaaaaaaaaaa" \ |
| r1438 | r1439 | |
|---|---|---|
| 320 | 320 | static WRITE8_HANDLER ( msx_ppi_port_c_w ); |
| 321 | 321 | static READ8_HANDLER (msx_ppi_port_b_r ); |
| 322 | 322 | |
| 323 | static ppi8255_interface msx_ppi8255_interface = | |
| 323 | static const ppi8255_interface msx_ppi8255_interface = | |
| 324 | 324 | { |
| 325 | 325 | 1, |
| 326 | 326 | {NULL}, |
| r1438 | r1439 | |
| 331 | 331 | {msx_ppi_port_c_w} |
| 332 | 332 | }; |
| 333 | 333 | |
| 334 | static struct tc8521_interface tc = { NULL }; | |
| 334 | static const struct tc8521_interface tc = { NULL }; | |
| 335 | 335 | |
| 336 | 336 | static void msx_init(void) |
| 337 | 337 | { |
| r1438 | r1439 | |
|---|---|---|
| 38 | 38 | static WRITE8_HANDLER ( pio_port_b_w ); |
| 39 | 39 | static WRITE8_HANDLER ( pio_port_c_w ); |
| 40 | 40 | |
| 41 | static ppi8255_interface ppi8255 = { | |
| 41 | static const ppi8255_interface ppi8255 = { | |
| 42 | 42 | 1, |
| 43 | 43 | {pio_port_a_r}, |
| 44 | 44 | {pio_port_b_r}, |
| r1438 | r1439 | |
| 55 | 55 | static void pit_clk_1(double clock); |
| 56 | 56 | static void pit_irq_2(int which); |
| 57 | 57 | |
| 58 | static struct pit8253_config pit8253 = | |
| 58 | static const struct pit8253_config pit8253 = | |
| 59 | 59 | { |
| 60 | 60 | TYPE8253, |
| 61 | 61 | { |
| r1438 | r1439 | |
|---|---|---|
| 86 | 86 | |
| 87 | 87 | static void serial_protocol_none_sent_char(int id); |
| 88 | 88 | |
| 89 | static struct serial_protocol_interface serial_protocol_none_interface= | |
| 89 | static const struct serial_protocol_interface serial_protocol_none_interface= | |
| 90 | 90 | { |
| 91 | 91 | NULL, |
| 92 | 92 | serial_protocol_none_sent_char, |
| r1438 | r1439 | |
| 96 | 96 | static void serial_protocol_xmodem_receive_char(int id, unsigned char ch); |
| 97 | 97 | static void serial_protocol_xmodem_sent_char(int id); |
| 98 | 98 | |
| 99 | static struct serial_protocol_interface serial_protocol_xmodem_interface= | |
| 99 | static const struct serial_protocol_interface serial_protocol_xmodem_interface= | |
| 100 | 100 | { |
| 101 | 101 | serial_protocol_xmodem_receive_char, |
| 102 | 102 | serial_protocol_xmodem_sent_char |
| r1438 | r1439 | |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | |
| 152 | static const char *protocol_names[]= | |
| 152 | static const char *const protocol_names[]= | |
| 153 | 153 | { |
| 154 | 154 | "None", |
| 155 | 155 | "XModem" |
| r1438 | r1439 | |
|---|---|---|
| 4518 | 4518 | |
| 4519 | 4519 | |
| 4520 | 4520 | |
| 4521 | static mmc mmc_list[] = | |
| 4521 | static const mmc mmc_list[] = | |
| 4522 | 4522 | { |
| 4523 | 4523 | /* INES DESC LOW_W, LOW_R, MED_W, HIGH_W, PPU_latch, scanline CB, hblank CB */ |
| 4524 | 4524 | { 0, "No Mapper", NULL, NULL, NULL, NULL, NULL, NULL, NULL }, |
| r1438 | r1439 | |
|---|---|---|
| 34 | 34 | #define CONTROL_IRQ 0x10 |
| 35 | 35 | |
| 36 | 36 | typedef struct { |
| 37 | CENTRONICS_DEVICE *device; | |
| 37 | const CENTRONICS_DEVICE *device; | |
| 38 | 38 | const PC_LPT_CONFIG *config; |
| 39 | 39 | int on; |
| 40 | 40 | UINT8 data; |
| r1438 | r1439 | |
| 51 | 51 | This->config=config; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | void pc_lpt_set_device(int nr, CENTRONICS_DEVICE *device) | |
| 54 | void pc_lpt_set_device(int nr, const CENTRONICS_DEVICE *device) | |
| 55 | 55 | { |
| 56 | 56 | PC_LPT *This=LPT+nr; |
| 57 | 57 | This->device=device; |
| r1438 | r1439 | |
|---|---|---|
| 594 | 594 | vc1541->led = data & 8; |
| 595 | 595 | } |
| 596 | 596 | |
| 597 | static struct via6522_interface via2 = | |
| 597 | static const struct via6522_interface via2 = | |
| 598 | 598 | { |
| 599 | 599 | 0, /*vc1541_via0_read_porta, */ |
| 600 | 600 | vc1541_via0_read_portb, |
| r1438 | r1439 | |
|---|---|---|
| 653 | 653 | |
| 654 | 654 | |
| 655 | 655 | |
| 656 | static CENTRONICS_CONFIG to7_centronics = { PRINTER_CENTRONICS, to7_io_ack }; | |
| 656 | static const CENTRONICS_CONFIG to7_centronics = { PRINTER_CENTRONICS, to7_io_ack }; | |
| 657 | 657 | |
| 658 | 658 | |
| 659 | 659 | |
| r1438 | r1439 | |
| 757 | 757 | |
| 758 | 758 | |
| 759 | 759 | |
| 760 | static struct acia6850_interface to7_acia_modem = | |
| 760 | static const struct acia6850_interface to7_acia_modem = | |
| 761 | 761 | { |
| 762 | 762 | 1200, 1200, /* 1200 bauds, might be divided by 16 */ |
| 763 | 763 | &to7_modem_rx, &to7_modem_tx, |
| r1438 | r1439 | |
| 1180 | 1180 | to7_midi_intr = data >> 5; |
| 1181 | 1181 | #if VERBOSE_MIDI |
| 1182 | 1182 | { |
| 1183 | static int bits[8] = { 7,7,7,7,8,8,8,8 }; | |
| 1184 | static int stop[8] = { 2,2,1,1,2,1,1,1 }; | |
| 1185 | static char parity[8] = { 'e','o','e','o','-','-','e','o' }; | |
| 1183 | static const int bits[8] = { 7,7,7,7,8,8,8,8 }; | |
| 1184 | static const int stop[8] = { 2,2,1,1,2,1,1,1 }; | |
| 1185 | static const char parity[8] = { 'e','o','e','o','-','-','e','o' }; | |
| 1186 | 1186 | logerror( "$%04x %f to7_midi_w: set control to $%02X (bits=%i, stop=%i, parity=%c, intr in=%i out=%i)\n", |
| 1187 | 1187 | activecpu_get_previouspc(), attotime_to_double(timer_get_time()), |
| 1188 | 1188 | data, |
| r1438 | r1439 | |
| 2819 | 2819 | }; |
| 2820 | 2820 | |
| 2821 | 2821 | |
| 2822 | static CENTRONICS_CONFIG to9_centronics = { PRINTER_CENTRONICS, NULL }; | |
| 2822 | static const CENTRONICS_CONFIG to9_centronics = { PRINTER_CENTRONICS, NULL }; | |
| 2823 | 2823 | |
| 2824 | 2824 | |
| 2825 | 2825 |
| r1438 | r1439 | |
|---|---|---|
| 135 | 135 | |
| 136 | 136 | static int KBIR; /* COPS VIA interrupt pending */ |
| 137 | 137 | |
| 138 | static struct via6522_interface lisa_via6522_intf[2] = | |
| 138 | static const struct via6522_interface lisa_via6522_intf[2] = | |
| 139 | 139 | { |
| 140 | 140 | { /* COPS via */ |
| 141 | 141 | NULL, COPS_via_in_b, |
| r1438 | r1439 | |
|---|---|---|
| 59 | 59 | UINT8 DDGA; /* Disk Directory Granule allocation (number of driectory granules) */ |
| 60 | 60 | } PDRIVE; |
| 61 | 61 | |
| 62 | static PDRIVE pd_list[12] = { | |
| 62 | static const PDRIVE pd_list[12] = { | |
| 63 | 63 | {0x14, 0x28, 0x07, 0x28, 0x0A, 0x02, 0x00, 0x00, 0x05, 0x02}, /* CMD"<0=A" 40 tracks, SS, SD */ |
| 64 | 64 | {0x14, 0x28, 0x07, 0x28, 0x14, 0x04, 0x00, 0x40, 0x05, 0x04}, /* CMD"<0=B" 40 tracks, DS, SD */ |
| 65 | 65 | {0x18, 0x30, 0x53, 0x28, 0x12, 0x03, 0x00, 0x03, 0x05, 0x03}, /* CMD"<0=C" 40 tracks, SS, DD */ |
| r1438 | r1439 | |
|---|---|---|
| 349 | 349 | |
| 350 | 350 | *******************************************************************************/ |
| 351 | 351 | |
| 352 | static struct msm8251_interface pmd85_msm8251_interface = | |
| 352 | static const struct msm8251_interface pmd85_msm8251_interface = | |
| 353 | 353 | { |
| 354 | 354 | NULL, |
| 355 | 355 | NULL, |
| r1438 | r1439 | |
| 376 | 376 | |
| 377 | 377 | *******************************************************************************/ |
| 378 | 378 | |
| 379 | static struct pit8253_config pmd85_pit8253_interface = | |
| 379 | static const struct pit8253_config pmd85_pit8253_interface = | |
| 380 | 380 | { |
| 381 | 381 | TYPE8253, |
| 382 | 382 | { |
| r1438 | r1439 | |
| 650 | 650 | } |
| 651 | 651 | } |
| 652 | 652 | |
| 653 | static ppi8255_interface pmd85_ppi8255_interface = | |
| 653 | static const ppi8255_interface pmd85_ppi8255_interface = | |
| 654 | 654 | { |
| 655 | 655 | 4, |
| 656 | 656 | {pmd85_ppi_0_porta_r, pmd85_ppi_1_porta_r, pmd85_ppi_2_porta_r, pmd85_ppi_3_porta_r}, |
| r1438 | r1439 | |
| 661 | 661 | {pmd85_ppi_0_portc_w, pmd85_ppi_1_portc_w, pmd85_ppi_2_portc_w, pmd85_ppi_3_portc_w} |
| 662 | 662 | }; |
| 663 | 663 | |
| 664 | static ppi8255_interface alfa_ppi8255_interface = | |
| 664 | static const ppi8255_interface alfa_ppi8255_interface = | |
| 665 | 665 | { |
| 666 | 666 | 3, |
| 667 | 667 | {pmd85_ppi_0_porta_r, pmd85_ppi_1_porta_r, pmd85_ppi_2_porta_r}, |
| r1438 | r1439 | |
| 672 | 672 | {pmd85_ppi_0_portc_w, pmd85_ppi_1_portc_w, pmd85_ppi_2_portc_w} |
| 673 | 673 | }; |
| 674 | 674 | |
| 675 | static ppi8255_interface mato_ppi8255_interface = | |
| 675 | static const ppi8255_interface mato_ppi8255_interface = | |
| 676 | 676 | { |
| 677 | 677 | 1, |
| 678 | 678 | {pmd85_ppi_0_porta_r}, |
| r1438 | r1439 | |
|---|---|---|
| 59 | 59 | */ |
| 60 | 60 | |
| 61 | 61 | typedef struct { |
| 62 | RRIOT_CONFIG *config; | |
| 62 | const RRIOT_CONFIG *config; | |
| 63 | 63 | struct { |
| 64 | 64 | UINT8 in, out, ddr; |
| 65 | 65 | } port_a, port_b; |
| r1438 | r1439 | |
| 75 | 75 | |
| 76 | 76 | static TIMER_CALLBACK(rriot_timer_cb); |
| 77 | 77 | |
| 78 | void rriot_init(int nr, RRIOT_CONFIG *config) | |
| 78 | void rriot_init(int nr, const RRIOT_CONFIG *config) | |
| 79 | 79 | { |
| 80 | 80 | memset(&rriot[nr], 0, sizeof(rriot[nr])); |
| 81 | 81 | rriot[nr].config = config; |
| r1438 | r1439 | |
|---|---|---|
| 102 | 102 | } RRIOT_CONFIG; |
| 103 | 103 | |
| 104 | 104 | /* This has to be called from a driver at startup */ |
| 105 | void rriot_init(int nr, RRIOT_CONFIG *riot); | |
| 105 | void rriot_init(int nr, const RRIOT_CONFIG *riot); | |
| 106 | 106 | |
| 107 | 107 | int rriot_r(int chip, int offs); |
| 108 | 108 | void rriot_w(int chip, int offs, int data); |
| r1438 | r1439 | |
|---|---|---|
| 13 | 13 | #include "includes/kaypro.h" |
| 14 | 14 | #include "cpu/z80/z80.h" |
| 15 | 15 | |
| 16 | static const char *disk_ids[4] = {"KAY2","KAY2","KAY2","KAY2"}; | |
| 16 | static const char *const disk_ids[4] = {"KAY2","KAY2","KAY2","KAY2"}; | |
| 17 | 17 | |
| 18 | 18 | static UINT8 keyrows[10] = { 0,0,0,0,0,0,0,0,0,0 }; |
| 19 | static char keyboard[8][10][8] = { | |
| 19 | static const char keyboard[8][10][8] = { | |
| 20 | 20 | { /* normal */ |
| 21 | 21 | { 27,'1','2','3','4','5','6','7'}, |
| 22 | 22 | {'8','9','0','-','=','`', 8, 9}, |
| r1438 | r1439 | |
|---|---|---|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | |
| 198 | static ppi8255_interface lviv_ppi8255_interface = | |
| 198 | static const ppi8255_interface lviv_ppi8255_interface = | |
| 199 | 199 | { |
| 200 | 200 | 2, |
| 201 | 201 | {lviv_ppi_0_porta_r, lviv_ppi_1_porta_r}, |
| r1438 | r1439 | |
|---|---|---|
| 805 | 805 | { |
| 806 | 806 | } |
| 807 | 807 | |
| 808 | static struct nec765_interface pc8801_fdc_interface= | |
| 808 | static const struct nec765_interface pc8801_fdc_interface= | |
| 809 | 809 | { |
| 810 | 810 | pc8801_fdc_interrupt, |
| 811 | 811 | pc8801_fdc_dma_drq |
| r1438 | r1439 | |
|---|---|---|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | |
| 228 | static struct via6522_interface pet_via = | |
| 228 | static const struct via6522_interface pet_via = | |
| 229 | 229 | { |
| 230 | 230 | NULL, /* in_a_func */ |
| 231 | 231 | pet_via_port_b_r, /* in_b_func */ |
| r1438 | r1439 | |
| 482 | 482 | pet_vh_init(); |
| 483 | 483 | } |
| 484 | 484 | |
| 485 | //static struct mscrtc6845_config crtc_pet = { 800000 /*?*/}; | |
| 485 | //static const struct mscrtc6845_config crtc_pet = { 800000 /*?*/}; | |
| 486 | 486 | static void pet_display_enable_changed(int display_enabled) { |
| 487 | 487 | } |
| 488 | 488 |
| r1438 | r1439 | |
|---|---|---|
| 5 | 5 | * |
| 6 | 6 | ******************************************************************************/ |
| 7 | 7 | |
| 8 | dsk_fmt formats[] = { | |
| 8 | const dsk_fmt formats[] = { | |
| 9 | 9 | { |
| 10 | 10 | "ATHD", "IBM AT DSHD 3.5\"", |
| 11 | 11 | 0, /* unique format */ |
| r1438 | r1439 | |
|---|---|---|
| 25 | 25 | return 0; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | static struct acia6850_interface sb2m600_acia0 = | |
| 28 | static const struct acia6850_interface sb2m600_acia0 = | |
| 29 | 29 | { |
| 30 | 30 | sb2m600_acia0_statin, |
| 31 | 31 | sb2m600_acia0_casin, |
| r1438 | r1439 | |
| 33 | 33 | 0 |
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | static struct acia6850_interface sb2m600_acia1 = | |
| 36 | static const struct acia6850_interface sb2m600_acia1 = | |
| 37 | 37 | { |
| 38 | 38 | 0, |
| 39 | 39 | 0, |
| r1438 | r1439 | |
|---|---|---|
| 352 | 352 | via_set_input_ca1(0, acknowledge); |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | static CENTRONICS_CONFIG oric_cent_config[1]={ | |
| 355 | static const CENTRONICS_CONFIG oric_cent_config[1]={ | |
| 356 | 356 | { |
| 357 | 357 | PRINTER_CENTRONICS, |
| 358 | 358 | oric_printer_handshake_in |
| r1438 | r1439 | |
| 452 | 452 | |
| 453 | 453 | */ |
| 454 | 454 | |
| 455 | static struct via6522_interface oric_6522_interface= | |
| 455 | static const struct via6522_interface oric_6522_interface= | |
| 456 | 456 | { |
| 457 | 457 | oric_via_in_a_func, |
| 458 | 458 | oric_via_in_b_func, |
| r1438 | r1439 | |
| 1433 | 1433 | |
| 1434 | 1434 | oric_refresh_ints(); |
| 1435 | 1435 | } |
| 1436 | static struct via6522_interface telestrat_via2_interface= | |
| 1436 | static const struct via6522_interface telestrat_via2_interface= | |
| 1437 | 1437 | { |
| 1438 | 1438 | telestrat_via2_in_a_func, |
| 1439 | 1439 | telestrat_via2_in_b_func, |
| r1438 | r1439 | |
|---|---|---|
| 104 | 104 | previous_ca2_data = data; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | static struct via6522_interface atom_6522_interface= | |
| 107 | static const struct via6522_interface atom_6522_interface= | |
| 108 | 108 | { |
| 109 | 109 | atom_via_in_a_func, /* printer status */ |
| 110 | 110 | NULL, |
| r1438 | r1439 | |
| 123 | 123 | |
| 124 | 124 | |
| 125 | 125 | |
| 126 | static | |
| 126 | static const ppi8255_interface atom_8255_int = | |
| 127 | 127 | { |
| 128 | 128 | 1, |
| 129 | 129 | {atom_8255_porta_r}, |
| r1438 | r1439 | |
| 157 | 157 | previous_i8271_int_state = state; |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | static struct i8271_interface atom_8271_interface= | |
| 160 | static const struct i8271_interface atom_8271_interface= | |
| 161 | 161 | { |
| 162 | 162 | atom_8271_interrupt_callback, |
| 163 | 163 | NULL |
| r1438 | r1439 | |
|---|---|---|
| 361 | 361 | cbm_ieee_eoi_w(0,data); |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | static struct via6522_interface via0 = | |
| 364 | static const struct via6522_interface via0 = | |
| 365 | 365 | { |
| 366 | 366 | vc20_via0_read_porta, |
| 367 | 367 | 0, /*via0_read_portb, */ |
| r1438 | r1439 | |
|---|---|---|
| 52 | 52 | static void pc_fdc_hw_dma_drq(int,int); |
| 53 | 53 | static mess_image *pc_fdc_get_image(int floppy_index); |
| 54 | 54 | |
| 55 | static nec765_interface pc_fdc_nec765_interface = | |
| 55 | static const nec765_interface pc_fdc_nec765_interface = | |
| 56 | 56 | { |
| 57 | 57 | pc_fdc_hw_interrupt, |
| 58 | 58 | pc_fdc_hw_dma_drq, |
| r1438 | r1439 | |
|---|---|---|
| 100 | 100 | static UINT8 *ptr = 0; /* data pointer */ |
| 101 | 101 | static UINT8 hdc_control; |
| 102 | 102 | |
| 103 | static const char *hdc_command_names[] = | |
| 103 | static const char *const hdc_command_names[] = | |
| 104 | 104 | { |
| 105 | 105 | "CMD_TESTREADY", /* 0x00 */ |
| 106 | 106 | "CMD_RECALIBRATE", /* 0x01 */ |
| r1438 | r1439 | |
|---|---|---|
| 140 | 140 | return data; |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE= { | |
| 143 | const CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE= { | |
| 144 | 144 | NULL, |
| 145 | 145 | centronics_write_data, |
| 146 | 146 | centronics_read_handshake, |
| r1438 | r1439 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | static int ide_irq, clk_irq; |
| 68 | 68 | |
| 69 | static struct ide_interface ti99_ide_interface = | |
| 69 | static const struct ide_interface ti99_ide_interface = | |
| 70 | 70 | { |
| 71 | 71 | ide_interrupt_callback |
| 72 | 72 | }; |
| r1438 | r1439 | |
|---|---|---|
| 94 | 94 | |
| 95 | 95 | /* PC-XT has a 8255 which is connected to keyboard and other |
| 96 | 96 | status information */ |
| 97 | ppi8255_interface pc_ppi8255_interface = | |
| 97 | const ppi8255_interface pc_ppi8255_interface = | |
| 98 | 98 | { |
| 99 | 99 | 1, |
| 100 | 100 | {pc_ppi_porta_r}, |
| r1438 | r1439 | |
|---|---|---|
| 43 | 43 | |
| 44 | 44 | #define D64_MAX_TRACKS 35 |
| 45 | 45 | |
| 46 | int d64_sectors_per_track[] = | |
| 46 | const int d64_sectors_per_track[] = | |
| 47 | 47 | { |
| 48 | 48 | 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, |
| 49 | 49 | 19, 19, 19, 19, 19, 19, 19, |
| r1438 | r1439 | |
|---|---|---|
| 267 | 267 | z80dart_init - initialize a single DART chip |
| 268 | 268 | -------------------------------------------------*/ |
| 269 | 269 | |
| 270 | void z80dart_init(int which, z80dart_interface *intf) | |
| 270 | void z80dart_init(int which, const z80dart_interface *intf) | |
| 271 | 271 | { |
| 272 | 272 | z80dart *dart = darts + which; |
| 273 | 273 |
| r1438 | r1439 | |
|---|---|---|
| 479 | 479 | } |
| 480 | 480 | |
| 481 | 481 | |
| 482 | static struct ide_interface bebox_ide_interface = | |
| 482 | static const struct ide_interface bebox_ide_interface = | |
| 483 | 483 | { |
| 484 | 484 | bebox_ide_interrupt |
| 485 | 485 | }; |
| r1438 | r1439 | |
| 937 | 937 | scsi53c810_pci_write |
| 938 | 938 | }; |
| 939 | 939 | |
| 940 | static SCSIConfigTable dev_table = | |
| 940 | static const SCSIConfigTable dev_table = | |
| 941 | 941 | { |
| 942 | 942 | 2, /* 2 SCSI devices */ |
| 943 | 943 | { |
| r1438 | r1439 | |
| 946 | 946 | } |
| 947 | 947 | }; |
| 948 | 948 | |
| 949 | static struct LSI53C810interface scsi53c810_intf = | |
| 949 | static const struct LSI53C810interface scsi53c810_intf = | |
| 950 | 950 | { |
| 951 | 951 | &dev_table, /* SCSI device table */ |
| 952 | 952 | &scsi53c810_irq_callback, |
| r1438 | r1439 | |
|---|---|---|
| 37 | 37 | INITIALIZATION/CONFIGURATION |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | |
| 40 | void z80dart_init(int which, z80dart_interface *intf); | |
| 40 | void z80dart_init(int which, const z80dart_interface *intf); | |
| 41 | 41 | void z80dart_reset(int which); |
| 42 | 42 | |
| 43 | 43 |
| r1438 | r1439 | |
|---|---|---|
| 37 | 37 | static int kbd_irq_line = CLEAR_LINE; |
| 38 | 38 | |
| 39 | 39 | static UINT8 keyrows[10] = { 0,0,0,0,0,0,0,0,0,0 }; |
| 40 | static char keyboard[8][9][8] = { | |
| 40 | static const char keyboard[8][9][8] = { | |
| 41 | 41 | { /* normal */ |
| 42 | 42 | { 27,'1','2','3','4','5','6','7'}, |
| 43 | 43 | {'8','9','0','-','=','`',127, 9}, |
| r1438 | r1439 | |
| 291 | 291 | * VIA read wrappers |
| 292 | 292 | **************************************************************/ |
| 293 | 293 | #if VERBOSE |
| 294 | static char *via_name[16] = { | |
| 294 | static const char *const via_name[16] = { | |
| 295 | 295 | "PB ","PA ","DDRB","DDRA", |
| 296 | 296 | "T1CL","T1CH","T1LL","T1LH", |
| 297 | 297 | "T2CL","T2CH","SR ","ACR ", |
| r1438 | r1439 | |
| 331 | 331 | /************************************************************** |
| 332 | 332 | * VIA interface structure |
| 333 | 333 | **************************************************************/ |
| 334 | static struct via6522_interface via6522[2] = | |
| 334 | static const struct via6522_interface via6522[2] = | |
| 335 | 335 | { |
| 336 | 336 | { /* VIA#1 at bfc0-bfcf*/ |
| 337 | 337 | via_0_in_a, via_0_in_b, |
| r1438 | r1439 | |
|---|---|---|
| 54 | 54 | static int osborne1_z80_irq_ack(int); |
| 55 | 55 | static void osborne1_z80_irq_reti(int); |
| 56 | 56 | |
| 57 | struct z80_irq_daisy_chain osborne1_daisy_chain[] = { | |
| 57 | const struct z80_irq_daisy_chain osborne1_daisy_chain[] = { | |
| 58 | 58 | { osborne1_z80_reset, osborne1_z80_irq_state, osborne1_z80_irq_ack, osborne1_z80_irq_reti, 0 }, |
| 59 | 59 | { NULL, NULL, NULL, NULL, -1 } |
| 60 | 60 | }; |
| r1438 | r1439 | |
| 296 | 296 | NULL /* irq_b_func */ |
| 297 | 297 | }; |
| 298 | 298 | |
| 299 | //static struct aica6850_interface osborne1_6850_config = { | |
| 299 | //static const struct aica6850_interface osborne1_6850_config = { | |
| 300 | 300 | // 10, /* tx_clock */ |
| 301 | 301 | // 10, /* rx_clock */ |
| 302 | 302 | // NULL, /* rx_pin */ |
| r1438 | r1439 | |
|---|---|---|
| 130 | 130 | * cpm_init |
| 131 | 131 | * Initialize the BIOS simulation for 'n' drives of types stored in 'ids' |
| 132 | 132 | *****************************************************************************/ |
| 133 | int cpm_init(int n, const char *ids[]) | |
| 133 | int cpm_init(int n, const char *const ids[]) | |
| 134 | 134 | { |
| 135 | 135 | UINT8 * RAM = memory_get_write_ptr(0, ADDRESS_SPACE_PROGRAM, 0x0000); |
| 136 | dsk_fmt *f; | |
| 136 | const dsk_fmt *f; | |
| 137 | 137 | int i, d; |
| 138 | 138 | |
| 139 | 139 | |
| r1438 | r1439 | |
| 358 | 358 | |
| 359 | 359 | if (VERBOSE) |
| 360 | 360 | { |
| 361 | dsk_fmt *f = &formats[fmt[d]]; | |
| 361 | const dsk_fmt *f = &formats[fmt[d]]; | |
| 362 | 362 | |
| 363 | 363 | logerror("CPM '%s' is '%s'\n", id, f->name); |
| 364 | 364 | logerror("CPM #%d %dK (%d cylinders, %d sides, %d %d bytes sectors/track)\n", |
| r1438 | r1439 | |
| 379 | 379 | *****************************************************************************/ |
| 380 | 380 | static void cpm_disk_image_seek(void) |
| 381 | 381 | { |
| 382 | dsk_fmt *f = &formats[fmt[curdisk]]; | |
| 382 | const dsk_fmt *f = &formats[fmt[curdisk]]; | |
| 383 | 383 | int offs, o, r, s, h; |
| 384 | 384 | |
| 385 | 385 | switch (f->order) |
| r1438 | r1439 | |
| 586 | 586 | |
| 587 | 587 | WRITE8_HANDLER ( cpm_bios_command_w ) |
| 588 | 588 | { |
| 589 | dsk_fmt *f; | |
| 589 | const dsk_fmt *f; | |
| 590 | 590 | char buff[256]; |
| 591 | 591 | UINT8 * RAM = memory_get_write_ptr(0, ADDRESS_SPACE_PROGRAM, 0x0000); |
| 592 | 592 | UINT16 tmp, af, bc, de, hl; |
| r1438 | r1439 | |
|---|---|---|
| 145 | 145 | cpm_dpb dpb; /* associated dpb */ |
| 146 | 146 | } dsk_fmt; |
| 147 | 147 | |
| 148 | extern dsk_fmt formats[]; | |
| 148 | extern const dsk_fmt formats[]; | |
| 149 | 149 | |
| 150 | 150 | /* these are in cpm_bios.c */ |
| 151 | 151 | DEVICE_LOAD( cpm_floppy ); |
| 152 | extern int cpm_init(int n, const char *ids[]); | |
| 152 | extern int cpm_init(int n, const char *const ids[]); | |
| 153 | 153 | |
| 154 | 154 | extern READ8_HANDLER ( cpm_bios_command_r ); |
| 155 | 155 | extern WRITE8_HANDLER ( cpm_bios_command_w ); |
| r1438 | r1439 | |
|---|---|---|
| 13 | 13 | static void dma_transfer_halt(int channel); |
| 14 | 14 | static void dma_transfer_continue(int channel); |
| 15 | 15 | |
| 16 | void hd63450_init(struct hd63450_interface* intf) | |
| 16 | void hd63450_init(const struct hd63450_interface* intf) | |
| 17 | 17 | { |
| 18 | 18 | int x; |
| 19 | 19 |
| r1438 | r1439 | |
|---|---|---|
| 69 | 69 | cpunum_set_input_line(0, 0, (state ? HOLD_LINE : CLEAR_LINE)); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | static uart8250_interface svi318_uart8250_interface[1] = | |
| 72 | static const uart8250_interface svi318_uart8250_interface[1] = | |
| 73 | 73 | { |
| 74 | 74 | { |
| 75 | 75 | TYPE8250, |
| r1438 | r1439 | |
| 224 | 224 | cassette_output(image_from_devtype_and_index(IO_CASSETTE, 0), (data & 0x20) ? -1.0 : +1.0); |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | static ppi8255_interface svi318_ppi8255_interface = | |
| 227 | static const ppi8255_interface svi318_ppi8255_interface = | |
| 228 | 228 | { |
| 229 | 229 | 1, |
| 230 | 230 | {svi318_ppi_port_a_r}, |
| r1438 | r1439 | |
|---|---|---|
| 45 | 45 | const struct hd63450_interface* intf; |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | void hd63450_init(struct hd63450_interface* intf); | |
| 48 | void hd63450_init(const struct hd63450_interface* intf); | |
| 49 | 49 | int hd63450_read(int offset, UINT16 mem_mask); |
| 50 | 50 | void hd63450_write(int offset, int data, UINT16 mem_mask); |
| 51 | 51 | void hd63450_single_transfer(int x); |
| r1438 | r1439 | |
|---|---|---|
| 77 | 77 | |
| 78 | 78 | /* MSM5205 ADPCM decoder definition */ |
| 79 | 79 | static void pce_cd_msm5205_int( int data ); |
| 80 | struct MSM5205interface pce_cd_msm5205_interface = { | |
| 80 | const struct MSM5205interface pce_cd_msm5205_interface = { | |
| 81 | 81 | pce_cd_msm5205_int, /* interrupt function */ |
| 82 | 82 | MSM5205_S48_4B /* 1/48 prescaler, 4bit data */ |
| 83 | 83 | }; |
| r1438 | r1439 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | /* init */ |
| 40 | void msm8251_init(struct msm8251_interface *iface) | |
| 40 | void msm8251_init(const struct msm8251_interface *iface) | |
| 41 | 41 | { |
| 42 | 42 | serial_helper_setup(); |
| 43 | 43 |
| r1438 | r1439 | |
|---|---|---|
| 122 | 122 | 2: 64K (banks 4 to 7) for Acorn sideways ram FE30 bank latch |
| 123 | 123 | 3: 128K (banks 8 to 15) for Acown sideways ram FE30 bank latch |
| 124 | 124 | */ |
| 125 | static unsigned short bbc_SWRAMtype1[16]={0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; | |
| 126 | static unsigned short bbc_SWRAMtype2[16]={0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0}; | |
| 127 | static unsigned short bbc_SWRAMtype3[16]={0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; | |
| 125 | static const unsigned short bbc_SWRAMtype1[16]={0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; | |
| 126 | static const unsigned short bbc_SWRAMtype2[16]={0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0}; | |
| 127 | static const unsigned short bbc_SWRAMtype3[16]={0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; | |
| 128 | 128 | |
| 129 | 129 | WRITE8_HANDLER ( memoryb4_w ) |
| 130 | 130 | { |
| r1438 | r1439 | |
| 282 | 282 | which could either be sideways ROM or sideways RAM */ |
| 283 | 283 | |
| 284 | 284 | |
| 285 | static unsigned short bbc_b_plus_sideways_ram_banks[16]={ 1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0 }; | |
| 285 | static const unsigned short bbc_b_plus_sideways_ram_banks[16]={ 1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0 }; | |
| 286 | 286 | |
| 287 | 287 | |
| 288 | 288 | WRITE8_HANDLER ( memorybp4_128_w ) |
| r1438 | r1439 | |
| 489 | 489 | } |
| 490 | 490 | } |
| 491 | 491 | |
| 492 | static unsigned short bbc_master_sideways_ram_banks[16]= | |
| 492 | static const unsigned short bbc_master_sideways_ram_banks[16]= | |
| 493 | 493 | { |
| 494 | 494 | 0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0 |
| 495 | 495 | }; |
| r1438 | r1439 | |
| 1172 | 1172 | } |
| 1173 | 1173 | |
| 1174 | 1174 | |
| 1175 | static struct via6522_interface | |
| 1175 | static const struct via6522_interface | |
| 1176 | 1176 | bbcb_system_via= { |
| 1177 | 1177 | bbcb_via_system_read_porta, |
| 1178 | 1178 | bbcb_via_system_read_portb, |
| r1438 | r1439 | |
| 1261 | 1261 | } |
| 1262 | 1262 | |
| 1263 | 1263 | |
| 1264 | static struct via6522_interface bbcb_user_via = | |
| 1264 | static const struct via6522_interface bbcb_user_via = | |
| 1265 | 1265 | { |
| 1266 | 1266 | bbcb_via_user_read_porta,//via_user_read_porta, |
| 1267 | 1267 | bbcb_via_user_read_portb,//via_user_read_portb, |
| r1438 | r1439 | |
| 1309 | 1309 | via_0_cb1_w(0,data); |
| 1310 | 1310 | } |
| 1311 | 1311 | |
| 1312 | static struct uPD7002_interface | |
| 1312 | static const struct uPD7002_interface | |
| 1313 | 1313 | BBC_uPD7002= { |
| 1314 | 1314 | BBC_get_analogue_input, |
| 1315 | 1315 | BBC_uPD7002_EOC |
| r1438 | r1439 | |
| 1364 | 1364 | //logerror("Set SIO irq %01x\n",level); |
| 1365 | 1365 | } |
| 1366 | 1366 | |
| 1367 | static struct MC6850_interface | |
| 1367 | static const struct MC6850_interface | |
| 1368 | 1368 | BBC_MC6850_calls= { |
| 1369 | 1369 | 0,// Transmit data ouput |
| 1370 | 1370 | 0,// Request to Send output |
| r1438 | r1439 | |
| 1523 | 1523 | } |
| 1524 | 1524 | |
| 1525 | 1525 | |
| 1526 | static i8271_interface bbc_i8271_interface= | |
| 1526 | static const i8271_interface bbc_i8271_interface= | |
| 1527 | 1527 | { |
| 1528 | 1528 | bbc_i8271_interrupt, |
| 1529 | 1529 | NULL |
| r1438 | r1439 | |
|---|---|---|
| 313 | 313 | } |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | static nec765_interface compis_fdc_interface = | |
| 316 | static const nec765_interface compis_fdc_interface = | |
| 317 | 317 | { |
| 318 | 318 | compis_fdc_int, |
| 319 | 319 | compis_fdc_dma_drq |
| r1438 | r1439 | |
| 433 | 433 | compis_fdc_tc((data & 0x80)?1:0); |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | static ppi8255_interface compis_ppi_interface = | |
| 436 | static const ppi8255_interface compis_ppi_interface = | |
| 437 | 437 | { |
| 438 | 438 | 1, |
| 439 | 439 | {NULL}, |
| r1438 | r1439 | |
| 458 | 458 | /* PIT 8253 */ |
| 459 | 459 | /*-------------------------------------------------------------------------*/ |
| 460 | 460 | |
| 461 | static struct pit8253_config compis_pit_config[2] = | |
| 461 | static const struct pit8253_config compis_pit_config[2] = | |
| 462 | 462 | { |
| 463 | 463 | { |
| 464 | 464 | TYPE8253, |
| r1438 | r1439 | |
| 533 | 533 | */ |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | static struct msm8251_interface compis_usart_interface= | |
| 536 | static const struct msm8251_interface compis_usart_interface= | |
| 537 | 537 | { |
| 538 | 538 | NULL, |
| 539 | 539 | NULL, |
| r1438 | r1439 | |
|---|---|---|
| 217 | 217 | kc85_disc_hw_input_gate |=(1<<7); |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | static struct nec765_interface kc_fdc_interface= | |
| 220 | static const struct nec765_interface kc_fdc_interface= | |
| 221 | 221 | { |
| 222 | 222 | kc85_fdc_interrupt, |
| 223 | 223 | kc85_fdc_dma_drq |
| r1438 | r1439 | |
| 287 | 287 | void (*enable)(int state); |
| 288 | 288 | }; |
| 289 | 289 | /* |
| 290 | static struct kc85_module kc85_v24_module= | |
| 290 | static const struct kc85_module kc85_v24_module= | |
| 291 | 291 | { |
| 292 | 292 | 0x0ee, |
| 293 | 293 | "M003", |
| 294 | 294 | "V24" |
| 295 | 295 | }; |
| 296 | 296 | */ |
| 297 | static struct kc85_module kc85_disk_interface_device= | |
| 297 | static const struct kc85_module kc85_disk_interface_device= | |
| 298 | 298 | { |
| 299 | 299 | 0x0a7, |
| 300 | 300 | "D004", |
| 301 | 301 | "Disk Interface" |
| 302 | 302 | }; |
| 303 | 303 | |
| 304 | static struct kc85_module | |
| 304 | static const struct kc85_module *modules[256>>2]; | |
| 305 | 305 | /* |
| 306 | 306 | |
| 307 | 307 | port xx80 |
| r1438 | r1439 | |
| 1806 | 1806 | #endif |
| 1807 | 1807 | } |
| 1808 | 1808 | |
| 1809 | static z80pio_interface kc85_pio_intf = | |
| 1809 | static const z80pio_interface kc85_pio_intf = | |
| 1810 | 1810 | { |
| 1811 | 1811 | kc85_pio_interrupt, /* callback when change interrupt status */ |
| 1812 | 1812 | kc85_pio_ardy_callback, /* portA ready active callback */ |
| r1438 | r1439 | |
|---|---|---|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | |
| 152 | static struct CassetteLegacyWaveFiller fmsx_legacy_fill_wave = | |
| 152 | static const struct CassetteLegacyWaveFiller fmsx_legacy_fill_wave = | |
| 153 | 153 | { |
| 154 | 154 | fmsx_cas_fill_wave, /* fill_wave */ |
| 155 | 155 | -1, /* chunk_size */ |
| r1438 | r1439 | |
| 176 | 176 | |
| 177 | 177 | |
| 178 | 178 | |
| 179 | static struct CassetteFormat fmsx_cas_format = | |
| 179 | static const struct CassetteFormat fmsx_cas_format = | |
| 180 | 180 | { |
| 181 | 181 | "tap", |
| 182 | 182 | fmsx_cas_identify, |
| r1438 | r1439 | |
|---|---|---|
| 302 | 302 | return p - buffer; |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | static struct CassetteLegacyWaveFiller uef_legacy_fill_wave = { | |
| 305 | static const struct CassetteLegacyWaveFiller uef_legacy_fill_wave = { | |
| 306 | 306 | uef_cas_fill_wave, /* fill_wave */ |
| 307 | 307 | -1, /* chunk_size */ |
| 308 | 308 | 0, /* chunk_samples */ |
| r1438 | r1439 | |
| 320 | 320 | return cassette_legacy_construct( cassette, &uef_legacy_fill_wave ); |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | struct CassetteFormat uef_cassette_format = { | |
| 323 | const struct CassetteFormat uef_cassette_format = { | |
| 324 | 324 | "uef", |
| 325 | 325 | uef_cassette_identify, |
| 326 | 326 | uef_cassette_load, |
| r1438 | r1439 | |
|---|---|---|
| 111 | 111 | |
| 112 | 112 | |
| 113 | 113 | |
| 114 | static struct CassetteLegacyWaveFiller apf_legacy_fill_wave = | |
| 114 | static const struct CassetteLegacyWaveFiller apf_legacy_fill_wave = | |
| 115 | 115 | { |
| 116 | 116 | apf_cassette_fill_wave, /* fill_wave */ |
| 117 | 117 | -1, /* chunk_size */ |
| r1438 | r1439 | |
| 138 | 138 | |
| 139 | 139 | |
| 140 | 140 | |
| 141 | static struct CassetteFormat apf_apt_format = | |
| 141 | static const struct CassetteFormat apf_apt_format = | |
| 142 | 142 | { |
| 143 | 143 | "apt", |
| 144 | 144 | apf_apt_identify, |
| r1438 | r1439 | |
|---|---|---|
| 462 | 462 | return size; |
| 463 | 463 | } |
| 464 | 464 | |
| 465 | static struct CassetteLegacyWaveFiller tzx_legacy_fill_wave = { | |
| 465 | static const struct CassetteLegacyWaveFiller tzx_legacy_fill_wave = { | |
| 466 | 466 | tzx_cas_fill_wave, /* fill_wave */ |
| 467 | 467 | -1, /* chunk_size */ |
| 468 | 468 | 0, /* chunk_samples */ |
| r1438 | r1439 | |
| 472 | 472 | 0 /* trailer_samples */ |
| 473 | 473 | }; |
| 474 | 474 | |
| 475 | static struct CassetteLegacyWaveFiller tap_legacy_fill_wave = { | |
| 475 | static const struct CassetteLegacyWaveFiller tap_legacy_fill_wave = { | |
| 476 | 476 | tap_cas_fill_wave, /* fill_wave */ |
| 477 | 477 | -1, /* chunk_size */ |
| 478 | 478 | 0, /* chunk_samples */ |
| r1438 | r1439 | |
| 516 | 516 | return cassette_legacy_construct( cassette, &cdt_legacy_fill_wave ); |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | static struct CassetteFormat tzx_cassette_format = { | |
| 519 | static const struct CassetteFormat tzx_cassette_format = { | |
| 520 | 520 | "tzx", |
| 521 | 521 | tzx_cassette_identify, |
| 522 | 522 | tzx_cassette_load, |
| 523 | 523 | NULL |
| 524 | 524 | }; |
| 525 | 525 | |
| 526 | static struct CassetteFormat tap_cassette_format = { | |
| 526 | static const struct CassetteFormat tap_cassette_format = { | |
| 527 | 527 | "tap", |
| 528 | 528 | tap_cassette_identify, |
| 529 | 529 | tap_cassette_load, |
| r1438 | r1439 | |
|---|---|---|
| 40 | 40 | return (size_t) sz; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | struct io_procs stdio_ioprocs = | |
| 43 | const struct io_procs stdio_ioprocs = | |
| 44 | 44 | { |
| 45 | 45 | stdio_closeproc, |
| 46 | 46 | stdio_seekproc, |
| r1438 | r1439 | |
| 49 | 49 | stdio_filesizeproc |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | struct io_procs stdio_ioprocs_noclose = | |
| 52 | const struct io_procs stdio_ioprocs_noclose = | |
| 53 | 53 | { |
| 54 | 54 | NULL, |
| 55 | 55 | stdio_seekproc, |
| r1438 | r1439 | |
|---|---|---|
| 93 | 93 | return generic_fill_wave(buffer, length, code, V1_BITSAMPLES, V1_BYTESAMPLES, V1_LO, vtech1_fill_wave_byte); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | static struct CassetteLegacyWaveFiller vtech1_legacy_fill_wave = | |
| 96 | static const struct CassetteLegacyWaveFiller vtech1_legacy_fill_wave = | |
| 97 | 97 | { |
| 98 | 98 | vtech1_cassette_fill_wave, /* fill_wave */ |
| 99 | 99 | 1, /* chunk_size */ |
| r1438 | r1439 | |
| 114 | 114 | return cassette_legacy_construct(cassette, &vtech1_legacy_fill_wave); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | static struct CassetteFormat vtech1_cas_format = | |
| 117 | static const struct CassetteFormat vtech1_cas_format = | |
| 118 | 118 | { |
| 119 | 119 | "cas", |
| 120 | 120 | vtech1_cas_identify, |
| r1438 | r1439 | |
| 188 | 188 | return generic_fill_wave(buffer, length, code, VT2_BITSAMPLES, VT2_BYTESAMPLES, VT2_LO, vtech2_fill_wave_byte); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | static struct CassetteLegacyWaveFiller vtech2_legacy_fill_wave = | |
| 191 | static const struct CassetteLegacyWaveFiller vtech2_legacy_fill_wave = | |
| 192 | 192 | { |
| 193 | 193 | vtech2_cassette_fill_wave, /* fill_wave */ |
| 194 | 194 | 1, /* chunk_size */ |
| r1438 | r1439 | |
| 209 | 209 | return cassette_legacy_construct(cassette, &vtech2_legacy_fill_wave); |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | static struct CassetteFormat vtech2_cas_format = | |
| 212 | static const struct CassetteFormat vtech2_cas_format = | |
| 213 | 213 | { |
| 214 | 214 | "cas", |
| 215 | 215 | vtech2_cas_identify, |
| r1438 | r1439 | |
|---|---|---|
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | |
| 295 | static struct CassetteLegacyWaveFiller csw_legacy_fill_wave = { | |
| 295 | static const struct CassetteLegacyWaveFiller csw_legacy_fill_wave = { | |
| 296 | 296 | csw_cas_fill_wave, /* fill_wave */ |
| 297 | 297 | -1, /* chunk_size */ |
| 298 | 298 | 0, /* chunk_samples */ |
| r1438 | r1439 | |
| 310 | 310 | return cassette_legacy_construct( cassette, &csw_legacy_fill_wave ); |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | static struct CassetteFormat csw_cassette_format = { | |
| 313 | static const struct CassetteFormat csw_cassette_format = { | |
| 314 | 314 | "csw", |
| 315 | 315 | csw_cassette_identify, |
| 316 | 316 | csw_cassette_load, |
| r1438 | r1439 | |
|---|---|---|
| 45 | 45 | |
| 46 | 46 | ***************************************************************************/ |
| 47 | 47 | |
| 48 | extern struct io_procs stdio_ioprocs; | |
| 49 | extern struct io_procs stdio_ioprocs_noclose; | |
| 48 | extern const struct io_procs stdio_ioprocs; | |
| 49 | extern const struct io_procs stdio_ioprocs_noclose; | |
| 50 | 50 | |
| 51 | 51 | |
| 52 | 52 |
| r1438 | r1439 | |
|---|---|---|
| 930 | 930 | |
| 931 | 931 | const char *floppy_error(floperr_t err) |
| 932 | 932 | { |
| 933 | const char *error_messages[] = | |
| 933 | static const char *const error_messages[] = | |
| 934 | 934 | { |
| 935 | 935 | "The operation completed successfully", |
| 936 | 936 | "Fatal internal error", |
| r1438 | r1439 | |
|---|---|---|
| 228 | 228 | |
| 229 | 229 | |
| 230 | 230 | |
| 231 | struct CassetteFormat wavfile_format = | |
| 231 | const struct CassetteFormat wavfile_format = | |
| 232 | 232 | { |
| 233 | 233 | "wav", |
| 234 | 234 | wavfile_identify, |
| r1438 | r1439 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | |
| 83 | 83 | #define FLOPPY_OPTIONS_START(name) \ |
| 84 | struct FloppyFormat floppyoptions_##name[] = \ | |
| 84 | const struct FloppyFormat floppyoptions_##name[] = \ | |
| 85 | 85 | { \ |
| 86 | 86 | |
| 87 | 87 | #define FLOPPY_OPTIONS_END \ |
| r1438 | r1439 | |
| 89 | 89 | }; |
| 90 | 90 | |
| 91 | 91 | #define FLOPPY_OPTIONS_EXTERN(name) \ |
| 92 | extern struct FloppyFormat floppyoptions_##name[] \ | |
| 92 | extern const struct FloppyFormat floppyoptions_##name[] \ | |
| 93 | 93 | |
| 94 | 94 | #define FLOPPY_OPTION(name, extensions_, description_, identify_, construct_, ranges_)\ |
| 95 | 95 | { #name, extensions_, description_, identify_, construct_, ranges_ }, \ |
| r1438 | r1439 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | #include "cassimg.h" |
| 13 | 13 | |
| 14 | extern struct CassetteFormat wavfile_format; | |
| 14 | extern const struct CassetteFormat wavfile_format; | |
| 15 | 15 | |
| 16 | 16 | #endif /* WAVFILE_H */ |
| r1438 | r1439 | |
|---|---|---|
| 299 | 299 | |
| 300 | 300 | |
| 301 | 301 | |
| 302 | static struct CassetteLegacyWaveFiller mz700_legacy_fill_wave = | |
| 302 | static const struct CassetteLegacyWaveFiller mz700_legacy_fill_wave = | |
| 303 | 303 | { |
| 304 | 304 | fill_wave, /* fill_wave */ |
| 305 | 305 | 1, /* chunk_size */ |
| r1438 | r1439 | |
| 326 | 326 | |
| 327 | 327 | |
| 328 | 328 | |
| 329 | static struct CassetteFormat mz700_cas_format = | |
| 329 | static const struct CassetteFormat mz700_cas_format = | |
| 330 | 330 | { |
| 331 | 331 | "m12", |
| 332 | 332 | mz700_cas_identify, |
| r1438 | r1439 | |
|---|---|---|
| 164 | 164 | |
| 165 | 165 | |
| 166 | 166 | |
| 167 | static struct CassetteLegacyWaveFiller svi_legacy_fill_wave = | |
| 167 | static const struct CassetteLegacyWaveFiller svi_legacy_fill_wave = | |
| 168 | 168 | { |
| 169 | 169 | svi_cas_fill_wave, /* fill_wave */ |
| 170 | 170 | -1, /* chunk_size */ |
| r1438 | r1439 | |
| 191 | 191 | |
| 192 | 192 | |
| 193 | 193 | |
| 194 | static struct CassetteFormat svi_cas_format = | |
| 194 | static const struct CassetteFormat svi_cas_format = | |
| 195 | 195 | { |
| 196 | 196 | "cas", |
| 197 | 197 | svi_cas_identify, |
| r1438 | r1439 | |
|---|---|---|
| 126 | 126 | return CASSETTE_ERROR_SUCCESS; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | static struct CassetteFormat sordm5_cas_format = | |
| 129 | static const struct CassetteFormat sordm5_cas_format = | |
| 130 | 130 | { |
| 131 | 131 | "cas", |
| 132 | 132 | sordm5_tap_identify, |
| r1438 | r1439 | |
|---|---|---|
| 4 | 4 | #define TI85_PC_OK_PACKET_SIZE 4 |
| 5 | 5 | #define TI85_PC_END_PACKET_SIZE 4 |
| 6 | 6 | |
| 7 | UINT8 ti85_pc_ok_packet[] = {0x05, 0x56, 0x00, 0x00}; | |
| 8 | UINT8 ti86_pc_ok_packet[] = {0x06, 0x56, 0x00, 0x00}; | |
| 9 | UINT8 ti85_pc_continue_packet[] = {0x05, 0x09, 0x00, 0x00}; | |
| 10 | UINT8 ti86_pc_continue_packet[] = {0x06, 0x09, 0x00, 0x00}; | |
| 11 | UINT8 ti85_pc_screen_request_packet[] = {0x05, 0x6d, 0x00, 0x00}; | |
| 12 | static UINT8 ti85_pc_end_packet[] = {0x05, 0x92, 0x00, 0x00}; | |
| 13 | static UINT8 ti86_pc_end_packet[] = {0x06, 0x92, 0x00, 0x00}; | |
| 7 | const UINT8 ti85_pc_ok_packet[] = {0x05, 0x56, 0x00, 0x00}; | |
| 8 | const UINT8 ti86_pc_ok_packet[] = {0x06, 0x56, 0x00, 0x00}; | |
| 9 | const UINT8 ti85_pc_continue_packet[] = {0x05, 0x09, 0x00, 0x00}; | |
| 10 | const UINT8 ti86_pc_continue_packet[] = {0x06, 0x09, 0x00, 0x00}; | |
| 11 | const UINT8 ti85_pc_screen_request_packet[] = {0x05, 0x6d, 0x00, 0x00}; | |
| 12 | static const UINT8 ti85_pc_end_packet[] = {0x05, 0x92, 0x00, 0x00}; | |
| 13 | static const UINT8 ti86_pc_end_packet[] = {0x06, 0x92, 0x00, 0x00}; | |
| 14 | 14 | |
| 15 | UINT8 ti85_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x35, 0x2a, 0x2a, 0x1a, 0x0c, 0x00}; | |
| 16 | UINT8 ti86_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x36, 0x2a, 0x2a, 0x1a, 0x0a, 0x00}; | |
| 15 | const UINT8 ti85_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x35, 0x2a, 0x2a, 0x1a, 0x0c, 0x00}; | |
| 16 | const UINT8 ti86_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x36, 0x2a, 0x2a, 0x1a, 0x0a, 0x00}; | |
| 17 | 17 | |
| 18 | 18 | int ti85_serial_transfer_type = TI85_SEND_VARIABLES; |
| 19 | 19 | |
| 20 | UINT16 ti85_calculate_checksum(UINT8* data, unsigned int size) | |
| 20 | UINT16 ti85_calculate_checksum(const UINT8* data, unsigned int size) | |
| 21 | 21 | { |
| 22 | 22 | UINT16 checksum = 0; |
| 23 | 23 | unsigned int i; |
| r1438 | r1439 | |
| 27 | 27 | return checksum; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | UINT16 ti85_variables_count (UINT8 * ti85_data, unsigned int ti85_data_size) | |
| 30 | UINT16 ti85_variables_count (const UINT8 * ti85_data, unsigned int ti85_data_size) | |
| 31 | 31 | { |
| 32 | 32 | unsigned int pos, head_size, var_size; |
| 33 | 33 | UINT16 number_of_entries = 0; |
| r1438 | r1439 | |
| 42 | 42 | return number_of_entries; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | static void ti85_backup_read (UINT8 * ti85_data, unsigned int ti85_data_size, ti85_entry * ti85_entries) | |
| 45 | static void ti85_backup_read (const UINT8 * ti85_data, unsigned int ti85_data_size, ti85_entry * ti85_entries) | |
| 46 | 46 | { |
| 47 | 47 | unsigned int pos = 0x42+2; |
| 48 | 48 | |
| r1438 | r1439 | |
| 59 | 59 | ti85_entries[2].offset = pos; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | void ti85_variables_read (UINT8 * ti85_data, unsigned int ti85_data_size, ti85_entry * ti85_entries) | |
| 62 | void ti85_variables_read (const UINT8 * ti85_data, unsigned int ti85_data_size, ti85_entry * ti85_entries) | |
| 63 | 63 | { |
| 64 | 64 | unsigned int pos, i=0; |
| 65 | 65 | |
| r1438 | r1439 | |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | |
| 80 | void ti85_convert_data_to_stream (UINT8* file_data, unsigned int size, UINT8* serial_data) | |
| 80 | void ti85_convert_data_to_stream (const UINT8* file_data, unsigned int size, UINT8* serial_data) | |
| 81 | 81 | { |
| 82 | 82 | unsigned int i, bits; |
| 83 | 83 | |
| r1438 | r1439 | |
| 86 | 86 | serial_data[i*8+bits] = (file_data[i]>>bits) & 0x01; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | void ti85_convert_stream_to_data (UINT8* serial_data, UINT32 size, UINT8* data) | |
| 89 | void ti85_convert_stream_to_data (const UINT8* serial_data, UINT32 size, UINT8* data) | |
| 90 | 90 | { |
| 91 | 91 | UINT32 i; |
| 92 | 92 | UINT8 bits; |
| r1438 | r1439 | |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | int ti85_convert_file_data_to_serial_stream (UINT8* file_data, unsigned int file_size, ti85_serial_data* serial_data, char* calc_type) | |
| 104 | int ti85_convert_file_data_to_serial_stream (const UINT8* file_data, unsigned int file_size, ti85_serial_data* serial_data, char* calc_type) | |
| 105 | 105 | { |
| 106 | 106 | UINT16 i; |
| 107 | 107 | UINT16 number_of_entries; |
| r1438 | r1439 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | |
| 23 | static struct pc_disk_sizes disk_sizes[] = | |
| 23 | static const struct pc_disk_sizes disk_sizes[] = | |
| 24 | 24 | { |
| 25 | 25 | { 8*1*40*512, 8, 1}, /* 5 1/4 inch double density single sided */ |
| 26 | 26 | { 8*2*40*512, 8, 2}, /* 5 1/4 inch double density */ |
| r1438 | r1439 | |
|---|---|---|
| 107 | 107 | |
| 108 | 108 | |
| 109 | 109 | |
| 110 | static struct CassetteLegacyWaveFiller lviv_legacy_fill_wave = | |
| 110 | static const struct CassetteLegacyWaveFiller lviv_legacy_fill_wave = | |
| 111 | 111 | { |
| 112 | 112 | lviv_cassette_fill_wave, /* fill_wave */ |
| 113 | 113 | -1, /* chunk_size */ |
| r1438 | r1439 | |
| 134 | 134 | |
| 135 | 135 | |
| 136 | 136 | |
| 137 | static struct CassetteFormat lviv_lvt_image_format = | |
| 137 | static const struct CassetteFormat lviv_lvt_image_format = | |
| 138 | 138 | { |
| 139 | 139 | "lvt", |
| 140 | 140 | lviv_lvt_identify, |
| r1438 | r1439 | |
|---|---|---|
| 30 | 30 | UINT16 number_of_variables; |
| 31 | 31 | } ti85_serial_data; |
| 32 | 32 | |
| 33 | extern UINT8 ti85_file_signature[]; | |
| 34 | extern UINT8 ti86_file_signature[]; | |
| 35 | extern UINT8 ti85_pc_ok_packet[]; | |
| 36 | extern UINT8 ti86_pc_ok_packet[]; | |
| 37 | extern UINT8 ti85_pc_continue_packet[]; | |
| 38 | extern UINT8 ti86_pc_continue_packet[]; | |
| 39 | extern UINT8 ti85_pc_screen_request_packet[]; | |
| 33 | extern const UINT8 ti85_file_signature[]; | |
| 34 | extern const UINT8 ti86_file_signature[]; | |
| 35 | extern const UINT8 ti85_pc_ok_packet[]; | |
| 36 | extern const UINT8 ti86_pc_ok_packet[]; | |
| 37 | extern const UINT8 ti85_pc_continue_packet[]; | |
| 38 | extern const UINT8 ti86_pc_continue_packet[]; | |
| 39 | extern const UINT8 ti85_pc_screen_request_packet[]; | |
| 40 | 40 | extern int ti85_serial_transfer_type; |
| 41 | 41 | |
| 42 | extern UINT16 ti85_calculate_checksum(UINT8*, unsigned int); | |
| 43 | extern UINT16 ti85_variables_count (UINT8 *, unsigned int); | |
| 44 | extern void ti85_variables_read (UINT8 *, unsigned int, ti85_entry *); | |
| 45 | extern int ti85_convert_file_data_to_serial_stream (UINT8*, UINT32, ti85_serial_data*, char*); | |
| 46 | extern void ti85_convert_data_to_stream (UINT8*, unsigned int, UINT8*); | |
| 47 | extern void ti85_convert_stream_to_data (UINT8*, unsigned int, UINT8*); | |
| 42 | extern UINT16 ti85_calculate_checksum(const UINT8*, unsigned int); | |
| 43 | extern UINT16 ti85_variables_count (const UINT8 *, unsigned int); | |
| 44 | extern void ti85_variables_read (const UINT8 *, unsigned int, ti85_entry *); | |
| 45 | extern int ti85_convert_file_data_to_serial_stream (const UINT8*, UINT32, ti85_serial_data*, char*); | |
| 46 | extern void ti85_convert_data_to_stream (const UINT8*, unsigned int, UINT8*); | |
| 47 | extern void ti85_convert_stream_to_data (const UINT8*, unsigned int, UINT8*); | |
| 48 | 48 | extern void ti85_free_serial_stream (ti85_serial_data*); |
| r1438 | r1439 | |
|---|---|---|
| 364 | 364 | |
| 365 | 365 | |
| 366 | 366 | |
| 367 | static floppy_interface thom_floppy_interface = | |
| 367 | static const floppy_interface thom_floppy_interface = | |
| 368 | 368 | { |
| 369 | 369 | thom_floppy_seek, |
| 370 | 370 | thom_floppy_get_sectors_per_track, |
| r1438 | r1439 | |
|---|---|---|
| 259 | 259 | |
| 260 | 260 | |
| 261 | 261 | |
| 262 | struct CassetteFormat coco_cas_format = | |
| 262 | const struct CassetteFormat coco_cas_format = | |
| 263 | 263 | { |
| 264 | 264 | "cas", |
| 265 | 265 | coco_cas_identify, |
| r1438 | r1439 | |
|---|---|---|
| 214 | 214 | return p - buffer; |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | static struct CassetteLegacyWaveFiller primo_legacy_fill_wave = | |
| 217 | static const struct CassetteLegacyWaveFiller primo_legacy_fill_wave = | |
| 218 | 218 | { |
| 219 | 219 | primo_cassette_fill_wave, /* fill_wave */ |
| 220 | 220 | -1, /* chunk_size */ |
| r1438 | r1439 | |
| 235 | 235 | return cassette_legacy_construct(cassette, &primo_legacy_fill_wave); |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | static struct CassetteFormat primo_ptp_image_format = | |
| 238 | static const struct CassetteFormat primo_ptp_image_format = | |
| 239 | 239 | { |
| 240 | 240 | "ptp", |
| 241 | 241 | primo_ptp_identify, |
| r1438 | r1439 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | #include "formats/cassimg.h" |
| 13 | 13 | |
| 14 | extern struct CassetteFormat coco_cas_format; | |
| 14 | extern const struct CassetteFormat coco_cas_format; | |
| 15 | 15 | extern const struct CassetteModulation coco_cas_modulation; |
| 16 | 16 | |
| 17 | 17 | CASSETTE_FORMATLIST_EXTERN(coco_cassette_formats); |
| r1438 | r1439 | |
|---|---|---|
| 85 | 85 | return p - buffer; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | static struct CassetteLegacyWaveFiller pmd85_legacy_fill_wave = | |
| 88 | static const struct CassetteLegacyWaveFiller pmd85_legacy_fill_wave = | |
| 89 | 89 | { |
| 90 | 90 | pmd85_cassette_fill_wave, /* fill_wave */ |
| 91 | 91 | -1, /* chunk_size */ |
| r1438 | r1439 | |
| 106 | 106 | return cassette_legacy_construct(cassette, &pmd85_legacy_fill_wave); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | static struct CassetteFormat pmd85_pmd_image_format = | |
| 109 | static const struct CassetteFormat pmd85_pmd_image_format = | |
| 110 | 110 | { |
| 111 | 111 | "pmd", |
| 112 | 112 | pmd85_pmd_identify, |
| r1438 | r1439 | |
|---|---|---|
| 146 | 146 | |
| 147 | 147 | |
| 148 | 148 | casserr_t cassette_open_choices(void *file, const struct io_procs *procs, const char *extension, |
| 149 | const struct CassetteFormat **formats, int flags, cassette_image **outcassette) | |
| 149 | const struct CassetteFormat *const *formats, int flags, cassette_image **outcassette) | |
| 150 | 150 | { |
| 151 | 151 | casserr_t err; |
| 152 | 152 | cassette_image *cassette; |
| r1438 | r1439 | |
| 226 | 226 | { |
| 227 | 227 | casserr_t err; |
| 228 | 228 | cassette_image *cassette; |
| 229 | static struct CassetteOptions default_options = { 1, 16, 44100 }; | |
| 229 | static const struct CassetteOptions default_options = { 1, 16, 44100 }; | |
| 230 | 230 | |
| 231 | 231 | /* cannot create to a read only image */ |
| 232 | 232 | if (flags & CASSETTE_FLAG_READONLY) |
| r1438 | r1439 | |
|---|---|---|
| 189 | 189 | return p - buffer; |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | static struct CassetteLegacyWaveFiller zx81_legacy_fill_wave = | |
| 192 | static const struct CassetteLegacyWaveFiller zx81_legacy_fill_wave = | |
| 193 | 193 | { |
| 194 | 194 | zx81_cassette_fill_wave, /* fill_wave */ |
| 195 | 195 | -1, /* chunk_size */ |
| r1438 | r1439 | |
| 211 | 211 | return cassette_legacy_construct(cassette, &zx81_legacy_fill_wave); |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | static struct CassetteFormat zx81_p_image_format = | |
| 214 | static const struct CassetteFormat zx81_p_image_format = | |
| 215 | 215 | { |
| 216 | 216 | "p,81", |
| 217 | 217 | zx81_p_identify, |
| r1438 | r1439 | |
| 253 | 253 | return p - buffer; |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | static struct CassetteLegacyWaveFiller zx80_legacy_fill_wave = | |
| 256 | static const struct CassetteLegacyWaveFiller zx80_legacy_fill_wave = | |
| 257 | 257 | { |
| 258 | 258 | zx80_cassette_fill_wave, /* fill_wave */ |
| 259 | 259 | -1, /* chunk_size */ |
| r1438 | r1439 | |
| 274 | 274 | return cassette_legacy_construct(cassette, &zx80_legacy_fill_wave); |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | static struct CassetteFormat zx80_o_image_format = | |
| 277 | static const struct CassetteFormat zx80_o_image_format = | |
| 278 | 278 | { |
| 279 | 279 | "o,80", |
| 280 | 280 | zx80_o_identify, |
| r1438 | r1439 | |
|---|---|---|
| 114 | 114 | }; |
| 115 | 115 | |
| 116 | 116 | /* builtin formats */ |
| 117 | extern struct CassetteFormat wavfile_format; | |
| 117 | extern const struct CassetteFormat wavfile_format; | |
| 118 | 118 | |
| 119 | 119 | /* macros for specifying format lists */ |
| 120 | 120 | #define CASSETTE_FORMATLIST_EXTERN(name) \ |
| 121 | extern const struct CassetteFormat *name[] | |
| 121 | extern const struct CassetteFormat *const name[] | |
| 122 | 122 | |
| 123 | 123 | #define CASSETTE_FORMATLIST_START(name) \ |
| 124 | const struct CassetteFormat *name[] = \ | |
| 124 | const struct CassetteFormat *const name[] = \ | |
| 125 | 125 | { \ |
| 126 | 126 | &wavfile_format, \ |
| 127 | 127 | |
| r1438 | r1439 | |
| 143 | 143 | casserr_t cassette_open(void *file, const struct io_procs *procs, |
| 144 | 144 | const struct CassetteFormat *format, int flags, cassette_image **outcassette); |
| 145 | 145 | casserr_t cassette_open_choices(void *file, const struct io_procs *procs, const char *extension, |
| 146 | const struct CassetteFormat **formats, int flags, cassette_image **outcassette); | |
| 146 | const struct CassetteFormat *const *formats, int flags, cassette_image **outcassette); | |
| 147 | 147 | casserr_t cassette_create(void *file, const struct io_procs *procs, const struct CassetteFormat *format, |
| 148 | 148 | const struct CassetteOptions *opts, int flags, cassette_image **outcassette); |
| 149 | 149 | casserr_t cassette_save(cassette_image *cassette); |
| r1438 | r1439 | |
|---|---|---|
| 489 | 489 | |
| 490 | 490 | |
| 491 | 491 | |
| 492 | static struct CassetteLegacyWaveFiller oric_legacy_fill_wave = | |
| 492 | static const struct CassetteLegacyWaveFiller oric_legacy_fill_wave = | |
| 493 | 493 | { |
| 494 | 494 | oric_cassette_fill_wave, /* fill_wave */ |
| 495 | 495 | -1, /* chunk_size */ |
| r1438 | r1439 | |
| 516 | 516 | |
| 517 | 517 | |
| 518 | 518 | |
| 519 | static struct CassetteFormat oric_tap_format = | |
| 519 | static const struct CassetteFormat oric_tap_format = | |
| 520 | 520 | { |
| 521 | 521 | "tap", |
| 522 | 522 | oric_tap_identify, |
| r1438 | r1439 | |
|---|---|---|
| 129 | 129 | return a26_cas_do_work( NULL, casdata ); |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | static struct CassetteLegacyWaveFiller a26_legacy_fill_wave = { | |
| 132 | static const struct CassetteLegacyWaveFiller a26_legacy_fill_wave = { | |
| 133 | 133 | a26_cas_fill_wave, |
| 134 | 134 | -1, |
| 135 | 135 | 0, |
| r1438 | r1439 | |
| 153 | 153 | return cassette_legacy_construct( cassette, &a26_legacy_fill_wave ); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | static struct CassetteFormat a26_cassette_format = { | |
| 156 | static const struct CassetteFormat a26_cassette_format = { | |
| 157 | 157 | "a26", |
| 158 | 158 | a26_cassette_identify, |
| 159 | 159 | a26_cassette_load, |
| r1438 | r1439 | |
|---|---|---|
| 569 | 569 | |
| 570 | 570 | |
| 571 | 571 | |
| 572 | static struct CassetteFormat to7_k7 = | |
| 572 | static const struct CassetteFormat to7_k7 = | |
| 573 | 573 | { "k7", to7_k7_identify, to7_k7_load, NULL /* no save */ }; |
| 574 | 574 | |
| 575 | 575 | |
| r1438 | r1439 | |
| 934 | 934 | |
| 935 | 935 | |
| 936 | 936 | |
| 937 | static struct CassetteFormat mo5_k5 = | |
| 937 | static const struct CassetteFormat mo5_k5 = | |
| 938 | 938 | { "k5,k7", mo5_k5_identify, mo5_k5_load, NULL /* no save */ }; |
| 939 | 939 | |
| 940 | 940 | |
| r1438 | r1439 | |
| 985 | 985 | /********************* formats ************************/ |
| 986 | 986 | |
| 987 | 987 | |
| 988 | const struct CassetteFormat *to7_cassette_formats[] = | |
| 988 | const struct CassetteFormat *const to7_cassette_formats[] = | |
| 989 | 989 | { &to7_wav, &to7_k7, NULL }; |
| 990 | 990 | |
| 991 | 991 | |
| 992 | const struct CassetteFormat *mo5_cassette_formats[] = | |
| 992 | const struct CassetteFormat *const mo5_cassette_formats[] = | |
| 993 | 993 | { &mo5_wav, &mo5_k5, NULL }; |
| 994 | 994 | |
| 995 | 995 |
| r1438 | r1439 | |
|---|---|---|
| 130 | 130 | set_led_status(1, level); |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | static CDP1802_CONFIG vip_config = | |
| 133 | static const CDP1802_CONFIG vip_config = | |
| 134 | 134 | { |
| 135 | 135 | vip_mode_r, |
| 136 | 136 | vip_ef_r, |
| r1438 | r1439 | |
|---|---|---|
| 120 | 120 | } |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | static struct CustomSound_interface wswan_sound_interface = | |
| 123 | static const struct CustomSound_interface wswan_sound_interface = | |
| 124 | 124 | { |
| 125 | 125 | wswan_sh_start |
| 126 | 126 | }; |
| r1438 | r1439 | |
|---|---|---|
| 202 | 202 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, comquest_charlayout, 0, 2 ) |
| 203 | 203 | GFXDECODE_END |
| 204 | 204 | |
| 205 | static unsigned char comquest_palette[] = | |
| 205 | static const unsigned char comquest_palette[] = | |
| 206 | 206 | { |
| 207 | 207 | 0, 0, 0, |
| 208 | 208 | 255,255,255 |
| 209 | 209 | }; |
| 210 | 210 | |
| 211 | static unsigned short comquest_colortable[1][2] = { | |
| 211 | static const unsigned short comquest_colortable[1][2] = { | |
| 212 | 212 | { 0, 1 }, |
| 213 | 213 | }; |
| 214 | 214 | |
| r1438 | r1439 | |
| 224 | 224 | // memory_set_bankptr(1,mem+0x00000); |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | static UINT32 amask= 0xffff; | |
| 227 | static const UINT32 amask= 0xffff; | |
| 228 | 228 | |
| 229 | 229 | |
| 230 | 230 | static MACHINE_DRIVER_START( comquest ) |
| r1438 | r1439 | |
|---|---|---|
| 337 | 337 | |
| 338 | 338 | /* Palette Initialization */ |
| 339 | 339 | |
| 340 | static unsigned char zx80_palette[] = | |
| 340 | static const unsigned char zx80_palette[] = | |
| 341 | 341 | { |
| 342 | 342 | 255,255,255, /* white */ |
| 343 | 343 | 0, 0, 0, /* black */ |
| 344 | 344 | }; |
| 345 | 345 | |
| 346 | static unsigned char zx81_palette[] = | |
| 346 | static const unsigned char zx81_palette[] = | |
| 347 | 347 | { |
| 348 | 348 | 255,255,255, /* white */ |
| 349 | 349 | 0, 0, 0, /* black */ |
| 350 | 350 | }; |
| 351 | 351 | |
| 352 | static unsigned char ts1000_palette[] = | |
| 352 | static const unsigned char ts1000_palette[] = | |
| 353 | 353 | { |
| 354 | 354 | 64,244,244, /* cyan */ |
| 355 | 355 | 0, 0, 0, /* black */ |
| 356 | 356 | }; |
| 357 | 357 | |
| 358 | static unsigned short zx_colortable[] = | |
| 358 | static const unsigned short zx_colortable[] = | |
| 359 | 359 | { |
| 360 | 360 | 0, 1, /* white on black */ |
| 361 | 361 | 1, 0 /* black on white */ |
| r1438 | r1439 | |
| 533 | 533 | |
| 534 | 534 | /* System Configuration */ |
| 535 | 535 | |
| 536 | static struct CassetteOptions zx81_cassette_options = { | |
| 536 | static const struct CassetteOptions zx81_cassette_options = { | |
| 537 | 537 | 1, /* channels */ |
| 538 | 538 | 16, /* bits per sample */ |
| 539 | 539 | 44100 /* sample frequency */ |
| r1438 | r1439 | |
|---|---|---|
| 64 | 64 | |
| 65 | 65 | */ |
| 66 | 66 | |
| 67 | static unsigned char dgnbeta_palette[] = | |
| 67 | static const unsigned char dgnbeta_palette[] = | |
| 68 | 68 | { |
| 69 | 69 | /*normal brightness */ |
| 70 | 70 | 0x00,0x00,0x00, /* black */ |
| r1438 | r1439 | |
|---|---|---|
| 429 | 429 | *************************************/ |
| 430 | 430 | |
| 431 | 431 | |
| 432 | static struct jaguar_config gpu_config = | |
| 432 | static const struct jaguar_config gpu_config = | |
| 433 | 433 | { |
| 434 | 434 | jaguar_gpu_cpu_int |
| 435 | 435 | }; |
| 436 | 436 | |
| 437 | 437 | |
| 438 | static struct jaguar_config dsp_config = | |
| 438 | static const struct jaguar_config dsp_config = | |
| 439 | 439 | { |
| 440 | 440 | jaguar_dsp_cpu_int |
| 441 | 441 | }; |
| r1438 | r1439 | |
|---|---|---|
| 143 | 143 | return 0x80; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | static struct ES5503interface es5503_interface = | |
| 146 | static const struct ES5503interface es5503_interface = | |
| 147 | 147 | { |
| 148 | 148 | apple2gs_doc_irq, |
| 149 | 149 | apple2gs_adc_read, |
| r1438 | r1439 | |
|---|---|---|
| 164 | 164 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, hp48_charlayout, 0, 8 ) |
| 165 | 165 | GFXDECODE_END |
| 166 | 166 | |
| 167 | static SATURN_CONFIG config={ | |
| 167 | static const SATURN_CONFIG config={ | |
| 168 | 168 | hp48_out, hp48_in, |
| 169 | 169 | hp48_mem_reset, hp48_mem_config, hp48_mem_unconfig, hp48_mem_id, |
| 170 | 170 | hp48_crc |
| r1438 | r1439 | |
|---|---|---|
| 300 | 300 | ROM_LOAD ("910429.bin", 0x20000, 0x20000, CRC(b025805c) SHA1(c3b05665684f74adbe33052a2d10170a1063ee7d)) |
| 301 | 301 | ROM_END |
| 302 | 302 | |
| 303 | static SID6581_interface c65_sound_interface = | |
| 303 | static const SID6581_interface c65_sound_interface = | |
| 304 | 304 | { |
| 305 | 305 | c64_paddle_read |
| 306 | 306 | }; |
| r1438 | r1439 | |
|---|---|---|
| 170 | 170 | PORT_BIT(0xcb, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 171 | 171 | INPUT_PORTS_END |
| 172 | 172 | |
| 173 | static struct CassetteOptions dai_cassette_options = { | |
| 173 | static const struct CassetteOptions dai_cassette_options = { | |
| 174 | 174 | 1, /* channels */ |
| 175 | 175 | 16, /* bits per sample */ |
| 176 | 176 | 44100 /* sample frequency */ |
| r1438 | r1439 | |
|---|---|---|
| 64 | 64 | |
| 65 | 65 | |
| 66 | 66 | |
| 67 | static struct CustomSound_interface custom_interface = | |
| 67 | static const struct CustomSound_interface custom_interface = | |
| 68 | 68 | { |
| 69 | 69 | mac_sh_start |
| 70 | 70 | }; |
| r1438 | r1439 | |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | |
| 385 | static struct MachineDriver machine_driver_mac2 = | |
| 385 | static const struct MachineDriver machine_driver_mac2 = | |
| 386 | 386 | { |
| 387 | 387 | /* basic machine hardware */ |
| 388 | 388 | { |
| r1438 | r1439 | |
|---|---|---|
| 642 | 642 | 0xff,0xc1,0x60, 0xff,0xca,0x69, 0xff,0xcf,0x7e, 0xff,0xda,0x96 |
| 643 | 643 | }; |
| 644 | 644 | |
| 645 | static unsigned short atari_colortable[] = | |
| 645 | static const unsigned short atari_colortable[] = | |
| 646 | 646 | { |
| 647 | 647 | 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, |
| 648 | 648 | 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f, |
| r1438 | r1439 | |
| 682 | 682 | |
| 683 | 683 | |
| 684 | 684 | |
| 685 | static struct POKEYinterface pokey_interface = | |
| 685 | static const struct POKEYinterface pokey_interface = | |
| 686 | 686 | { |
| 687 | 687 | { |
| 688 | 688 | analog_0_r, |
| r1438 | r1439 | |
|---|---|---|
| 782 | 782 | } |
| 783 | 783 | } |
| 784 | 784 | |
| 785 | static unsigned long baud_rate_table[]= | |
| 785 | static const unsigned long baud_rate_table[]= | |
| 786 | 786 | { |
| 787 | 787 | 150, |
| 788 | 788 | 300, |
| r1438 | r1439 | |
| 942 | 942 | } |
| 943 | 943 | |
| 944 | 944 | |
| 945 | static struct tc8521_interface nc100_tc8521_interface= | |
| 945 | static const struct tc8521_interface nc100_tc8521_interface= | |
| 946 | 946 | { |
| 947 | 947 | nc100_tc8521_alarm_callback, |
| 948 | 948 | }; |
| 949 | 949 | |
| 950 | static struct msm8251_interface nc100_uart_interface= | |
| 950 | static const struct msm8251_interface nc100_uart_interface= | |
| 951 | 951 | { |
| 952 | 952 | nc100_txrdy_callback, |
| 953 | 953 | NULL, |
| r1438 | r1439 | |
| 969 | 969 | nc_update_interrupts(); |
| 970 | 970 | } |
| 971 | 971 | |
| 972 | static CENTRONICS_CONFIG nc100_cent_config[1]={ | |
| 972 | static const CENTRONICS_CONFIG nc100_cent_config[1]={ | |
| 973 | 973 | { |
| 974 | 974 | PRINTER_CENTRONICS, |
| 975 | 975 | nc100_printer_handshake_in |
| r1438 | r1439 | |
| 1276 | 1276 | nc_update_interrupts(); |
| 1277 | 1277 | } |
| 1278 | 1278 | |
| 1279 | static CENTRONICS_CONFIG nc200_cent_config[1]={ | |
| 1279 | static const CENTRONICS_CONFIG nc200_cent_config[1]={ | |
| 1280 | 1280 | { |
| 1281 | 1281 | PRINTER_CENTRONICS, |
| 1282 | 1282 | nc200_printer_handshake_in |
| r1438 | r1439 | |
| 1328 | 1328 | nc200_refresh_uart_interrupt(); |
| 1329 | 1329 | } |
| 1330 | 1330 | |
| 1331 | static struct msm8251_interface nc200_uart_interface= | |
| 1331 | static const struct msm8251_interface nc200_uart_interface= | |
| 1332 | 1332 | { |
| 1333 | 1333 | nc200_rxrdy_callback, |
| 1334 | 1334 | NULL, |
| r1438 | r1439 | |
| 1356 | 1356 | nc_update_interrupts(); |
| 1357 | 1357 | } |
| 1358 | 1358 | |
| 1359 | static struct nec765_interface nc200_nec765_interface= | |
| 1359 | static const struct nec765_interface nc200_nec765_interface= | |
| 1360 | 1360 | { |
| 1361 | 1361 | nc200_fdc_interrupt, |
| 1362 | 1362 | NULL, |
| r1438 | r1439 | |
|---|---|---|
| 417 | 417 | /*C64_DIPS */ |
| 418 | 418 | INPUT_PORTS_END |
| 419 | 419 | |
| 420 | static unsigned char cbm700_palette[] = | |
| 420 | static const unsigned char cbm700_palette[] = | |
| 421 | 421 | { |
| 422 | 422 | 0,0,0, /* black */ |
| 423 | 423 | 0,0x80,0, /* green */ |
| 424 | 424 | }; |
| 425 | 425 | |
| 426 | static unsigned short cbmb_colortable[] = { | |
| 426 | static const unsigned short cbmb_colortable[] = { | |
| 427 | 427 | 0, 1 |
| 428 | 428 | }; |
| 429 | 429 |
| r1438 | r1439 | |
|---|---|---|
| 179 | 179 | } |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | static struct nec765_interface sord_fd5_nec765_interface= | |
| 182 | static const struct nec765_interface sord_fd5_nec765_interface= | |
| 183 | 183 | { |
| 184 | 184 | sord_fd5_fdc_interrupt, |
| 185 | 185 | NULL |
| r1438 | r1439 | |
| 302 | 302 | #endif |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | static ppi8255_interface sord_ppi8255_interface = | |
| 305 | static const ppi8255_interface sord_ppi8255_interface = | |
| 306 | 306 | { |
| 307 | 307 | 1, |
| 308 | 308 | {sord_ppi_porta_r}, |
| r1438 | r1439 | |
| 454 | 454 | |
| 455 | 455 | |
| 456 | 456 | |
| 457 | static CENTRONICS_CONFIG sordm5_cent_config[1] = | |
| 457 | static const CENTRONICS_CONFIG sordm5_cent_config[1] = | |
| 458 | 458 | { |
| 459 | 459 | { |
| 460 | 460 | PRINTER_CENTRONICS, |
| r1438 | r1439 | |
| 623 | 623 | INPUT_PORTS_END |
| 624 | 624 | |
| 625 | 625 | |
| 626 | static struct z80_irq_daisy_chain sord_m5_daisy_chain[] = | |
| 626 | static const struct z80_irq_daisy_chain sord_m5_daisy_chain[] = | |
| 627 | 627 | { |
| 628 | 628 | {z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0}, |
| 629 | 629 | {0,0,0,0,-1} |
| r1438 | r1439 | |
|---|---|---|
| 564 | 564 | INPUT_PORTS_END |
| 565 | 565 | |
| 566 | 566 | /* AY-8912 for Dragon Alpha, the AY-8912 simply an AY-8910 with only one io port. */ |
| 567 | static struct AY8910interface ay8912_interface = | |
| 567 | static const struct AY8910interface ay8912_interface = | |
| 568 | 568 | { |
| 569 | 569 | dgnalpha_psg_porta_read, /* portA read */ |
| 570 | 570 | NULL, /* portB read */ |
| r1438 | r1439 | |
|---|---|---|
| 352 | 352 | /* |
| 353 | 353 | TMS5220 speech synthesizer |
| 354 | 354 | */ |
| 355 | static struct TMS5220interface tms5220interface = | |
| 355 | static const struct TMS5220interface tms5220interface = | |
| 356 | 356 | { |
| 357 | 357 | NULL, /* no IRQ callback */ |
| 358 | 358 | spchroms_read, /* speech ROM read handler */ |
| r1438 | r1439 | |
| 388 | 388 | TMS9928A_configure(&tms9129_interface); |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | static struct tms9995reset_param ti99_8_processor_config = | |
| 391 | static const struct tms9995reset_param ti99_8_processor_config = | |
| 392 | 392 | { |
| 393 | 393 | 1, /* enable automatic wait state generation */ |
| 394 | 394 | /* (in January 83 99/8 schematics sheet 9: the delay logic |
| r1438 | r1439 | |
|---|---|---|
| 236 | 236 | }; |
| 237 | 237 | #endif |
| 238 | 238 | |
| 239 | static struct NESinterface nes_interface = | |
| 239 | static const struct NESinterface nes_interface = | |
| 240 | 240 | { |
| 241 | 241 | 0 |
| 242 | 242 | }; |
| 243 | 243 | |
| 244 | static struct NESinterface nespal_interface = | |
| 244 | static const struct NESinterface nespal_interface = | |
| 245 | 245 | { |
| 246 | 246 | 0 |
| 247 | 247 | }; |
| r1438 | r1439 | |
|---|---|---|
| 498 | 498 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, pc1251_charlayout, 0, 8 ) |
| 499 | 499 | GFXDECODE_END |
| 500 | 500 | |
| 501 | static SC61860_CONFIG config={ | |
| 501 | static const SC61860_CONFIG config={ | |
| 502 | 502 | pc1401_reset, pc1401_brk, NULL, |
| 503 | 503 | pc1401_ina, pc1401_outa, |
| 504 | 504 | pc1401_inb, pc1401_outb, |
| r1438 | r1439 | |
| 542 | 542 | MACHINE_DRIVER_END |
| 543 | 543 | |
| 544 | 544 | |
| 545 | static SC61860_CONFIG pc1251_config = | |
| 545 | static const SC61860_CONFIG pc1251_config = | |
| 546 | 546 | { |
| 547 | 547 | NULL, pc1251_brk, NULL, |
| 548 | 548 | pc1251_ina, pc1251_outa, |
| r1438 | r1439 | |
| 569 | 569 | MACHINE_DRIVER_END |
| 570 | 570 | |
| 571 | 571 | |
| 572 | static SC61860_CONFIG pc1350_config = | |
| 572 | static const SC61860_CONFIG pc1350_config = | |
| 573 | 573 | { |
| 574 | 574 | NULL, pc1350_brk,NULL, |
| 575 | 575 | pc1350_ina, pc1350_outa, |
| r1438 | r1439 | |
| 600 | 600 | MACHINE_DRIVER_END |
| 601 | 601 | |
| 602 | 602 | |
| 603 | static SC61860_CONFIG pc1403_config = | |
| 603 | static const SC61860_CONFIG pc1403_config = | |
| 604 | 604 | { |
| 605 | 605 | NULL, pc1403_brk, NULL, |
| 606 | 606 | pc1403_ina, pc1403_outa, |
| r1438 | r1439 | |
|---|---|---|
| 188 | 188 | cpunum_set_input_line( 0, 0, level ? F8_INT_INTR : F8_INT_NONE ); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | static F3853_CONFIG mk1_config = { | |
| 191 | static const F3853_CONFIG mk1_config = { | |
| 192 | 192 | MAIN_CLOCK, |
| 193 | 193 | mk1_interrupt |
| 194 | 194 | }; |
| r1438 | r1439 | |
|---|---|---|
| 443 | 443 | #include "gb.lh" |
| 444 | 444 | |
| 445 | 445 | /* Initial value of the cpu registers (hacks until we get bios dumps) */ |
| 446 | static UINT16 sgb_cpu_regs[6] = { 0x01B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 }; /* Super GameBoy */ | |
| 447 | static UINT16 mgb_cpu_regs[6] = { 0xFFB0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 }; /* GameBoy Pocket / Super GameBoy 2 */ | |
| 448 | static UINT16 cgb_cpu_regs[6] = { 0x11B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 }; /* GameBoy Color / Gameboy Advance */ | |
| 449 | static UINT16 megaduck_cpu_regs[6] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFE, 0x0000 }; /* Megaduck */ | |
| 446 | static const UINT16 sgb_cpu_regs[6] = { 0x01B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 }; /* Super GameBoy */ | |
| 447 | static const UINT16 mgb_cpu_regs[6] = { 0xFFB0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 }; /* GameBoy Pocket / Super GameBoy 2 */ | |
| 448 | static const UINT16 cgb_cpu_regs[6] = { 0x11B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 }; /* GameBoy Color / Gameboy Advance */ | |
| 449 | static const UINT16 megaduck_cpu_regs[6] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFE, 0x0000 }; /* Megaduck */ | |
| 450 | 450 | |
| 451 | static Z80GB_CONFIG dmg_cpu_reset = { NULL, Z80GB_FEATURE_HALT_BUG, gb_timer_callback }; | |
| 452 | static Z80GB_CONFIG sgb_cpu_reset = { sgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback }; | |
| 453 | static Z80GB_CONFIG mgb_cpu_reset = { mgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback }; | |
| 454 | static Z80GB_CONFIG cgb_cpu_reset = { cgb_cpu_regs, 0, gb_timer_callback }; | |
| 455 | static Z80GB_CONFIG megaduck_cpu_reset = { megaduck_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback }; | |
| 451 | static const Z80GB_CONFIG dmg_cpu_reset = { NULL, Z80GB_FEATURE_HALT_BUG, gb_timer_callback }; | |
| 452 | static const Z80GB_CONFIG sgb_cpu_reset = { sgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback }; | |
| 453 | static const Z80GB_CONFIG mgb_cpu_reset = { mgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback }; | |
| 454 | static const Z80GB_CONFIG cgb_cpu_reset = { cgb_cpu_regs, 0, gb_timer_callback }; | |
| 455 | static const Z80GB_CONFIG megaduck_cpu_reset = { megaduck_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback }; | |
| 456 | 456 | |
| 457 | 457 | static ADDRESS_MAP_START(gb_map, ADDRESS_SPACE_PROGRAM, 8) |
| 458 | 458 | ADDRESS_MAP_FLAGS( AMEF_UNMAP(1) ) |
| r1438 | r1439 | |
| 543 | 543 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SELECT) PORT_NAME("Select") |
| 544 | 544 | INPUT_PORTS_END |
| 545 | 545 | |
| 546 | static struct CustomSound_interface gameboy_sound_interface = | |
| 546 | static const struct CustomSound_interface gameboy_sound_interface = | |
| 547 | 547 | { gameboy_sh_start, 0, 0 }; |
| 548 | 548 | |
| 549 | 549 |
| r1438 | r1439 | |
|---|---|---|
| 1257 | 1257 | } |
| 1258 | 1258 | } |
| 1259 | 1259 | |
| 1260 | static uart8250_interface pcw16_com_interface[2]= | |
| 1260 | static const uart8250_interface pcw16_com_interface[2]= | |
| 1261 | 1261 | { |
| 1262 | 1262 | { |
| 1263 | 1263 | TYPE16550, |
| r1438 | r1439 | |
| 1332 | 1332 | } |
| 1333 | 1333 | |
| 1334 | 1334 | |
| 1335 | static PC_LPT_CONFIG lpt_config = | |
| 1335 | static const PC_LPT_CONFIG lpt_config = | |
| 1336 | 1336 | { |
| 1337 | 1337 | 1, |
| 1338 | 1338 | LPT_UNIDIRECTIONAL, // more one of these epp/ecp aware ports |
| 1339 | 1339 | NULL |
| 1340 | 1340 | }; |
| 1341 | 1341 | |
| 1342 | static CENTRONICS_CONFIG cent_config = | |
| 1342 | static const CENTRONICS_CONFIG cent_config = | |
| 1343 | 1343 | { |
| 1344 | 1344 | PRINTER_CENTRONICS, |
| 1345 | 1345 | pc_lpt_handshake_in |
| r1438 | r1439 | |
|---|---|---|
| 73 | 73 | |
| 74 | 74 | static UINT8 read_board_flag; |
| 75 | 75 | |
| 76 | static char EMP[4] = "EMP"; | |
| 77 | static char NO_PIECE[4] = "NOP"; | |
| 76 | static const char EMP[4] = "EMP"; | |
| 77 | static const char NO_PIECE[4] = "NOP"; | |
| 78 | 78 | |
| 79 | 79 | |
| 80 | 80 | typedef struct { |
| r1438 | r1439 | |
| 102 | 102 | |
| 103 | 103 | static BOARD_FIELD m_board[8][8]; |
| 104 | 104 | |
| 105 | static | |
| 105 | static const BOARD_FIELD start_board[8][8] = | |
| 106 | 106 | { |
| 107 | 107 | { { 7,44,434,"WR1"}, { 6,100,434,"WN1"}, { 5,156,434,"WB1"}, { 4,212,434,"WQ1"}, { 3,268,434,"WK"}, { 2,324,434,"WB2"}, { 1,380,434,"WN2"}, { 0,436,434,"WR2"} }, |
| 108 | 108 | { {15,44,378,"WP1"}, {14,100,378,"WP2"}, {13,156,378,"WP3"}, {12,212,378,"WP4"}, {11,268,378,"WP5"}, {10,324,378,"WP6"}, { 9,380,378,"WP7"}, { 8,436,378,"WP8"} }, |
| r1438 | r1439 | |
| 187 | 187 | static void clear_layout(void); |
| 188 | 188 | static void set_status_of_pieces(void); |
| 189 | 189 | |
| 190 | static char * get_non_set_pieces(const char *cur_piece); | |
| 190 | static const char * get_non_set_pieces(const char *cur_piece); | |
| 191 | 191 | |
| 192 | 192 | static unsigned int out_of_board( float x0, float y0); |
| 193 | 193 | |
| r1438 | r1439 | |
| 586 | 586 | // INT32 lg_x, lg_y; |
| 587 | 587 | // UINT8 p_key; |
| 588 | 588 | |
| 589 | char *piece; | |
| 589 | const char *piece; | |
| 590 | 590 | |
| 591 | 591 | float save_x, save_y; |
| 592 | 592 | |
| r1438 | r1439 | |
| 1284 | 1284 | } |
| 1285 | 1285 | |
| 1286 | 1286 | |
| 1287 | static char *get_non_set_pieces(const char *cur_piece) | |
| 1287 | static const char *get_non_set_pieces(const char *cur_piece) | |
| 1288 | 1288 | { |
| 1289 | 1289 | UINT8 i=0; |
| 1290 | 1290 | |
| r1438 | r1439 | |
| 1298 | 1298 | if (!all_pieces[start_i].set && ( all_pieces[start_i].piece[0] != cur_piece[0] || |
| 1299 | 1299 | all_pieces[start_i].piece[1] != cur_piece[1]) ) |
| 1300 | 1300 | { |
| 1301 | return ((char *)&all_pieces[start_i].piece[0]); | |
| 1301 | return ((const char *)&all_pieces[start_i].piece[0]); | |
| 1302 | 1302 | } |
| 1303 | 1303 | |
| 1304 | 1304 | i=i+1; |
| r1438 | r1439 | |
|---|---|---|
| 702 | 702 | INPUT_PORTS_END |
| 703 | 703 | |
| 704 | 704 | |
| 705 | static struct AY8910interface ay8910_interface = | |
| 705 | static const struct AY8910interface ay8910_interface = | |
| 706 | 706 | { |
| 707 | 707 | msx_psg_port_a_r, |
| 708 | 708 | msx_psg_port_b_r, |
| r1438 | r1439 | |
|---|---|---|
| 36 | 36 | static GFXDECODE_START( gamecom_gfxdecodeinfo ) |
| 37 | 37 | GFXDECODE_END |
| 38 | 38 | |
| 39 | static SM8500_CONFIG gamecom_cpu_config = { | |
| 39 | static const SM8500_CONFIG gamecom_cpu_config = { | |
| 40 | 40 | gamecom_handle_dma, |
| 41 | 41 | gamecom_update_timers |
| 42 | 42 | }; |
| r1438 | r1439 | |
| 70 | 70 | |
| 71 | 71 | #define GAMECOM_PALETTE_LENGTH 5 |
| 72 | 72 | |
| 73 | static unsigned char palette[] = | |
| 73 | static const unsigned char palette[] = | |
| 74 | 74 | { |
| 75 | 75 | 0xDF, 0xFF, 0x8F, /* White */ |
| 76 | 76 | 0x8F, 0xCF, 0x8F, /* Gray 3 */ |
| r1438 | r1439 | |
|---|---|---|
| 301 | 301 | { |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | static CDP1802_CONFIG tmc600_cdp1802_config = | |
| 304 | static const CDP1802_CONFIG tmc600_cdp1802_config = | |
| 305 | 305 | { |
| 306 | 306 | tmc600_mode_r, |
| 307 | 307 | tmc600_ef_r, |
| r1438 | r1439 | |
|---|---|---|
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | |
| 87 | static struct AY8910interface ay8910_interface = | |
| 87 | static const struct AY8910interface ay8910_interface = | |
| 88 | 88 | { |
| 89 | 89 | input_port_0_r, |
| 90 | 90 | 0, |
| r1438 | r1439 | |
|---|---|---|
| 67 | 67 | { |
| 68 | 68 | tm990_189_palette_size = 3 |
| 69 | 69 | }; |
| 70 | static unsigned char tm990_189_palette[tm990_189_palette_size*3] = | |
| 70 | static const unsigned char tm990_189_palette[tm990_189_palette_size*3] = | |
| 71 | 71 | { |
| 72 | 72 | 0x00,0x00,0x00, /* black */ |
| 73 | 73 | 0xFF,0x00,0x00 /* red for LEDs */ |
| r1438 | r1439 | |
|---|---|---|
| 322 | 322 | RGB_BLACK /* black */ |
| 323 | 323 | }; |
| 324 | 324 | |
| 325 | static unsigned short arcadia_colortable[2][2] = { | |
| 325 | static const unsigned short arcadia_colortable[2][2] = { | |
| 326 | 326 | { 0, 1 }, |
| 327 | 327 | { 1, 0 } |
| 328 | 328 | }; |
| r1438 | r1439 | |
|---|---|---|
| 264 | 264 | |
| 265 | 265 | /* ------------ serial ------------ */ |
| 266 | 266 | |
| 267 | static const char* thom_serial_names[3][3]= | |
| 267 | static const char *const thom_serial_names[3][3]= | |
| 268 | 268 | { |
| 269 | 269 | { "cc90232", "c232", "RS232 (older, CC 90-232)" }, |
| 270 | 270 | { "rf57932", "r232", "RS232 (newer, RF 57-932)" }, |
| r1438 | r1439 | |
|---|---|---|
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | static struct CustomSound_interface lynx_sound_interface = | |
| 205 | static const struct CustomSound_interface lynx_sound_interface = | |
| 206 | 206 | { |
| 207 | 207 | lynx_custom_start |
| 208 | 208 | }; |
| 209 | 209 | |
| 210 | static struct CustomSound_interface lynx2_sound_interface = | |
| 210 | static const struct CustomSound_interface lynx2_sound_interface = | |
| 211 | 211 | { |
| 212 | 212 | lynx2_custom_start |
| 213 | 213 | }; |
| r1438 | r1439 | |
|---|---|---|
| 90 | 90 | MAKE_RGB(0x7f, 0x7f, 0x7f) /* Dark Gray */ |
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | static unsigned short aquarius_colortable[] = | |
| 93 | static const unsigned short aquarius_colortable[] = | |
| 94 | 94 | { |
| 95 | 95 | 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0,10, 0,11, 0,12, 0,13, 0,14, 0,15, 0, |
| 96 | 96 | 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1,10, 1,11, 1,12, 1,13, 1,14, 1,15, 1, |
| r1438 | r1439 | |
|---|---|---|
| 243 | 243 | PORT_BIT(0x80, 0x00, IPT_UNKNOWN) PORT_NAME("Joy 2 [*]") PORT_CODE(JOYCODE_BUTTON1) |
| 244 | 244 | INPUT_PORTS_END |
| 245 | 245 | |
| 246 | static gfx_layout cgenie_charlayout = | |
| 246 | static const gfx_layout cgenie_charlayout = | |
| 247 | 247 | { |
| 248 | 248 | 8,8, /* 8*8 characters */ |
| 249 | 249 | 384, /* 256 fixed + 128 defineable characters */ |
| r1438 | r1439 | |
| 270 | 270 | GFXDECODE_ENTRY( REGION_GFX2, 0, cgenie_gfxlayout, 3*16*2, 3*4 ) |
| 271 | 271 | GFXDECODE_END |
| 272 | 272 | |
| 273 | static unsigned char cgenie_palette[] = { | |
| 273 | static const unsigned char cgenie_palette[] = { | |
| 274 | 274 | 0*4, 0*4, 0*4, /* background */ |
| 275 | 275 | |
| 276 | 276 | /* this is the 'RGB monitor' version, strong and clean */ |
| r1438 | r1439 | |
| 329 | 329 | |
| 330 | 330 | }; |
| 331 | 331 | |
| 332 | static unsigned short cgenie_colortable[] = | |
| 332 | static const unsigned short cgenie_colortable[] = | |
| 333 | 333 | { |
| 334 | 334 | 0, 1, 0, 2, 0, 3, 0, 4, /* RGB monitor set of text colors */ |
| 335 | 335 | 0, 5, 0, 6, 0, 7, 0, 8, |
| r1438 | r1439 | |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | |
| 362 | static struct AY8910interface ay8910_interface = | |
| 362 | static const struct AY8910interface ay8910_interface = | |
| 363 | 363 | { |
| 364 | 364 | cgenie_psg_port_a_r, |
| 365 | 365 | cgenie_psg_port_b_r, |
| r1438 | r1439 | |
|---|---|---|
| 627 | 627 | ROM_LOAD("matoh.bin", 0x10000, 0x4000, CRC(ca25880d) SHA1(38ce0b6a26d48a09fdf96863c3eaf3705aca2590)) |
| 628 | 628 | ROM_END |
| 629 | 629 | |
| 630 | static struct CassetteOptions pmd85_cassette_options = { | |
| 630 | static const struct CassetteOptions pmd85_cassette_options = { | |
| 631 | 631 | 1, /* channels */ |
| 632 | 632 | 16, /* bits per sample */ |
| 633 | 633 | 7200 /* sample frequency */ |
| r1438 | r1439 | |
|---|---|---|
| 373 | 373 | |
| 374 | 374 | /* Sound Interface */ |
| 375 | 375 | |
| 376 | static struct SN76477interface sn76477_interface = | |
| 376 | static const struct SN76477interface sn76477_interface = | |
| 377 | 377 | { |
| 378 | 378 | RES_K(47), // 4 noise_res R26 47k |
| 379 | 379 | RES_K(330), // 5 filter_res R24 330k |
| r1438 | r1439 | |
| 426 | 426 | 7 R Cassette Data |
| 427 | 427 | */ |
| 428 | 428 | |
| 429 | static struct z80_irq_daisy_chain abc80_daisy_chain[] = | |
| 429 | static const struct z80_irq_daisy_chain abc80_daisy_chain[] = | |
| 430 | 430 | { |
| 431 | 431 | { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti, 0 }, |
| 432 | 432 | { 0, 0, 0, 0, -1 } |
| r1438 | r1439 | |
|---|---|---|
| 436 | 436 | MAKE_RGB(50, 0, 0) |
| 437 | 437 | }; |
| 438 | 438 | |
| 439 | static unsigned short apexc_colortable[] = | |
| 439 | static const unsigned short apexc_colortable[] = | |
| 440 | 440 | { |
| 441 | 441 | 0, 1 |
| 442 | 442 | }; |
| r1438 | r1439 | |
|---|---|---|
| 1510 | 1510 | AM_RANGE(0xf00000, 0xffffff) AM_ROM |
| 1511 | 1511 | ADDRESS_MAP_END |
| 1512 | 1512 | |
| 1513 | static mfp68901_interface mfp_interface = | |
| 1513 | static const mfp68901_interface mfp_interface = | |
| 1514 | 1514 | { |
| 1515 | 1515 | 2000000, // 4MHz clock |
| 1516 | 1516 | 4000000, |
| r1438 | r1439 | |
| 1524 | 1524 | NULL |
| 1525 | 1525 | }; |
| 1526 | 1526 | |
| 1527 | static ppi8255_interface ppi_interface = | |
| 1527 | static const ppi8255_interface ppi_interface = | |
| 1528 | 1528 | { |
| 1529 | 1529 | 1, // 1 PPI |
| 1530 | 1530 | { ppi_port_a_r }, |
| r1438 | r1439 | |
| 1535 | 1535 | { ppi_port_c_w } |
| 1536 | 1536 | }; |
| 1537 | 1537 | |
| 1538 | static struct hd63450_interface dmac_interface = | |
| 1538 | static const struct hd63450_interface dmac_interface = | |
| 1539 | 1539 | { |
| 1540 | 1540 | 0, // CPU - 68000 |
| 1541 | 1541 | {TIME_IN_USEC(32),TIME_IN_USEC(32),TIME_IN_USEC(4),TIME_IN_USEC(32)}, // Cycle steal mode timing (guesstimate) |
| r1438 | r1439 | |
| 1548 | 1548 | // { 0, 0, 0, 0 } |
| 1549 | 1549 | }; |
| 1550 | 1550 | |
| 1551 | static nec765_interface fdc_interface = | |
| 1551 | static const nec765_interface fdc_interface = | |
| 1552 | 1552 | { |
| 1553 | 1553 | fdc_irq, |
| 1554 | 1554 | fdc_drq |
| 1555 | 1555 | }; |
| 1556 | 1556 | |
| 1557 | static struct YM2151interface ym2151_interface = | |
| 1557 | static const struct YM2151interface ym2151_interface = | |
| 1558 | 1558 | { |
| 1559 | 1559 | x68k_fm_irq, |
| 1560 | 1560 | x68k_ct_w // CT1, CT2 from YM2151 port 0x1b |
| 1561 | 1561 | }; |
| 1562 | 1562 | |
| 1563 | static struct scc8530_interface scc_interface = | |
| 1563 | static const struct scc8530_interface scc_interface = | |
| 1564 | 1564 | { |
| 1565 | 1565 | NULL//x68k_scc_ack |
| 1566 | 1566 | }; |
| 1567 | 1567 | |
| 1568 | static struct rp5c15_interface rtc_intf = | |
| 1568 | static const struct rp5c15_interface rtc_intf = | |
| 1569 | 1569 | { |
| 1570 | 1570 | x68k_rtc_alarm_irq |
| 1571 | 1571 | }; |
| r1438 | r1439 | |
|---|---|---|
| 162 | 162 | extern void spectrum_plus3_update_memory(void); |
| 163 | 163 | |
| 164 | 164 | |
| 165 | static struct AY8910interface spectrum_ay_interface = | |
| 165 | static const struct AY8910interface spectrum_ay_interface = | |
| 166 | 166 | { |
| 167 | 167 | NULL |
| 168 | 168 | }; |
| r1438 | r1439 | |
| 550 | 550 | int spectrum_plus3_port_1ffd_data = -1; |
| 551 | 551 | |
| 552 | 552 | |
| 553 | static nec765_interface spectrum_plus3_nec765_interface = | |
| 553 | static const nec765_interface spectrum_plus3_nec765_interface = | |
| 554 | 554 | { |
| 555 | 555 | NULL, |
| 556 | 556 | NULL |
| 557 | 557 | }; |
| 558 | 558 | |
| 559 | 559 | |
| 560 | static int spectrum_plus3_memory_selections[]= | |
| 560 | static const int spectrum_plus3_memory_selections[]= | |
| 561 | 561 | { |
| 562 | 562 | 0,1,2,3, |
| 563 | 563 | 4,5,6,7, |
| r1438 | r1439 | |
| 646 | 646 | { |
| 647 | 647 | /* Extended memory paging */ |
| 648 | 648 | |
| 649 | int *memory_selection; | |
| 649 | const int *memory_selection; | |
| 650 | 650 | int MemorySelection; |
| 651 | 651 | unsigned char *ram_data; |
| 652 | 652 | |
| r1438 | r1439 | |
| 1914 | 1914 | |
| 1915 | 1915 | INPUT_PORTS_END |
| 1916 | 1916 | |
| 1917 | static unsigned char spectrum_palette[16*3] = { | |
| 1917 | static const unsigned char spectrum_palette[16*3] = { | |
| 1918 | 1918 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, |
| 1919 | 1919 | 0xbf, 0x00, 0x00, 0xbf, 0x00, 0xbf, |
| 1920 | 1920 | 0x00, 0xbf, 0x00, 0x00, 0xbf, 0xbf, |
| r1438 | r1439 | |
| 1926 | 1926 | 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, |
| 1927 | 1927 | }; |
| 1928 | 1928 | |
| 1929 | static unsigned short spectrum_colortable[128*2] = { | |
| 1929 | static const unsigned short spectrum_colortable[128*2] = { | |
| 1930 | 1930 | 0,0, 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, |
| 1931 | 1931 | 1,0, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7, |
| 1932 | 1932 | 2,0, 2,1, 2,2, 2,3, 2,4, 2,5, 2,6, 2,7, |
| r1438 | r1439 | |
|---|---|---|
| 374 | 374 | logerror("pio irq state: %02x\n",state); |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | static z80pio_interface pio_intf = | |
| 377 | static const z80pio_interface pio_intf = | |
| 378 | 378 | { |
| 379 | 379 | mpf1_pio_interrupt, |
| 380 | 380 | NULL, |
| r1438 | r1439 | |
| 503 | 503 | |
| 504 | 504 | |
| 505 | 505 | |
| 506 | static ppi8255_interface ppi8255_intf = | |
| 506 | static const ppi8255_interface ppi8255_intf = | |
| 507 | 507 | { |
| 508 | 508 | 1, /* 1 chip */ |
| 509 | 509 | { mpf1_porta_r }, /* Port A read */ |
| r1438 | r1439 | |
|---|---|---|
| 195 | 195 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 4 ) |
| 196 | 196 | GFXDECODE_END |
| 197 | 197 | |
| 198 | static unsigned char kaypro_palette[] = | |
| 198 | static const unsigned char kaypro_palette[] = | |
| 199 | 199 | { |
| 200 | 200 | 0, 0, 0, /* black */ |
| 201 | 201 | 0,240, 0, /* green */ |
| r1438 | r1439 | |
| 209 | 209 | 240,240,240, |
| 210 | 210 | }; |
| 211 | 211 | |
| 212 | static unsigned short kaypro_colortable[] = | |
| 212 | static const unsigned short kaypro_colortable[] = | |
| 213 | 213 | { |
| 214 | 214 | 0, 1, /* green on black */ |
| 215 | 215 | 0, 2, /* dim green on black */ |
| r1438 | r1439 | |
|---|---|---|
| 32 | 32 | static int vidpg; |
| 33 | 33 | static int charset; |
| 34 | 34 | |
| 35 | static z80pio_interface z80pio_intf = | |
| 35 | static const z80pio_interface z80pio_intf = | |
| 36 | 36 | { |
| 37 | 37 | pio_interrupt |
| 38 | 38 | NULL, |
| r1438 | r1439 | |
| 302 | 302 | memcpy(colortable, & bw_colortable, sizeof(bw_colortable)); |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | static struct z80_irq_daisy_chain super80_daisy_chain[] = | |
| 305 | static const struct z80_irq_daisy_chain super80_daisy_chain[] = | |
| 306 | 306 | { |
| 307 | 307 | {z80pio_reset, z80pio_interrupt, z80pio_reti, 0}, |
| 308 | 308 | {0,0,0,-1} |
| r1438 | r1439 | |
|---|---|---|
| 62 | 62 | INPUT_PORTS_END |
| 63 | 63 | |
| 64 | 64 | /* ?? */ |
| 65 | static struct mips3_config config = | |
| 65 | static const struct mips3_config config = | |
| 66 | 66 | { |
| 67 | 67 | 16384, /* code cache size */ |
| 68 | 68 | 8192, /* data cache size */ |
| r1438 | r1439 | |
|---|---|---|
| 1319 | 1319 | centronics_write_data(0, data); |
| 1320 | 1320 | } |
| 1321 | 1321 | |
| 1322 | static struct AY8910interface ym2149_interface = | |
| 1322 | static const struct AY8910interface ym2149_interface = | |
| 1323 | 1323 | { |
| 1324 | 1324 | 0, |
| 1325 | 1325 | 0, |
| r1438 | r1439 | |
| 1337 | 1337 | acia_irq = state; |
| 1338 | 1338 | } |
| 1339 | 1339 | |
| 1340 | static struct acia6850_interface acia_ikbd_intf = | |
| 1340 | static const struct acia6850_interface acia_ikbd_intf = | |
| 1341 | 1341 | { |
| 1342 | 1342 | Y2/64, |
| 1343 | 1343 | Y2/64, |
| r1438 | r1439 | |
| 1349 | 1349 | acia_interrupt |
| 1350 | 1350 | }; |
| 1351 | 1351 | |
| 1352 | static struct acia6850_interface acia_midi_intf = | |
| 1352 | static const struct acia6850_interface acia_midi_intf = | |
| 1353 | 1353 | { |
| 1354 | 1354 | Y2/64, |
| 1355 | 1355 | Y2/64, |
| r1438 | r1439 | |
| 1420 | 1420 | NULL |
| 1421 | 1421 | }; |
| 1422 | 1422 | |
| 1423 | static CENTRONICS_CONFIG atarist_centronics_config[1] = | |
| 1423 | static const CENTRONICS_CONFIG atarist_centronics_config[1] = | |
| 1424 | 1424 | { |
| 1425 | 1425 | { |
| 1426 | 1426 | PRINTER_IBM, |
| r1438 | r1439 | |
| 1510 | 1510 | cpunum_set_irq_callback(0, atarist_int_ack); |
| 1511 | 1511 | } |
| 1512 | 1512 | |
| 1513 | static struct rp5c15_interface rtc_intf = | |
| 1513 | static const struct rp5c15_interface rtc_intf = | |
| 1514 | 1514 | { |
| 1515 | 1515 | NULL |
| 1516 | 1516 | }; |
| r1438 | r1439 | |
| 1657 | 1657 | // 0x80 = FDD_DENSE_SEL |
| 1658 | 1658 | } |
| 1659 | 1659 | |
| 1660 | static struct AY8910interface stbook_ym2149_interface = | |
| 1660 | static const struct AY8910interface stbook_ym2149_interface = | |
| 1661 | 1661 | { |
| 1662 | 1662 | 0, |
| 1663 | 1663 | 0, |
| r1438 | r1439 | |
| 1667 | 1667 | |
| 1668 | 1668 | static UINT8 krxd, ktxd; |
| 1669 | 1669 | |
| 1670 | static struct acia6850_interface stbook_acia_ikbd_intf = | |
| 1670 | static const struct acia6850_interface stbook_acia_ikbd_intf = | |
| 1671 | 1671 | { |
| 1672 | 1672 | U517/2/16, // 500kHz |
| 1673 | 1673 | U517/2/2, // 1MHZ |
| r1438 | r1439 | |
|---|---|---|
| 436 | 436 | |
| 437 | 437 | |
| 438 | 438 | |
| 439 | static struct TMS5220interface tms5220interface = | |
| 439 | static const struct TMS5220interface tms5220interface = | |
| 440 | 440 | { |
| 441 | 441 | NULL, /* no IRQ callback */ |
| 442 | 442 | #if 1 |
| r1438 | r1439 | |
|---|---|---|
| 393 | 393 | keylatch = data & 0x07; |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | static ppi8255_interface sc3000_ppi8255_intf = | |
| 396 | static const ppi8255_interface sc3000_ppi8255_intf = | |
| 397 | 397 | { |
| 398 | 398 | 1, // 1 chip |
| 399 | 399 | { sc3000_ppi8255_a_r }, // Port A read |
| r1438 | r1439 | |
| 489 | 489 | centronics_write_handshake(1, (data & 0x80) ? 0 : CENTRONICS_STROBE, CENTRONICS_STROBE); |
| 490 | 490 | } |
| 491 | 491 | |
| 492 | static ppi8255_interface sf7000_ppi8255_intf = | |
| 492 | static const ppi8255_interface sf7000_ppi8255_intf = | |
| 493 | 493 | { |
| 494 | 494 | 2, // 2 chips |
| 495 | 495 | { sc3000_ppi8255_a_r, sf7000_ppi8255_a_r }, // Port A read |
| r1438 | r1439 | |
| 511 | 511 | sf7000_fdc_index = state; |
| 512 | 512 | } |
| 513 | 513 | |
| 514 | static struct nec765_interface sf7000_nec765_interface = | |
| 514 | static const struct nec765_interface sf7000_nec765_interface = | |
| 515 | 515 | { |
| 516 | 516 | sf7000_fdc_interrupt, |
| 517 | 517 | NULL |
| 518 | 518 | }; |
| 519 | 519 | |
| 520 | static struct msm8251_interface sf7000_uart_interface = | |
| 520 | static const struct msm8251_interface sf7000_uart_interface = | |
| 521 | 521 | { |
| 522 | 522 | NULL, |
| 523 | 523 | NULL, |
| 524 | 524 | NULL |
| 525 | 525 | }; |
| 526 | 526 | |
| 527 | static CENTRONICS_CONFIG sf7000_centronics_config[1] = { | |
| 527 | static const CENTRONICS_CONFIG sf7000_centronics_config[1] = { | |
| 528 | 528 | { |
| 529 | 529 | PRINTER_IBM, |
| 530 | 530 | NULL |
| r1438 | r1439 | |
|---|---|---|
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | |
| 311 | static tx0_reset_param_t tx0_reset_param = | |
| 311 | static const tx0_reset_param_t tx0_reset_param = | |
| 312 | 312 | { |
| 313 | 313 | { |
| 314 | 314 | tx0_io_cpy, |
| r1438 | r1439 | |
|---|---|---|
| 1423 | 1423 | } |
| 1424 | 1424 | } |
| 1425 | 1425 | |
| 1426 | static SCSIConfigTable dev_table = | |
| 1426 | static const SCSIConfigTable dev_table = | |
| 1427 | 1427 | { |
| 1428 | 1428 | 1, /* 1 SCSI device */ |
| 1429 | 1429 | { { SCSI_ID_4, 0, SCSI_DEVICE_CDROM }, /* SCSI ID 4, using CD 0, and it's a CD-ROM */ |
| 1430 | 1430 | { SCSI_ID_2, 0, SCSI_DEVICE_CDROM } } /* SCSI ID 2, using HD 0, and it's a CD-ROM */ |
| 1431 | 1431 | }; |
| 1432 | 1432 | |
| 1433 | static struct WD33C93interface scsi_intf = | |
| 1433 | static const struct WD33C93interface scsi_intf = | |
| 1434 | 1434 | { |
| 1435 | 1435 | &dev_table, /* SCSI device table */ |
| 1436 | 1436 | &scsi_irq, /* command completion IRQ */ |
| r1438 | r1439 | |
| 1538 | 1538 | } |
| 1539 | 1539 | } |
| 1540 | 1540 | |
| 1541 | static struct mips3_config config = | |
| 1541 | static const struct mips3_config config = | |
| 1542 | 1542 | { |
| 1543 | 1543 | 32768, /* code cache size */ |
| 1544 | 1544 | 32768 /* data cache size */ |
| r1438 | r1439 | |
|---|---|---|
| 1161 | 1161 | ROM_REGION (0x100, REGION_GFX2, 0) |
| 1162 | 1162 | ROM_END |
| 1163 | 1163 | |
| 1164 | static SID6581_interface c128_sound_interface = | |
| 1164 | static const SID6581_interface c128_sound_interface = | |
| 1165 | 1165 | { |
| 1166 | 1166 | c64_paddle_read |
| 1167 | 1167 | }; |
| r1438 | r1439 | |
|---|---|---|
| 243 | 243 | } |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | static CENTRONICS_CONFIG exidy_cent_config[1]={ | |
| 246 | static const CENTRONICS_CONFIG exidy_cent_config[1]={ | |
| 247 | 247 | { |
| 248 | 248 | PRINTER_CENTRONICS, |
| 249 | 249 | exidy_printer_handshake_in |
| r1438 | r1439 | |
|---|---|---|
| 492 | 492 | |
| 493 | 493 | static READ8_HANDLER(opn_dummy_input){return 0xff;} |
| 494 | 494 | |
| 495 | static struct YM2203interface ym2203_interface = | |
| 495 | static const struct YM2203interface ym2203_interface = | |
| 496 | 496 | { |
| 497 | 497 | opn_dummy_input, |
| 498 | 498 | opn_dummy_input, |
| r1438 | r1439 | |
|---|---|---|
| 84 | 84 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, p2000m_charlayout, 0, 128 ) |
| 85 | 85 | GFXDECODE_END |
| 86 | 86 | |
| 87 | static unsigned char p2000m_palette[2 * 3] = | |
| 87 | static const unsigned char p2000m_palette[2 * 3] = | |
| 88 | 88 | { |
| 89 | 89 | 0x00, 0x00, 0x00, |
| 90 | 90 | 0xff, 0xff, 0xff |
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | static unsigned short p2000m_colortable[2 * 2] = | |
| 93 | static const unsigned short p2000m_colortable[2 * 2] = | |
| 94 | 94 | { |
| 95 | 95 | 1,0, 0,1 |
| 96 | 96 | }; |
| r1438 | r1439 | |
|---|---|---|
| 471 | 471 | PORT_DIPSETTING( 1, DEF_STR( Yes ) ) |
| 472 | 472 | INPUT_PORTS_END |
| 473 | 473 | |
| 474 | static unsigned char pet_palette[] = | |
| 474 | static const unsigned char pet_palette[] = | |
| 475 | 475 | { |
| 476 | 476 | 0,0,0, /* black */ |
| 477 | 477 | 0,0x80,0, /* green */ |
| 478 | 478 | }; |
| 479 | 479 | |
| 480 | static unsigned short pet_colortable[][2] = { | |
| 480 | static const unsigned short pet_colortable[][2] = { | |
| 481 | 481 | { 0, 1 }, |
| 482 | 482 | /* reverse */ |
| 483 | 483 | { 1, 0 } |
| r1438 | r1439 | |
|---|---|---|
| 1391 | 1391 | } |
| 1392 | 1392 | } |
| 1393 | 1393 | |
| 1394 | static struct tia_interface tia_interface = | |
| 1394 | static const struct tia_interface tia_interface = | |
| 1395 | 1395 | { |
| 1396 | 1396 | a2600_read_input_port, |
| 1397 | 1397 | a2600_get_databus_contents, |
| 1398 | 1398 | a2600_tia_vsync_callback |
| 1399 | 1399 | }; |
| 1400 | 1400 | |
| 1401 | static struct tia_interface tia_interface_pal = | |
| 1401 | static const struct tia_interface tia_interface_pal = | |
| 1402 | 1402 | { |
| 1403 | 1403 | a2600_read_input_port, |
| 1404 | 1404 | a2600_get_databus_contents, |
| r1438 | r1439 | |
|---|---|---|
| 201 | 201 | beep_set_state(0, level); |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | static CDP1802_CONFIG studio2_config = | |
| 204 | static const CDP1802_CONFIG studio2_config = | |
| 205 | 205 | { |
| 206 | 206 | studio2_mode_r, |
| 207 | 207 | studio2_ef_r, |
| r1438 | r1439 | |
| 223 | 223 | return ef; |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | static CDP1802_CONFIG mpt02_config = | |
| 226 | static const CDP1802_CONFIG mpt02_config = | |
| 227 | 227 | { |
| 228 | 228 | studio2_mode_r, |
| 229 | 229 | mpt02_ef_r, |
| r1438 | r1439 | |
|---|---|---|
| 134 | 134 | |
| 135 | 135 | /* PCW uses NEC765 in NON-DMA mode. FDC Ints are connected to /INT or |
| 136 | 136 | /NMI depending on choice (see system control below) */ |
| 137 | static nec765_interface pcw_nec765_interface = | |
| 137 | static const nec765_interface pcw_nec765_interface = | |
| 138 | 138 | { |
| 139 | 139 | pcw_fdc_interrupt, |
| 140 | 140 | NULL |
| r1438 | r1439 | |
|---|---|---|
| 212 | 212 | cpunum_set_input_line(0, M6502_IRQ_LINE, level); |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | static RRIOT_CONFIG riot={ | |
| 215 | static const RRIOT_CONFIG riot={ | |
| 216 | 216 | 1000000, |
| 217 | 217 | { mk2_read_a, mk2_write_a }, |
| 218 | 218 | { mk2_read_b, mk2_write_b }, |
| r1438 | r1439 | |
|---|---|---|
| 412 | 412 | PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("JOYSTICK 1 FIRE 1") PORT_CODE(JOYCODE_Y_UP_SWITCH) |
| 413 | 413 | INPUT_PORTS_END |
| 414 | 414 | |
| 415 | static unsigned char oric_palette[8*3] = | |
| 415 | static const unsigned char oric_palette[8*3] = | |
| 416 | 416 | { |
| 417 | 417 | 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, |
| 418 | 418 | 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, |
| r1438 | r1439 | |
| 434 | 434 | |
| 435 | 435 | |
| 436 | 436 | |
| 437 | static struct AY8910interface oric_ay_interface = | |
| 437 | static const struct AY8910interface oric_ay_interface = | |
| 438 | 438 | { |
| 439 | 439 | 0, |
| 440 | 440 | 0, |
| r1438 | r1439 | |
|---|---|---|
| 166 | 166 | /* enterprise interface to dave - ok, so Dave chip is unique |
| 167 | 167 | to Enterprise. But these functions make it nice and easy to see |
| 168 | 168 | whats going on. */ |
| 169 | static DAVE_INTERFACE | |
| 169 | static const DAVE_INTERFACE enterprise_dave_interface = | |
| 170 | 170 | { |
| 171 | 171 | enterprise_dave_reg_read, |
| 172 | 172 | enterprise_dave_reg_write, |
| r1438 | r1439 | |
| 525 | 525 | |
| 526 | 526 | INPUT_PORTS_END |
| 527 | 527 | |
| 528 | static struct CustomSound_interface dave_custom_sound = | |
| 528 | static const struct CustomSound_interface dave_custom_sound = | |
| 529 | 529 | { |
| 530 | 530 | Dave_sh_start |
| 531 | 531 | }; |
| r1438 | r1439 | |
|---|---|---|
| 391 | 391 | PORT_INCLUDE( pc_joystick ) /* IN15 - IN19 */ |
| 392 | 392 | INPUT_PORTS_END |
| 393 | 393 | |
| 394 | static unsigned i286_address_mask = 0x00ffffff; | |
| 394 | static const unsigned i286_address_mask = 0x00ffffff; | |
| 395 | 395 | |
| 396 | 396 | |
| 397 | 397 | #if defined(ADLIB) |
| 398 | 398 | /* irq line not connected to pc on adlib cards (and compatibles) */ |
| 399 | 399 | static void irqhandler(int linestate) {} |
| 400 | 400 | |
| 401 | static struct YM3812interface ym3812_interface = | |
| 401 | static const struct YM3812interface ym3812_interface = | |
| 402 | 402 | { |
| 403 | 403 | irqhandler |
| 404 | 404 | }; |
| r1438 | r1439 | |
|---|---|---|
| 156 | 156 | #endif |
| 157 | 157 | INPUT_PORTS_END |
| 158 | 158 | |
| 159 | static struct CustomSound_interface snes_sound_interface = | |
| 159 | static const struct CustomSound_interface snes_sound_interface = | |
| 160 | 160 | { snes_sh_start, 0, 0 }; |
| 161 | 161 | |
| 162 | 162 | static GFXDECODE_START( gfxdecodeinfo ) |
| r1438 | r1439 | |
|---|---|---|
| 2243 | 2243 | GFXDECODE_ENTRY( REGION_GFX2, 0, tiles16x16x8_layout, 0x00, 0x20 ) |
| 2244 | 2244 | GFXDECODE_END |
| 2245 | 2245 | |
| 2246 | static struct sh2_config sh2_conf_master = { 0 }; | |
| 2247 | static struct sh2_config sh2_conf_slave = { 1 }; | |
| 2246 | static const struct sh2_config sh2_conf_master = { 0 }; | |
| 2247 | static const struct sh2_config sh2_conf_slave = { 1 }; | |
| 2248 | 2248 | |
| 2249 | 2249 | static void scsp_irq(int irq) |
| 2250 | 2250 | { |
| r1438 | r1439 | |
| 2269 | 2269 | } |
| 2270 | 2270 | } |
| 2271 | 2271 | |
| 2272 | static struct SCSPinterface scsp_interface = | |
| 2272 | static const struct SCSPinterface scsp_interface = | |
| 2273 | 2273 | { |
| 2274 | 2274 | REGION_CPU3, |
| 2275 | 2275 | 0, |
| r1438 | r1439 | |
|---|---|---|
| 179 | 179 | |
| 180 | 180 | ADDRESS_MAP_END |
| 181 | 181 | |
| 182 | static ti990_10reset_param reset_params = | |
| 182 | static const ti990_10reset_param reset_params = | |
| 183 | 183 | { |
| 184 | 184 | /*idle_callback*/NULL, |
| 185 | 185 | rset_callback, |
| r1438 | r1439 | |
|---|---|---|
| 179 | 179 | Machine drivers |
| 180 | 180 | ***************************************************************************/ |
| 181 | 181 | |
| 182 | static struct CustomSound_interface amiga_custom_interface = | |
| 182 | static const struct CustomSound_interface amiga_custom_interface = | |
| 183 | 183 | { |
| 184 | 184 | amiga_sh_start |
| 185 | 185 | }; |
| r1438 | r1439 | |
|---|---|---|
| 231 | 231 | |
| 232 | 232 | INPUT_PORTS_END |
| 233 | 233 | |
| 234 | static struct CustomSound_interface channelf_sound_interface = | |
| 234 | static const struct CustomSound_interface channelf_sound_interface = | |
| 235 | 235 | { |
| 236 | 236 | channelf_sh_custom_start |
| 237 | 237 | }; |
| r1438 | r1439 | |
|---|---|---|
| 140 | 140 | RGB_WHITE |
| 141 | 141 | }; |
| 142 | 142 | |
| 143 | static unsigned short apple1_colortable[] = | |
| 143 | static const unsigned short apple1_colortable[] = | |
| 144 | 144 | { |
| 145 | 145 | 0, 1 |
| 146 | 146 | }; |
| r1438 | r1439 | |
|---|---|---|
| 590 | 590 | return -1; |
| 591 | 591 | } |
| 592 | 592 | |
| 593 | static z80dart_interface abc800_dart_intf = | |
| 593 | static const z80dart_interface abc800_dart_intf = | |
| 594 | 594 | { |
| 595 | 595 | ABC800_X01/2/2, /* clock */ |
| 596 | 596 | 0, /* interrupt handler */ |
| r1438 | r1439 | |
| 617 | 617 | } |
| 618 | 618 | } |
| 619 | 619 | |
| 620 | static z80dart_interface abc802_dart_intf = | |
| 620 | static const z80dart_interface abc802_dart_intf = | |
| 621 | 621 | { |
| 622 | 622 | ABC800_X01/2/2, /* clock */ |
| 623 | 623 | 0, /* interrupt handler */ |
| r1438 | r1439 | |
| 628 | 628 | dart_serial_receive /* receive handler */ |
| 629 | 629 | }; |
| 630 | 630 | |
| 631 | static struct z80_irq_daisy_chain abc800_daisy_chain[] = | |
| 631 | static const struct z80_irq_daisy_chain abc800_daisy_chain[] = | |
| 632 | 632 | { |
| 633 | 633 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, |
| 634 | 634 | { z80sio_reset, z80sio_irq_state, z80sio_irq_ack, z80sio_irq_reti, 0 }, |
| r1438 | r1439 | |
|---|---|---|
| 138 | 138 | // floppy control (FDC-6) |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | static CDP1802_CONFIG tmc2000e_config = | |
| 141 | static const CDP1802_CONFIG tmc2000e_config = | |
| 142 | 142 | { |
| 143 | 143 | tmc2000e_mode_r, |
| 144 | 144 | tmc2000e_ef_r, |
| r1438 | r1439 | |
|---|---|---|
| 203 | 203 | { |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | static CDP1802_CONFIG tmc1800_config = | |
| 206 | static const CDP1802_CONFIG tmc1800_config = | |
| 207 | 207 | { |
| 208 | 208 | tmc1800_mode_r, |
| 209 | 209 | tmc1800_ef_r, |
| r1438 | r1439 | |
| 241 | 241 | set_led_status(1, level); |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | static CDP1802_CONFIG tmc2000_config = | |
| 244 | static const CDP1802_CONFIG tmc2000_config = | |
| 245 | 245 | { |
| 246 | 246 | tmc1800_mode_r, |
| 247 | 247 | tmc2000_ef_r, |
| r1438 | r1439 | |
|---|---|---|
| 71 | 71 | ADDRESS_MAP_END |
| 72 | 72 | |
| 73 | 73 | |
| 74 | static ppc_config bebox_ppc_config = | |
| 74 | static const ppc_config bebox_ppc_config = | |
| 75 | 75 | { |
| 76 | 76 | PPC_MODEL_603, /* 603 "Wart" */ |
| 77 | 77 | 0x10, /* Multiplier 1.0, Bus = 66MHz, Core = 66MHz */ |
| 78 | 78 | BUS_FREQUENCY_66MHZ |
| 79 | 79 | }; |
| 80 | 80 | |
| 81 | static ppc_config bebox2_ppc_config = | |
| 81 | static const ppc_config bebox2_ppc_config = | |
| 82 | 82 | { |
| 83 | 83 | PPC_MODEL_603E, /* 603E "Stretch", version 1.3 */ |
| 84 | 84 | 0x19, /* Multiplier 2.0, Bus = 66MHz, Core = 133MHz */ |
| r1438 | r1439 | |
|---|---|---|
| 221 | 221 | NTSC_YELLOW_GREEN |
| 222 | 222 | }; |
| 223 | 223 | |
| 224 | static unsigned short a7800_colortable[] = | |
| 224 | static const unsigned short a7800_colortable[] = | |
| 225 | 225 | { |
| 226 | 226 | 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, |
| 227 | 227 | 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f, |
| r1438 | r1439 | |
|---|---|---|
| 109 | 109 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, nascom2_charlayout, 0, 1 ) |
| 110 | 110 | GFXDECODE_END |
| 111 | 111 | |
| 112 | static | |
| 112 | static const unsigned char nascom1_palette[] = | |
| 113 | 113 | { |
| 114 | 114 | 0x00, 0x00, 0x00, /* Black */ |
| 115 | 115 | 0xff, 0xff, 0xff /* White */ |
| 116 | 116 | }; |
| 117 | 117 | |
| 118 | static | |
| 118 | static const unsigned short nascom1_colortable[] = | |
| 119 | 119 | { |
| 120 | 120 | 0, 1 |
| 121 | 121 | }; |
| r1438 | r1439 | |
|---|---|---|
| 209 | 209 | z80ctc_0_w(offset,data); |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | static z80ctc_interface | |
| 212 | static z80ctc_interface mtx_ctc_intf = | |
| 213 | 213 | { |
| 214 | 214 | MTX_SYSTEM_CLOCK, |
| 215 | 215 | 0, |
| r1438 | r1439 | |
| 737 | 737 | INPUT_PORTS_END |
| 738 | 738 | |
| 739 | 739 | |
| 740 | static struct z80_irq_daisy_chain mtx_daisy_chain[] = | |
| 740 | static const struct z80_irq_daisy_chain mtx_daisy_chain[] = | |
| 741 | 741 | { |
| 742 | 742 | {z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0}, |
| 743 | 743 | {0,0,0,0,-1} |
| r1438 | r1439 | |
|---|---|---|
| 191 | 191 | GFXDECODE_ENTRY( REGION_GFX2, 0, chunky_layout, 0, 1 ) |
| 192 | 192 | GFXDECODE_END |
| 193 | 193 | |
| 194 | static struct AY8910interface ay8910_interface = | |
| 194 | static const struct AY8910interface ay8910_interface = | |
| 195 | 195 | { |
| 196 | 196 | 0, |
| 197 | 197 | 0, |
| r1438 | r1439 | |
|---|---|---|
| 447 | 447 | centronics_write_handshake(0, handshake, CENTRONICS_STROBE); |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | static z80pio_interface einstein_pio_intf = | |
| 450 | static const z80pio_interface einstein_pio_intf = | |
| 451 | 451 | { |
| 452 | 452 | einstein_pio_interrupt, |
| 453 | 453 | einstein_pio_ardy, |
| r1438 | r1439 | |
| 522 | 522 | } |
| 523 | 523 | #endif |
| 524 | 524 | |
| 525 | static struct z80_irq_daisy_chain einstein_daisy_chain[] = | |
| 525 | static const struct z80_irq_daisy_chain einstein_daisy_chain[] = | |
| 526 | 526 | { |
| 527 | 527 | {einstein_keyboard_int_reset, einstein_keyboard_interrupt, 0, einstein_keyboard_reti, 0}, |
| 528 | 528 | {z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0}, |
| r1438 | r1439 | |
| 1348 | 1348 | |
| 1349 | 1349 | |
| 1350 | 1350 | |
| 1351 | static struct msm8251_interface einstein_msm8251_intf= | |
| 1351 | static const struct msm8251_interface einstein_msm8251_intf= | |
| 1352 | 1352 | { |
| 1353 | 1353 | NULL, |
| 1354 | 1354 | NULL, |
| r1438 | r1439 | |
| 1372 | 1372 | } |
| 1373 | 1373 | } |
| 1374 | 1374 | |
| 1375 | static CENTRONICS_CONFIG einstein_cent_config[1]={ | |
| 1375 | static const CENTRONICS_CONFIG einstein_cent_config[1]={ | |
| 1376 | 1376 | { |
| 1377 | 1377 | PRINTER_CENTRONICS, |
| 1378 | 1378 | einstein_printer_handshake_in |
| r1438 | r1439 | |
| 1602 | 1602 | return einstein_keyboard_data; |
| 1603 | 1603 | } |
| 1604 | 1604 | |
| 1605 | static struct AY8910interface einstein_ay_interface = | |
| 1605 | static const struct AY8910interface einstein_ay_interface = | |
| 1606 | 1606 | { |
| 1607 | 1607 | NULL, |
| 1608 | 1608 | einstein_port_b_read, |
| r1438 | r1439 | |
|---|---|---|
| 127 | 127 | the CPU can get more bus time. |
| 128 | 128 | */ |
| 129 | 129 | |
| 130 | static unsigned char ti99_2_palette[] = | |
| 130 | static const unsigned char ti99_2_palette[] = | |
| 131 | 131 | { |
| 132 | 132 | 255, 255, 255, |
| 133 | 133 | 0, 0, 0 |
| 134 | 134 | }; |
| 135 | 135 | |
| 136 | static unsigned short ti99_2_colortable[] = | |
| 136 | static const unsigned short ti99_2_colortable[] = | |
| 137 | 137 | { |
| 138 | 138 | 0, 1 |
| 139 | 139 | }; |
| r1438 | r1439 | |
| 373 | 373 | INPUT_PORTS_END |
| 374 | 374 | |
| 375 | 375 | |
| 376 | static struct tms9995reset_param ti99_2_processor_config = | |
| 376 | static const struct tms9995reset_param ti99_2_processor_config = | |
| 377 | 377 | { |
| 378 | 378 | #if 0 |
| 379 | 379 | REGION_CPU1,/* region for processor RAM */ |
| r1438 | r1439 | |
|---|---|---|
| 35 | 35 | #endif |
| 36 | 36 | #endif |
| 37 | 37 | |
| 38 | static unsigned char intv_palette[] = | |
| 38 | static const unsigned char intv_palette[] = | |
| 39 | 39 | { |
| 40 | 40 | 0x00, 0x00, 0x00, /* BLACK */ |
| 41 | 41 | 0x00, 0x2D, 0xFF, /* BLUE */ |
| r1438 | r1439 | |
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | static struct AY8910interface ay8910_interface = | |
| 85 | static const struct AY8910interface ay8910_interface = | |
| 86 | 86 | { |
| 87 | 87 | intv_right_control_r, |
| 88 | 88 | intv_left_control_r, |
| r1438 | r1439 | |
| 92 | 92 | |
| 93 | 93 | /* graphics output */ |
| 94 | 94 | |
| 95 | static gfx_layout intv_gromlayout = | |
| 95 | static const gfx_layout intv_gromlayout = | |
| 96 | 96 | { |
| 97 | 97 | 16, 16, |
| 98 | 98 | 256, |
| r1438 | r1439 | |
| 104 | 104 | 8 * 16 |
| 105 | 105 | }; |
| 106 | 106 | |
| 107 | static gfx_layout intv_gramlayout = | |
| 107 | static const gfx_layout intv_gramlayout = | |
| 108 | 108 | { |
| 109 | 109 | 16, 16, |
| 110 | 110 | 64, |
| r1438 | r1439 | |
| 116 | 116 | 8 * 8 |
| 117 | 117 | }; |
| 118 | 118 | |
| 119 | static gfx_layout intvkbd_charlayout = | |
| 119 | static const gfx_layout intvkbd_charlayout = | |
| 120 | 120 | { |
| 121 | 121 | 8, 8, |
| 122 | 122 | 256, |
| r1438 | r1439 | |
|---|---|---|
| 81 | 81 | GFXDECODE_ENTRY( REGION_CPU1, 0x2c00, jupiter_charlayout, 0, 2 ) |
| 82 | 82 | GFXDECODE_END |
| 83 | 83 | |
| 84 | static unsigned char jupiter_palette[] = | |
| 84 | static const unsigned char jupiter_palette[] = | |
| 85 | 85 | { |
| 86 | 86 | 0x00, 0x00, 0x00, /* Black */ |
| 87 | 87 | 0xff, 0xff, 0xff /* White */ |
| 88 | 88 | }; |
| 89 | 89 | |
| 90 | static unsigned short jupiter_colortable[] = | |
| 90 | static const unsigned short jupiter_colortable[] = | |
| 91 | 91 | { |
| 92 | 92 | 0, 1, |
| 93 | 93 | 1, 0 |
| r1438 | r1439 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | */ |
| 43 | 43 | |
| 44 | static struct via6522_interface config= | |
| 44 | static const struct via6522_interface config= | |
| 45 | 45 | { |
| 46 | 46 | 0,//read8_handler in_a_func; |
| 47 | 47 | 0,//read8_handler in_b_func; |
| r1438 | r1439 | |
|---|---|---|
| 275 | 275 | Audio Initialisation |
| 276 | 276 | ******************************************************************************/ |
| 277 | 277 | |
| 278 | static INT16 speaker_levels[] = {-32768, 0, 32767, 0}; | |
| 278 | static const INT16 speaker_levels[] = {-32768, 0, 32767, 0}; | |
| 279 | 279 | |
| 280 | static struct Speaker_interface speaker_interface = | |
| 280 | static const struct Speaker_interface speaker_interface = | |
| 281 | 281 | { |
| 282 | 282 | 4, |
| 283 | 283 | speaker_levels |
| r1438 | r1439 | |
|---|---|---|
| 97 | 97 | // This is the sequence for unlocking the ASIC in the CPC+/GX4000 |
| 98 | 98 | // These are outed to port &bc00, after syncing the lock by outing a non-zero value then a zero to &bc00 |
| 99 | 99 | // To lock the ASIC again, repeat the sequence without the last &ee |
| 100 | static unsigned char asic_unlock_seq[15] = | |
| 100 | static const unsigned char asic_unlock_seq[15] = | |
| 101 | 101 | { |
| 102 | 102 | 0xff, 0x77, 0xb3, 0x51, 0xa8, 0xd4, 0x62, 0x39, 0x9c, 0x46, 0x2b, 0x15, 0x8a, 0xcd, 0xee |
| 103 | 103 | }; |
| r1438 | r1439 | |
| 154 | 154 | static unsigned char *Amstrad_UpperRom; |
| 155 | 155 | /* There are 8 different ram configurations which work on the currently selected 64k logical block. |
| 156 | 156 | The following tables show the possible ram configurations :*/ |
| 157 | static int RamConfigurations[8 * 4] = | |
| 157 | static const int RamConfigurations[8 * 4] = | |
| 158 | 158 | { |
| 159 | 159 | 0, 1, 2, 3, /* config 0 */ |
| 160 | 160 | 0, 1, 2, 7, /* config 1 */ |
| r1438 | r1439 | |
| 338 | 338 | /* ----------------------------- |
| 339 | 339 | - amstrad_ppi8255_interface - |
| 340 | 340 | -----------------------------*/ |
| 341 | static ppi8255_interface amstrad_ppi8255_interface = | |
| 341 | static const ppi8255_interface amstrad_ppi8255_interface = | |
| 342 | 342 | { |
| 343 | 343 | 1, /* number of PPIs to emulate */ |
| 344 | 344 | {amstrad_ppi_porta_r}, /* port A read */ |
| r1438 | r1439 | |
| 350 | 350 | }; |
| 351 | 351 | |
| 352 | 352 | /* Amstrad NEC765 interface doesn't use interrupts or DMA! */ |
| 353 | static nec765_interface amstrad_nec765_interface = | |
| 353 | static const nec765_interface amstrad_nec765_interface = | |
| 354 | 354 | { |
| 355 | 355 | NULL, |
| 356 | 356 | NULL |
| r1438 | r1439 | |
| 1615 | 1615 | } |
| 1616 | 1616 | |
| 1617 | 1617 | /* the following timings have been measured! */ |
| 1618 | static UINT8 amstrad_cycle_table_op[256] = { | |
| 1618 | static const UINT8 amstrad_cycle_table_op[256] = { | |
| 1619 | 1619 | 4, 12, 8, 8, 4, 4, 8, 4, 4, 12, 8, 8, 4, 4, 8, 4, |
| 1620 | 1620 | 12, 12, 8, 8, 4, 4, 8, 4, 12, 12, 8, 8, 4, 4, 8, 4, |
| 1621 | 1621 | 8, 12, 20, 8, 4, 4, 8, 4, 8, 12, 20, 8, 4, 4, 8, 4, |
| r1438 | r1439 | |
| 1634 | 1634 | 8, 12, 12, 4, 12, 16, 8, 16, 8, 8, 12, 4, 12, 4, 8, 16 |
| 1635 | 1635 | }; |
| 1636 | 1636 | |
| 1637 | static UINT8 amstrad_cycle_table_cb[256]= | |
| 1637 | static const UINT8 amstrad_cycle_table_cb[256]= | |
| 1638 | 1638 | { |
| 1639 | 1639 | 4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 4, 4, 4, 12, 4, |
| 1640 | 1640 | 4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 4, 4, 4, 12, 4, |
| r1438 | r1439 | |
| 1655 | 1655 | }; |
| 1656 | 1656 | |
| 1657 | 1657 | |
| 1658 | static UINT8 amstrad_cycle_table_ed[256]= | |
| 1658 | static const UINT8 amstrad_cycle_table_ed[256]= | |
| 1659 | 1659 | { |
| 1660 | 1660 | 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, |
| 1661 | 1661 | 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, |
| r1438 | r1439 | |
| 1676 | 1676 | }; |
| 1677 | 1677 | |
| 1678 | 1678 | |
| 1679 | static UINT8 amstrad_cycle_table_xy[256]= | |
| 1679 | static const UINT8 amstrad_cycle_table_xy[256]= | |
| 1680 | 1680 | { |
| 1681 | 1681 | 4, 12, 8, 8, 4, 4, 8, 4, 4, 12, 8, 8, 4, 4, 8, 4, |
| 1682 | 1682 | 12, 12, 8, 8, 4, 4, 8, 4, 12, 12, 8, 8, 4, 4, 8, 4, |
| r1438 | r1439 | |
| 1696 | 1696 | 8, 12, 12, 4, 12, 16, 8, 16, 8, 8, 12, 4, 12, 4, 8, 16 |
| 1697 | 1697 | }; |
| 1698 | 1698 | |
| 1699 | static UINT8 amstrad_cycle_table_xycb[256]= | |
| 1699 | static const UINT8 amstrad_cycle_table_xycb[256]= | |
| 1700 | 1700 | { |
| 1701 | 1701 | 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, |
| 1702 | 1702 | 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, |
| r1438 | r1439 | |
| 1716 | 1716 | 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 |
| 1717 | 1717 | }; |
| 1718 | 1718 | |
| 1719 | static UINT8 amstrad_cycle_table_ex[256]= | |
| 1719 | static const UINT8 amstrad_cycle_table_ex[256]= | |
| 1720 | 1720 | { |
| 1721 | 1721 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1722 | 1722 | 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| r1438 | r1439 | |
| 1821 | 1821 | |
| 1822 | 1822 | /* Using the cool code Juergen has provided, I will override |
| 1823 | 1823 | the timing tables with the values for the amstrad */ |
| 1824 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_op, amstrad_cycle_table_op); | |
| 1825 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_cb, amstrad_cycle_table_cb); | |
| 1826 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_ed, amstrad_cycle_table_ed); | |
| 1827 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_xy, amstrad_cycle_table_xy); | |
| 1828 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_xycb, amstrad_cycle_table_xycb); | |
| 1829 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_ex, amstrad_cycle_table_ex); | |
| 1824 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_op, (void*)amstrad_cycle_table_op); | |
| 1825 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_cb, (void*)amstrad_cycle_table_cb); | |
| 1826 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_ed, (void*)amstrad_cycle_table_ed); | |
| 1827 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_xy, (void*)amstrad_cycle_table_xy); | |
| 1828 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_xycb, (void*)amstrad_cycle_table_xycb); | |
| 1829 | cpunum_set_info_ptr(0,CPUINFO_PTR_Z80_CYCLE_TABLE+Z80_TABLE_ex, (void*)amstrad_cycle_table_ex); | |
| 1830 | 1830 | |
| 1831 | 1831 | /* Juergen is a cool dude! */ |
| 1832 | 1832 | cpunum_set_irq_callback(0, amstrad_cpu_acknowledge_int); |
| r1438 | r1439 | |
| 2390 | 2390 | /* -------------------- |
| 2391 | 2391 | - AY8910_interface - |
| 2392 | 2392 | --------------------*/ |
| 2393 | static struct AY8910interface ay8912_interface = | |
| 2393 | static const struct AY8910interface ay8912_interface = | |
| 2394 | 2394 | { |
| 2395 | 2395 | amstrad_psg_porta_read, /* portA read */ |
| 2396 | 2396 | amstrad_psg_porta_read, /* portB read */ |
| r1438 | r1439 | |
|---|---|---|
| 331 | 331 | memory_set_opbase_handler(0, a310_setopbase); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | static const char *ioc_regnames[] = | |
| 334 | static const char *const ioc_regnames[] = | |
| 335 | 335 | { |
| 336 | 336 | "(rw) Control", // 0 |
| 337 | 337 | "(read) Keyboard receive (write) keyboard send", // 1 |
| r1438 | r1439 | |
|---|---|---|
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | |
| 285 | static struct tc8521_interface avigo_tc8521_interface = | |
| 285 | static const struct tc8521_interface avigo_tc8521_interface = | |
| 286 | 286 | { |
| 287 | 287 | avigo_tc8521_alarm_int |
| 288 | 288 | }; |
| r1438 | r1439 | |
| 371 | 371 | |
| 372 | 372 | |
| 373 | 373 | |
| 374 | static uart8250_interface avigo_com_interface[1]= | |
| 374 | static const uart8250_interface avigo_com_interface[1]= | |
| 375 | 375 | { |
| 376 | 376 | { |
| 377 | 377 | TYPE16550, |
| r1438 | r1439 | |
|---|---|---|
| 766 | 766 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(2) PORT_NAME("P2 L2") |
| 767 | 767 | INPUT_PORTS_END |
| 768 | 768 | |
| 769 | static struct PSXSPUinterface psxspu_interface = | |
| 769 | static const struct PSXSPUinterface psxspu_interface = | |
| 770 | 770 | { |
| 771 | 771 | &g_p_n_psxram, |
| 772 | 772 | psx_irq_set, |
| r1438 | r1439 | |
|---|---|---|
| 547 | 547 | INPUT_PORTS_END |
| 548 | 548 | |
| 549 | 549 | |
| 550 | static struct tms9995reset_param tutor_processor_config = | |
| 550 | static const struct tms9995reset_param tutor_processor_config = | |
| 551 | 551 | { |
| 552 | 552 | #if 0 |
| 553 | 553 | REGION_CPU1,/* region for processor RAM */ |
| r1438 | r1439 | |
|---|---|---|
| 308 | 308 | GFXDECODE_ENTRY( REGION_GFX1, 0, trs80_charlayout_double_width, 0, 4 ) |
| 309 | 309 | GFXDECODE_END |
| 310 | 310 | |
| 311 | static unsigned char trs80_palette[] = | |
| 311 | static const unsigned char trs80_palette[] = | |
| 312 | 312 | { |
| 313 | 313 | 0x00,0x00,0x00, |
| 314 | 314 | 0xff,0xff,0xff |
| 315 | 315 | }; |
| 316 | 316 | |
| 317 | static unsigned short trs80_colortable[] = | |
| 317 | static const unsigned short trs80_colortable[] = | |
| 318 | 318 | { |
| 319 | 319 | 0,1 /* white on black */ |
| 320 | 320 | }; |
| r1438 | r1439 | |
| 328 | 328 | memcpy(colortable,trs80_colortable,sizeof(trs80_colortable)); |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | static INT16 speaker_levels[3] = {0.0*32767,0.46*32767,0.85*32767}; | |
| 331 | static const INT16 speaker_levels[3] = {0.0*32767,0.46*32767,0.85*32767}; | |
| 332 | 332 | |
| 333 | static struct Speaker_interface speaker_interface = | |
| 333 | static const struct Speaker_interface speaker_interface = | |
| 334 | 334 | { |
| 335 | 335 | 3, /* optional: number of different levels */ |
| 336 | 336 | speaker_levels /* optional: level lookup table */ |
| r1438 | r1439 | |
|---|---|---|
| 626 | 626 | memcpy(colortable, apple2_colortable, sizeof(apple2_colortable)); |
| 627 | 627 | } |
| 628 | 628 | |
| 629 | static struct AY8910interface ay8910_interface = | |
| 629 | static const struct AY8910interface ay8910_interface = | |
| 630 | 630 | { |
| 631 | 631 | NULL |
| 632 | 632 | }; |
| r1438 | r1439 | |
|---|---|---|
| 343 | 343 | ROM_CART_LOAD(0, "rom", 0x18000, 0x4000, ROM_FILL_FF | ROM_OPTIONAL) |
| 344 | 344 | ROM_END |
| 345 | 345 | |
| 346 | static struct CassetteOptions primo_cassette_options = { | |
| 346 | static const struct CassetteOptions primo_cassette_options = { | |
| 347 | 347 | 1, /* channels */ |
| 348 | 348 | 16, /* bits per sample */ |
| 349 | 349 | 22050 /* sample frequency */ |
| r1438 | r1439 | |
|---|---|---|
| 471 | 471 | tvlink.palette[3] = MAKE24_RGB15(svisionp_palette[(PALETTE_START+3)*3+0], svisionp_palette[(PALETTE_START+3)*3+1], svisionp_palette[(PALETTE_START+3)*3+2]); |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | static struct CustomSound_interface svision_sound_interface = | |
| 474 | static const struct CustomSound_interface svision_sound_interface = | |
| 475 | 475 | { |
| 476 | 476 | svision_custom_start |
| 477 | 477 | }; |
| r1438 | r1439 | |
|---|---|---|
| 698 | 698 | ROM_LOAD( "rom80.e0", 0x12000, 0x2000, CRC(e801dadc )) |
| 699 | 699 | #endif |
| 700 | 700 | |
| 701 | static SID6581_interface c64_sound_interface = | |
| 701 | static const SID6581_interface c64_sound_interface = | |
| 702 | 702 | { |
| 703 | 703 | c64_paddle_read |
| 704 | 704 | }; |
| r1438 | r1439 | |
|---|---|---|
| 307 | 307 | |
| 308 | 308 | INPUT_PORTS_END |
| 309 | 309 | |
| 310 | static struct AY8910interface ay8910_interface = | |
| 310 | static const struct AY8910interface ay8910_interface = | |
| 311 | 311 | { |
| 312 | 312 | svi318_psg_port_a_r, |
| 313 | 313 | NULL, |
| r1438 | r1439 | |
|---|---|---|
| 219 | 219 | static GFXDECODE_START( gfxdecodeinfo ) |
| 220 | 220 | GFXDECODE_END |
| 221 | 221 | |
| 222 | static struct TMS5220interface tms5220interface = | |
| 222 | static const struct TMS5220interface tms5220interface = | |
| 223 | 223 | { |
| 224 | 224 | NULL, /* no IRQ callback */ |
| 225 | 225 | #if 1 |
| r1438 | r1439 | |
|---|---|---|
| 1132 | 1132 | PORT_INCLUDE( pc_joystick ) /* IN15 - IN19 */ |
| 1133 | 1133 | INPUT_PORTS_END |
| 1134 | 1134 | |
| 1135 | static unsigned i86_address_mask = 0x000fffff; | |
| 1135 | static const unsigned i86_address_mask = 0x000fffff; | |
| 1136 | 1136 | |
| 1137 | 1137 | #if defined(ADLIB) |
| 1138 | 1138 | /* irq line not connected to pc on adlib cards (and compatibles) */ |
| 1139 | 1139 | static void pc_irqhandler(int linestate) {} |
| 1140 | 1140 | |
| 1141 | static struct YM3812interface ym3812_interface = | |
| 1141 | static const struct YM3812interface ym3812_interface = | |
| 1142 | 1142 | { |
| 1143 | 1143 | pc_irqhandler |
| 1144 | 1144 | }; |
| r1438 | r1439 | |
|---|---|---|
| 494 | 494 | /* |
| 495 | 495 | TMS0285 speech synthesizer |
| 496 | 496 | */ |
| 497 | static struct TMS5220interface tms5220interface = | |
| 497 | static const struct TMS5220interface tms5220interface = | |
| 498 | 498 | { |
| 499 | 499 | NULL, /* no IRQ callback */ |
| 500 | 500 | spchroms_read, /* speech ROM read handler */ |
| r1438 | r1439 | |
|---|---|---|
| 51 | 51 | return 0; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | static struct EEPROM_interface eeprom_interface_93C56 = | |
| 54 | static const struct EEPROM_interface eeprom_interface_93C56 = | |
| 55 | 55 | { |
| 56 | 56 | 7, // address bits 7 |
| 57 | 57 | 16, // data bits 16 |
| r1438 | r1439 | |
| 562 | 562 | { |
| 563 | 563 | } |
| 564 | 564 | |
| 565 | static SCSIConfigTable dev_table = | |
| 565 | static const SCSIConfigTable dev_table = | |
| 566 | 566 | { |
| 567 | 567 | 1, /* 1 SCSI device */ |
| 568 | 568 | { { SCSI_ID_6, 0, SCSI_DEVICE_CDROM } } /* SCSI ID 6, using CHD 0, and it's a CD-ROM */ |
| 569 | 569 | }; |
| 570 | 570 | |
| 571 | static struct WD33C93interface scsi_intf = | |
| 571 | static const struct WD33C93interface scsi_intf = | |
| 572 | 572 | { |
| 573 | 573 | &dev_table, /* SCSI device table */ |
| 574 | 574 | &scsi_irq, /* command completion IRQ */ |
| r1438 | r1439 | |
| 597 | 597 | } |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | static struct mips3_config config = | |
| 600 | static const struct mips3_config config = | |
| 601 | 601 | { |
| 602 | 602 | 32768, /* code cache size */ |
| 603 | 603 | 32768 /* data cache size */ |
| r1438 | r1439 | |
|---|---|---|
| 713 | 713 | } |
| 714 | 714 | |
| 715 | 715 | |
| 716 | //static struct TMS5220interface tms5220_interface = | |
| 716 | //static const struct TMS5220interface tms5220_interface = | |
| 717 | 717 | //{ |
| 718 | 718 | // 680000L, |
| 719 | 719 | // 50, |
| r1438 | r1439 | |
|---|---|---|
| 200 | 200 | PORT_DIPSETTING( 0x00, "Disabled" ) |
| 201 | 201 | INPUT_PORTS_END |
| 202 | 202 | |
| 203 | static unsigned i86_address_mask = 0x000fffff; | |
| 203 | static const unsigned i86_address_mask = 0x000fffff; | |
| 204 | 204 | |
| 205 | 205 | static const compis_gdc_interface i82720_interface = |
| 206 | 206 | { |
| r1438 | r1439 | |
|---|---|---|
| 23 | 23 | |
| 24 | 24 | /* pio is last in chain and therefore has highest priority */ |
| 25 | 25 | |
| 26 | static struct z80_irq_daisy_chain kc85_daisy_chain[] = | |
| 26 | static const struct z80_irq_daisy_chain kc85_daisy_chain[] = | |
| 27 | 27 | { |
| 28 | 28 | {z80pio_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0}, |
| 29 | 29 | {z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0}, |
| r1438 | r1439 | |
|---|---|---|
| 69 | 69 | - Added a general 74145 BCD-to-decimal decoder emulation, currently used |
| 70 | 70 | by the SYM-1 driver. [Dirk Best] |
| 71 | 71 | |
| 72 | - Fixed M65C02 optimization [Peter Trauner] | |
| 72 | - Fixed M65C02 optimization. [Peter Trauner] | |
| 73 | 73 | |
| 74 | - Staticization and constification. [Atari Ace] | |
| 74 | 75 | |
| 75 | 76 | |
| 77 | ||
| 76 | 78 | 0.121 |
| 77 | 79 | |
| 78 | 80 | New System Drivers Supported (in no particular order): |
| Previous | 15994 Revisions | Next |