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

src/mame/machine/amiga.c
r1438r1439
15291529 *
15301530 *************************************/
15311531
1532void amiga_add_autoconfig(amiga_autoconfig_device *device)
1532void amiga_add_autoconfig(const amiga_autoconfig_device *device)
15331533{
15341534   autoconfig_device *dev, **d;
15351535
src/mame/includes/amiga.h
r1438r1439
390390void amiga_serial_in_w(UINT16 data);
391391attotime amiga_get_serial_char_period(void);
392392
393void amiga_add_autoconfig(amiga_autoconfig_device *device);
393void amiga_add_autoconfig(const amiga_autoconfig_device *device);
394394READ16_HANDLER( amiga_autoconfig_r );
395395WRITE16_HANDLER( amiga_autoconfig_w );
396396
src/osd/winui/columnedit.h
r1438r1439
1616
1717INT_PTR InternalColumnDialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam,
1818   int nColumnMax, int *shown, int *order,
19   LPCTSTR *names, void (*pfnGetRealColumnOrder)(int *),
19   const LPCTSTR *names, void (*pfnGetRealColumnOrder)(int *),
2020   void (*pfnGetColumnInfo)(int *pnOrder, int *pnShown),
2121   void (*pfnSetColumnInfo)(int *pnOrder, int *pnShown));
2222
src/osd/winui/dijoystick.c
r1438r1439
5050    External variables
5151 ***************************************************************************/
5252
53struct OSDJoystick  DIJoystick =
53const struct OSDJoystick  DIJoystick =
5454{
5555   DIJoystick_init,                /* init              */
5656   DIJoystick_exit,                /* exit              */
src/osd/winui/picker.c
r1438r1439
8686   int *pnColumnsShown;
8787   int *pnColumnsOrder;
8888   UINT_PTR nTimer;
89   LPCTSTR *ppszColumnNames;
89   const LPCTSTR *ppszColumnNames;
9090};
9191
9292
r1438r1439
15811581
15821582
15831583
1584LPCTSTR *Picker_GetColumnNames(HWND hwndPicker)
1584const LPCTSTR *Picker_GetColumnNames(HWND hwndPicker)
15851585{
15861586   struct PickerInfo *pPickerInfo;
15871587   pPickerInfo = GetPickerInfo(hwndPicker);
src/osd/winui/dijoystick.h
r1438r1439
6262   BOOL (*Available)(void);
6363};
6464
65extern struct OSDJoystick DIJoystick;
65extern const struct OSDJoystick DIJoystick;
6666
6767extern int    DIJoystick_GetNumPhysicalJoysticks(void);
6868extern TCHAR* DIJoystick_GetPhysicalJoystickName(int num_joystick);
src/osd/winui/picker.h
r1438r1439
5151   BOOL bOldControl;
5252   BOOL bXPControl;
5353   int nColumnCount;
54   LPCTSTR *ppszColumnNames;
54   const LPCTSTR *ppszColumnNames;
5555};
5656
5757enum
r1438r1439
9393// Accessors
9494const struct PickerCallbacks *Picker_GetCallbacks(HWND hwndPicker);
9595int Picker_GetColumnCount(HWND hwndPicker);
96LPCTSTR *Picker_GetColumnNames(HWND hwndPicker);
96const LPCTSTR *Picker_GetColumnNames(HWND hwndPicker);
9797
9898#endif // PICKER_H
src/osd/winui/mui_opts.c
r1438r1439
405405// Screen shot Page tab control text
406406// these must match the order of the options flags in options.h
407407// (TAB_...)
408static const char* image_tabs_long_name[MAX_TAB_TYPES] =
408static const char *const image_tabs_long_name[MAX_TAB_TYPES] =
409409{
410410   "Snapshot ",
411411   "Flyer ",
r1438r1439
417417   "History ",
418418};
419419
420static const char* image_tabs_short_name[MAX_TAB_TYPES] =
420static const char *const image_tabs_short_name[MAX_TAB_TYPES] =
421421{
422422   "snapshot",
423423   "flyer",
src/osd/winui/dxdecode.c
r1438r1439
3232} ERRORCODE, * LPERRORCODE;
3333
3434/***************************************************************/
35static ERRORCODE    g_ErrorCode[] =
35static const ERRORCODE g_ErrorCode[] =
3636{
3737   {   DDERR_ALREADYINITIALIZED,           "DDERR_ALREADYINITIALIZED"},
3838   {   DDERR_CANNOTATTACHSURFACE,          "DDERR_CANNOTATTACHSURFACE"},
src/osd/winui/winui.c
r1438r1439
423423typedef struct
424424{
425425   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 */
427427} Resize;
428428
429429static void ResizeWindow(HWND hParent, Resize *r);
r1438r1439
500500static PDIRWATCHER s_pWatcher;
501501
502502/* use a joystick subsystem in the gui? */
503static struct OSDJoystick* g_pJoyGUI = NULL;
503static const struct OSDJoystick* g_pJoyGUI = NULL;
504504
505505/* store current keyboard state (in internal codes) here */
506506static input_code keyboard_state[ 2048 ]; /* __code_max #defines the number of internal key_codes */
r1438r1439
631631   char      name[40];       // functionality name (optional)
632632   input_seq   is;            // the input sequence (the keys pressed)
633633   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
635635} GUISequence;
636636
637static GUISequence GUISequenceControl[]=
637static const GUISequence GUISequenceControl[]=
638638{
639639   {"gui_key_up",                SEQ_DEF_0,    ID_UI_UP,           Get_ui_key_up },
640640   {"gui_key_down",              SEQ_DEF_0,    ID_UI_DOWN,         Get_ui_key_down },
r1438r1439
818818static MYBITMAPINFO     bmDesc;
819819
820820/* List view Column text */
821LPCTSTR column_names[COLUMN_MAX] =
821const LPCTSTR column_names[COLUMN_MAX] =
822822{
823823#ifdef MESS
824824   TEXT("System"),
r1438r1439
19521952
19531953   for (i = 0; i < NUM_GUI_SEQUENCES; i++)
19541954   {
1955      input_seq *is1;
1955      const input_seq *is1;
19561956      input_seq *is2;
19571957      is1 = &(GUISequenceControl[i].is);
19581958      is2 = GUISequenceControl[i].getiniptr();
r1438r1439
27112711   int cmkindex = 0, dx, dy, dx1, dtempx;
27122712   HWND hControl;
27132713   RECT parent_rect, rect;
2714   ResizeItem *ri;
2714   const ResizeItem *ri;
27152715   POINT p = {0, 0};
27162716
27172717   if (hParent == NULL)
r1438r1439
34253425
34263426   for (i = 0; i < NUM_GUI_SEQUENCES; i++)
34273427   {
3428      input_seq *is = &(GUISequenceControl[i].is);
3428      const input_seq *is = &(GUISequenceControl[i].is);
34293429
34303430      if (GUI_seq_pressed(is))
34313431      {
src/emu/cpu/z80gb/z80gb.h
r1438r1439
44#include "cpuintrf.h"
55
66typedef struct {
7   UINT16   *regs;
7   const UINT16   *regs;
88   UINT8   features;
99   void   (*timer_callback)(int cycles);
1010} Z80GB_CONFIG;
src/emu/cpu/f8/f3853.c
r1438r1439
7272}
7373
7474
75void f3853_init(F3853_CONFIG *config)
75void f3853_init(const F3853_CONFIG *config)
7676{
7777   UINT8 reg=0xfe;
7878   int i;
src/emu/cpu/f8/f3853.h
r1438r1439
1212    void (*interrupt_request)(UINT16 addr, int level);
1313} F3853_CONFIG;
1414
15void f3853_init(F3853_CONFIG *config);
15void f3853_init(const F3853_CONFIG *config);
1616void f3853_reset(void);
1717
1818// ports 0x0c - 0x0f
src/emu/sound/speaker.h
r1438r1439
1515struct Speaker_interface
1616{
1717   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 */
1919};
2020
2121void speaker_level_w (int which, int new_level);
src/emu/sound/sidenvel.c
r1438r1439
214214INLINE UINT16 enveEmuShortAttack(sidOperator*);
215215
216216
217ptr2sidUwordFunc enveModeTable[] =
217const ptr2sidUwordFunc enveModeTable[] =
218218{
219219   /* 0 */
220220   &enveEmuStartAttack, &enveEmuStartRelease,
src/emu/sound/sidenvel.h
r1438r1439
1010void enveEmuResetOperator(sidOperator* pVoice);
1111
1212
13extern ptr2sidUwordFunc enveModeTable[];   // -> envelope.cpp
13extern const ptr2sidUwordFunc enveModeTable[];   // -> envelope.cpp
1414extern const UINT8 masterVolumeLevels[16];  // -> envelope.cpp
1515
1616static const UINT8 ENVE_STARTATTACK = 0;
src/mess/devices/mflopimg.c
r1438r1439
210210
211211
212212
213static floppy_interface mess_floppy_interface =
213static const floppy_interface mess_floppy_interface =
214214{
215215   flopimg_seek_callback,
216216   flopimg_get_sectors_per_track,
r1438r1439
246246
247247/* ----------------------------------------------------------------------- */
248248
249struct io_procs mess_ioprocs =
249const struct io_procs mess_ioprocs =
250250{
251251   NULL,
252252   image_fseek_thunk,
src/mess/devices/dsk.c
r1438r1439
4040static void dsk_write_sector_data_from_buffer(mess_image *img, int sector_index, int side, const char *ptr, int length, int ddam);
4141static void dsk_read_sector_data_into_buffer(mess_image *img, int sector_index, int side, char *ptr, int length);
4242
43static floppy_interface dsk_floppy_interface =
43static const floppy_interface dsk_floppy_interface =
4444{
4545   dsk_seek_callback,
4646   dsk_get_sectors_per_track,
src/mess/mess.c
r1438r1439
2525UINT8 *mess_ram;
2626UINT8 mess_ram_default_value = 0xCD;
2727
28char mess_disclaimer[] =
28const char mess_disclaimer[] =
2929      "MESS is an emulator: it reproduces, more or less faithfully, the behaviour of\n"
3030      "several computer and console systems. But hardware is useless without software\n"
3131      "so a file dump of the ROM, cartridges, discs, and cassettes which run on that\n"
src/mess/mess.h
r1438r1439
4747
4848void mess_options_init(core_options *opts);
4949
50extern char mess_disclaimer[];
50extern const char mess_disclaimer[];
5151
5252UINT32 hash_data_extract_crc32(const char *d);
5353
src/mess/tools/messtest/core.c
r1438r1439
229229
230230static input_code messtest_token_to_code(const char *token)
231231{
232   static struct
232   static const struct
233233   {
234234      int            code;
235235      const char *   codename;
src/mess/tools/imgtool/iflopimg.c
r1438r1439
6868   return stream_size((imgtool_stream *) file);
6969}
7070
71static struct io_procs imgtool_ioprocs =
71static const struct io_procs imgtool_ioprocs =
7272{
7373   imgtool_floppy_closeproc,
7474   imgtool_floppy_seekproc,
r1438r1439
7777   imgtool_floppy_filesizeproc
7878};
7979
80static struct io_procs imgtool_noclose_ioprocs =
80static const struct io_procs imgtool_noclose_ioprocs =
8181{
8282   NULL,
8383   imgtool_floppy_seekproc,
src/mess/tools/imgtool/imgtoolx.h
r1438r1439
3939
4040#define WAVEMODULE(name_,humanname_,ext_,eoln_,flags_,zeropulse,onepulse,threshpulse,waveflags,blockheader,blockheadersize,\
4141      initalt,nextfile,readfilechunk)   \
42   static struct WaveExtra waveextra_##name =                        \
42   static const struct WaveExtra waveextra_##name =                        \
4343   {                                                      \
4444      (initalt),                                             \
4545      (nextfile),                                             \
src/mess/tools/imgtool/filtbas.c
r1438r1439
1919{
2020   UINT8 shift;
2121   UINT8 base;
22   const char **tokens;
22   const char *const *tokens;
2323   int num_tokens;
2424};
2525
r1438r1439
140140
141141/* ----------------------------------------------------------------------- */
142142
143static const char *cocobas_statements[] =
143static const char *const cocobas_statements[] =
144144{
145145   "FOR",      /* 0x80 */
146146   "GO",      /* 0x81 */
r1438r1439
265265   "ATTR"      /* 0xf8 */
266266};
267267
268static const char *cocobas_functions[] =
268static const char *const cocobas_functions[] =
269269{
270270   "SGN",      /* 0xff80 */
271271   "INT",      /* 0xff81 */
r1438r1439
314314   "ERLIN"      /* 0xffac */
315315};
316316
317static const char *dragonbas_statements[] =
317static const char *const dragonbas_statements[] =
318318{
319319   "FOR",      /* 0x80 */
320320   "GO",      /* 0x81 */
r1438r1439
415415   "DSKO$"      /* 0xe0 */
416416};
417417
418static const char *dragonbas_functions[] =
418static const char *const dragonbas_functions[] =
419419{
420420   "SGN",      /* 0xff80 */
421421   "INT",      /* 0xff81 */
r1438r1439
458458   "MKN$"      /* 0xffa6 */
459459};
460460
461static const char *vzbas[] =
461static const char *const vzbas[] =
462462{
463463   "END",      /* 0x80 */
464464   "FOR",      /* 0x81 */
r1438r1439
594594/* ----------------------------------------------------------------------- *
595595 * CBM machines                                                            *
596596 * ----------------------------------------------------------------------- */
597static const char *basic_10[] = /* "BASIC 1.0" - supported by pet */
597static const char *const basic_10[] = /* "BASIC 1.0" - supported by pet */
598598{
599599   "END",            /* 0x80 */
600600   "FOR",            /* 0x81 */
r1438r1439
726726   "{PI}"            /* 0xff - A single character shaped as greek lowercase 'PI' */
727727};
728728
729static const char *basic_20[] = /* "BASIC 2.0" - supported by vic20 & clones, c64 & clones, cbm30xx series */
729static const char *const basic_20[] = /* "BASIC 2.0" - supported by vic20 & clones, c64 & clones, cbm30xx series */
730730{
731731   "END",            /* 0x80 */
732732   "FOR",            /* 0x81 */
r1438r1439
858858   "{PI}"            /* 0xff - A single character shaped as greek lowercase 'PI' */
859859};
860860
861static const char *basic_20_super_expander_vic[] = /* "BASIC 2.0 with Super Expander" - supported by vic20 & clones */
861static const char *const basic_20_super_expander_vic[] = /* "BASIC 2.0 with Super Expander" - supported by vic20 & clones */
862862{
863863   "END",            /* 0x80 */
864864   "FOR",            /* 0x81 */
r1438r1439
990990   "{PI}"            /* 0xff - A single character shaped as greek lowercase 'PI' */
991991};
992992
993static const char *basic_20_turtle_basic_10[] = /* "BASIC 2.0 with Turtle BASIC 1.0" - supported by vic20 & clones */
993static const char *const basic_20_turtle_basic_10[] = /* "BASIC 2.0 with Turtle BASIC 1.0" - supported by vic20 & clones */
994994{
995995   "END",            /* 0x80 */
996996   "FOR",            /* 0x81 */
r1438r1439
11221122   "{PI}"            /* 0xff - A single character shaped as greek lowercase 'PI' */
11231123};
11241124
1125static const char *basic_20_speech_basic_27[] = /* "BASIC 2.0 with Speech BASIC 2.7" - supported by c64 & clones */
1125static const char *const basic_20_speech_basic_27[] = /* "BASIC 2.0 with Speech BASIC 2.7" - supported by c64 & clones */
11261126{
11271127   "END",            /* 0x80 */
11281128   "FOR",            /* 0x81 */
r1438r1439
12541254   "{PI}"            /* 0xff - A single character shaped as greek lowercase 'PI' */
12551255};
12561256
1257static const char *basic_20_at_basic[] = /* "BASIC 2.0 with @BASIC" - supported by c64 & clones */
1257static const char *const basic_20_at_basic[] = /* "BASIC 2.0 with @BASIC" - supported by c64 & clones */
12581258{
12591259   "END",            /* 0x80 */
12601260   "FOR",            /* 0x81 */
r1438r1439
13861386   "{PI}"            /* 0xff - A single character shaped as greek lowercase 'PI' */
13871387};
13881388
1389static const char *basic_20_simon_s_basic[] = /* "BASIC 2.0 with Simon's BASIC" - supported by c64 & clones */
1389static const char *const basic_20_simon_s_basic[] = /* "BASIC 2.0 with Simon's BASIC" - supported by c64 & clones */
13901390{
13911391   "END",            /* 0x80 */
13921392   "FOR",            /* 0x81 */
r1438r1439
16461646   "OUT"             /* 0x647f */
16471647};
16481648
1649static const char *basic_20_exp_40[] = /* "BASIC 2.0 with BASIC 4.0 Expansion" - supported by c64 & clones */
1649static const char *const basic_20_exp_40[] = /* "BASIC 2.0 with BASIC 4.0 Expansion" - supported by c64 & clones */
16501650{
16511651   "END",            /* 0x80 */
16521652   "FOR",            /* 0x81 */
r1438r1439
17781778   "{PI}"            /* 0xff - A single character shaped as greek lowercase 'PI' */
17791779};
17801780
1781static const char *basic_35[] = /* "BASIC 3.5" - supported by c16 & clones, except c364 */
1781static const char *const basic_35[] = /* "BASIC 3.5" - supported by c16 & clones, except c364 */
17821782{
17831783   "END",            /* 0x80 */
17841784   "FOR",            /* 0x81 */
r1438r1439
19101910   "{PI}"            /* 0xff - A single character shaped as greek lowercase 'PI' */
19111911};
19121912
1913static const char *basic_35_magic_voice[] = /* "BASIC 3.5 with Magic Voice Speech Synthesizer" - supported by c364 */
1913static const char *const basic_35_magic_voice[] = /* "BASIC 3.5 with Magic Voice Speech Synthesizer" - supported by c364 */
19141914{
19151915   "END",            /* 0x80 */
19161916   "FOR",            /* 0x81 */
r1438r1439
20532053   "SAY"             /* 0xfe0a */
20542054};
20552055
2056static const char *basic_40[] = /* "BASIC 4.0" - supported by cbm40xx & cbm80xx series, cbm500, cbm600 & clones */
2056static const char *const basic_40[] = /* "BASIC 4.0" - supported by cbm40xx & cbm80xx series, cbm500, cbm600 & clones */
20572057{
20582058   "END",            /* 0x80 */
20592059   "FOR",            /* 0x81 */
r1438r1439
21852185   "{PI}"            /* 0xff - A single character shaped as greek lowercase 'PI' */
21862186};
21872187
2188static const char *basic_70[] = /* "BASIC 7.0" - supported by c128 & clones */
2188static const char *const basic_70[] = /* "BASIC 7.0" - supported by c128 & clones */
21892189{
21902190   "END",            /* 0x80 */
21912191   "FOR",            /* 0x81 */
r1438r1439
23672367   "SLOW"            /* 0xfe26 */
23682368};
23692369
2370static const char *basic_100[] = /* "BASIC 10.0" - supported by c65 & clones */
2370static const char *const basic_100[] = /* "BASIC 10.0" - supported by c65 & clones */
23712371{
23722372   "END",            /* 0x80 */
23732373   "FOR",            /* 0x81 */
src/mess/tools/imgtool/main.c
r1438r1439
2121
2222/* ---------------------------------------------------------------------- */
2323
24static void writeusage(FILE *f, int write_word_usage, struct command *c, char *argv[])
24static void writeusage(FILE *f, int write_word_usage, const struct command *c, char *argv[])
2525{
2626   fprintf(f, "%s %s %s %s\n",
2727      (write_word_usage ? "Usage:" : "      "),
r1438r1439
871871
872872/* ----------------------------------------------------------------------- */
873873
874static struct command cmds[] =
874static const struct command cmds[] =
875875{
876876   { "create",            cmd_create,            "<format> <imagename> [--(createoption)=value]", 2, 8, 0},
877877   { "dir",            cmd_dir,            "<format> <imagename> [path]", 2, 3, 0 },
r1438r1439
897897{
898898   int i;
899899   int result;
900   struct command *c;
900   const struct command *c;
901901   const char *sample_format = "coco_jvc_rsdos";
902902
903903#ifdef MAME_DEBUG
src/mess/tools/imgtool/modules/thomson.c
r1438r1439
11841184
11851185/* character codes >= 128 are reserved for BASIC keywords */
11861186
1187static const char* thombas7[2][128] = {
1187static const char *const thombas7[2][128] = {
11881188  { /* statements */
11891189    "END", "FOR", "NEXT", "DATA", "DIM", "READ", "LET", "GO", "RUN", "IF",
11901190    "RESTORE", "RETURN", "REM", "'", "STOP", "ELSE", "TRON", "TROFF", "DEFSTR",
r1438r1439
12141214};
12151215
12161216/* MO5: some keywords ar missing; DOS and TUNE are added */
1217static const char* thombas5[2][128] = {
1217static const char *const thombas5[2][128] = {
12181218  { /* statements */
12191219    "END", "FOR", "NEXT", "DATA", "DIM", "READ", NULL, "GO", "RUN", "IF",
12201220    "RESTORE", "RETURN", "REM", "'", "STOP", "ELSE", "TRON", "TROFF", "DEFSTR",
r1438r1439
12481248/* DENSITY is missing on BASIC 512 & BASIC 128 for MO6 but, otherwise, they
12491249   have the same tokens
12501250*/
1251static const char* thombas128[2][128] = {
1251static const char *const thombas128[2][128] = {
12521252  { /* statements */
12531253    "END", "FOR", "NEXT", "DATA", "DIM", "READ", "LET", "GO", "RUN", "IF",
12541254    "RESTORE", "RETURN", "REM", "'", "STOP", "ELSE", "TRON", "TROFF", "DEFSTR",
r1438r1439
14011401                const char *name,
14021402                const char *fork,
14031403                imgtool_stream *dst,
1404                const char* table[2][128])
1404                const char *const table[2][128])
14051405{
14061406  imgtool_stream *org = stream_open_mem( NULL, 0 );
14071407  imgtoolerr_t err;
r1438r1439
14721472                const char *fork,
14731473                imgtool_stream *src,
14741474                option_resolution *opts,
1475                const char* table[2][128])
1475                const char *const table[2][128])
14761476{
14771477  return IMGTOOLERR_UNIMPLEMENTED;
14781478}
src/mess/tools/imgtool/modules/crt.c
r1438r1439
305305$4050:
306306*/
307307 
308static const char *hardware_types[]={
308static const char *const hardware_types[]={
309309   "Normal cartridge",
310310   "Action Replay",
311311   "KCS Power Cartridge",
r1438r1439
330330   char name[0x20];
331331} crt_header;
332332   
333static const char *chip_types[]={ "ROM", "RAM", "FLASH" };
333static const char *const chip_types[]={ "ROM", "RAM", "FLASH" };
334334typedef struct {
335335   char id[4]; // CHIP
336336   bigulong packet_length;
r1438r1439
376376   |IMAGE_USES_EXROM_LINE|IMAGE_USES_LABEL, //flags
377377*/
378378
379static struct OptionTemplate c64crt_fileeopts[] =
379static const struct OptionTemplate c64crt_fileeopts[] =
380380{
381381   { "ftype",   NULL, IMGOPTION_FLAG_TYPE_INTEGER,   0,      0xffff,   NULL   },   /* [0] */
382382   { "faddr",   NULL, IMGOPTION_FLAG_TYPE_INTEGER,   0,      0xffff,   NULL   },   /* [1] */
r1438r1439
388388#define C64CRT_FILEOPTION_FADDR      1
389389#define C64CRT_FILEOPTION_FBANK      2
390390
391static struct OptionTemplate c64crt_createopts[] =
391static const struct OptionTemplate c64crt_createopts[] =
392392{
393393   { "hardwaretype",   NULL, IMGOPTION_FLAG_TYPE_INTEGER,                     0,      0xffff,   NULL   },   /* [0] */
394394   { "gameline",      NULL, IMGOPTION_FLAG_TYPE_INTEGER,                     0,      0x00ff,   NULL   },   /* [1] */
src/mess/tools/imgtool/modules/ti85.c
r1438r1439
7272
7373#define HEADER(file) ((ti85_header*)file->data)
7474
75static struct OptionTemplate ti85_fileoptions[] =
75static const struct OptionTemplate ti85_fileoptions[] =
7676{
7777   { "ftype", "File type", IMGOPTION_FLAG_TYPE_INTEGER | IMGOPTION_FLAG_HASDEFAULT,0,27,"12"},
7878   { NULL, 0, 0, 0, 0 }
7979};
8080
81static struct OptionTemplate ti85_createoptions[] =
81static const struct OptionTemplate ti85_createoptions[] =
8282{
8383   { "comment", "Comment", IMGOPTION_FLAG_TYPE_STRING | IMGOPTION_FLAG_HASDEFAULT,0,0,"TI-85 file created with ImgTool"},
8484   { NULL, NULL, 0, 0, 0, 0 }
src/mess/tools/imgtool/modules/d64.c
r1438r1439
7878   unsigned char unused2[0x2d]; // zer0
7979} D71_HEADER;
8080
81static D64_HEADER d64_header={
81static const D64_HEADER d64_header={
8282   18,1,'A',
8383   0, // 1571 0x80
8484   { { 0 } },
r1438r1439
117117   unsigned char unused1[227]; // zero
118118} D81_HEADER;
119119
120static D81_HEADER d81_header={
120static const D81_HEADER d81_header={
121121   40,3,'D',
122122   0,
123123   { '\xa0','\xa0','\xa0','\xa0','\xa0','\xa0','\xa0','\xa0',
r1438r1439
133133   struct { unsigned char free, map[5]; } bam[40];
134134} D81_BAM;
135135
136static D81_BAM d81_bam={
136static const D81_BAM d81_bam={
137137   40, 2,0x44, 0xbb,
138138};
139139
r1438r1439
517517static int d64_read_sector(imgtool_image *img, UINT8 head, UINT8 track, UINT8 sector, int offset, void *buffer, int length);
518518static int d64_write_sector(imgtool_image *img, UINT8 head, UINT8 track, UINT8 sector, int offset, const void *buffer, int length);
519519
520static struct OptionTemplate d64_createopts[] =
520static const struct OptionTemplate d64_createopts[] =
521521{
522522   { "label",   NULL, IMGOPTION_FLAG_TYPE_STRING | IMGOPTION_FLAG_HASDEFAULT,   0,      0,      NULL   },   /* [3] */
523523   { NULL, NULL, 0, 0, 0, 0 }
src/mess/tools/imgtool/modules/t64.c
r1438r1439
115115static int t64_image_deletefile(imgtool_image *img, const char *fname);
116116static int t64_image_create(const imgtool_module *mod, imgtool_stream *f, const ResolvedOption *_options);
117117
118static struct OptionTemplate t64_createopts[] =
118static const struct OptionTemplate t64_createopts[] =
119119{
120120   { "entries", NULL, IMGOPTION_FLAG_TYPE_INTEGER,                     0,      3,      NULL   },   /* [0] */
121121   { "label", NULL, IMGOPTION_FLAG_TYPE_STRING | IMGOPTION_FLAG_HASDEFAULT,   0,      0,      NULL   },   /* [1] */
src/mess/tools/imgtool/modules/xsa.c
r1438r1439
209209static unsigned updhufcnt;
210210static unsigned cpdist[tblsize+1];
211211static unsigned cpdbmask[tblsize];
212static unsigned cpdext[] = { /* Extra bits for distance codes */
212static const unsigned cpdext[] = { /* Extra bits for distance codes */
213213          0,  0,  0,  0,  1,  2,  3,  4,
214214          5,  6,  7,  8,  9, 10, 11, 12};
215215
src/mess/audio/vc4000.c
r1438r1439
7575
7676
7777
78struct CustomSound_interface vc4000_sound_interface =
78const struct CustomSound_interface vc4000_sound_interface =
7979{
8080   vc4000_custom_start
8181};
src/mess/audio/dave.c
r1438r1439
1818#define STEP 0x08000
1919
2020static DAVE dave;
21static DAVE_INTERFACE *dave_iface;
21static const DAVE_INTERFACE *dave_iface;
2222
2323//static unsigned char Dave_IntRegRead(void);
2424//static void Dave_IntRegWrite(unsigned char);
r1438r1439
652652   return dave.Regs[RegIndex & 0x01f];
653653}
654654
655void   Dave_SetIFace(struct DAVE_INTERFACE *newInterface)
655void   Dave_SetIFace(const struct DAVE_INTERFACE *newInterface)
656656{
657657   dave_iface = newInterface;
658658}
src/mess/audio/sblaster.c
r1438r1439
169169}
170170
171171#if 0
172struct CustomSound_interface soundblaster_interface = {
172const struct CustomSound_interface soundblaster_interface = {
173173   soundblaster_start,
174174   soundblaster_stop,
175175   soundblaster_update
src/mess/audio/odyssey2.c
r1438r1439
1111
1212sound_stream *odyssey2_sh_channel;
1313
14struct CustomSound_interface odyssey2_sound_interface =
14const struct CustomSound_interface odyssey2_sound_interface =
1515{
1616   odyssey2_sh_start
1717};
src/mess/audio/dave.h
r1438r1439
102102
103103extern void   Dave_SetInt(int);
104104
105void   Dave_SetIFace(struct DAVE_INTERFACE *newInterface);
105void   Dave_SetIFace(const struct DAVE_INTERFACE *newInterface);
106106void     Dave_Interrupt(void);
107107
108108#endif
src/mess/audio/arcadia.c
r1438r1439
7979
8080
8181
82struct CustomSound_interface arcadia_sound_interface =
82const struct CustomSound_interface arcadia_sound_interface =
8383{
8484   arcadia_custom_start
8585};
src/mess/audio/dai.c
r1438r1439
2929                       500, 1000, 1500, 2000,
3030                 2500, 3000, 3500, 4000};
3131
32struct CustomSound_interface dai_sound_interface =
32const struct CustomSound_interface dai_sound_interface =
3333{
3434   dai_sh_start,
3535   NULL,
src/mess/includes/vic6560.h
r1438r1439
111111
112112extern VIDEO_START( vic6560 );
113113extern VIDEO_UPDATE( vic6560 );
114extern unsigned char vic6560_palette[16 * 3];
114extern const unsigned char vic6560_palette[16 * 3];
115115
116116/* to be inserted in GameDriver-Structure */
117extern struct CustomSound_interface vic6560_sound_interface;
117extern const struct CustomSound_interface vic6560_sound_interface;
118118
119119extern INTERRUPT_GEN( vic656x_raster_interrupt );
120120
src/mess/includes/hp48.h
r1438r1439
7171extern MACHINE_RESET( hp48 );
7272
7373/* in video/hp48.c */
74extern unsigned short hp48_colortable[0x20][2];
74extern const unsigned short hp48_colortable[0x20][2];
7575
7676extern PALETTE_INIT( hp48 );
7777extern VIDEO_START( hp48 );
src/mess/includes/dai.h
r1438r1439
1414extern UINT8 dai_osc_volume[3];
1515
1616/* video/dai.c */
17extern unsigned char dai_palette[16*3];
18extern unsigned short dai_colortable[1][16];
17extern const unsigned char dai_palette[16*3];
18extern const unsigned short dai_colortable[1][16];
1919VIDEO_START( dai );
2020VIDEO_UPDATE( dai );
2121PALETTE_INIT( dai );
2222void dai_update_palette (UINT8);
2323
2424/* audio/dai.c */
25extern struct CustomSound_interface dai_sound_interface;
25extern const struct CustomSound_interface dai_sound_interface;
2626extern void dai_sh_change_clock(double);
2727
2828#endif /* DAI_H */
src/mess/includes/i8271.h
r1438r1439
146146#define I8271_STATUS_NON_DMA_REQUEST   0x004
147147
148148/* initialise emulation */
149void i8271_init(i8271_interface *);
149void i8271_init(const i8271_interface *);
150150/* reset */
151151void i8271_reset(void);
152152
src/mess/includes/tc8521.h
r1438r1439
1111   void (*alarm_output_callback)(int);
1212};
1313
14void tc8521_init(struct tc8521_interface *);
14void tc8521_init(const struct tc8521_interface *);
1515
1616void tc8521_load_stream(mame_file *file);
1717void tc8521_save_stream(mame_file *file);
src/mess/includes/pocketc.h
r1438r1439
22extern PALETTE_INIT( pocketc );
33extern VIDEO_START( pocketc );
44
5extern unsigned short pocketc_colortable[8][2];
5extern const unsigned short pocketc_colortable[8][2];
66
77typedef const char *POCKETC_FIGURE[];
88void pocketc_draw_special(mame_bitmap *bitmap,
src/mess/includes/pc1500.h
r1438r1439
1010
1111
1212/* in mess/video/ */
13extern unsigned char pc1500_palette[242][3];
14extern unsigned short pc1500_colortable[1][2];
13extern const unsigned char pc1500_palette[242][3];
14extern const unsigned short pc1500_colortable[1][2];
1515
1616
1717void pc1500_init_colors (unsigned char *sys_palette,
src/mess/includes/pclpt.h
r1438r1439
2323
2424void pc_lpt_config(int nr, const PC_LPT_CONFIG *config);
2525
26void pc_lpt_set_device(int nr, CENTRONICS_DEVICE *device);
26void pc_lpt_set_device(int nr, const CENTRONICS_DEVICE *device);
2727
2828/* line definitions in centroni.h */
2929/* only those lines in mask are modified */
src/mess/includes/arcadia.h
r1438r1439
2020extern VIDEO_START( arcadia );
2121extern VIDEO_UPDATE( arcadia );
2222
23extern struct CustomSound_interface arcadia_sound_interface;
23extern const struct CustomSound_interface arcadia_sound_interface;
2424extern void arcadia_soundport_w (int mode, int data);
src/mess/includes/pmd85.h
r1438r1439
1515/* video/pmd85.c */
1616extern VIDEO_START( pmd85 );
1717extern VIDEO_UPDATE( pmd85 );
18extern unsigned char pmd85_palette[3*3];
19extern unsigned short pmd85_colortable[1][3];
18extern const unsigned char pmd85_palette[3*3];
19extern const unsigned short pmd85_colortable[1][3];
2020extern PALETTE_INIT( pmd85 );
src/mess/includes/lviv.h
r1438r1439
1010/* video/lviv.c */
1111extern VIDEO_START( lviv );
1212extern VIDEO_UPDATE( lviv );
13extern unsigned char lviv_palette[8*3];
13extern const unsigned char lviv_palette[8*3];
1414extern unsigned short lviv_colortable[1][4];
1515extern PALETTE_INIT( lviv );
1616extern void lviv_update_palette (UINT8);
src/mess/includes/vic4567.h
r1438r1439
33
44#include "vic6567.h"
55
6extern unsigned char vic3_palette[0x100 * 3];
6extern const unsigned char vic3_palette[0x100 * 3];
77
88extern void vic4567_init (int pal, int (*dma_read) (int),
99                    int (*dma_read_color) (int), void (*irq) (int),
src/mess/includes/centroni.h
r1438r1439
5151UINT8 centronics_read_data(int nr);
5252int centronics_read_handshake(int nr);
5353
54extern CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE;
54extern const CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE;
5555
5656#ifdef __cplusplus
5757}
src/mess/includes/ibmpc.h
r1438r1439
11#include "machine/8255ppi.h"
22
3extern ppi8255_interface pc_ppi8255_interface;
3extern const ppi8255_interface pc_ppi8255_interface;
44
55READ8_HANDLER( pc_rtc_r );
66WRITE8_HANDLER( pc_rtc_w );
src/mess/includes/cbmdrive.h
r1438r1439
6666CBM_Drive;
6767
6868#define D64_MAX_TRACKS 35
69extern int d64_sectors_per_track[D64_MAX_TRACKS];
69extern const int d64_sectors_per_track[D64_MAX_TRACKS];
7070int d64_tracksector2offset (int track, int sector);
7171#define D64_TRACK_ID1   (d64_tracksector2offset(18,0)+162)
7272#define D64_TRACK_ID2   (d64_tracksector2offset(18,0)+163)
src/mess/includes/vdc8563.h
r1438r1439
2020extern VIDEO_START( vdc8563 );
2121extern VIDEO_UPDATE( vdc8563 );
2222
23extern unsigned char vdc8563_palette[16 * 3];
23extern const unsigned char vdc8563_palette[16 * 3];
2424
2525/* to be called when writting to port */
2626extern WRITE8_HANDLER ( vdc8563_port_w );
src/mess/includes/osborne1.h
r1438r1439
11#ifndef __OSBORNE1_H
22#define __OSBORNE1_H
33
4extern struct z80_irq_daisy_chain osborne1_daisy_chain[];
4extern const struct z80_irq_daisy_chain osborne1_daisy_chain[];
55
66WRITE8_HANDLER( osborne1_0000_w );
77WRITE8_HANDLER( osborne1_1000_w );
src/mess/includes/vic6567.h
r1438r1439
5050extern VIDEO_UPDATE( vic2 );
5151extern INTERRUPT_GEN( vic2_raster_irq );
5252
53extern unsigned char vic2_palette[16 * 3];
53extern const unsigned char vic2_palette[16 * 3];
5454
5555/* to be inserted in GameDriver-Structure */
5656
src/mess/includes/odyssey2.h
r1438r1439
4040/* video/odyssey2.c */
4141extern int odyssey2_vh_hpos;
4242
43extern UINT8 odyssey2_colors[];
43extern const UINT8 odyssey2_colors[];
4444
4545VIDEO_START( odyssey2 );
4646VIDEO_UPDATE( odyssey2 );
r1438r1439
5454
5555/* audio/odyssey2.c */
5656extern sound_stream *odyssey2_sh_channel;
57extern struct CustomSound_interface odyssey2_sound_interface;
57extern const struct CustomSound_interface odyssey2_sound_interface;
5858void *odyssey2_sh_start(int clock, const struct CustomSound_interface *config);
5959void odyssey2_sh_update( void *param,stream_sample_t **inputs, stream_sample_t **_buffer,int length );
6060
src/mess/includes/primo.h
r1438r1439
1818/* video/pmd85.c */
1919extern VIDEO_START( primo );
2020extern VIDEO_UPDATE( primo );
21extern unsigned char primo_palette[2*3];
22extern unsigned short primo_colortable[1][2];
21extern const unsigned char primo_palette[2*3];
22extern const unsigned short primo_colortable[1][2];
2323extern PALETTE_INIT( primo );
2424extern UINT16 primo_video_memory_base;
src/mess/includes/ti85.h
r1438r1439
4747VIDEO_START( ti85 );
4848VIDEO_UPDATE( ti85 );
4949PALETTE_INIT( ti85 );
50extern unsigned char ti85_palette[32*7][3];
51extern unsigned short ti85_colortable[32][7];
50extern const unsigned char ti85_palette[32*7][3];
51extern const unsigned short ti85_colortable[32][7];
5252                                   
src/mess/includes/ted7360.h
r1438r1439
4646
4747extern VIDEO_START( ted7360 );
4848extern VIDEO_UPDATE( ted7360 );
49extern unsigned char ted7360_palette[16 * 8 * 3];
49extern const unsigned char ted7360_palette[16 * 8 * 3];
5050
5151/* to be inserted in GameDriver-Structure */
52extern struct CustomSound_interface ted7360_sound_interface;
52extern const struct CustomSound_interface ted7360_sound_interface;
5353
5454/* to be called when writting to port */
5555extern WRITE8_HANDLER ( ted7360_port_w );
src/mess/includes/pce.h
r1438r1439
1919WRITE8_HANDLER ( pce_joystick_w );
2020 READ8_HANDLER ( pce_joystick_r );
2121
22extern struct MSM5205interface pce_cd_msm5205_interface;
22extern const struct MSM5205interface pce_cd_msm5205_interface;
2323WRITE8_HANDLER( pce_cd_bram_w );
2424WRITE8_HANDLER( pce_cd_intf_w );
2525READ8_HANDLER( pce_cd_intf_r );
src/mess/includes/vc4000.h
r1438r1439
1414extern VIDEO_START( vc4000 );
1515extern VIDEO_UPDATE( vc4000 );
1616
17extern struct CustomSound_interface vc4000_sound_interface;
17extern const struct CustomSound_interface vc4000_sound_interface;
1818
1919void vc4000_soundport_w (int mode, int data);
src/mess/includes/msm8251.h
r1438r1439
7474
7575
7676/* init chip, set interface, and do main setup */
77void msm8251_init(struct msm8251_interface *);
77void msm8251_init(const struct msm8251_interface *);
7878/* reset the chip */
7979void msm8251_reset(void);
8080
src/mess/includes/galaxy.h
r1438r1439
1111extern WRITE8_HANDLER( galaxy_latch_w );
1212
1313/* video/galaxy.c */
14extern gfx_layout galaxy_charlayout;
15extern unsigned char galaxy_palette[2*3];
16extern unsigned short galaxy_colortable[1][2];
14extern const gfx_layout galaxy_charlayout;
15extern const unsigned char galaxy_palette[2*3];
16extern const unsigned short galaxy_colortable[1][2];
1717extern PALETTE_INIT( galaxy );
1818extern VIDEO_START( galaxy );
1919extern VIDEO_UPDATE( galaxy );
src/mess/video/vic6560.c
r1438r1439
2424 * needs little more testing with working dipswitches */
2525/*#define GFX */
2626
27unsigned char vic6560_palette[] =
27const unsigned char vic6560_palette[] =
2828{
2929/* ripped from vice, a very excellent emulator */
3030/* black, white, red, cyan */
r1438r1439
3737   0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xa0, 0xff, 0xff, 0xff, 0x00
3838};
3939
40struct CustomSound_interface vic6560_sound_interface =
40const struct CustomSound_interface vic6560_sound_interface =
4141{
4242   vic6560_custom_start
4343};
r1438r1439
122122   8 * 8
123123};
124124
125static UINT8 pointermask[] =
125static const UINT8 pointermask[] =
126126{
127127   0x00, 0x70, 0x60, 0x50, 0x08, 0x04, 0x00, 0x00,      /* blackmask */
128128   0xf0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00   /* whitemask */
src/mess/video/dgn_beta.c
r1438r1439
164164static void beta_Set_VSync(int offset, int data);
165165static void beta_Set_DE(int offset, int data);
166166
167static struct m6845_interface
167static const struct m6845_interface
168168beta_m6845_interface= {
169169   0,      // Memory Address register
170170   beta_Set_RA,   // Row Address register
src/mess/video/hp48.c
r1438r1439
44
55#include "includes/hp48.h"
66
7static unsigned char hp48_palette[] =
7static const UINT8 hp48_palette[] =
88{
99   49,70,64,   /* background */
1010   40,35,55,   /* symbol color */
r1438r1439
1313};
1414
1515/* 32 contrast steps */
16unsigned short hp48_colortable[0x20][2] = {
16const UINT16 hp48_colortable[0x20][2] = {
1717   { 0, 2 },
1818   { 0, 2 },
1919   { 0, 2 },
src/mess/video/911_vdt.c
r1438r1439
6464   GFXDECODE_ENTRY( vdt911_chr_region, vdt911_frenchWP_chr_offset, fontlayout_7bit, 0, 4 )
6565GFXDECODE_END
6666
67unsigned char vdt911_palette[vdt911_palette_size*3] =
67const unsigned char vdt911_palette[vdt911_palette_size*3] =
6868{
6969   0x00,0x00,0x00,   /* black */
7070   0xC0,0xC0,0xC0,   /* low intensity */
7171   0xFF,0xFF,0xFF   /* high intensity */
7272};
7373
74unsigned short vdt911_colortable[vdt911_colortable_size] =
74const unsigned short vdt911_colortable[vdt911_colortable_size] =
7575{
7676   0, 2,   /* high intensity */
7777   0, 1,   /* low intensity */
r1438r1439
518518      }
519519}
520520
521static unsigned char (*key_translate[])[91] =
521static const unsigned char (*key_translate[])[91] =
522522{   /* array must use same order as vdt911_model_t!!! */
523523   /* US */
524524   US_key_translate,
src/mess/video/i82720.c
r1438r1439
13801380*/
13811381
13821382
1383static unsigned char COMPIS_palette[16*3] =
1383static const unsigned char COMPIS_palette[16*3] =
13841384{
13851385   0, 0, 0,
13861386   0, 0, 0,
src/mess/video/911_vdt.h
r1438r1439
2222
2323GFXDECODE_EXTERN( vdt911_gfxdecodeinfo );
2424
25extern unsigned char vdt911_palette[];
26extern unsigned short vdt911_colortable[];
25extern const unsigned char vdt911_palette[];
26extern const unsigned short vdt911_colortable[];
2727enum
2828{
2929   vdt911_palette_size = 3 /** 3*/,
src/mess/video/dai.c
r1438r1439
2525   #define LOG_DAI_VIDEO_LINE(_mode, _unit, _resolution, _repeat, _scan)
2626#endif
2727
28unsigned char dai_palette[16*3] =
28const unsigned char dai_palette[16*3] =
2929{
3030   0x00, 0x00, 0x00,   /*  0 Black      */
3131   0x00, 0x00, 0x8b,   /*  1 Dark Blue      */
r1438r1439
4545   0xff, 0xff, 0xff,   /* 15 White      */
4646};
4747
48unsigned short dai_colortable[1][16] =
48const unsigned short dai_colortable[1][16] =
4949{
5050   { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }
5151};
src/mess/video/nc.c
r1438r1439
1919}
2020
2121/* two colours */
22static unsigned short nc_colour_table[NC_NUM_COLOURS] =
22static const unsigned short nc_colour_table[NC_NUM_COLOURS] =
2323{
2424   0, 1,2,3
2525};
src/mess/video/saa505x.c
r1438r1439
8888
8989/* Normal Character Set */
9090
91static char teletext_saa5050_characters[96*60]={
91static const char teletext_saa5050_characters[96*60]={
9292  // 0x20 ' '
9393  0,0,0,0,0,0,
9494  0,0,0,0,0,0,
r1438r1439
11501150
11511151/* Graphics Character Set */
11521152
1153static char teletext_graphics[96*60]={
1153static const char teletext_graphics[96*60]={
11541154  // 0x20
11551155  0,0,0,0,0,0,
11561156  0,0,0,0,0,0,
r1438r1439
22112211
22122212/* Separated Graphics Character Set */
22132213
2214static char teletext_separated_graphics[96*60]={
2214static const char teletext_separated_graphics[96*60]={
22152215  // Character ' ' (32)
22162216  0,0,0,0,0,0,
22172217  0,0,0,0,0,0,
r1438r1439
33693369static int teletext_data;
33703370static int teletext_LOSE;
33713371
3372static char *tt_lookup=teletext_saa5050_characters;
3373static char *tt_graphics=teletext_graphics;
3372static const char *tt_lookup=teletext_saa5050_characters;
3373static const char *tt_graphics=teletext_graphics;
33743374static int tt_colour=7;
33753375static int tt_rcolour;
33763376static int tt_bgcolour=0;
src/mess/video/911_key.h
r1438r1439
33
44   The only difference is that the US # character is a Pound character in UK.
55*/
6static unsigned char US_key_translate[4][91] =
6static const unsigned char US_key_translate[4][91] =
77{
88   {   /* lower case */
99      0x92,
r1438r1439
451451/*
452452   key translation table for French terminals
453453*/
454static unsigned char French_key_translate[4][91] =
454static const unsigned char French_key_translate[4][91] =
455455{
456456   {   /* lower case */
457457      0x92,
r1438r1439
899899/*
900900   key translation table for German terminals
901901*/
902static unsigned char German_key_translate[4][91] =
902static const unsigned char German_key_translate[4][91] =
903903{
904904   {   /* lower case */
905905      0x92,
r1438r1439
13471347/*
13481348   key translation table for Swedish/Finnish terminals
13491349*/
1350static unsigned char Swedish_key_translate[4][91] =
1350static const unsigned char Swedish_key_translate[4][91] =
13511351{
13521352   {   /* lower case */
13531353      0x92,
r1438r1439
17951795/*
17961796   key translation table for Norwegian/Danish terminals
17971797*/
1798static unsigned char Norwegian_key_translate[4][91] =
1798static const unsigned char Norwegian_key_translate[4][91] =
17991799{
18001800   {   /* lower case */
18011801      0x92,
r1438r1439
22432243/*
22442244   key translation table for Japanese katakana terminals
22452245*/
2246static unsigned char Japanese_key_translate[6][91] =
2246static const unsigned char Japanese_key_translate[6][91] =
22472247{
22482248   {   /* lower case */
22492249      0x92,
r1438r1439
29122912/*
29132913   key translation table for Arabic terminals
29142914*/
2915static unsigned char Arabic_key_translate[6][91] =
2915static const unsigned char Arabic_key_translate[6][91] =
29162916{
29172917   {   /* lower case */
29182918      0x92,
r1438r1439
35813581/*
35823582   key translation table for French word-processing terminals
35833583*/
3584static unsigned char FrenchWP_key_translate[4][91] =
3584static const unsigned char FrenchWP_key_translate[4][91] =
35853585{
35863586   {   /* lower case */
35873587      0x92,
src/mess/video/pocketc.c
r1438r1439
1111  203d: 0 BUSY, 1 PRINT, 3 JAPAN, 4 SMALL, 5 SHIFT, 6 DEF
1212  207c: 1 DEF 1 RAD 2 GRAD 5 ERROR 6 FLAG */
1313
14static unsigned char pocketc_palette[] =
14static const unsigned char pocketc_palette[] =
1515{
1616   99,107,99,
1717   94,111,103,
r1438r1439
2121   0, 0, 0
2222};
2323
24unsigned short pocketc_colortable[8][2] = {
24const unsigned short pocketc_colortable[8][2] = {
2525   { 0, 4 },
2626   { 0, 4 },
2727   { 0, 4 },
src/mess/video/gb.c
r1438r1439
101101static TIMER_CALLBACK(gb_lcd_timer_proc);
102102static void gb_lcd_switch_on( void );
103103
104static unsigned char palette[] =
104static const unsigned char palette[] =
105105{
106106/* Simple black and white palette */
107107/*   0xFF,0xFF,0xFF,
r1438r1439
122122   0x41,0x41,0x41,      /* Dark       */
123123};
124124
125static unsigned char palette_megaduck[] = {
125static const unsigned char palette_megaduck[] = {
126126   0x6B, 0xA6, 0x4A, 0x43, 0x7A, 0x63, 0x25, 0x59, 0x55, 0x12, 0x42, 0x4C
127127};
128128
src/mess/video/z88.c
r1438r1439
2323***************************************************************************/
2424
2525/* two colours */
26static unsigned short z88_colour_table[Z88_NUM_COLOURS] =
26static const unsigned short z88_colour_table[Z88_NUM_COLOURS] =
2727{
2828   0, 1, 2
2929};
src/mess/video/pcw16.c
r1438r1439
66int pcw16_video_control;
77
88/* 16 colours, + 1 for border */
9static unsigned short pcw16_colour_table[PCW16_NUM_COLOURS] =
9static const unsigned short pcw16_colour_table[PCW16_NUM_COLOURS] =
1010{
1111   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1212   16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
src/mess/video/bbctext.h
r1438r1439
11/* Normal Character Set */
22
3static char teletext_characters[96*60]={
3static const char teletext_characters[96*60]={
44  // 0x20 ' '
55  0,0,0,0,0,0,
66  0,0,0,0,0,0,
r1438r1439
10621062
10631063/* Graphics Character Set */
10641064
1065static char teletext_graphics[96*60]={
1065static const char teletext_graphics[96*60]={
10661066  // 0x20
10671067  0,0,0,0,0,0,
10681068  0,0,0,0,0,0,
r1438r1439
21232123
21242124/* Separated Graphics Character Set */
21252125
2126static char teletext_separated_graphics[96*60]={
2126static const char teletext_separated_graphics[96*60]={
21272127  // Character ' ' (32)
21282128  0,0,0,0,0,0,
21292129  0,0,0,0,0,0,
src/mess/video/epnick.c
r1438r1439
4444/* the mapping doesn't change - EP uses 0..256 index's for
4545colour specification - don't know if I require this for the
4646driver or not. */
47static unsigned short nick_colour_table[256]=
47static const unsigned short nick_colour_table[256]=
4848{
4949   0,1,2,3,4,5,6,7,8,
5050   9,10,11,12,13,14,15,16,
src/mess/video/vectrex.c
r1438r1439
3232static WRITE8_HANDLER ( v_via_ca2_w );
3333static WRITE8_HANDLER ( v_via_cb2_w );
3434
35static struct via6522_interface vectrex_via6522_interface =
35static const struct via6522_interface vectrex_via6522_interface =
3636{
3737   v_via_pa_r, v_via_pb_r,         /* read PA/B */
3838   0, 0, 0, 0,                     /* read ca1, cb1, ca2, cb2 */
r1438r1439
444444
445445*****************************************************************/
446446
447static struct via6522_interface spectrum1_via6522_interface =
447static const struct via6522_interface spectrum1_via6522_interface =
448448{
449449   /*inputs : A/B,CA/B1,CA/B2 */ v_via_pa_r, s1_via_pb_r, 0, 0, 0, 0,
450450   /*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,
src/mess/video/pmd85.c
r1438r1439
1313#include "video/generic.h"
1414#include "includes/pmd85.h"
1515
16unsigned char pmd85_palette[3*3] =
16const unsigned char pmd85_palette[3*3] =
1717{
1818   0x00, 0x00, 0x00,
1919   0x7f, 0x7f, 0x7f,
2020   0xff, 0xff, 0xff
2121};
2222
23unsigned short pmd85_colortable[1][3] ={
23const unsigned short pmd85_colortable[1][3] ={
2424   { 0, 1, 2 }
2525};
2626
src/mess/video/abc80.c
r1438r1439
66static int abc80_bank;
77static int abc80_row;
88
9static unsigned short abc80_colortable[] =
9static const unsigned short abc80_colortable[] =
1010{
1111   0x00, 0x01,
1212   0x01, 0x00,
src/mess/video/lviv.c
r1438r1439
1313#include "includes/lviv.h"
1414#include "mslegacy.h"
1515
16unsigned char lviv_palette[8*3] =
16const unsigned char lviv_palette[8*3] =
1717{
1818   0x00, 0x00, 0x00,
1919   0x00, 0x00, 0xa4,
src/mess/video/exidy.c
r1438r1439
2020}
2121
2222/* two colours */
23static unsigned short exidy_colour_table[EXIDY_NUM_COLOURS] =
23static const unsigned short exidy_colour_table[EXIDY_NUM_COLOURS] =
2424{
2525   0, 1
2626};
2727
2828/* black/white */
29static unsigned char exidy_palette[EXIDY_NUM_COLOURS * 3] =
29static const unsigned char exidy_palette[EXIDY_NUM_COLOURS * 3] =
3030{
3131    0x000, 0x000, 0x000,
3232    0x0ff, 0x0ff, 0x0ff
src/mess/video/pcw.c
r1438r1439
2828extern unsigned char pcw_vdu_video_control_register;
2929
3030/* two colours */
31static unsigned short pcw_colour_table[PCW_NUM_COLOURS] =
31static const unsigned short pcw_colour_table[PCW_NUM_COLOURS] =
3232{
3333   0, 1
3434};
src/mess/video/vic4567.c
r1438r1439
1414#define VIC3_BITPLANE_IADDR(x) ( x&1 ? VIC3_BITPLANE_IADDR_HELPER(x)+0x10000 \
1515                        : VIC3_BITPLANE_IADDR_HELPER(x) )
1616
17unsigned char vic3_palette[0x100*3]={0};
17const unsigned char vic3_palette[0x100*3]={0};
1818
1919static struct {
2020   struct {
src/mess/video/channelf.c
r1438r1439
77UINT8 channelf_row_reg = 0;
88UINT8 channelf_col_reg = 0;
99
10static UINT8 channelf_palette[] = {
10static const UINT8 channelf_palette[] = {
1111   0x00, 0x00, 0x00,   /* black */
1212   0xff, 0xff, 0xff,   /* white */
1313   0xff, 0x00, 0x00,   /* red    */
src/mess/video/pc_mda.c
r1438r1439
2121#define MDA_LOG(n,m,a)
2222#endif
2323
24unsigned char mda_palette[4][3] = {
24const unsigned char mda_palette[4][3] = {
2525   { 0x00,0x00,0x00 },
2626   { 0x00,0x55,0x00 },
2727   { 0x00,0xaa,0x00 },
2828   { 0x00,0xff,0x00 }
2929};
3030
31gfx_layout pc_mda_charlayout =
31const gfx_layout pc_mda_charlayout =
3232{
3333   9,32,               /* 9 x 32 characters (9 x 15 is the default, but..) */
3434   256,               /* 256 characters */
r1438r1439
5555   (maximal 4 colors)
5656   PC200 uses different attributes from IBM.
5757*/
58unsigned short mda_colortable[] =
58const unsigned short mda_colortable[] =
5959{
6060   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,
6161   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,
r1438r1439
148148      dirtybuffer[cursor->pos*2]=1;
149149}
150150
151static struct mscrtc6845_config config= { 14318180 /*?*/, pc_mda_cursor };
151static const struct mscrtc6845_config config= { 14318180 /*?*/, pc_mda_cursor };
152152
153153
154154/* This code seems to go through hoops to accomodate differing GfxElement
src/mess/video/cgapal.c
r1438r1439
99 *
1010 */
1111
12unsigned char cga_palette[1328][3] =
12const unsigned char cga_palette[1328][3] =
1313{
1414/* RGB colours */
1515   { 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0xaa }, { 0x00, 0xaa, 0x00 }, { 0x00, 0xaa, 0xaa },
src/mess/video/pc_mda.h
r1438r1439
1717WRITE8_HANDLER ( pc_MDA_w );
1818READ8_HANDLER ( pc_MDA_r );
1919
20extern unsigned char mda_palette[4][3];
21extern gfx_layout pc_mda_charlayout;
22extern gfx_layout pc_mda_gfxlayout_1bpp;
20extern const unsigned char mda_palette[4][3];
21extern const gfx_layout pc_mda_charlayout;
22extern const gfx_layout pc_mda_gfxlayout_1bpp;
2323GFXDECODE_EXTERN( pc_mda_gfxdecodeinfo );
24extern unsigned short mda_colortable[256*2+1*2];
24extern const unsigned short mda_colortable[256*2+1*2];
2525
2626PALETTE_INIT( pc_mda );
2727
src/mess/video/pc_t1t.c
r1438r1439
3333
3434**************************************************************************/
3535
36static unsigned short pcjr_colortable[] =
36static const unsigned short pcjr_colortable[] =
3737{
3838     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,
3939     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,
r1438r1439
214214      dirtybuffer[cursor->pos*2] = 1;
215215}
216216
217static struct mscrtc6845_config config= { 14318180 /*?*/, pc_t1t_cursor };
217static const struct mscrtc6845_config config= { 14318180 /*?*/, pc_t1t_cursor };
218218
219219
220220static VIDEO_START( pc_t1t )
src/mess/video/vdc8563.c
r1438r1439
5757 black gray orange yellow dardgrey vio red lgreen
5858 lred lgray brown blue white green cyan lblue
5959*/
60unsigned char vdc8563_palette[] =
60const unsigned char vdc8563_palette[] =
6161{
6262#if 0
6363   0x00, 0x00, 0x00, /* black */
src/mess/video/pc_aga.c
r1438r1439
1010static pc_video_update_proc pc_aga_choosevideomode(int *width, int *height, struct mscrtc6845 *crtc);
1111
1212
13gfx_layout europc_cga_charlayout =
13const gfx_layout europc_cga_charlayout =
1414{
1515   8,16,               /* 8 x 32 characters */
1616   256,                    /* 256 characters */
r1438r1439
2626   8*16                     /* every char takes 8 bytes */
2727};
2828
29gfx_layout europc_mda_charlayout =
29const gfx_layout europc_mda_charlayout =
3030{
3131   9,32,               /* 9 x 32 characters (9 x 15 is the default, but..) */
3232   256,               /* 256 characters */
r1438r1439
4444   8*16
4545};
4646
47static gfx_layout pc200_mda_charlayout =
47static const gfx_layout pc200_mda_charlayout =
4848{
4949   9,32,               /* 9 x 32 characters (9 x 15 is the default, but..) */
5050   256,               /* 256 characters */
r1438r1439
6060   8*16                /* every char takes 8 bytes (upper half) */
6161};
6262
63static gfx_layout pc200_cga_charlayout =
63static const gfx_layout pc200_cga_charlayout =
6464{
6565   8,16,               /* 8 x 16 characters */
6666   256,                    /* 256 characters */
r1438r1439
200200}
201201
202202
203static struct mscrtc6845_config config= { 14318180 /*?*/, pc_aga_cursor };
203static const struct mscrtc6845_config config= { 14318180 /*?*/, pc_aga_cursor };
204204
205205VIDEO_START( pc_aga )
206206{
src/mess/video/pc_cga.c
r1438r1439
9191***************************************************************************/
9292
9393/* In cgapal.c; it's quite big */
94extern unsigned char cga_palette[16 * CGA_PALETTE_SETS][3];
94extern const unsigned char cga_palette[16 * CGA_PALETTE_SETS][3];
9595
9696
97unsigned short cga_colortable[] =
97const unsigned short cga_colortable[] =
9898{
9999/* Text modes */
100100     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,
r1438r1439
148148     12,11,12,15, 13,11,12,15, 14,11,12,15, 15,11,12,15,
149149};
150150
151gfx_layout CGA_charlayout =
151const gfx_layout CGA_charlayout =
152152{
153153   8,16,               /* 8 x 16 characters */
154154   256,                    /* 256 characters */
src/mess/video/pc_aga.h
r1438r1439
2020
2121#include "driver.h"
2222
23extern gfx_layout europc_cga_charlayout;
24extern gfx_layout europc_mda_charlayout;
23extern const gfx_layout europc_cga_charlayout;
24extern const gfx_layout europc_mda_charlayout;
2525GFXDECODE_EXTERN( europc_gfxdecodeinfo );
2626GFXDECODE_EXTERN( aga_gfxdecodeinfo );
2727
src/mess/video/pc_cga.h
r1438r1439
55#define CGA_PALETTE_SETS 83   /* one for colour, one for mono,
66             * 81 for colour composite */
77
8extern unsigned char cga_palette[CGA_PALETTE_SETS * 16][3];
9extern unsigned short cga_colortable[256*2 + 16*2 + 96*4];
10extern gfx_layout CGA_charlayout;
11extern gfx_layout CGA_gfxlayout_1bpp;
12extern gfx_layout CGA_gfxlayout_2bpp;
8extern const unsigned char cga_palette[CGA_PALETTE_SETS * 16][3];
9extern const unsigned short cga_colortable[256*2 + 16*2 + 96*4];
10extern const gfx_layout CGA_charlayout;
11extern const gfx_layout CGA_gfxlayout_1bpp;
12extern const gfx_layout CGA_gfxlayout_2bpp;
1313
1414MACHINE_DRIVER_EXTERN( pcvideo_cga );
1515
src/mess/video/cdp1864.c
r1438r1439
2222
2323static CDP1864_VIDEO_CONFIG cdp1864;
2424
25static int cdp1864_bgcolseq[] = { 2, 0, 1, 4 };
25static const int cdp1864_bgcolseq[] = { 2, 0, 1, 4 };
2626
2727int cdp1864_efx;
2828
src/mess/video/ssystem3.c
r1438r1439
1010
1111UINT8 ssystem3_led[5]= {0};
1212
13static unsigned char ssystem3_palette[] =
13static const unsigned char ssystem3_palette[] =
1414{
1515   0,12,12,
1616   80,82,75,
1717   0,12,12
1818};
1919
20static unsigned short ssystem3_colortable[1][2] = {
20static const unsigned short ssystem3_colortable[1][2] = {
2121   { 0, 1 },
2222};
2323
src/mess/video/vtech1.c
r1438r1439
4040static UINT32 vtech1_palette_mono[16];
4141
4242/* note - Juergen's colors do not match the colors in the m6847 code */
43static UINT8 vtech1_palette[] =
43static const UINT8 vtech1_palette[] =
4444{
4545      0, 224,   0,    /* green */
4646    208, 255,   0,    /* yellow (greenish) */
src/mess/video/amstrad.c
r1438r1439
10571057}
10581058/* The cursor is not used on Amstrad. The CURSOR signal is available on the Expansion port for other hardware to use. */
10591059
1060static struct m6845_interface amstrad6845= {
1060static const struct m6845_interface amstrad6845= {
10611061   amstrad_Set_MA, // Memory Address register
10621062   amstrad_Set_RA, // Row Address register
10631063   amstrad_Set_HS, // Horizontal status
src/mess/video/avigo.c
r1438r1439
4545   8 * 8
4646};
4747
48static UINT8 pointermask[] =
48static const UINT8 pointermask[] =
4949{
5050   0x00, 0x70, 0x60, 0x50, 0x08, 0x04, 0x00, 0x00,      /* blackmask */
5151   0xf0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00   /* whitemask */
r1438r1439
139139}
140140
141141/* two colours */
142static unsigned short avigo_colour_table[AVIGO_NUM_COLOURS] =
142static const unsigned short avigo_colour_table[AVIGO_NUM_COLOURS] =
143143{
144144   0, 1
145145};
146146
147147/* black/white */
148static unsigned char avigo_palette[AVIGO_NUM_COLOURS * 3] =
148static const unsigned char avigo_palette[AVIGO_NUM_COLOURS * 3] =
149149{
150150    0x0ff, 0x0ff, 0x0ff,
151151    0x000, 0x000, 0x000
src/mess/video/vic6567.c
r1438r1439
155155#define FOREGROUNDCOLOR (vic2.reg[0x24]&0xf)
156156#define FRAMECOLOR (vic2.reg[0x20]&0xf)
157157
158unsigned char vic2_palette[] =
158const unsigned char vic2_palette[] =
159159{
160160/* black, white, red, cyan */
161161/* purple, green, blue, yellow */
src/mess/video/trs80.c
r1438r1439
7777   /* Special translation if video RAM with only 7 bits is present
7878    * I don't know if it's entirely correct, but it's close ;-)
7979    */
80   static UINT8 translate_videoram[2][256] = {
80   static const UINT8 translate_videoram[2][256] = {
8181      {
8282         0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
8383         0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,
src/mess/video/odyssey2.c
r1438r1439
1818   light back / grid colors
1919   black, blue, green, light green, red, violet, orange, light grey */
2020
21UINT8 odyssey2_colors[] =
21const UINT8 odyssey2_colors[] =
2222{
2323   /* Background,Grid Dim */
2424   0x00,0x00,0x00,
r1438r1439
5151   0xff,0xff,0xff    /* White */
5252};
5353
54static UINT8 o2_shape[0x40][8]={
54static const UINT8 o2_shape[0x40][8]={
5555    { 0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00 }, // 0
5656    { 0x18,0x38,0x18,0x18,0x18,0x18,0x3C,0x00 },
5757    { 0x3C,0x66,0x0C,0x18,0x30,0x60,0x7E,0x00 },
src/mess/video/primo.c
r1438r1439
1515
1616UINT16 primo_video_memory_base;
1717
18unsigned char primo_palette[2*3] =
18const unsigned char primo_palette[2*3] =
1919{
2020   0x00, 0x00, 0x00,
2121   0xff, 0xff, 0xff
2222};
2323
24unsigned short primo_colortable[1][2] =
24const unsigned short primo_colortable[1][2] =
2525{
2626   { 0, 1 }
2727};
src/mess/video/tms3556.c
r1438r1439
6161#define TMS3556_MODE_BITMAP   2
6262#define TMS3556_MODE_MIXED   3
6363
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" };*/
6565
6666static PALETTE_INIT(tms3556);
6767static VIDEO_UPDATE(tms3556);
src/mess/video/ti85.c
r1438r1439
3131
3232static UINT8 * ti85_frames;
3333
34unsigned char ti85_palette[32*7][3] =
34const unsigned char ti85_palette[32*7][3] =
3535{
3636   { 0xae, 0xcd, 0xb0 },     { 0xaa, 0xc9, 0xae },     { 0xa6, 0xc5, 0xad },     { 0xa3, 0xc1, 0xab },     { 0x9f, 0xbd, 0xaa },     { 0x9b, 0xb9, 0xa8 },     { 0x98, 0xb5, 0xa7 },  //0x00
3737   { 0xae, 0xcd, 0xb0 },     { 0xa9, 0xc8, 0xae },     { 0xa4, 0xc3, 0xac },     { 0xa0, 0xbe, 0xaa },     { 0x9b, 0xb9, 0xa8 },     { 0x96, 0xb4, 0xa6 },     { 0x92, 0xaf, 0xa4 },  //0x01
r1438r1439
6767   { 0x57, 0x74, 0x8c },     { 0x56, 0x73, 0x8b },     { 0x55, 0x72, 0x8b },     { 0x55, 0x71, 0x8b },     { 0x54, 0x70, 0x8a },     { 0x53, 0x6f, 0x8a },     { 0x53, 0x6f, 0x8a }  //0x1f
6868};
6969
70unsigned short ti85_colortable[32][7] =
70const unsigned short ti85_colortable[32][7] =
7171{
7272   { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 },
7373   { 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d },
src/mess/video/ted7360.c
r1438r1439
431431#define MULTICOLOR2 (ted7360[0x18]&0x7f)
432432#define FRAMECOLOR (ted7360[0x19]&0x7f)
433433
434unsigned char ted7360_palette[] =
434const unsigned char ted7360_palette[] =
435435{
436436/* black, white, red, cyan */
437437/* purple, green, blue, yellow */
r1438r1439
480480   0xd1, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xed, 0xff, 0xbc
481481};
482482
483struct CustomSound_interface ted7360_sound_interface =
483const struct CustomSound_interface ted7360_sound_interface =
484484{
485485   ted7360_custom_start
486486};
r1438r1439
522522   8 * 8
523523};
524524
525static UINT8 cursormask[] =
525static const UINT8 cursormask[] =
526526{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
527527static gfx_element *cursorelement;
528528
src/mess/video/saa5050.c
r1438r1439
7474   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_lolayout, 0, 128 )
7575GFXDECODE_END
7676
77static unsigned char saa5050_palette[8 * 3] =
77static const UINT8 saa5050_palette[8 * 3] =
7878{
7979   0x00, 0x00, 0x00,   /* black */
8080   0xff, 0x00, 0x00,   /* red */
r1438r1439
8686   0xff, 0xff, 0xff   /* white */
8787};
8888
89static   unsigned   short   saa5050_colortable[64 * 2] =   /* bgnd, fgnd */
89static const UINT16 saa5050_colortable[64 * 2] =   /* bgnd, fgnd */
9090{
9191   0,1, 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7,
9292   1,0, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7,
src/mess/video/733_asr.c
r1438r1439
7979   AM_enint_mask = 1 << 6
8080};
8181
82static unsigned char asr_palette[asr733_palette_size*3] =
82static const unsigned char asr_palette[asr733_palette_size*3] =
8383{
8484   255, 255, 255,
8585   0, 0, 0
8686};
8787
88static unsigned short asr_colortable[asr733_colortable_size] =
88static const unsigned short asr_colortable[asr733_colortable_size] =
8989{
9090   0, 1
9191};
r1438r1439
434434}
435435
436436
437static unsigned char key_translate[3][51] =
437static const unsigned char key_translate[3][51] =
438438{
439439   {   /* unshifted */
440440      '1',
src/mess/video/galaxy.c
r1438r1439
1414
1515static int horizontal_pos = 0x0b;
1616
17gfx_layout galaxy_charlayout =
17const gfx_layout galaxy_charlayout =
1818{
1919   8, 13,            /* 8x8 characters */
2020   128,            /* 128 characters */
r1438r1439
2727   8             /* each character takes 1 consecutive byte */
2828};
2929
30unsigned char galaxy_palette[2*3] =
30const unsigned char galaxy_palette[2*3] =
3131{
3232   0xff, 0xff, 0xff,      /* White */
3333   0x00, 0x00, 0x00      /* Black */
3434};
3535
36unsigned short galaxy_colortable[1][2] =
36const unsigned short galaxy_colortable[1][2] =
3737{
3838   {0, 1}
3939};
src/mess/video/bbc.c
r1438r1439
247247static int videoULA_teletext_normal_select;
248248static int videoULA_flash_colour_select;
249249
250static int pixels_per_byte_set[8]={ 2,4,8,16,1,2,4,8 };
250static const int pixels_per_byte_set[8]={ 2,4,8,16,1,2,4,8 };
251251static int pixels_per_byte;
252252
253static int emulation_pixels_per_real_pixel_set[4]={ 8,4,2,1 };
253static const int emulation_pixels_per_real_pixel_set[4]={ 8,4,2,1 };
254254static int emulation_pixels_per_real_pixel;
255255
256256static int emulation_pixels_per_byte;
257257
258static int width_of_cursor_set[8]={ 0,0,1,2,1,0,2,4 };
258static const int width_of_cursor_set[8]={ 0,0,1,2,1,0,2,4 };
259259static int emulation_cursor_size=1;
260260static int cursor_state=0;
261261
src/mess/video/vtech2.c
r1438r1439
5454   dirtybuffer = (UINT8*) auto_malloc(videoram_size);
5555}
5656
57static int offs_2[192] = {
57static const int offs_2[192] = {
5858   0x0000,0x0800,0x1000,0x1800,0x2000,0x2800,0x3000,0x3800,
5959   0x0100,0x0900,0x1100,0x1900,0x2100,0x2900,0x3100,0x3900,
6060   0x0200,0x0a00,0x1200,0x1a00,0x2200,0x2a00,0x3200,0x3a00,
r1438r1439
8181   0x07a0,0x0fa0,0x17a0,0x1fa0,0x27a0,0x2fa0,0x37a0,0x3fa0
8282};
8383
84static int offs_1[192] = {
84static const int offs_1[192] = {
8585   0x2000,0x2080,0x2800,0x2880,0x3000,0x3080,0x3800,0x3880,
8686   0x2100,0x2180,0x2900,0x2980,0x3100,0x3180,0x3900,0x3980,
8787   0x2200,0x2280,0x2a00,0x2a80,0x3200,0x3280,0x3a00,0x3a80,
src/mess/video/kc.c
r1438r1439
1414
1515/* KC85/4 and KC85/3 common graphics hardware */
1616
17static unsigned short kc85_colour_table[KC85_PALETTE_SIZE] =
17static const unsigned short kc85_colour_table[KC85_PALETTE_SIZE] =
1818{
1919   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2020        16, 17, 18, 19, 20, 21, 22, 23
r1438r1439
5757 */
5858
5959
60static unsigned char kc85_palette[KC85_PALETTE_SIZE * 3] =
60static const unsigned char kc85_palette[KC85_PALETTE_SIZE * 3] =
6161{
6262      /* 3 bit colour value. bit 2->green, bit 1->red, bit 0->blue */
6363       
src/mess/messdriv.c
r1438r1439
4444#undef TESTDRIVER
4545#define DRIVER(NAME)
4646#define TESTDRIVER(NAME) &driver_##NAME,
47const game_driver *test_drivers[] =
47const game_driver *const test_drivers[] =
4848{
4949#include "messdriv.c"
5050   0   /* end of array */
src/mess/osd/winui/cfgfile.c
r1438r1439
3232
3333static BOOL SettingsFileName(DWORD nSettingsFile, char *buffer, size_t bufsize)
3434{
35   extern FOLDERDATA g_folderData[];
35   extern const FOLDERDATA g_folderData[];
3636   extern LPEXFOLDERDATA ExtraFolderData[];
3737   char *ptr;
3838   int i;
src/mess/osd/winui/messui.c
r1438r1439
4949static void SoftwareTabView_OnMoveSize(void);
5050static void SetupSoftwareTabView(void);
5151
52static LPCTSTR mess_column_names[] =
52static const LPCTSTR mess_column_names[] =
5353{
5454    TEXT("Software"),
5555   TEXT("Goodname"),
r1438r1439
10641064{
10651065   INT_PTR result = 0;
10661066   int nColumnCount = Picker_GetColumnCount(MyColumnDialogProc_hwndPicker);
1067   LPCTSTR *ppszColumnNames = Picker_GetColumnNames(MyColumnDialogProc_hwndPicker);
1067   const LPCTSTR *ppszColumnNames = Picker_GetColumnNames(MyColumnDialogProc_hwndPicker);
10681068   
10691069   result = InternalColumnDialogProc(hDlg, Msg, wParam, lParam, nColumnCount,
10701070      MyColumnDialogProc_shown, MyColumnDialogProc_order, ppszColumnNames,
src/mess/artworkx.c
r1438r1439
9797   int enabled = TRUE;
9898   int item_count = 0;
9999
100   static const char *cust_files[] =
100   static const char *const cust_files[] =
101101   {
102102      "ctrlr.png",      "ctrlr.ini",
103103      "keyboard.png",      "keyboard.ini"
src/mess/machine/wswan.c
r1438r1439
6868static UINT8 *ws_bios_bank = NULL;
6969static UINT8 wswan_bios_disabled;
7070UINT8 ws_portram[256];
71static UINT8 ws_portram_init[256] =
71static const UINT8 ws_portram_init[256] =
7272{
7373   0x00, 0x00, 0x00/*?*/, 0xbb, 0x00, 0x00, 0x00, 0x26, 0xfe, 0xde, 0xf9, 0xfb, 0xdb, 0xd7, 0x7f, 0xf5,
7474   0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x9e, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x99, 0xfd, 0xb7, 0xdf,
r1438r1439
117117   EA 00 00 FF FF jmp FFFFh:0000h
118118
119119*/
120static UINT8 ws_fake_bios_code[] = {
120static const UINT8 ws_fake_bios_code[] = {
121121   0xfc, 0xbc, 0x00, 0x20, 0x68, 0x00, 0x00, 0x07, 0x68, 0x00, 0xf0, 0x1f, 0xbf, 0x00, 0x04, 0xbe,
122122   0xe0, 0xff, 0xb9, 0x10, 0x00, 0xf3, 0xa4, 0xb0, 0x2f, 0xe6, 0xc0, 0xea, 0x00, 0x04, 0x00, 0x00,
123123   0xe4, 0xa0, 0x0c, 0x01, 0xe6, 0xa0, 0xea, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
src/mess/machine/dgn_beta.c
r1438r1439
11731173
11741174#ifdef MAME_DEBUG
11751175
1176static const char *os9syscalls[] =
1176static const char *const os9syscalls[] =
11771177{
11781178   "F$Link",          /* Link to Module */
11791179   "F$Load",          /* Load Module from File */
src/mess/machine/pdp1.c
r1438r1439
798798         /* Black: ignore */
799799         //color = color_typewriter_black;
800800         {
801            static char black[5] = { '\033', '[', '3', '0', 'm' };
801            static const char black[5] = { '\033', '[', '3', '0', 'm' };
802802            image_fwrite(typewriter.fd, black, sizeof(black));
803803         }
804804         break;
r1438r1439
807807         /* Red: ignore */
808808         //color = color_typewriter_red;
809809         {
810            static char red[5] = { '\033', '[', '3', '1', 'm' };
810            static const char red[5] = { '\033', '[', '3', '1', 'm' };
811811            image_fwrite(typewriter.fd, red, sizeof(red));
812812         }
813813         break;
r1438r1439
825825      case 077:
826826         /* Carriage Return */
827827         {
828            static char line_end[2] = { '\r', '\n' };
828            static const char line_end[2] = { '\r', '\n' };
829829            image_fwrite(typewriter.fd, line_end, sizeof(line_end));
830830         }
831831         break;
src/mess/machine/nec765.c
r1438r1439
17451745
17461746static void nec765_setup_command(void)
17471747{
1748   static const char *commands[] =
1748   static const char *const commands[] =
17491749   {
17501750      NULL,                  /* [00] */
17511751      NULL,                  /* [01] */
src/mess/machine/uart8250.c
r1438r1439
188188void uart8250_w(int n, offs_t idx, UINT8 data)
189189{
190190#ifdef VERBOSE_COM
191    static char P[8] = "NONENHNL";  /* names for parity select */
191    static const char P[8] = "NONENHNL";  /* names for parity select */
192192#endif
193193    int tmp;
194194
src/mess/machine/dai.c
r1438r1439
9696   2000000.
9797};
9898
99static ppi8255_interface dai_ppi82555_intf =
99static const ppi8255_interface dai_ppi82555_intf =
100100{
101101   1,          /* 1 chip */
102102   { NULL, NULL },      /* Port A read */
r1438r1439
104104   { NULL, NULL },      /* Port C read */
105105};
106106
107static struct pit8253_config dai_pit8253_intf =
107static const struct pit8253_config dai_pit8253_intf =
108108{
109109   TYPE8253,
110110   {
src/mess/machine/mac.c
r1438r1439
7777static void mac_via_irq(int state);
7878static offs_t mac_dasm_override(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
7979
80static struct via6522_interface mac_via6522_intf =
80static const struct via6522_interface mac_via6522_intf =
8181{
8282   mac_via_in_a, mac_via_in_b,
8383   NULL, NULL,
r1438r1439
13861386   mac_driver_init(MODEL_MAC_512KE);
13871387}
13881388
1389static SCSIConfigTable dev_table =
1389static const SCSIConfigTable dev_table =
13901390{
13911391   2,                                      /* 2 SCSI devices */
13921392   { { SCSI_ID_5, 1, SCSI_DEVICE_HARDDISK },  /* SCSI ID 5, using CHD 1, and it's a harddisk */
13931393    { SCSI_ID_6, 0, SCSI_DEVICE_HARDDISK } } /* SCSI ID 6, using CHD 0, and it's a harddisk */
13941394};
13951395
1396static struct NCR5380interface macplus_5380intf =
1396static const struct NCR5380interface macplus_5380intf =
13971397{
13981398   &dev_table,   // SCSI device table
13991399   NULL      // IRQ (unconnected on the Mac Plus)
src/mess/machine/ncr5380.c
r1438r1439
2626
2727#define VERBOSE   (0)
2828
29static const char *rnames[] =
29static const char *const rnames[] =
3030{
3131   "Current data",
3232   "Initiator cmd",
r1438r1439
3838   "Reset parity"
3939};
4040
41static const char *wnames[] =
41static const char *const wnames[] =
4242{
4343   "Output data",
4444   "Initiator cmd",
r1438r1439
5757} SCSIDev;
5858
5959static SCSIDev devices[8];   // SCSI IDs 0-7
60static struct NCR5380interface *intf;
60static const struct NCR5380interface *intf;
6161
6262static UINT8 n5380_Registers[8];
6363static UINT8 last_id;
r1438r1439
334334   return rv;
335335}
336336
337extern void ncr5380_init( struct NCR5380interface *interface )
337extern void ncr5380_init( const struct NCR5380interface *interface )
338338{
339339   int i;
340340
src/mess/machine/d88.c
r1438r1439
1515static void d88image_read_sector_data_into_buffer(mess_image *img, int side, int index1, char *ptr, int length);
1616static void d88image_write_sector_data_from_buffer(mess_image *img, int side, int index1, const char *ptr, int length,int ddam);
1717
18static floppy_interface d88image_floppy_interface=
18static const floppy_interface d88image_floppy_interface=
1919{
2020   d88image_seek_callback,
2121   d88image_get_sectors_per_track,             /* done */
src/mess/machine/cbmb.c
r1438r1439
250250static void cbmb_display_enable_changed(int display_enabled) {
251251}
252252
253//static struct mscrtc6845_config cbm600_crtc= { 1600000 /*?*/, cbmb_vh_cursor };
253//static const struct mscrtc6845_config cbm600_crtc= { 1600000 /*?*/, cbmb_vh_cursor };
254254const static crtc6845_interface cbm600_crtc = {
255255   0,
256256   1600000 /*?*/,
r1438r1439
284284   crtc6845_config( 0, &cbm600_crtc);
285285}
286286
287//static struct mscrtc6845_config cbm700_crtc= { 2000000 /*?*/, cbmb_vh_cursor };
287//static const struct mscrtc6845_config cbm700_crtc= { 2000000 /*?*/, cbmb_vh_cursor };
288288const static crtc6845_interface cbm700_crtc = {
289289   0,
290290   2000000 /*?*/,
src/mess/machine/ncr5380.h
r1438r1439
1010
1111struct NCR5380interface
1212{
13   SCSIConfigTable *scsidevs;      /* SCSI devices */
13   const SCSIConfigTable *scsidevs;      /* SCSI devices */
1414   void (*irq_callback)(int state);   /* irq callback */
1515};
1616
r1438r1439
3636#define R5380_OUTDATA_DTACK   (R5380_OUTDATA | 0x10)
3737#define R5380_CURDATA_DTACK   (R5380_CURDATA | 0x10)
3838
39extern void ncr5380_init( struct NCR5380interface *interface );
39extern void ncr5380_init( const struct NCR5380interface *interface );
4040extern void ncr5380_read_data(int bytes, UINT8 *pData);
4141extern void ncr5380_write_data(int bytes, UINT8 *pData);
4242extern void *ncr5380_get_device(int id);
src/mess/machine/mbee.c
r1438r1439
3636
3737UINT8 *mbee_workram;
3838
39static z80pio_interface pio_intf =
39static const z80pio_interface pio_intf =
4040{
4141   pio_interrupt,   /* callback when change interrupt status */
4242   0,            /* portA ready active callback (do not support yet)*/
src/mess/machine/msx_slot.c
r1438r1439
15641564   }
15651565}
15661566
1567static char PAC_HEADER[] = "PAC2 BACKUP DATA";
1567static const char PAC_HEADER[] = "PAC2 BACKUP DATA";
15681568#define PAC_HEADER_LEN (16)
15691569
15701570MSX_SLOT_LOADSRAM(fmpac)
src/mess/machine/i8271.c
r1438r1439
5353   return image_from_devtype_and_index(IO_FLOPPY, i8271.drive);
5454}
5555
56void i8271_init(i8271_interface *iface)
56void i8271_init(const i8271_interface *iface)
5757{
5858   memset(&i8271, 0, sizeof(I8271));
5959
src/mess/machine/rp5c15.c
r1438r1439
9797   }
9898}
9999
100void rp5c15_init(struct rp5c15_interface* intf)
100void rp5c15_init(const struct rp5c15_interface* intf)
101101{
102102   mame_system_time systm;
103103   mame_system_tm time;
src/mess/machine/coco.c
r1438r1439
30513051
30523052#ifdef MAME_DEBUG
30533053
3054static const char *os9syscalls[] =
3054static const char *const os9syscalls[] =
30553055{
30563056   "F$Link",          /* Link to Module */
30573057   "F$Load",          /* Load Module from File */
src/mess/machine/rp5c15.h
r1438r1439
5454   void (*alarm_callback)(int state);
5555};  //  Ricoh RP5C15
5656
57void rp5c15_init(struct rp5c15_interface*);
57void rp5c15_init(const struct rp5c15_interface*);
5858
5959void rtc_add_second(void);
6060void rtc_add_minute(void);
src/mess/machine/tc8521.c
r1438r1439
101101//#define VERBOSE
102102
103103/* mask data with these values when writing */
104static unsigned char rtc_write_masks[16*4]=
104static const unsigned char rtc_write_masks[16*4]=
105105{
106106   0x0f,0x07,0x0f,0x07,0x0f,0x03,0x07,0x0f,0x03,0x0f,0x03,0x0f,0x0f,0x0f, 0x0f, 0x0f,
107107   0x00,0x00,0x0f,0x07,0x0f,0x03,0x07,0x0f,0x03,0x00,0x01,0x03,0x00,0x0f, 0x0f, 0x0f,
r1438r1439
291291
292292
293293
294void tc8521_init(struct tc8521_interface *intf)
294void tc8521_init(const struct tc8521_interface *intf)
295295{
296296   memset(&rtc, 0, sizeof(struct tc8521));
297297   memset(&rtc.interface, 0, sizeof(struct tc8521_interface));
src/mess/machine/gb.c
r1438r1439
721721}
722722
723723#ifdef MAME_DEBUG
724static const char *sgbcmds[26] =
724static const char *const sgbcmds[26] =
725725{
726726   "PAL01   ",
727727   "PAL23   ",
r1438r1439
13071307
13081308DEVICE_LOAD(gb_cart)
13091309{
1310   static const char *CartTypes[] =
1310   static const char *const CartTypes[] =
13111311   {
13121312      "ROM ONLY",
13131313      "ROM+MBC1",
r1438r1439
13481348   };
13491349
13501350/*** Following are some known manufacturer codes *************************/
1351   static struct
1351   static const struct
13521352   {
13531353      UINT16 Code;
13541354      const char *Name;
src/mess/machine/concept.c
r1438r1439
4747static void via_irq_func(int state);
4848
4949
50static struct via6522_interface concept_via6522_intf =
50static const struct via6522_interface concept_via6522_intf =
5151{   /* main via */
5252   via_in_a, via_in_b,
5353   NULL, NULL,
src/mess/machine/kim1.c
r1438r1439
6464   "..................";
6565
6666
67   static const char *keys[24] =
67   static const char *const keys[24] =
6868   {
6969      "aaaaaaaaaaaaaaaaaaaaaaaa" \
7070      "aaaaaaaaaaaaaaaaaaaaaaaa" \
src/mess/machine/msx.c
r1438r1439
320320static WRITE8_HANDLER ( msx_ppi_port_c_w );
321321static READ8_HANDLER (msx_ppi_port_b_r );
322322
323static ppi8255_interface msx_ppi8255_interface =
323static const ppi8255_interface msx_ppi8255_interface =
324324{
325325   1,
326326   {NULL},
r1438r1439
331331   {msx_ppi_port_c_w}
332332};
333333
334static struct tc8521_interface tc = { NULL };
334static const struct tc8521_interface tc = { NULL };
335335
336336static void msx_init(void)
337337{
src/mess/machine/mz700.c
r1438r1439
3838static WRITE8_HANDLER ( pio_port_b_w );
3939static WRITE8_HANDLER ( pio_port_c_w );
4040
41static ppi8255_interface ppi8255 = {
41static const ppi8255_interface ppi8255 = {
4242    1,
4343   {pio_port_a_r},
4444   {pio_port_b_r},
r1438r1439
5555static void pit_clk_1(double clock);
5656static void pit_irq_2(int which);
5757
58static struct pit8253_config pit8253 =
58static const struct pit8253_config pit8253 =
5959{
6060   TYPE8253,
6161   {
src/mess/machine/serial.c
r1438r1439
8686
8787static void serial_protocol_none_sent_char(int id);
8888
89static struct serial_protocol_interface serial_protocol_none_interface=
89static const struct serial_protocol_interface serial_protocol_none_interface=
9090{
9191   NULL,
9292   serial_protocol_none_sent_char,
r1438r1439
9696static void serial_protocol_xmodem_receive_char(int id, unsigned char ch);
9797static void serial_protocol_xmodem_sent_char(int id);
9898
99static struct serial_protocol_interface serial_protocol_xmodem_interface=
99static const struct serial_protocol_interface serial_protocol_xmodem_interface=
100100{
101101   serial_protocol_xmodem_receive_char,
102102   serial_protocol_xmodem_sent_char
r1438r1439
149149}
150150
151151
152static const char *protocol_names[]=
152static const char *const protocol_names[]=
153153{
154154   "None",
155155   "XModem"
src/mess/machine/nes_mmc.c
r1438r1439
45184518
45194519
45204520
4521static mmc mmc_list[] =
4521static const mmc mmc_list[] =
45224522{
45234523/*   INES   DESC                  LOW_W, LOW_R, MED_W, HIGH_W, PPU_latch, scanline CB, hblank CB */
45244524   { 0, "No Mapper",            NULL, NULL, NULL, NULL, NULL, NULL, NULL },
src/mess/machine/pclpt.c
r1438r1439
3434#define CONTROL_IRQ 0x10
3535
3636typedef struct {
37   CENTRONICS_DEVICE *device;
37   const CENTRONICS_DEVICE *device;
3838   const PC_LPT_CONFIG *config;
3939   int on;
4040   UINT8 data;
r1438r1439
5151   This->config=config;
5252}
5353
54void pc_lpt_set_device(int nr, CENTRONICS_DEVICE *device)
54void pc_lpt_set_device(int nr, const CENTRONICS_DEVICE *device)
5555{
5656   PC_LPT *This=LPT+nr;
5757   This->device=device;
src/mess/machine/vc1541.c
r1438r1439
594594   vc1541->led = data & 8;
595595}
596596
597static struct via6522_interface via2 =
597static const struct via6522_interface via2 =
598598{
599599   0,                           /*vc1541_via0_read_porta, */
600600   vc1541_via0_read_portb,
src/mess/machine/thomson.c
r1438r1439
653653
654654
655655
656static CENTRONICS_CONFIG to7_centronics = { PRINTER_CENTRONICS, to7_io_ack };
656static const CENTRONICS_CONFIG to7_centronics = { PRINTER_CENTRONICS, to7_io_ack };
657657
658658
659659
r1438r1439
757757
758758
759759
760static struct acia6850_interface to7_acia_modem =
760static const struct acia6850_interface to7_acia_modem =
761761{
762762   1200, 1200, /* 1200 bauds, might be divided by 16 */
763763   &to7_modem_rx, &to7_modem_tx,
r1438r1439
11801180         to7_midi_intr = data >> 5;
11811181#if VERBOSE_MIDI
11821182         {
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' };
11861186            logerror( "$%04x %f to7_midi_w: set control to $%02X (bits=%i, stop=%i, parity=%c, intr in=%i out=%i)\n",
11871187                 activecpu_get_previouspc(), attotime_to_double(timer_get_time()),
11881188                 data,
r1438r1439
28192819};
28202820
28212821
2822static CENTRONICS_CONFIG to9_centronics = { PRINTER_CENTRONICS, NULL };
2822static const CENTRONICS_CONFIG to9_centronics = { PRINTER_CENTRONICS, NULL };
28232823
28242824
28252825
src/mess/machine/lisa.c
r1438r1439
135135
136136static int KBIR;   /* COPS VIA interrupt pending */
137137
138static struct via6522_interface lisa_via6522_intf[2] =
138static const struct via6522_interface lisa_via6522_intf[2] =
139139{
140140   {   /* COPS via */
141141      NULL, COPS_via_in_b,
src/mess/machine/cgenie.c
r1438r1439
5959   UINT8 DDGA;     /* Disk Directory Granule allocation (number of driectory granules) */
6060}   PDRIVE;
6161
62static PDRIVE pd_list[12] = {
62static const PDRIVE pd_list[12] = {
6363   {0x14, 0x28, 0x07, 0x28, 0x0A, 0x02, 0x00, 0x00, 0x05, 0x02}, /* CMD"<0=A" 40 tracks, SS, SD */
6464   {0x14, 0x28, 0x07, 0x28, 0x14, 0x04, 0x00, 0x40, 0x05, 0x04}, /* CMD"<0=B" 40 tracks, DS, SD */
6565   {0x18, 0x30, 0x53, 0x28, 0x12, 0x03, 0x00, 0x03, 0x05, 0x03}, /* CMD"<0=C" 40 tracks, SS, DD */
src/mess/machine/pmd85.c
r1438r1439
349349
350350*******************************************************************************/
351351
352static struct msm8251_interface pmd85_msm8251_interface =
352static const struct msm8251_interface pmd85_msm8251_interface =
353353{
354354   NULL,
355355   NULL,
r1438r1439
376376
377377*******************************************************************************/
378378
379static struct pit8253_config pmd85_pit8253_interface =
379static const struct pit8253_config pmd85_pit8253_interface =
380380{
381381   TYPE8253,
382382   {
r1438r1439
650650   }
651651}
652652
653static ppi8255_interface pmd85_ppi8255_interface =
653static const ppi8255_interface pmd85_ppi8255_interface =
654654{
655655   4,
656656   {pmd85_ppi_0_porta_r, pmd85_ppi_1_porta_r, pmd85_ppi_2_porta_r, pmd85_ppi_3_porta_r},
r1438r1439
661661   {pmd85_ppi_0_portc_w, pmd85_ppi_1_portc_w, pmd85_ppi_2_portc_w, pmd85_ppi_3_portc_w}
662662};
663663
664static ppi8255_interface alfa_ppi8255_interface =
664static const ppi8255_interface alfa_ppi8255_interface =
665665{
666666   3,
667667   {pmd85_ppi_0_porta_r, pmd85_ppi_1_porta_r, pmd85_ppi_2_porta_r},
r1438r1439
672672   {pmd85_ppi_0_portc_w, pmd85_ppi_1_portc_w, pmd85_ppi_2_portc_w}
673673};
674674
675static ppi8255_interface mato_ppi8255_interface =
675static const ppi8255_interface mato_ppi8255_interface =
676676{
677677   1,
678678   {pmd85_ppi_0_porta_r},
src/mess/machine/rriot.c
r1438r1439
5959*/
6060
6161typedef struct {
62   RRIOT_CONFIG *config;
62   const RRIOT_CONFIG *config;
6363   struct {
6464      UINT8 in, out, ddr;
6565   } port_a, port_b;
r1438r1439
7575
7676static TIMER_CALLBACK(rriot_timer_cb);
7777
78void rriot_init(int nr, RRIOT_CONFIG *config)
78void rriot_init(int nr, const RRIOT_CONFIG *config)
7979{
8080   memset(&rriot[nr], 0, sizeof(rriot[nr]));
8181   rriot[nr].config = config;
src/mess/machine/rriot.h
r1438r1439
102102} RRIOT_CONFIG;
103103
104104/* This has to be called from a driver at startup */
105void rriot_init(int nr, RRIOT_CONFIG *riot);
105void rriot_init(int nr, const RRIOT_CONFIG *riot);
106106   
107107int rriot_r(int chip, int offs);
108108void rriot_w(int chip, int offs, int data);
src/mess/machine/kaypro.c
r1438r1439
1313#include "includes/kaypro.h"
1414#include "cpu/z80/z80.h"
1515
16static const char *disk_ids[4] = {"KAY2","KAY2","KAY2","KAY2"};
16static const char *const disk_ids[4] = {"KAY2","KAY2","KAY2","KAY2"};
1717
1818static UINT8 keyrows[10] = { 0,0,0,0,0,0,0,0,0,0 };
19static char keyboard[8][10][8] = {
19static const char keyboard[8][10][8] = {
2020   { /* normal */
2121      { 27,'1','2','3','4','5','6','7'},
2222      {'8','9','0','-','=','`',  8,  9},
src/mess/machine/lviv.c
r1438r1439
195195}
196196
197197
198static ppi8255_interface lviv_ppi8255_interface =
198static const ppi8255_interface lviv_ppi8255_interface =
199199{
200200   2,
201201   {lviv_ppi_0_porta_r, lviv_ppi_1_porta_r},
src/mess/machine/pc8801.c
r1438r1439
805805{
806806}
807807
808static struct nec765_interface pc8801_fdc_interface=
808static const struct nec765_interface pc8801_fdc_interface=
809809{
810810   pc8801_fdc_interrupt,
811811   pc8801_fdc_dma_drq
src/mess/machine/pet.c
r1438r1439
225225}
226226
227227
228static struct via6522_interface pet_via =
228static const struct via6522_interface pet_via =
229229{
230230   NULL,               /* in_a_func */
231231   pet_via_port_b_r,      /* in_b_func */
r1438r1439
482482   pet_vh_init();
483483}
484484
485//static struct mscrtc6845_config crtc_pet = { 800000 /*?*/};
485//static const struct mscrtc6845_config crtc_pet = { 800000 /*?*/};
486486static void pet_display_enable_changed(int display_enabled) {
487487}
488488
src/mess/machine/cpm_disk.c
r1438r1439
55 *
66 ******************************************************************************/
77
8dsk_fmt formats[] = {
8const dsk_fmt formats[] = {
99   {
1010      "ATHD", "IBM AT DSHD 3.5\"",
1111      0,   /* unique format */
src/mess/machine/osi.c
r1438r1439
2525   return 0;
2626}
2727
28static struct acia6850_interface sb2m600_acia0 =
28static const struct acia6850_interface sb2m600_acia0 =
2929{
3030   sb2m600_acia0_statin,
3131   sb2m600_acia0_casin,
r1438r1439
3333   0
3434};
3535
36static struct acia6850_interface sb2m600_acia1 =
36static const struct acia6850_interface sb2m600_acia1 =
3737{
3838   0,
3939   0,
src/mess/machine/oric.c
r1438r1439
352352    via_set_input_ca1(0, acknowledge);
353353}
354354
355static CENTRONICS_CONFIG oric_cent_config[1]={
355static const CENTRONICS_CONFIG oric_cent_config[1]={
356356   {
357357      PRINTER_CENTRONICS,
358358      oric_printer_handshake_in
r1438r1439
452452
453453*/
454454
455static struct via6522_interface oric_6522_interface=
455static const struct via6522_interface oric_6522_interface=
456456{
457457   oric_via_in_a_func,
458458   oric_via_in_b_func,
r1438r1439
14331433
14341434    oric_refresh_ints();
14351435}
1436static struct via6522_interface telestrat_via2_interface=
1436static const struct via6522_interface telestrat_via2_interface=
14371437{
14381438   telestrat_via2_in_a_func,
14391439   telestrat_via2_in_b_func,
src/mess/machine/atom.c
r1438r1439
104104   previous_ca2_data = data;
105105}
106106
107static struct via6522_interface atom_6522_interface=
107static const struct via6522_interface atom_6522_interface=
108108{
109109   atom_via_in_a_func,      /* printer status */
110110   NULL,
r1438r1439
123123
124124
125125
126static   ppi8255_interface   atom_8255_int =
126static const ppi8255_interface atom_8255_int =
127127{
128128   1,
129129   {atom_8255_porta_r},
r1438r1439
157157   previous_i8271_int_state = state;
158158}
159159
160static struct i8271_interface atom_8271_interface=
160static const struct i8271_interface atom_8271_interface=
161161{
162162   atom_8271_interrupt_callback,
163163   NULL
src/mess/machine/vc20.c
r1438r1439
361361   cbm_ieee_eoi_w(0,data);
362362}
363363
364static struct via6522_interface via0 =
364static const struct via6522_interface via0 =
365365{
366366   vc20_via0_read_porta,
367367   0,                           /*via0_read_portb, */
src/mess/machine/pc_fdc.c
r1438r1439
5252static void pc_fdc_hw_dma_drq(int,int);
5353static mess_image *pc_fdc_get_image(int floppy_index);
5454
55static nec765_interface pc_fdc_nec765_interface =
55static const nec765_interface pc_fdc_nec765_interface =
5656{
5757   pc_fdc_hw_interrupt,
5858   pc_fdc_hw_dma_drq,
src/mess/machine/pc_hdc.c
r1438r1439
100100static UINT8 *ptr = 0;               /* data pointer */
101101static UINT8 hdc_control;
102102
103static const char *hdc_command_names[] =
103static const char *const hdc_command_names[] =
104104{
105105   "CMD_TESTREADY",      /* 0x00 */
106106   "CMD_RECALIBRATE",      /* 0x01 */
src/mess/machine/centroni.c
r1438r1439
140140   return data;
141141}
142142
143CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE= {
143const CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE= {
144144   NULL,
145145   centronics_write_data,
146146   centronics_read_handshake,
src/mess/machine/99_ide.c
r1438r1439
6666
6767static int ide_irq, clk_irq;
6868
69static struct ide_interface ti99_ide_interface =
69static const struct ide_interface ti99_ide_interface =
7070{
7171   ide_interrupt_callback
7272};
src/mess/machine/ibmpc.c
r1438r1439
9494
9595/* PC-XT has a 8255 which is connected to keyboard and other
9696status information */
97ppi8255_interface pc_ppi8255_interface =
97const ppi8255_interface pc_ppi8255_interface =
9898{
9999   1,
100100   {pc_ppi_porta_r},
src/mess/machine/cbmdrive.c
r1438r1439
4343
4444#define D64_MAX_TRACKS 35
4545
46int d64_sectors_per_track[] =
46const int d64_sectors_per_track[] =
4747{
4848   21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
4949   19, 19, 19, 19, 19, 19, 19,
src/mess/machine/z80dart.c
r1438r1439
267267    z80dart_init - initialize a single DART chip
268268-------------------------------------------------*/
269269
270void z80dart_init(int which, z80dart_interface *intf)
270void z80dart_init(int which, const z80dart_interface *intf)
271271{
272272   z80dart *dart = darts + which;
273273
src/mess/machine/bebox.c
r1438r1439
479479}
480480
481481
482static struct ide_interface bebox_ide_interface =
482static const struct ide_interface bebox_ide_interface =
483483{
484484   bebox_ide_interrupt
485485};
r1438r1439
937937   scsi53c810_pci_write
938938};
939939
940static SCSIConfigTable dev_table =
940static const SCSIConfigTable dev_table =
941941{
942942   2, /* 2 SCSI devices */
943943   {
r1438r1439
946946   }
947947};
948948
949static struct LSI53C810interface scsi53c810_intf =
949static const struct LSI53C810interface scsi53c810_intf =
950950{
951951   &dev_table,      /* SCSI device table */
952952   &scsi53c810_irq_callback,
src/mess/machine/z80dart.h
r1438r1439
3737    INITIALIZATION/CONFIGURATION
3838***************************************************************************/
3939
40void z80dart_init(int which, z80dart_interface *intf);
40void z80dart_init(int which, const z80dart_interface *intf);
4141void z80dart_reset(int which);
4242
4343
src/mess/machine/microtan.c
r1438r1439
3737static int kbd_irq_line = CLEAR_LINE;
3838
3939static UINT8 keyrows[10] = { 0,0,0,0,0,0,0,0,0,0 };
40static char keyboard[8][9][8] = {
40static const char keyboard[8][9][8] = {
4141    { /* normal */
4242        { 27,'1','2','3','4','5','6','7'},
4343        {'8','9','0','-','=','`',127,  9},
r1438r1439
291291 * VIA read wrappers
292292 **************************************************************/
293293#if VERBOSE
294static char *via_name[16] = {
294static const char *const via_name[16] = {
295295    "PB  ","PA  ","DDRB","DDRA",
296296    "T1CL","T1CH","T1LL","T1LH",
297297    "T2CL","T2CH","SR  ","ACR ",
r1438r1439
331331/**************************************************************
332332 * VIA interface structure
333333 **************************************************************/
334static struct via6522_interface via6522[2] =
334static const struct via6522_interface via6522[2] =
335335{
336336    {   /* VIA#1 at bfc0-bfcf*/
337337        via_0_in_a,   via_0_in_b,
src/mess/machine/osborne1.c
r1438r1439
5454static int osborne1_z80_irq_ack(int);
5555static void osborne1_z80_irq_reti(int);
5656
57struct z80_irq_daisy_chain osborne1_daisy_chain[] = {
57const struct z80_irq_daisy_chain osborne1_daisy_chain[] = {
5858   { osborne1_z80_reset, osborne1_z80_irq_state, osborne1_z80_irq_ack, osborne1_z80_irq_reti, 0 },
5959   { NULL, NULL, NULL, NULL, -1 }
6060};
r1438r1439
296296   NULL   /* irq_b_func */
297297};
298298
299//static struct aica6850_interface osborne1_6850_config = {
299//static const struct aica6850_interface osborne1_6850_config = {
300300//   10,   /* tx_clock */
301301//   10,   /* rx_clock */
302302//   NULL,   /* rx_pin */
src/mess/machine/cpm_bios.c
r1438r1439
130130 *   cpm_init
131131 *   Initialize the BIOS simulation for 'n' drives of types stored in 'ids'
132132 *****************************************************************************/
133int cpm_init(int n, const char *ids[])
133int cpm_init(int n, const char *const ids[])
134134{
135135   UINT8 * RAM = memory_get_write_ptr(0, ADDRESS_SPACE_PROGRAM, 0x0000);
136   dsk_fmt *f;
136   const dsk_fmt *f;
137137   int i, d;
138138
139139
r1438r1439
358358
359359   if (VERBOSE)
360360   {
361      dsk_fmt *f = &formats[fmt[d]];
361      const dsk_fmt *f = &formats[fmt[d]];
362362
363363      logerror("CPM '%s' is '%s'\n", id, f->name);
364364      logerror("CPM #%d %dK (%d cylinders, %d sides, %d %d bytes sectors/track)\n",
r1438r1439
379379 *****************************************************************************/
380380static void cpm_disk_image_seek(void)
381381{
382   dsk_fmt *f = &formats[fmt[curdisk]];
382   const dsk_fmt *f = &formats[fmt[curdisk]];
383383   int offs, o, r, s, h;
384384
385385   switch (f->order)
r1438r1439
586586
587587WRITE8_HANDLER ( cpm_bios_command_w )
588588{
589   dsk_fmt *f;
589   const dsk_fmt *f;
590590   char buff[256];
591591   UINT8 * RAM = memory_get_write_ptr(0, ADDRESS_SPACE_PROGRAM, 0x0000);
592592   UINT16 tmp, af, bc, de, hl;
src/mess/machine/cpm_bios.h
r1438r1439
145145   cpm_dpb dpb;         /* associated dpb */
146146} dsk_fmt;
147147
148extern dsk_fmt formats[];
148extern const dsk_fmt formats[];
149149
150150/* these are in cpm_bios.c */
151151DEVICE_LOAD( cpm_floppy );
152extern int cpm_init(int n, const char *ids[]);
152extern int cpm_init(int n, const char *const ids[]);
153153
154154extern READ8_HANDLER ( cpm_bios_command_r );
155155extern WRITE8_HANDLER ( cpm_bios_command_w );
src/mess/machine/hd63450.c
r1438r1439
1313static void dma_transfer_halt(int channel);
1414static void dma_transfer_continue(int channel);
1515
16void hd63450_init(struct hd63450_interface* intf)
16void hd63450_init(const struct hd63450_interface* intf)
1717{
1818   int x;
1919
src/mess/machine/svi318.c
r1438r1439
6969   cpunum_set_input_line(0, 0, (state ? HOLD_LINE : CLEAR_LINE));
7070}
7171
72static uart8250_interface svi318_uart8250_interface[1] =
72static const uart8250_interface svi318_uart8250_interface[1] =
7373{
7474   {
7575      TYPE8250,
r1438r1439
224224   cassette_output(image_from_devtype_and_index(IO_CASSETTE, 0), (data & 0x20) ? -1.0 : +1.0);
225225}
226226
227static ppi8255_interface svi318_ppi8255_interface =
227static const ppi8255_interface svi318_ppi8255_interface =
228228{
229229   1,
230230   {svi318_ppi_port_a_r},
src/mess/machine/hd63450.h
r1438r1439
4545   const struct hd63450_interface* intf;
4646}; 
4747
48void hd63450_init(struct hd63450_interface* intf);
48void hd63450_init(const struct hd63450_interface* intf);
4949int hd63450_read(int offset, UINT16 mem_mask);
5050void hd63450_write(int offset, int data, UINT16 mem_mask);
5151void hd63450_single_transfer(int x);
src/mess/machine/pce.c
r1438r1439
7777
7878/* MSM5205 ADPCM decoder definition */
7979static void pce_cd_msm5205_int( int data );
80struct MSM5205interface pce_cd_msm5205_interface = {
80const struct MSM5205interface pce_cd_msm5205_interface = {
8181   pce_cd_msm5205_int,   /* interrupt function */
8282   MSM5205_S48_4B      /* 1/48 prescaler, 4bit data */
8383};
src/mess/machine/msm8251.c
r1438r1439
3737
3838
3939/* init */
40void   msm8251_init(struct msm8251_interface *iface)
40void   msm8251_init(const struct msm8251_interface *iface)
4141{
4242   serial_helper_setup();
4343
src/mess/machine/bbc.c
r1438r1439
1221222: 64K (banks 4 to 7) for Acorn sideways ram FE30 bank latch
1231233: 128K (banks 8 to 15) for Acown sideways ram FE30 bank latch
124124*/
125static unsigned short bbc_SWRAMtype1[16]={0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
126static unsigned short bbc_SWRAMtype2[16]={0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0};
127static unsigned short bbc_SWRAMtype3[16]={0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
125static const unsigned short bbc_SWRAMtype1[16]={0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
126static const unsigned short bbc_SWRAMtype2[16]={0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0};
127static const unsigned short bbc_SWRAMtype3[16]={0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
128128
129129WRITE8_HANDLER ( memoryb4_w )
130130{
r1438r1439
282282which could either be sideways ROM or sideways RAM */
283283
284284
285static 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 };
285static 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 };
286286
287287
288288WRITE8_HANDLER ( memorybp4_128_w )
r1438r1439
489489   }
490490}
491491
492static unsigned short bbc_master_sideways_ram_banks[16]=
492static const unsigned short bbc_master_sideways_ram_banks[16]=
493493{
494494   0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0
495495};
r1438r1439
11721172}
11731173
11741174
1175static struct via6522_interface
1175static const struct via6522_interface
11761176bbcb_system_via= {
11771177  bbcb_via_system_read_porta,
11781178  bbcb_via_system_read_portb,
r1438r1439
12611261}
12621262
12631263
1264static struct via6522_interface bbcb_user_via =
1264static const struct via6522_interface bbcb_user_via =
12651265{
12661266   bbcb_via_user_read_porta,//via_user_read_porta,
12671267   bbcb_via_user_read_portb,//via_user_read_portb,
r1438r1439
13091309   via_0_cb1_w(0,data);
13101310}
13111311
1312static struct uPD7002_interface
1312static const struct uPD7002_interface
13131313BBC_uPD7002= {
13141314   BBC_get_analogue_input,
13151315   BBC_uPD7002_EOC
r1438r1439
13641364  //logerror("Set SIO irq  %01x\n",level);
13651365}
13661366
1367static struct MC6850_interface
1367static const struct MC6850_interface
13681368BBC_MC6850_calls= {
13691369   0,// Transmit data ouput
13701370   0,// Request to Send output
r1438r1439
15231523}
15241524
15251525
1526static i8271_interface bbc_i8271_interface=
1526static const i8271_interface bbc_i8271_interface=
15271527{
15281528   bbc_i8271_interrupt,
15291529    NULL
src/mess/machine/compis.c
r1438r1439
313313   }
314314}
315315
316static nec765_interface compis_fdc_interface =
316static const nec765_interface compis_fdc_interface =
317317{
318318   compis_fdc_int,
319319   compis_fdc_dma_drq
r1438r1439
433433   compis_fdc_tc((data & 0x80)?1:0);
434434}
435435
436static ppi8255_interface compis_ppi_interface =
436static const ppi8255_interface compis_ppi_interface =
437437{
438438    1,
439439    {NULL},
r1438r1439
458458/*  PIT 8253                                                               */
459459/*-------------------------------------------------------------------------*/
460460
461static struct pit8253_config compis_pit_config[2] =
461static const struct pit8253_config compis_pit_config[2] =
462462{
463463{
464464   TYPE8253,
r1438r1439
533533*/
534534}
535535
536static struct msm8251_interface compis_usart_interface=
536static const struct msm8251_interface compis_usart_interface=
537537{
538538   NULL,
539539   NULL,
src/mess/machine/kc.c
r1438r1439
217217      kc85_disc_hw_input_gate |=(1<<7);
218218}
219219
220static struct nec765_interface kc_fdc_interface=
220static const struct nec765_interface kc_fdc_interface=
221221{
222222   kc85_fdc_interrupt,
223223   kc85_fdc_dma_drq
r1438r1439
287287   void (*enable)(int state);
288288};
289289/*
290static struct kc85_module kc85_v24_module=
290static const struct kc85_module kc85_v24_module=
291291{
292292   0x0ee,
293293   "M003",
294294   "V24"
295295};
296296*/
297static struct kc85_module kc85_disk_interface_device=
297static const struct kc85_module kc85_disk_interface_device=
298298{
299299   0x0a7,
300300   "D004",
301301   "Disk Interface"
302302};
303303
304static struct kc85_module   *modules[256>>2];
304static const struct kc85_module *modules[256>>2];
305305/*
306306
307307   port xx80
r1438r1439
18061806#endif
18071807}
18081808
1809static z80pio_interface kc85_pio_intf =
1809static const z80pio_interface kc85_pio_intf =
18101810{
18111811   kc85_pio_interrupt,      /* callback when change interrupt status */
18121812   kc85_pio_ardy_callback,   /* portA ready active callback */
src/mess/formats/fmsx_cas.c
r1438r1439
149149}
150150
151151
152static struct CassetteLegacyWaveFiller fmsx_legacy_fill_wave =
152static const struct CassetteLegacyWaveFiller fmsx_legacy_fill_wave =
153153{
154154   fmsx_cas_fill_wave,                  /* fill_wave */
155155   -1,                              /* chunk_size */
r1438r1439
176176
177177
178178
179static struct CassetteFormat fmsx_cas_format =
179static const struct CassetteFormat fmsx_cas_format =
180180{
181181   "tap",
182182   fmsx_cas_identify,
src/mess/formats/uef_cas.c
r1438r1439
302302   return p - buffer;
303303}
304304
305static struct CassetteLegacyWaveFiller uef_legacy_fill_wave = {
305static const struct CassetteLegacyWaveFiller uef_legacy_fill_wave = {
306306   uef_cas_fill_wave,            /* fill_wave */
307307   -1,                  /* chunk_size */
308308   0,                  /* chunk_samples */
r1438r1439
320320   return cassette_legacy_construct( cassette, &uef_legacy_fill_wave );
321321}
322322
323struct CassetteFormat uef_cassette_format = {
323const struct CassetteFormat uef_cassette_format = {
324324   "uef",
325325   uef_cassette_identify,
326326   uef_cassette_load,
src/mess/formats/apf_apt.c
r1438r1439
111111
112112
113113
114static struct CassetteLegacyWaveFiller apf_legacy_fill_wave =
114static const struct CassetteLegacyWaveFiller apf_legacy_fill_wave =
115115{
116116   apf_cassette_fill_wave,               /* fill_wave */
117117   -1,                              /* chunk_size */
r1438r1439
138138
139139
140140
141static struct CassetteFormat apf_apt_format =
141static const struct CassetteFormat apf_apt_format =
142142{
143143   "apt",
144144   apf_apt_identify,
src/mess/formats/tzx_cas.c
r1438r1439
462462   return size;
463463}
464464
465static struct CassetteLegacyWaveFiller tzx_legacy_fill_wave = {
465static const struct CassetteLegacyWaveFiller tzx_legacy_fill_wave = {
466466   tzx_cas_fill_wave,         /* fill_wave */
467467   -1,               /* chunk_size */
468468   0,               /* chunk_samples */
r1438r1439
472472   0               /* trailer_samples */
473473};
474474
475static struct CassetteLegacyWaveFiller tap_legacy_fill_wave = {
475static const struct CassetteLegacyWaveFiller tap_legacy_fill_wave = {
476476   tap_cas_fill_wave,         /* fill_wave */
477477   -1,               /* chunk_size */
478478   0,               /* chunk_samples */
r1438r1439
516516   return cassette_legacy_construct( cassette, &cdt_legacy_fill_wave );
517517}
518518
519static struct CassetteFormat tzx_cassette_format = {
519static const struct CassetteFormat tzx_cassette_format = {
520520   "tzx",
521521   tzx_cassette_identify,
522522   tzx_cassette_load,
523523   NULL
524524};
525525
526static struct CassetteFormat tap_cassette_format = {
526static const struct CassetteFormat tap_cassette_format = {
527527   "tap",
528528   tap_cassette_identify,
529529   tap_cassette_load,
src/mess/formats/ioprocs.c
r1438r1439
4040   return (size_t) sz;
4141}
4242
43struct io_procs stdio_ioprocs =
43const struct io_procs stdio_ioprocs =
4444{
4545   stdio_closeproc,
4646   stdio_seekproc,
r1438r1439
4949   stdio_filesizeproc
5050};
5151
52struct io_procs stdio_ioprocs_noclose =
52const struct io_procs stdio_ioprocs_noclose =
5353{
5454   NULL,
5555   stdio_seekproc,
src/mess/formats/vt_cas.c
r1438r1439
9393   return generic_fill_wave(buffer, length, code, V1_BITSAMPLES, V1_BYTESAMPLES, V1_LO, vtech1_fill_wave_byte);
9494}
9595
96static struct CassetteLegacyWaveFiller vtech1_legacy_fill_wave =
96static const struct CassetteLegacyWaveFiller vtech1_legacy_fill_wave =
9797{
9898   vtech1_cassette_fill_wave,   /* fill_wave */
9999   1,                     /* chunk_size */
r1438r1439
114114   return cassette_legacy_construct(cassette, &vtech1_legacy_fill_wave);
115115}
116116
117static struct CassetteFormat vtech1_cas_format =
117static const struct CassetteFormat vtech1_cas_format =
118118{
119119   "cas",
120120   vtech1_cas_identify,
r1438r1439
188188   return generic_fill_wave(buffer, length, code, VT2_BITSAMPLES, VT2_BYTESAMPLES, VT2_LO, vtech2_fill_wave_byte);
189189}
190190
191static struct CassetteLegacyWaveFiller vtech2_legacy_fill_wave =
191static const struct CassetteLegacyWaveFiller vtech2_legacy_fill_wave =
192192{
193193   vtech2_cassette_fill_wave,   /* fill_wave */
194194   1,                     /* chunk_size */
r1438r1439
209209   return cassette_legacy_construct(cassette, &vtech2_legacy_fill_wave);
210210}
211211
212static struct CassetteFormat vtech2_cas_format =
212static const struct CassetteFormat vtech2_cas_format =
213213{
214214   "cas",
215215   vtech2_cas_identify,
src/mess/formats/csw_cas.c
r1438r1439
292292}
293293
294294
295static struct CassetteLegacyWaveFiller csw_legacy_fill_wave = {
295static const struct CassetteLegacyWaveFiller csw_legacy_fill_wave = {
296296   csw_cas_fill_wave,      /* fill_wave */
297297   -1,                  /* chunk_size */
298298   0,                  /* chunk_samples */
r1438r1439
310310   return cassette_legacy_construct( cassette, &csw_legacy_fill_wave );
311311}
312312
313static struct CassetteFormat csw_cassette_format = {
313static const struct CassetteFormat csw_cassette_format = {
314314   "csw",
315315   csw_cassette_identify,
316316   csw_cassette_load,
src/mess/formats/ioprocs.h
r1438r1439
4545
4646***************************************************************************/
4747
48extern struct io_procs stdio_ioprocs;
49extern struct io_procs stdio_ioprocs_noclose;
48extern const struct io_procs stdio_ioprocs;
49extern const struct io_procs stdio_ioprocs_noclose;
5050
5151
5252
src/mess/formats/flopimg.c
r1438r1439
930930
931931const char *floppy_error(floperr_t err)
932932{
933   const char *error_messages[] =
933   static const char *const error_messages[] =
934934   {
935935      "The operation completed successfully",
936936      "Fatal internal error",
src/mess/formats/wavfile.c
r1438r1439
228228
229229
230230
231struct CassetteFormat wavfile_format =
231const struct CassetteFormat wavfile_format =
232232{
233233   "wav",
234234   wavfile_identify,
src/mess/formats/flopimg.h
r1438r1439
8181
8282
8383#define FLOPPY_OPTIONS_START(name)                                    \
84   struct FloppyFormat floppyoptions_##name[] =                        \
84   const struct FloppyFormat floppyoptions_##name[] =                        \
8585   {                                                         \
8686
8787#define FLOPPY_OPTIONS_END                                          \
r1438r1439
8989   };
9090
9191#define FLOPPY_OPTIONS_EXTERN(name)                                    \
92   extern struct FloppyFormat floppyoptions_##name[]                     \
92   extern const struct FloppyFormat floppyoptions_##name[]                     \
9393
9494#define FLOPPY_OPTION(name, extensions_, description_, identify_, construct_, ranges_)\
9595   { #name, extensions_, description_, identify_, construct_, ranges_ },            \
src/mess/formats/wavfile.h
r1438r1439
1111
1212#include "cassimg.h"
1313
14extern struct CassetteFormat wavfile_format;
14extern const struct CassetteFormat wavfile_format;
1515
1616#endif /* WAVFILE_H */
src/mess/formats/mz_cas.c
r1438r1439
299299
300300
301301
302static struct CassetteLegacyWaveFiller mz700_legacy_fill_wave =
302static const struct CassetteLegacyWaveFiller mz700_legacy_fill_wave =
303303{
304304   fill_wave,               /* fill_wave */
305305   1,                     /* chunk_size */
r1438r1439
326326
327327
328328
329static struct CassetteFormat mz700_cas_format =
329static const struct CassetteFormat mz700_cas_format =
330330{
331331   "m12",
332332   mz700_cas_identify,
src/mess/formats/svi_cas.c
r1438r1439
164164
165165
166166
167static struct CassetteLegacyWaveFiller svi_legacy_fill_wave =
167static const struct CassetteLegacyWaveFiller svi_legacy_fill_wave =
168168{
169169   svi_cas_fill_wave,                  /* fill_wave */
170170   -1,                              /* chunk_size */
r1438r1439
191191
192192
193193
194static struct CassetteFormat svi_cas_format =
194static const struct CassetteFormat svi_cas_format =
195195{
196196   "cas",
197197   svi_cas_identify,
src/mess/formats/sord_cas.c
r1438r1439
126126   return CASSETTE_ERROR_SUCCESS;
127127}
128128
129static struct CassetteFormat sordm5_cas_format =
129static const struct CassetteFormat sordm5_cas_format =
130130{
131131   "cas",
132132   sordm5_tap_identify,
src/mess/formats/ti85_ser.c
r1438r1439
44#define TI85_PC_OK_PACKET_SIZE   4
55#define TI85_PC_END_PACKET_SIZE   4
66
7UINT8 ti85_pc_ok_packet[] = {0x05, 0x56, 0x00, 0x00};
8UINT8 ti86_pc_ok_packet[] = {0x06, 0x56, 0x00, 0x00};
9UINT8 ti85_pc_continue_packet[] = {0x05, 0x09, 0x00, 0x00};
10UINT8 ti86_pc_continue_packet[] = {0x06, 0x09, 0x00, 0x00};
11UINT8 ti85_pc_screen_request_packet[] = {0x05, 0x6d, 0x00, 0x00};
12static UINT8 ti85_pc_end_packet[] = {0x05, 0x92, 0x00, 0x00};
13static UINT8 ti86_pc_end_packet[] = {0x06, 0x92, 0x00, 0x00};
7const UINT8 ti85_pc_ok_packet[] = {0x05, 0x56, 0x00, 0x00};
8const UINT8 ti86_pc_ok_packet[] = {0x06, 0x56, 0x00, 0x00};
9const UINT8 ti85_pc_continue_packet[] = {0x05, 0x09, 0x00, 0x00};
10const UINT8 ti86_pc_continue_packet[] = {0x06, 0x09, 0x00, 0x00};
11const UINT8 ti85_pc_screen_request_packet[] = {0x05, 0x6d, 0x00, 0x00};
12static const UINT8 ti85_pc_end_packet[] = {0x05, 0x92, 0x00, 0x00};
13static const UINT8 ti86_pc_end_packet[] = {0x06, 0x92, 0x00, 0x00};
1414
15UINT8 ti85_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x35, 0x2a, 0x2a, 0x1a, 0x0c, 0x00};
16UINT8 ti86_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x36, 0x2a, 0x2a, 0x1a, 0x0a, 0x00};
15const UINT8 ti85_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x35, 0x2a, 0x2a, 0x1a, 0x0c, 0x00};
16const UINT8 ti86_file_signature[] = {0x2a, 0x2a, 0x54, 0x49, 0x38, 0x36, 0x2a, 0x2a, 0x1a, 0x0a, 0x00};
1717
1818int ti85_serial_transfer_type = TI85_SEND_VARIABLES;
1919
20UINT16 ti85_calculate_checksum(UINT8* data, unsigned int size)
20UINT16 ti85_calculate_checksum(const UINT8* data, unsigned int size)
2121{
2222   UINT16 checksum = 0;
2323   unsigned int i;
r1438r1439
2727   return checksum;
2828}
2929
30UINT16 ti85_variables_count (UINT8 * ti85_data, unsigned int ti85_data_size)
30UINT16 ti85_variables_count (const UINT8 * ti85_data, unsigned int ti85_data_size)
3131{
3232   unsigned int pos, head_size, var_size;
3333   UINT16 number_of_entries = 0;
r1438r1439
4242   return number_of_entries;
4343}
4444
45static void ti85_backup_read (UINT8 * ti85_data, unsigned int ti85_data_size, ti85_entry * ti85_entries)
45static void ti85_backup_read (const UINT8 * ti85_data, unsigned int ti85_data_size, ti85_entry * ti85_entries)
4646{
4747   unsigned int pos = 0x42+2;
4848       
r1438r1439
5959   ti85_entries[2].offset = pos;
6060}
6161
62void ti85_variables_read (UINT8 * ti85_data, unsigned int ti85_data_size, ti85_entry * ti85_entries)
62void ti85_variables_read (const UINT8 * ti85_data, unsigned int ti85_data_size, ti85_entry * ti85_entries)
6363{
6464   unsigned int pos, i=0;
6565
r1438r1439
7777}
7878
7979
80void ti85_convert_data_to_stream (UINT8* file_data, unsigned int size, UINT8* serial_data)
80void ti85_convert_data_to_stream (const UINT8* file_data, unsigned int size, UINT8* serial_data)
8181{
8282   unsigned int i, bits;
8383
r1438r1439
8686         serial_data[i*8+bits] = (file_data[i]>>bits) & 0x01;
8787}
8888
89void ti85_convert_stream_to_data (UINT8* serial_data, UINT32 size, UINT8* data)
89void ti85_convert_stream_to_data (const UINT8* serial_data, UINT32 size, UINT8* data)
9090{
9191   UINT32 i;
9292   UINT8 bits;
r1438r1439
101101   }
102102}
103103
104int ti85_convert_file_data_to_serial_stream (UINT8* file_data, unsigned int file_size, ti85_serial_data*  serial_data, char* calc_type)
104int ti85_convert_file_data_to_serial_stream (const UINT8* file_data, unsigned int file_size, ti85_serial_data*  serial_data, char* calc_type)
105105{
106106   UINT16 i;
107107   UINT16 number_of_entries;
src/mess/formats/pc_dsk.c
r1438r1439
2020
2121
2222
23static struct pc_disk_sizes disk_sizes[] =
23static const struct pc_disk_sizes disk_sizes[] =
2424{
2525   { 8*1*40*512,  8, 1},   /* 5 1/4 inch double density single sided */
2626   { 8*2*40*512,  8, 2},   /* 5 1/4 inch double density */
src/mess/formats/lviv_lvt.c
r1438r1439
107107
108108
109109
110static struct CassetteLegacyWaveFiller lviv_legacy_fill_wave =
110static const struct CassetteLegacyWaveFiller lviv_legacy_fill_wave =
111111{
112112   lviv_cassette_fill_wave,               /* fill_wave */
113113   -1,                                 /* chunk_size */
r1438r1439
134134
135135
136136
137static struct CassetteFormat lviv_lvt_image_format =
137static const struct CassetteFormat lviv_lvt_image_format =
138138{
139139   "lvt",
140140   lviv_lvt_identify,
src/mess/formats/ti85_ser.h
r1438r1439
3030   UINT16 number_of_variables;
3131} ti85_serial_data;
3232
33extern UINT8 ti85_file_signature[];
34extern UINT8 ti86_file_signature[];
35extern UINT8 ti85_pc_ok_packet[];
36extern UINT8 ti86_pc_ok_packet[];
37extern UINT8 ti85_pc_continue_packet[];
38extern UINT8 ti86_pc_continue_packet[];
39extern UINT8 ti85_pc_screen_request_packet[];
33extern const UINT8 ti85_file_signature[];
34extern const UINT8 ti86_file_signature[];
35extern const UINT8 ti85_pc_ok_packet[];
36extern const UINT8 ti86_pc_ok_packet[];
37extern const UINT8 ti85_pc_continue_packet[];
38extern const UINT8 ti86_pc_continue_packet[];
39extern const UINT8 ti85_pc_screen_request_packet[];
4040extern int ti85_serial_transfer_type;
4141
42extern UINT16 ti85_calculate_checksum(UINT8*, unsigned int);
43extern UINT16 ti85_variables_count (UINT8 *, unsigned int);
44extern void ti85_variables_read (UINT8 *, unsigned int, ti85_entry *);
45extern int ti85_convert_file_data_to_serial_stream (UINT8*, UINT32, ti85_serial_data*, char*);
46extern void ti85_convert_data_to_stream (UINT8*, unsigned int, UINT8*);
47extern void ti85_convert_stream_to_data (UINT8*, unsigned int, UINT8*);
42extern UINT16 ti85_calculate_checksum(const UINT8*, unsigned int);
43extern UINT16 ti85_variables_count (const UINT8 *, unsigned int);
44extern void ti85_variables_read (const UINT8 *, unsigned int, ti85_entry *);
45extern int ti85_convert_file_data_to_serial_stream (const UINT8*, UINT32, ti85_serial_data*, char*);
46extern void ti85_convert_data_to_stream (const UINT8*, unsigned int, UINT8*);
47extern void ti85_convert_stream_to_data (const UINT8*, unsigned int, UINT8*);
4848extern void ti85_free_serial_stream (ti85_serial_data*);
src/mess/formats/thom_dsk.c
r1438r1439
364364
365365
366366
367static floppy_interface thom_floppy_interface =
367static const floppy_interface thom_floppy_interface =
368368{
369369   thom_floppy_seek,
370370   thom_floppy_get_sectors_per_track,
src/mess/formats/coco_cas.c
r1438r1439
259259
260260
261261
262struct CassetteFormat coco_cas_format =
262const struct CassetteFormat coco_cas_format =
263263{
264264   "cas",
265265   coco_cas_identify,
src/mess/formats/primoptp.c
r1438r1439
214214   return p - buffer;
215215}
216216
217static struct CassetteLegacyWaveFiller primo_legacy_fill_wave =
217static const struct CassetteLegacyWaveFiller primo_legacy_fill_wave =
218218{
219219   primo_cassette_fill_wave,         /* fill_wave */
220220   -1,                                 /* chunk_size */
r1438r1439
235235   return cassette_legacy_construct(cassette, &primo_legacy_fill_wave);
236236}
237237
238static struct CassetteFormat primo_ptp_image_format =
238static const struct CassetteFormat primo_ptp_image_format =
239239{
240240   "ptp",
241241   primo_ptp_identify,
src/mess/formats/coco_cas.h
r1438r1439
1111
1212#include "formats/cassimg.h"
1313
14extern struct CassetteFormat coco_cas_format;
14extern const struct CassetteFormat coco_cas_format;
1515extern const struct CassetteModulation coco_cas_modulation;
1616
1717CASSETTE_FORMATLIST_EXTERN(coco_cassette_formats);
src/mess/formats/pmd_pmd.c
r1438r1439
8585   return p - buffer;
8686}
8787
88static struct CassetteLegacyWaveFiller pmd85_legacy_fill_wave =
88static const struct CassetteLegacyWaveFiller pmd85_legacy_fill_wave =
8989{
9090   pmd85_cassette_fill_wave,         /* fill_wave */
9191   -1,                                 /* chunk_size */
r1438r1439
106106   return cassette_legacy_construct(cassette, &pmd85_legacy_fill_wave);
107107}
108108
109static struct CassetteFormat pmd85_pmd_image_format =
109static const struct CassetteFormat pmd85_pmd_image_format =
110110{
111111   "pmd",
112112   pmd85_pmd_identify,
src/mess/formats/cassimg.c
r1438r1439
146146
147147
148148casserr_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)
150150{
151151   casserr_t err;
152152   cassette_image *cassette;
r1438r1439
226226{
227227   casserr_t err;
228228   cassette_image *cassette;
229   static struct CassetteOptions default_options = { 1, 16, 44100 };
229   static const struct CassetteOptions default_options = { 1, 16, 44100 };
230230
231231   /* cannot create to a read only image */
232232   if (flags & CASSETTE_FLAG_READONLY)
src/mess/formats/zx81_p.c
r1438r1439
189189   return p - buffer;
190190}
191191
192static struct CassetteLegacyWaveFiller zx81_legacy_fill_wave =
192static const struct CassetteLegacyWaveFiller zx81_legacy_fill_wave =
193193{
194194   zx81_cassette_fill_wave,         /* fill_wave */
195195   -1,                  /* chunk_size */
r1438r1439
211211   return cassette_legacy_construct(cassette, &zx81_legacy_fill_wave);
212212}
213213
214static struct CassetteFormat zx81_p_image_format =
214static const struct CassetteFormat zx81_p_image_format =
215215{
216216   "p,81",
217217   zx81_p_identify,
r1438r1439
253253   return p - buffer;
254254}
255255
256static struct CassetteLegacyWaveFiller zx80_legacy_fill_wave =
256static const struct CassetteLegacyWaveFiller zx80_legacy_fill_wave =
257257{
258258   zx80_cassette_fill_wave,         /* fill_wave */
259259   -1,                                 /* chunk_size */
r1438r1439
274274   return cassette_legacy_construct(cassette, &zx80_legacy_fill_wave);
275275}
276276
277static struct CassetteFormat zx80_o_image_format =
277static const struct CassetteFormat zx80_o_image_format =
278278{
279279   "o,80",
280280   zx80_o_identify,
src/mess/formats/cassimg.h
r1438r1439
114114};
115115
116116/* builtin formats */
117extern struct CassetteFormat wavfile_format;
117extern const struct CassetteFormat wavfile_format;
118118
119119/* macros for specifying format lists */
120120#define CASSETTE_FORMATLIST_EXTERN(name)   \
121   extern const struct CassetteFormat *name[]
121   extern const struct CassetteFormat *const name[]
122122
123123#define CASSETTE_FORMATLIST_START(name)      \
124   const struct CassetteFormat *name[] =   \
124   const struct CassetteFormat *const name[] =   \
125125   {                              \
126126      &wavfile_format,               \
127127
r1438r1439
143143casserr_t cassette_open(void *file, const struct io_procs *procs,
144144   const struct CassetteFormat *format, int flags, cassette_image **outcassette);
145145casserr_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);
147147casserr_t cassette_create(void *file, const struct io_procs *procs, const struct CassetteFormat *format,
148148   const struct CassetteOptions *opts, int flags, cassette_image **outcassette);
149149casserr_t cassette_save(cassette_image *cassette);
src/mess/formats/oric_tap.c
r1438r1439
489489
490490
491491
492static struct CassetteLegacyWaveFiller oric_legacy_fill_wave =
492static const struct CassetteLegacyWaveFiller oric_legacy_fill_wave =
493493{
494494   oric_cassette_fill_wave,               /* fill_wave */
495495   -1,                                 /* chunk_size */
r1438r1439
516516
517517
518518
519static struct CassetteFormat oric_tap_format =
519static const struct CassetteFormat oric_tap_format =
520520{
521521   "tap",
522522   oric_tap_identify,
src/mess/formats/a26_cas.c
r1438r1439
129129   return a26_cas_do_work( NULL, casdata );
130130}
131131
132static struct CassetteLegacyWaveFiller a26_legacy_fill_wave = {
132static const struct CassetteLegacyWaveFiller a26_legacy_fill_wave = {
133133   a26_cas_fill_wave,
134134   -1,
135135   0,
r1438r1439
153153   return cassette_legacy_construct( cassette, &a26_legacy_fill_wave );
154154}
155155
156static struct CassetteFormat a26_cassette_format = {
156static const struct CassetteFormat a26_cassette_format = {
157157   "a26",
158158   a26_cassette_identify,
159159   a26_cassette_load,
src/mess/formats/thom_cas.c
r1438r1439
569569
570570
571571
572static struct CassetteFormat to7_k7 =
572static const struct CassetteFormat to7_k7 =
573573{ "k7", to7_k7_identify, to7_k7_load, NULL /* no save */ };
574574
575575
r1438r1439
934934
935935
936936
937static struct CassetteFormat mo5_k5 =
937static const struct CassetteFormat mo5_k5 =
938938{ "k5,k7", mo5_k5_identify, mo5_k5_load, NULL /* no save */ };
939939
940940
r1438r1439
985985/********************* formats ************************/
986986
987987
988const struct CassetteFormat *to7_cassette_formats[] =
988const struct CassetteFormat *const to7_cassette_formats[] =
989989{ &to7_wav, &to7_k7, NULL };
990990
991991
992const struct CassetteFormat *mo5_cassette_formats[] =
992const struct CassetteFormat *const mo5_cassette_formats[] =
993993{ &mo5_wav, &mo5_k5, NULL };
994994
995995
src/mess/drivers/vip.c
r1438r1439
130130   set_led_status(1, level);
131131}
132132
133static CDP1802_CONFIG vip_config =
133static const CDP1802_CONFIG vip_config =
134134{
135135   vip_mode_r,
136136   vip_ef_r,
src/mess/drivers/wswan.c
r1438r1439
120120   }
121121}
122122
123static struct CustomSound_interface wswan_sound_interface =
123static const struct CustomSound_interface wswan_sound_interface =
124124{
125125   wswan_sh_start
126126};
src/mess/drivers/comquest.c
r1438r1439
202202   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, comquest_charlayout, 0, 2 )
203203GFXDECODE_END
204204
205static unsigned char comquest_palette[] =
205static const unsigned char comquest_palette[] =
206206{
207207   0, 0, 0,
208208   255,255,255
209209};
210210
211static unsigned short comquest_colortable[1][2] = {
211static const unsigned short comquest_colortable[1][2] = {
212212   { 0, 1 },
213213};
214214
r1438r1439
224224//   memory_set_bankptr(1,mem+0x00000);
225225}
226226
227static UINT32 amask= 0xffff;
227static const UINT32 amask= 0xffff;
228228
229229
230230static MACHINE_DRIVER_START( comquest )
src/mess/drivers/zx.c
r1438r1439
337337
338338/* Palette Initialization */
339339
340static unsigned char zx80_palette[] =
340static const unsigned char zx80_palette[] =
341341{
342342   255,255,255,   /* white */
343343     0,  0,  0,   /* black */
344344};
345345
346static unsigned char zx81_palette[] =
346static const unsigned char zx81_palette[] =
347347{
348348   255,255,255,   /* white */
349349     0,  0,  0,   /* black */
350350};
351351
352static unsigned char ts1000_palette[] =
352static const unsigned char ts1000_palette[] =
353353{
354354    64,244,244,   /* cyan */
355355     0,  0,  0,   /* black */
356356};
357357
358static unsigned short zx_colortable[] =
358static const unsigned short zx_colortable[] =
359359{
360360   0, 1,                        /* white on black */
361361   1, 0                        /* black on white */
r1438r1439
533533
534534/* System Configuration */
535535
536static struct CassetteOptions zx81_cassette_options = {
536static const struct CassetteOptions zx81_cassette_options = {
537537   1,      /* channels */
538538   16,      /* bits per sample */
539539   44100      /* sample frequency */
src/mess/drivers/dgn_beta.c
r1438r1439
6464
6565*/
6666
67static unsigned char dgnbeta_palette[] =
67static const unsigned char dgnbeta_palette[] =
6868{
6969   /*normal brightness */
7070   0x00,0x00,0x00,    /* black */
src/mess/drivers/jaguar.c
r1438r1439
429429 *************************************/
430430
431431
432static struct jaguar_config gpu_config =
432static const struct jaguar_config gpu_config =
433433{
434434   jaguar_gpu_cpu_int
435435};
436436
437437
438static struct jaguar_config dsp_config =
438static const struct jaguar_config dsp_config =
439439{
440440   jaguar_dsp_cpu_int
441441};
src/mess/drivers/apple2gs.c
r1438r1439
143143   return 0x80;
144144}
145145
146static struct ES5503interface es5503_interface =
146static const struct ES5503interface es5503_interface =
147147{
148148   apple2gs_doc_irq,
149149   apple2gs_adc_read,
src/mess/drivers/hp48.c
r1438r1439
164164   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, hp48_charlayout, 0, 8 )
165165GFXDECODE_END
166166
167static SATURN_CONFIG config={
167static const SATURN_CONFIG config={
168168   hp48_out, hp48_in,
169169   hp48_mem_reset, hp48_mem_config, hp48_mem_unconfig, hp48_mem_id,
170170   hp48_crc
src/mess/drivers/c65.c
r1438r1439
300300   ROM_LOAD ("910429.bin", 0x20000, 0x20000, CRC(b025805c) SHA1(c3b05665684f74adbe33052a2d10170a1063ee7d))
301301ROM_END
302302
303static SID6581_interface c65_sound_interface =
303static const SID6581_interface c65_sound_interface =
304304{
305305   c64_paddle_read
306306};
src/mess/drivers/dai.c
r1438r1439
170170      PORT_BIT(0xcb, IP_ACTIVE_HIGH, IPT_UNUSED)
171171INPUT_PORTS_END
172172
173static struct CassetteOptions dai_cassette_options = {
173static const struct CassetteOptions dai_cassette_options = {
174174   1,      /* channels */
175175   16,      /* bits per sample */
176176   44100      /* sample frequency */
src/mess/drivers/mac.c
r1438r1439
6464
6565
6666
67static struct CustomSound_interface custom_interface =
67static const struct CustomSound_interface custom_interface =
6868{
6969   mac_sh_start
7070};
r1438r1439
382382}
383383
384384
385static struct MachineDriver machine_driver_mac2 =
385static const struct MachineDriver machine_driver_mac2 =
386386{
387387   /* basic machine hardware */
388388   {
src/mess/drivers/atari.c
r1438r1439
642642   0xff,0xc1,0x60, 0xff,0xca,0x69, 0xff,0xcf,0x7e, 0xff,0xda,0x96
643643};
644644
645static unsigned short atari_colortable[] =
645static const unsigned short atari_colortable[] =
646646{
647647   0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
648648   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,
r1438r1439
682682
683683
684684
685static struct POKEYinterface pokey_interface =
685static const struct POKEYinterface pokey_interface =
686686{
687687   {
688688      analog_0_r,
src/mess/drivers/nc.c
r1438r1439
782782   }
783783}
784784
785static unsigned long baud_rate_table[]=
785static const unsigned long baud_rate_table[]=
786786{
787787   150,
788788    300,
r1438r1439
942942}
943943
944944
945static struct tc8521_interface nc100_tc8521_interface=
945static const struct tc8521_interface nc100_tc8521_interface=
946946{
947947   nc100_tc8521_alarm_callback,
948948};
949949
950static struct msm8251_interface nc100_uart_interface=
950static const struct msm8251_interface nc100_uart_interface=
951951{
952952   nc100_txrdy_callback,
953953   NULL,
r1438r1439
969969   nc_update_interrupts();
970970}
971971
972static CENTRONICS_CONFIG nc100_cent_config[1]={
972static const CENTRONICS_CONFIG nc100_cent_config[1]={
973973   {
974974      PRINTER_CENTRONICS,
975975      nc100_printer_handshake_in
r1438r1439
12761276   nc_update_interrupts();
12771277}
12781278
1279static CENTRONICS_CONFIG nc200_cent_config[1]={
1279static const CENTRONICS_CONFIG nc200_cent_config[1]={
12801280   {
12811281      PRINTER_CENTRONICS,
12821282      nc200_printer_handshake_in
r1438r1439
13281328   nc200_refresh_uart_interrupt();
13291329}
13301330
1331static struct msm8251_interface nc200_uart_interface=
1331static const struct msm8251_interface nc200_uart_interface=
13321332{
13331333   nc200_rxrdy_callback,
13341334   NULL,
r1438r1439
13561356    nc_update_interrupts();
13571357}
13581358
1359static struct nec765_interface nc200_nec765_interface=
1359static const struct nec765_interface nc200_nec765_interface=
13601360{
13611361    nc200_fdc_interrupt,
13621362    NULL,
src/mess/drivers/cbmb.c
r1438r1439
417417   /*C64_DIPS */
418418INPUT_PORTS_END
419419
420static unsigned char cbm700_palette[] =
420static const unsigned char cbm700_palette[] =
421421{
422422   0,0,0, /* black */
423423   0,0x80,0, /* green */
424424};
425425
426static unsigned short cbmb_colortable[] = {
426static const unsigned short cbmb_colortable[] = {
427427   0, 1
428428};
429429
src/mess/drivers/sord.c
r1438r1439
179179   }
180180}
181181
182static struct nec765_interface sord_fd5_nec765_interface=
182static const struct nec765_interface sord_fd5_nec765_interface=
183183{
184184   sord_fd5_fdc_interrupt,
185185   NULL
r1438r1439
302302#endif
303303}
304304
305static ppi8255_interface sord_ppi8255_interface =
305static const ppi8255_interface sord_ppi8255_interface =
306306{
307307   1,
308308   {sord_ppi_porta_r},
r1438r1439
454454
455455
456456
457static CENTRONICS_CONFIG sordm5_cent_config[1] =
457static const CENTRONICS_CONFIG sordm5_cent_config[1] =
458458{
459459   {
460460      PRINTER_CENTRONICS,
r1438r1439
623623INPUT_PORTS_END
624624
625625
626static struct z80_irq_daisy_chain sord_m5_daisy_chain[] =
626static const struct z80_irq_daisy_chain sord_m5_daisy_chain[] =
627627{
628628   {z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0},
629629   {0,0,0,0,-1}
src/mess/drivers/coco.c
r1438r1439
564564INPUT_PORTS_END
565565
566566/* AY-8912 for Dragon Alpha, the AY-8912 simply an AY-8910 with only one io port. */
567static struct AY8910interface ay8912_interface =
567static const struct AY8910interface ay8912_interface =
568568{
569569   dgnalpha_psg_porta_read,   /* portA read */
570570   NULL,                   /* portB read */
src/mess/drivers/ti99_8.c
r1438r1439
352352/*
353353   TMS5220 speech synthesizer
354354*/
355static struct TMS5220interface tms5220interface =
355static const struct TMS5220interface tms5220interface =
356356{
357357   NULL,                  /* no IRQ callback */
358358   spchroms_read,            /* speech ROM read handler */
r1438r1439
388388   TMS9928A_configure(&tms9129_interface);
389389}
390390
391static struct tms9995reset_param ti99_8_processor_config =
391static const struct tms9995reset_param ti99_8_processor_config =
392392{
393393   1,            /* enable automatic wait state generation */
394394               /* (in January 83 99/8 schematics sheet 9: the delay logic
src/mess/drivers/nes.c
r1438r1439
236236};
237237#endif
238238
239static struct NESinterface nes_interface =
239static const struct NESinterface nes_interface =
240240{
241241   0
242242};
243243
244static struct NESinterface nespal_interface =
244static const struct NESinterface nespal_interface =
245245{
246246   0
247247};
src/mess/drivers/pocketc.c
r1438r1439
498498   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, pc1251_charlayout, 0, 8 )
499499GFXDECODE_END
500500
501static SC61860_CONFIG config={
501static const SC61860_CONFIG config={
502502    pc1401_reset, pc1401_brk, NULL,
503503    pc1401_ina, pc1401_outa,
504504    pc1401_inb, pc1401_outb,
r1438r1439
542542MACHINE_DRIVER_END
543543
544544
545static SC61860_CONFIG pc1251_config =
545static const SC61860_CONFIG pc1251_config =
546546{
547547    NULL, pc1251_brk, NULL,
548548    pc1251_ina, pc1251_outa,
r1438r1439
569569MACHINE_DRIVER_END
570570
571571
572static SC61860_CONFIG pc1350_config =
572static const SC61860_CONFIG pc1350_config =
573573{
574574    NULL, pc1350_brk,NULL,
575575    pc1350_ina, pc1350_outa,
r1438r1439
600600MACHINE_DRIVER_END
601601
602602
603static SC61860_CONFIG pc1403_config =
603static const SC61860_CONFIG pc1403_config =
604604{
605605    NULL, pc1403_brk, NULL,
606606    pc1403_ina, pc1403_outa,
src/mess/drivers/mk1.c
r1438r1439
188188    cpunum_set_input_line( 0, 0, level ? F8_INT_INTR : F8_INT_NONE );
189189}
190190
191static F3853_CONFIG mk1_config = {
191static const F3853_CONFIG mk1_config = {
192192   MAIN_CLOCK,
193193   mk1_interrupt
194194};
src/mess/drivers/gb.c
r1438r1439
443443#include "gb.lh"
444444
445445/* Initial value of the cpu registers (hacks until we get bios dumps) */
446static UINT16 sgb_cpu_regs[6] = { 0x01B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };    /* Super GameBoy                    */
447static UINT16 mgb_cpu_regs[6] = { 0xFFB0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };   /* GameBoy Pocket / Super GameBoy 2 */
448static UINT16 cgb_cpu_regs[6] = { 0x11B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };   /* GameBoy Color  / Gameboy Advance */
449static UINT16 megaduck_cpu_regs[6] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFE, 0x0000 };   /* Megaduck */
446static const UINT16 sgb_cpu_regs[6] = { 0x01B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };    /* Super GameBoy                    */
447static const UINT16 mgb_cpu_regs[6] = { 0xFFB0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };   /* GameBoy Pocket / Super GameBoy 2 */
448static const UINT16 cgb_cpu_regs[6] = { 0x11B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };   /* GameBoy Color  / Gameboy Advance */
449static const UINT16 megaduck_cpu_regs[6] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFE, 0x0000 };   /* Megaduck */
450450
451static Z80GB_CONFIG dmg_cpu_reset = { NULL, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
452static Z80GB_CONFIG sgb_cpu_reset = { sgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
453static Z80GB_CONFIG mgb_cpu_reset = { mgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
454static Z80GB_CONFIG cgb_cpu_reset = { cgb_cpu_regs, 0, gb_timer_callback };
455static Z80GB_CONFIG megaduck_cpu_reset = { megaduck_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
451static const Z80GB_CONFIG dmg_cpu_reset = { NULL, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
452static const Z80GB_CONFIG sgb_cpu_reset = { sgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
453static const Z80GB_CONFIG mgb_cpu_reset = { mgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
454static const Z80GB_CONFIG cgb_cpu_reset = { cgb_cpu_regs, 0, gb_timer_callback };
455static const Z80GB_CONFIG megaduck_cpu_reset = { megaduck_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
456456
457457static ADDRESS_MAP_START(gb_map, ADDRESS_SPACE_PROGRAM, 8)
458458   ADDRESS_MAP_FLAGS( AMEF_UNMAP(1) )
r1438r1439
543543   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SELECT) PORT_NAME("Select")
544544INPUT_PORTS_END
545545
546static struct CustomSound_interface gameboy_sound_interface =
546static const struct CustomSound_interface gameboy_sound_interface =
547547{ gameboy_sh_start, 0, 0 };
548548
549549
src/mess/drivers/pcw16.c
r1438r1439
12571257   }
12581258}
12591259
1260static uart8250_interface pcw16_com_interface[2]=
1260static const uart8250_interface pcw16_com_interface[2]=
12611261{
12621262   {
12631263      TYPE16550,
r1438r1439
13321332}
13331333
13341334
1335static PC_LPT_CONFIG lpt_config =
1335static const PC_LPT_CONFIG lpt_config =
13361336{
13371337   1,
13381338   LPT_UNIDIRECTIONAL, // more one of these epp/ecp aware ports
13391339   NULL
13401340};
13411341
1342static CENTRONICS_CONFIG cent_config =
1342static const CENTRONICS_CONFIG cent_config =
13431343{
13441344   PRINTER_CENTRONICS,
13451345   pc_lpt_handshake_in
src/mess/drivers/glasgow.c
r1438r1439
7373
7474  static UINT8 read_board_flag;
7575
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";
7878
7979
8080  typedef struct {
r1438r1439
102102
103103static     BOARD_FIELD m_board[8][8];
104104
105static     BOARD_FIELD start_board[8][8] =
105static const BOARD_FIELD start_board[8][8] =
106106   {
107107      { { 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"} },
108108      { {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"} },
r1438r1439
187187  static void clear_layout(void);
188188  static void set_status_of_pieces(void);
189189
190  static char * get_non_set_pieces(const char *cur_piece);
190  static const char * get_non_set_pieces(const char *cur_piece);
191191
192192  static unsigned int out_of_board( float x0, float y0);
193193
r1438r1439
586586//  INT32 lg_x, lg_y;
587587//    UINT8 p_key;
588588
589    char *piece;
589    const char *piece;
590590
591591   float save_x, save_y;
592592
r1438r1439
12841284   }
12851285
12861286
1287static char *get_non_set_pieces(const char *cur_piece)
1287static const char *get_non_set_pieces(const char *cur_piece)
12881288{
12891289   UINT8 i=0;
12901290
r1438r1439
12981298       if (!all_pieces[start_i].set && ( all_pieces[start_i].piece[0] != cur_piece[0] ||
12991299                                        all_pieces[start_i].piece[1] != cur_piece[1]) )
13001300           {
1301         return ((char *)&all_pieces[start_i].piece[0]);
1301         return ((const char *)&all_pieces[start_i].piece[0]);
13021302         }
13031303
13041304      i=i+1;
src/mess/drivers/msx.c
r1438r1439
702702INPUT_PORTS_END
703703
704704
705static struct AY8910interface ay8910_interface =
705static const struct AY8910interface ay8910_interface =
706706{
707707   msx_psg_port_a_r,
708708   msx_psg_port_b_r,
src/mess/drivers/gamecom.c
r1438r1439
3636static GFXDECODE_START( gamecom_gfxdecodeinfo )
3737GFXDECODE_END
3838
39static SM8500_CONFIG gamecom_cpu_config = {
39static const SM8500_CONFIG gamecom_cpu_config = {
4040   gamecom_handle_dma,
4141   gamecom_update_timers
4242};
r1438r1439
7070
7171#define GAMECOM_PALETTE_LENGTH   5   
7272
73static unsigned char palette[] =
73static const unsigned char palette[] =
7474{
7575   0xDF, 0xFF, 0x8F,   /* White */
7676   0x8F, 0xCF, 0x8F,   /* Gray 3 */
src/mess/drivers/tmc600.c
r1438r1439
301301{
302302}
303303
304static CDP1802_CONFIG tmc600_cdp1802_config =
304static const CDP1802_CONFIG tmc600_cdp1802_config =
305305{
306306   tmc600_mode_r,
307307   tmc600_ef_r,
src/mess/drivers/vectrex.c
r1438r1439
8484
8585
8686
87static struct AY8910interface ay8910_interface =
87static const struct AY8910interface ay8910_interface =
8888{
8989   input_port_0_r,
9090   0,
src/mess/drivers/tm990189.c
r1438r1439
6767{
6868   tm990_189_palette_size = 3
6969};
70static unsigned char tm990_189_palette[tm990_189_palette_size*3] =
70static const unsigned char tm990_189_palette[tm990_189_palette_size*3] =
7171{
7272   0x00,0x00,0x00,   /* black */
7373   0xFF,0x00,0x00   /* red for LEDs */
src/mess/drivers/arcadia.c
r1438r1439
322322   RGB_BLACK               /* black */
323323};
324324
325static unsigned short arcadia_colortable[2][2] = {
325static const unsigned short arcadia_colortable[2][2] = {
326326   { 0, 1 },
327327   { 1, 0 }
328328};
src/mess/drivers/thomson.c
r1438r1439
264264
265265/* ------------ serial ------------ */
266266
267static const char* thom_serial_names[3][3]=
267static const char *const thom_serial_names[3][3]=
268268{
269269   { "cc90232", "c232", "RS232 (older, CC 90-232)" },
270270   { "rf57932", "r232", "RS232 (newer, RF 57-932)" },
src/mess/drivers/lynx.c
r1438r1439
202202   }
203203}
204204
205static struct CustomSound_interface lynx_sound_interface =
205static const struct CustomSound_interface lynx_sound_interface =
206206{
207207   lynx_custom_start
208208};
209209
210static struct CustomSound_interface lynx2_sound_interface =
210static const struct CustomSound_interface lynx2_sound_interface =
211211{
212212   lynx2_custom_start
213213};
src/mess/drivers/aquarius.c
r1438r1439
9090   MAKE_RGB(0x7f, 0x7f, 0x7f)   /* Dark Gray */
9191};
9292
93static unsigned short aquarius_colortable[] =
93static const unsigned short aquarius_colortable[] =
9494{
9595    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,
9696    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,
src/mess/drivers/cgenie.c
r1438r1439
243243   PORT_BIT(0x80, 0x00, IPT_UNKNOWN) PORT_NAME("Joy 2 [*]") PORT_CODE(JOYCODE_BUTTON1)
244244INPUT_PORTS_END
245245
246static gfx_layout cgenie_charlayout =
246static const gfx_layout cgenie_charlayout =
247247{
248248   8,8,         /* 8*8 characters */
249249   384,         /* 256 fixed + 128 defineable characters */
r1438r1439
270270   GFXDECODE_ENTRY( REGION_GFX2, 0, cgenie_gfxlayout, 3*16*2, 3*4 )
271271GFXDECODE_END
272272
273static unsigned char cgenie_palette[] = {
273static const unsigned char cgenie_palette[] = {
274274    0*4,  0*4,  0*4,  /* background   */
275275
276276/* this is the 'RGB monitor' version, strong and clean */
r1438r1439
329329
330330};
331331
332static unsigned short cgenie_colortable[] =
332static const unsigned short cgenie_colortable[] =
333333{
334334   0, 1, 0, 2, 0, 3, 0, 4, /* RGB monitor set of text colors */
335335   0, 5, 0, 6, 0, 7, 0, 8,
r1438r1439
359359}
360360
361361
362static struct AY8910interface ay8910_interface =
362static const struct AY8910interface ay8910_interface =
363363{
364364   cgenie_psg_port_a_r,
365365   cgenie_psg_port_b_r,
src/mess/drivers/pmd85.c
r1438r1439
627627   ROM_LOAD("matoh.bin", 0x10000, 0x4000, CRC(ca25880d) SHA1(38ce0b6a26d48a09fdf96863c3eaf3705aca2590))
628628ROM_END
629629
630static struct CassetteOptions pmd85_cassette_options = {
630static const struct CassetteOptions pmd85_cassette_options = {
631631   1,      /* channels */
632632   16,      /* bits per sample */
633633   7200      /* sample frequency */
src/mess/drivers/abc80.c
r1438r1439
373373
374374/* Sound Interface */
375375
376static struct SN76477interface sn76477_interface =
376static const struct SN76477interface sn76477_interface =
377377{
378378   RES_K(47),      //  4  noise_res      R26 47k
379379   RES_K(330),      //  5  filter_res      R24 330k
r1438r1439
426426   7  R   Cassette Data
427427*/
428428
429static struct z80_irq_daisy_chain abc80_daisy_chain[] =
429static const struct z80_irq_daisy_chain abc80_daisy_chain[] =
430430{
431431   { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti, 0 },
432432   { 0, 0, 0, 0, -1 }
src/mess/drivers/apexc.c
r1438r1439
436436   MAKE_RGB(50, 0, 0)
437437};
438438
439static unsigned short apexc_colortable[] =
439static const unsigned short apexc_colortable[] =
440440{
441441   0, 1
442442};
src/mess/drivers/x68k.c
r1438r1439
15101510   AM_RANGE(0xf00000, 0xffffff) AM_ROM
15111511ADDRESS_MAP_END
15121512
1513static mfp68901_interface mfp_interface =
1513static const mfp68901_interface mfp_interface =
15141514{
15151515   2000000, // 4MHz clock
15161516   4000000,
r1438r1439
15241524   NULL
15251525};
15261526
1527static ppi8255_interface ppi_interface =
1527static const ppi8255_interface ppi_interface =
15281528{
15291529   1,  // 1 PPI
15301530   { ppi_port_a_r },
r1438r1439
15351535   { ppi_port_c_w }
15361536};
15371537
1538static struct hd63450_interface dmac_interface =
1538static const struct hd63450_interface dmac_interface =
15391539{
15401540   0,  // CPU - 68000
15411541   {TIME_IN_USEC(32),TIME_IN_USEC(32),TIME_IN_USEC(4),TIME_IN_USEC(32)},  // Cycle steal mode timing (guesstimate)
r1438r1439
15481548//   { 0, 0, 0, 0 }
15491549};
15501550
1551static nec765_interface fdc_interface =
1551static const nec765_interface fdc_interface =
15521552{
15531553   fdc_irq,
15541554   fdc_drq
15551555};
15561556
1557static struct YM2151interface ym2151_interface =
1557static const struct YM2151interface ym2151_interface =
15581558{
15591559   x68k_fm_irq,
15601560   x68k_ct_w  // CT1, CT2 from YM2151 port 0x1b
15611561};
15621562
1563static struct scc8530_interface scc_interface =
1563static const struct scc8530_interface scc_interface =
15641564{
15651565   NULL//x68k_scc_ack
15661566};
15671567
1568static struct rp5c15_interface rtc_intf =
1568static const struct rp5c15_interface rtc_intf =
15691569{
15701570   x68k_rtc_alarm_irq
15711571};
src/mess/drivers/spectrum.c
r1438r1439
162162extern void spectrum_plus3_update_memory(void);
163163
164164
165static struct AY8910interface spectrum_ay_interface =
165static const struct AY8910interface spectrum_ay_interface =
166166{
167167   NULL
168168};
r1438r1439
550550int spectrum_plus3_port_1ffd_data = -1;
551551
552552
553static nec765_interface spectrum_plus3_nec765_interface =
553static const nec765_interface spectrum_plus3_nec765_interface =
554554{
555555      NULL,
556556      NULL
557557};
558558
559559
560static int spectrum_plus3_memory_selections[]=
560static const int spectrum_plus3_memory_selections[]=
561561{
562562      0,1,2,3,
563563      4,5,6,7,
r1438r1439
646646   {
647647         /* Extended memory paging */
648648
649         int *memory_selection;
649         const int *memory_selection;
650650         int MemorySelection;
651651         unsigned char *ram_data;
652652
r1438r1439
19141914
19151915INPUT_PORTS_END
19161916
1917static unsigned char spectrum_palette[16*3] = {
1917static const unsigned char spectrum_palette[16*3] = {
19181918   0x00, 0x00, 0x00, 0x00, 0x00, 0xbf,
19191919   0xbf, 0x00, 0x00, 0xbf, 0x00, 0xbf,
19201920   0x00, 0xbf, 0x00, 0x00, 0xbf, 0xbf,
r1438r1439
19261926   0xff, 0xff, 0x00, 0xff, 0xff, 0xff,
19271927};
19281928
1929static unsigned short spectrum_colortable[128*2] = {
1929static const unsigned short spectrum_colortable[128*2] = {
19301930   0,0, 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7,
19311931   1,0, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7,
19321932   2,0, 2,1, 2,2, 2,3, 2,4, 2,5, 2,6, 2,7,
src/mess/drivers/mpf1.c
r1438r1439
374374   logerror("pio irq state: %02x\n",state);
375375}
376376
377static z80pio_interface pio_intf =
377static const z80pio_interface pio_intf =
378378{
379379   mpf1_pio_interrupt,
380380   NULL,
r1438r1439
503503
504504
505505
506static ppi8255_interface ppi8255_intf =
506static const ppi8255_interface ppi8255_intf =
507507{
508508   1,                /* 1 chip */
509509   { mpf1_porta_r },   /* Port A read */
src/mess/drivers/kaypro.c
r1438r1439
195195   GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 4 )
196196GFXDECODE_END
197197
198static unsigned char kaypro_palette[] =
198static const unsigned char kaypro_palette[] =
199199{
200200      0,  0,  0,    /* black */
201201      0,240,  0,    /* green */
r1438r1439
209209    240,240,240,
210210};
211211
212static unsigned short kaypro_colortable[] =
212static const unsigned short kaypro_colortable[] =
213213{
214214    0,  1,      /* green on black */
215215    0,  2,      /* dim green on black */
src/mess/drivers/super80.c
r1438r1439
3232static int vidpg;
3333static int charset;
3434
35static z80pio_interface z80pio_intf =
35static const z80pio_interface z80pio_intf =
3636{
3737   pio_interrupt
3838   NULL,
r1438r1439
302302   memcpy(colortable, & bw_colortable, sizeof(bw_colortable));
303303}
304304
305static struct z80_irq_daisy_chain super80_daisy_chain[] =
305static const struct z80_irq_daisy_chain super80_daisy_chain[] =
306306{
307307   {z80pio_reset, z80pio_interrupt, z80pio_reti, 0},
308308   {0,0,0,-1}
src/mess/drivers/n64.c
r1438r1439
6262INPUT_PORTS_END
6363
6464/* ?? */
65static struct mips3_config config =
65static const struct mips3_config config =
6666{
6767   16384,            /* code cache size */
6868   8192,            /* data cache size */
src/mess/drivers/atarist.c
r1438r1439
13191319   centronics_write_data(0, data);
13201320}
13211321
1322static struct AY8910interface ym2149_interface =
1322static const struct AY8910interface ym2149_interface =
13231323{
13241324   0,
13251325   0,
r1438r1439
13371337   acia_irq = state;
13381338}
13391339
1340static struct acia6850_interface acia_ikbd_intf =
1340static const struct acia6850_interface acia_ikbd_intf =
13411341{
13421342   Y2/64,
13431343   Y2/64,
r1438r1439
13491349   acia_interrupt
13501350};
13511351
1352static struct acia6850_interface acia_midi_intf =
1352static const struct acia6850_interface acia_midi_intf =
13531353{
13541354   Y2/64,
13551355   Y2/64,
r1438r1439
14201420   NULL
14211421};
14221422
1423static CENTRONICS_CONFIG atarist_centronics_config[1] =
1423static const CENTRONICS_CONFIG atarist_centronics_config[1] =
14241424{
14251425   {
14261426      PRINTER_IBM,
r1438r1439
15101510   cpunum_set_irq_callback(0, atarist_int_ack);
15111511}
15121512
1513static struct rp5c15_interface rtc_intf =
1513static const struct rp5c15_interface rtc_intf =
15141514{
15151515   NULL
15161516};
r1438r1439
16571657   // 0x80 = FDD_DENSE_SEL
16581658}
16591659
1660static struct AY8910interface stbook_ym2149_interface =
1660static const struct AY8910interface stbook_ym2149_interface =
16611661{
16621662   0,
16631663   0,
r1438r1439
16671667
16681668static UINT8 krxd, ktxd;
16691669
1670static struct acia6850_interface stbook_acia_ikbd_intf =
1670static const struct acia6850_interface stbook_acia_ikbd_intf =
16711671{
16721672   U517/2/16, // 500kHz
16731673   U517/2/2, // 1MHZ
src/mess/drivers/geneve.c
r1438r1439
436436
437437
438438
439static struct TMS5220interface tms5220interface =
439static const struct TMS5220interface tms5220interface =
440440{
441441   NULL,                  /* no IRQ callback */
442442#if 1
src/mess/drivers/sg1000.c
r1438r1439
393393   keylatch = data & 0x07;
394394}
395395
396static ppi8255_interface sc3000_ppi8255_intf =
396static const ppi8255_interface sc3000_ppi8255_intf =
397397{
398398   1,                   // 1 chip
399399   { sc3000_ppi8255_a_r },   // Port A read
r1438r1439
489489   centronics_write_handshake(1, (data & 0x80) ? 0 : CENTRONICS_STROBE, CENTRONICS_STROBE);
490490}
491491
492static ppi8255_interface sf7000_ppi8255_intf =
492static const ppi8255_interface sf7000_ppi8255_intf =
493493{
494494   2,                                  // 2 chips
495495   { sc3000_ppi8255_a_r, sf7000_ppi8255_a_r },   // Port A read
r1438r1439
511511   sf7000_fdc_index = state;
512512}
513513
514static struct nec765_interface sf7000_nec765_interface =
514static const struct nec765_interface sf7000_nec765_interface =
515515{
516516   sf7000_fdc_interrupt,
517517   NULL
518518};
519519
520static struct msm8251_interface sf7000_uart_interface =
520static const struct msm8251_interface sf7000_uart_interface =
521521{
522522   NULL,
523523   NULL,
524524   NULL
525525};
526526
527static CENTRONICS_CONFIG sf7000_centronics_config[1] = {
527static const CENTRONICS_CONFIG sf7000_centronics_config[1] = {
528528   {
529529      PRINTER_IBM,
530530      NULL
src/mess/drivers/tx0.c
r1438r1439
308308}
309309
310310
311static tx0_reset_param_t tx0_reset_param =
311static const tx0_reset_param_t tx0_reset_param =
312312{
313313   {
314314      tx0_io_cpy,
src/mess/drivers/ip22.c
r1438r1439
14231423   }
14241424}
14251425
1426static SCSIConfigTable dev_table =
1426static const SCSIConfigTable dev_table =
14271427{
14281428        1,                                      /* 1 SCSI device */
14291429        { { SCSI_ID_4, 0, SCSI_DEVICE_CDROM },  /* SCSI ID 4, using CD 0, and it's a CD-ROM */
14301430     { SCSI_ID_2, 0, SCSI_DEVICE_CDROM } } /* SCSI ID 2, using HD 0, and it's a CD-ROM */
14311431};
14321432
1433static struct WD33C93interface scsi_intf =
1433static const struct WD33C93interface scsi_intf =
14341434{
14351435   &dev_table,      /* SCSI device table */
14361436   &scsi_irq,      /* command completion IRQ */
r1438r1439
15381538   }
15391539}
15401540
1541static struct mips3_config config =
1541static const struct mips3_config config =
15421542{
15431543   32768,   /* code cache size */
15441544   32768   /* data cache size */
src/mess/drivers/c128.c
r1438r1439
11611161   ROM_REGION (0x100, REGION_GFX2, 0)
11621162ROM_END
11631163
1164static SID6581_interface c128_sound_interface =
1164static const SID6581_interface c128_sound_interface =
11651165{
11661166   c64_paddle_read
11671167};
src/mess/drivers/exidy.c
r1438r1439
243243   }
244244}
245245
246static CENTRONICS_CONFIG exidy_cent_config[1]={
246static const CENTRONICS_CONFIG exidy_cent_config[1]={
247247   {
248248      PRINTER_CENTRONICS,
249249      exidy_printer_handshake_in
src/mess/drivers/pc8801.c
r1438r1439
492492
493493static  READ8_HANDLER(opn_dummy_input){return 0xff;}
494494
495static struct YM2203interface ym2203_interface =
495static const struct YM2203interface ym2203_interface =
496496{
497497   opn_dummy_input,
498498   opn_dummy_input,
src/mess/drivers/p2000t.c
r1438r1439
8484   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, p2000m_charlayout, 0, 128 )
8585GFXDECODE_END
8686
87static unsigned char p2000m_palette[2 * 3] =
87static const unsigned char p2000m_palette[2 * 3] =
8888{
8989   0x00, 0x00, 0x00,
9090   0xff, 0xff, 0xff
9191};
9292
93static unsigned short p2000m_colortable[2 * 2] =
93static const unsigned short p2000m_colortable[2 * 2] =
9494{
9595   1,0, 0,1
9696};
src/mess/drivers/pet.c
r1438r1439
471471   PORT_DIPSETTING(  1, DEF_STR( Yes ) )
472472INPUT_PORTS_END
473473
474static unsigned char pet_palette[] =
474static const unsigned char pet_palette[] =
475475{
476476   0,0,0, /* black */
477477   0,0x80,0, /* green */
478478};
479479
480static unsigned short pet_colortable[][2] = {
480static const unsigned short pet_colortable[][2] = {
481481   { 0, 1 },
482482   /* reverse */
483483   { 1, 0 }
src/mess/drivers/a2600.c
r1438r1439
13911391   }
13921392}
13931393
1394static struct tia_interface tia_interface =
1394static const struct tia_interface tia_interface =
13951395{
13961396   a2600_read_input_port,
13971397   a2600_get_databus_contents,
13981398   a2600_tia_vsync_callback
13991399};
14001400
1401static struct tia_interface tia_interface_pal =
1401static const struct tia_interface tia_interface_pal =
14021402{
14031403   a2600_read_input_port,
14041404   a2600_get_databus_contents,
src/mess/drivers/studio2.c
r1438r1439
201201   beep_set_state(0, level);
202202}
203203
204static CDP1802_CONFIG studio2_config =
204static const CDP1802_CONFIG studio2_config =
205205{
206206   studio2_mode_r,
207207   studio2_ef_r,
r1438r1439
223223   return ef;
224224}
225225
226static CDP1802_CONFIG mpt02_config =
226static const CDP1802_CONFIG mpt02_config =
227227{
228228   studio2_mode_r,
229229   mpt02_ef_r,
src/mess/drivers/pcw.c
r1438r1439
134134
135135/* PCW uses NEC765 in NON-DMA mode. FDC Ints are connected to /INT or
136136/NMI depending on choice (see system control below) */
137static nec765_interface pcw_nec765_interface =
137static const nec765_interface pcw_nec765_interface =
138138{
139139   pcw_fdc_interrupt,
140140   NULL
src/mess/drivers/mk2.c
r1438r1439
212212   cpunum_set_input_line(0, M6502_IRQ_LINE, level);
213213}
214214
215static RRIOT_CONFIG riot={
215static const RRIOT_CONFIG riot={
216216   1000000,
217217   { mk2_read_a, mk2_write_a },
218218   { mk2_read_b, mk2_write_b },
src/mess/drivers/oric.c
r1438r1439
412412   PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("JOYSTICK 1 FIRE 1") PORT_CODE(JOYCODE_Y_UP_SWITCH)
413413INPUT_PORTS_END
414414
415static unsigned char oric_palette[8*3] =
415static const unsigned char oric_palette[8*3] =
416416{
417417   0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
418418   0x00, 0xff, 0x00, 0xff, 0xff, 0x00,
r1438r1439
434434
435435
436436
437static struct AY8910interface oric_ay_interface =
437static const struct AY8910interface oric_ay_interface =
438438{
439439   0,
440440   0,
src/mess/drivers/enterp.c
r1438r1439
166166/* enterprise interface to dave - ok, so Dave chip is unique
167167to Enterprise. But these functions make it nice and easy to see
168168whats going on. */
169static DAVE_INTERFACE   enterprise_dave_interface=
169static const DAVE_INTERFACE enterprise_dave_interface =
170170{
171171   enterprise_dave_reg_read,
172172      enterprise_dave_reg_write,
r1438r1439
525525
526526INPUT_PORTS_END
527527
528static struct CustomSound_interface dave_custom_sound =
528static const struct CustomSound_interface dave_custom_sound =
529529{
530530   Dave_sh_start
531531};
src/mess/drivers/at.c
r1438r1439
391391   PORT_INCLUDE( pc_joystick )         /* IN15 - IN19 */
392392INPUT_PORTS_END
393393
394static unsigned i286_address_mask = 0x00ffffff;
394static const unsigned i286_address_mask = 0x00ffffff;
395395
396396
397397#if defined(ADLIB)
398398/* irq line not connected to pc on adlib cards (and compatibles) */
399399static void irqhandler(int linestate) {}
400400
401static struct YM3812interface ym3812_interface =
401static const struct YM3812interface ym3812_interface =
402402{
403403   irqhandler
404404};
src/mess/drivers/snes.c
r1438r1439
156156#endif
157157INPUT_PORTS_END
158158
159static struct CustomSound_interface snes_sound_interface =
159static const struct CustomSound_interface snes_sound_interface =
160160{ snes_sh_start, 0, 0 };
161161
162162static GFXDECODE_START( gfxdecodeinfo )
src/mess/drivers/saturn.c
r1438r1439
22432243   GFXDECODE_ENTRY( REGION_GFX2, 0, tiles16x16x8_layout, 0x00, 0x20 )
22442244GFXDECODE_END
22452245
2246static struct sh2_config sh2_conf_master = { 0 };
2247static struct sh2_config sh2_conf_slave  = { 1 };
2246static const struct sh2_config sh2_conf_master = { 0 };
2247static const struct sh2_config sh2_conf_slave  = { 1 };
22482248
22492249static void scsp_irq(int irq)
22502250{
r1438r1439
22692269   }
22702270}
22712271
2272static struct SCSPinterface scsp_interface =
2272static const struct SCSPinterface scsp_interface =
22732273{
22742274   REGION_CPU3,
22752275   0,
src/mess/drivers/ti990_10.c
r1438r1439
179179
180180ADDRESS_MAP_END
181181
182static ti990_10reset_param reset_params =
182static const ti990_10reset_param reset_params =
183183{
184184   /*idle_callback*/NULL,
185185   rset_callback,
src/mess/drivers/amiga.c
r1438r1439
179179  Machine drivers
180180***************************************************************************/
181181
182static struct CustomSound_interface amiga_custom_interface =
182static const struct CustomSound_interface amiga_custom_interface =
183183{
184184   amiga_sh_start
185185};
src/mess/drivers/channelf.c
r1438r1439
231231
232232INPUT_PORTS_END
233233
234static struct CustomSound_interface channelf_sound_interface =
234static const struct CustomSound_interface channelf_sound_interface =
235235{
236236   channelf_sh_custom_start
237237};
src/mess/drivers/apple1.c
r1438r1439
140140   RGB_WHITE
141141};
142142
143static unsigned short apple1_colortable[] =
143static const unsigned short apple1_colortable[] =
144144{
145145   0, 1
146146};
src/mess/drivers/abc80x.c
r1438r1439
590590   return -1;
591591}
592592
593static z80dart_interface abc800_dart_intf =
593static const z80dart_interface abc800_dart_intf =
594594{
595595   ABC800_X01/2/2,         /* clock */
596596   0,                  /* interrupt handler */
r1438r1439
617617   }
618618}
619619
620static z80dart_interface abc802_dart_intf =
620static const z80dart_interface abc802_dart_intf =
621621{
622622   ABC800_X01/2/2,         /* clock */
623623   0,                  /* interrupt handler */
r1438r1439
628628   dart_serial_receive      /* receive handler */
629629};
630630
631static struct z80_irq_daisy_chain abc800_daisy_chain[] =
631static const struct z80_irq_daisy_chain abc800_daisy_chain[] =
632632{
633633   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 },
634634   { z80sio_reset, z80sio_irq_state, z80sio_irq_ack, z80sio_irq_reti, 0 },
src/mess/drivers/tmc2000e.c
r1438r1439
138138   // floppy control (FDC-6)
139139}
140140
141static CDP1802_CONFIG tmc2000e_config =
141static const CDP1802_CONFIG tmc2000e_config =
142142{
143143   tmc2000e_mode_r,
144144   tmc2000e_ef_r,
src/mess/drivers/tmc1800.c
r1438r1439
203203{
204204}
205205
206static CDP1802_CONFIG tmc1800_config =
206static const CDP1802_CONFIG tmc1800_config =
207207{
208208   tmc1800_mode_r,
209209   tmc1800_ef_r,
r1438r1439
241241   set_led_status(1, level);
242242}
243243
244static CDP1802_CONFIG tmc2000_config =
244static const CDP1802_CONFIG tmc2000_config =
245245{
246246   tmc1800_mode_r,
247247   tmc2000_ef_r,
src/mess/drivers/bebox.c
r1438r1439
7171ADDRESS_MAP_END
7272
7373
74static ppc_config bebox_ppc_config =
74static const ppc_config bebox_ppc_config =
7575{
7676   PPC_MODEL_603,   /* 603 "Wart"               */
7777   0x10,      /* Multiplier 1.0, Bus = 66MHz, Core = 66MHz   */
7878   BUS_FREQUENCY_66MHZ
7979};
8080
81static ppc_config bebox2_ppc_config =
81static const ppc_config bebox2_ppc_config =
8282{
8383   PPC_MODEL_603E,   /* 603E "Stretch", version 1.3         */
8484   0x19,      /* Multiplier 2.0, Bus = 66MHz, Core = 133MHz   */
src/mess/drivers/a7800.c
r1438r1439
221221   NTSC_YELLOW_GREEN
222222};
223223
224static unsigned short a7800_colortable[] =
224static const unsigned short a7800_colortable[] =
225225{
226226    0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
227227    0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,
src/mess/drivers/nascom1.c
r1438r1439
109109   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, nascom2_charlayout, 0, 1 )
110110GFXDECODE_END
111111
112static   unsigned   char   nascom1_palette[] =
112static const unsigned char nascom1_palette[] =
113113{
114114   0x00, 0x00, 0x00,   /* Black */
115115   0xff, 0xff, 0xff   /* White */
116116};
117117
118static   unsigned   short   nascom1_colortable[] =
118static const unsigned short nascom1_colortable[] =
119119{
120120   0, 1
121121};
src/mess/drivers/mtx.c
r1438r1439
209209      z80ctc_0_w(offset,data);
210210}
211211
212static z80ctc_interface   mtx_ctc_intf =
212static z80ctc_interface mtx_ctc_intf =
213213{
214214   MTX_SYSTEM_CLOCK,
215215   0,
r1438r1439
737737INPUT_PORTS_END
738738
739739
740static struct z80_irq_daisy_chain mtx_daisy_chain[] =
740static const struct z80_irq_daisy_chain mtx_daisy_chain[] =
741741{
742742   {z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0},
743743   {0,0,0,0,-1}
src/mess/drivers/microtan.c
r1438r1439
191191   GFXDECODE_ENTRY( REGION_GFX2, 0, chunky_layout, 0, 1 )
192192GFXDECODE_END
193193
194static struct AY8910interface ay8910_interface =
194static const struct AY8910interface ay8910_interface =
195195{
196196   0,
197197   0,
src/mess/drivers/einstein.c
r1438r1439
447447   centronics_write_handshake(0, handshake, CENTRONICS_STROBE);
448448}
449449
450static z80pio_interface einstein_pio_intf =
450static const z80pio_interface einstein_pio_intf =
451451{
452452   einstein_pio_interrupt,
453453   einstein_pio_ardy,
r1438r1439
522522}
523523#endif
524524
525static struct z80_irq_daisy_chain einstein_daisy_chain[] =
525static const struct z80_irq_daisy_chain einstein_daisy_chain[] =
526526{
527527   {einstein_keyboard_int_reset, einstein_keyboard_interrupt, 0, einstein_keyboard_reti, 0},
528528    {z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0},
r1438r1439
13481348
13491349
13501350
1351static struct msm8251_interface einstein_msm8251_intf=
1351static const struct msm8251_interface einstein_msm8251_intf=
13521352{
13531353   NULL,
13541354   NULL,
r1438r1439
13721372   }
13731373}
13741374
1375static CENTRONICS_CONFIG einstein_cent_config[1]={
1375static const CENTRONICS_CONFIG einstein_cent_config[1]={
13761376   {
13771377      PRINTER_CENTRONICS,
13781378      einstein_printer_handshake_in
r1438r1439
16021602   return einstein_keyboard_data;   
16031603}
16041604
1605static struct AY8910interface einstein_ay_interface =
1605static const struct AY8910interface einstein_ay_interface =
16061606{
16071607   NULL,
16081608   einstein_port_b_read,
src/mess/drivers/ti99_2.c
r1438r1439
127127   the CPU can get more bus time.
128128*/
129129
130static unsigned char ti99_2_palette[] =
130static const unsigned char ti99_2_palette[] =
131131{
132132   255, 255, 255,
133133   0, 0, 0
134134};
135135
136static unsigned short ti99_2_colortable[] =
136static const unsigned short ti99_2_colortable[] =
137137{
138138   0, 1
139139};
r1438r1439
373373INPUT_PORTS_END
374374
375375
376static struct tms9995reset_param ti99_2_processor_config =
376static const struct tms9995reset_param ti99_2_processor_config =
377377{
378378#if 0
379379   REGION_CPU1,/* region for processor RAM */
src/mess/drivers/intv.c
r1438r1439
3535#endif
3636#endif
3737
38static unsigned char intv_palette[] =
38static const unsigned char intv_palette[] =
3939{
4040   0x00, 0x00, 0x00, /* BLACK */
4141   0x00, 0x2D, 0xFF, /* BLUE */
r1438r1439
8282   }
8383}
8484
85static struct AY8910interface ay8910_interface =
85static const struct AY8910interface ay8910_interface =
8686{
8787   intv_right_control_r,
8888   intv_left_control_r,
r1438r1439
9292
9393/* graphics output */
9494
95static gfx_layout intv_gromlayout =
95static const gfx_layout intv_gromlayout =
9696{
9797   16, 16,
9898   256,
r1438r1439
104104   8 * 16
105105};
106106
107static gfx_layout intv_gramlayout =
107static const gfx_layout intv_gramlayout =
108108{
109109   16, 16,
110110   64,
r1438r1439
116116   8 * 8
117117};
118118
119static gfx_layout intvkbd_charlayout =
119static const gfx_layout intvkbd_charlayout =
120120{
121121   8, 8,
122122   256,
src/mess/drivers/jupiter.c
r1438r1439
8181   GFXDECODE_ENTRY( REGION_CPU1, 0x2c00, jupiter_charlayout, 0, 2 )
8282GFXDECODE_END
8383
84static unsigned char jupiter_palette[] =
84static const unsigned char jupiter_palette[] =
8585{
8686   0x00, 0x00, 0x00,   /* Black */
8787   0xff, 0xff, 0xff   /* White */
8888};
8989
90static unsigned short jupiter_colortable[] =
90static const unsigned short jupiter_colortable[] =
9191{
9292   0, 1,
9393   1, 0
src/mess/drivers/ssystem3.c
r1438r1439
4141
4242 */
4343
44static struct via6522_interface config=
44static const struct via6522_interface config=
4545{
4646   0,//read8_handler in_a_func;
4747   0,//read8_handler in_b_func;
src/mess/drivers/vtech1.c
r1438r1439
275275 Audio Initialisation
276276******************************************************************************/
277277
278static INT16 speaker_levels[] = {-32768, 0, 32767, 0};
278static const INT16 speaker_levels[] = {-32768, 0, 32767, 0};
279279
280static struct Speaker_interface speaker_interface =
280static const struct Speaker_interface speaker_interface =
281281{
282282   4,
283283   speaker_levels
src/mess/drivers/amstrad.c
r1438r1439
9797// This is the sequence for unlocking the ASIC in the CPC+/GX4000
9898// These are outed to port &bc00, after syncing the lock by outing a non-zero value then a zero to &bc00
9999// To lock the ASIC again, repeat the sequence without the last &ee
100static unsigned char asic_unlock_seq[15] =
100static const unsigned char asic_unlock_seq[15] =
101101{
102102   0xff, 0x77, 0xb3, 0x51, 0xa8, 0xd4, 0x62, 0x39, 0x9c, 0x46, 0x2b, 0x15, 0x8a, 0xcd, 0xee
103103};
r1438r1439
154154static unsigned char *Amstrad_UpperRom;
155155/* There are 8 different ram configurations which work on the currently selected 64k logical block.
156156   The following tables show the possible ram configurations :*/
157static int RamConfigurations[8 * 4] =
157static const int RamConfigurations[8 * 4] =
158158{
159159   0, 1, 2, 3,                   /* config 0 */
160160   0, 1, 2, 7,                   /* config 1 */
r1438r1439
338338/* -----------------------------
339339   - amstrad_ppi8255_interface -
340340   -----------------------------*/
341static ppi8255_interface amstrad_ppi8255_interface =
341static const ppi8255_interface amstrad_ppi8255_interface =
342342{
343343   1,                       /* number of PPIs to emulate */
344344   {amstrad_ppi_porta_r},   /* port A read */
r1438r1439
350350};
351351
352352/* Amstrad NEC765 interface doesn't use interrupts or DMA! */
353static nec765_interface amstrad_nec765_interface =
353static const nec765_interface amstrad_nec765_interface =
354354{
355355   NULL,
356356   NULL
r1438r1439
16151615}
16161616
16171617/* the following timings have been measured! */
1618static UINT8 amstrad_cycle_table_op[256] = {
1618static const UINT8 amstrad_cycle_table_op[256] = {
16191619    4, 12,  8,  8,  4,  4,  8,  4,  4, 12,  8,  8,  4,  4,  8,  4,
16201620   12, 12,  8,  8,  4,  4,  8,  4, 12, 12,  8,  8,  4,  4,  8,  4,
16211621    8, 12, 20,  8,  4,  4,  8,  4,  8, 12, 20,  8,  4,  4,  8,  4,
r1438r1439
16341634    8, 12, 12,  4, 12, 16,  8, 16,  8,  8, 12,  4, 12,  4,  8, 16
16351635};
16361636
1637static UINT8 amstrad_cycle_table_cb[256]=
1637static const UINT8 amstrad_cycle_table_cb[256]=
16381638{
16391639    4,  4,  4,  4,  4,  4, 12,  4,  4,  4,  4,  4,  4,  4, 12,  4,
16401640    4,  4,  4,  4,  4,  4, 12,  4,  4,  4,  4,  4,  4,  4, 12,  4,
r1438r1439
16551655};
16561656
16571657
1658static UINT8 amstrad_cycle_table_ed[256]=
1658static const UINT8 amstrad_cycle_table_ed[256]=
16591659{
16601660    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,
16611661    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,
r1438r1439
16761676};
16771677
16781678
1679static UINT8 amstrad_cycle_table_xy[256]=
1679static const UINT8 amstrad_cycle_table_xy[256]=
16801680{
16811681    4, 12,  8,  8,  4,  4,  8,  4,  4, 12,  8,  8,  4,  4,  8,  4,
16821682   12, 12,  8,  8,  4,  4,  8,  4, 12, 12,  8,  8,  4,  4,  8,  4,
r1438r1439
16961696    8, 12, 12,  4, 12, 16,  8, 16,  8,  8, 12,  4, 12,  4,  8, 16
16971697};
16981698
1699static UINT8 amstrad_cycle_table_xycb[256]=
1699static const UINT8 amstrad_cycle_table_xycb[256]=
17001700{
17011701   20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
17021702   20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
r1438r1439
17161716   20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20
17171717};
17181718
1719static UINT8 amstrad_cycle_table_ex[256]=
1719static const UINT8 amstrad_cycle_table_ex[256]=
17201720{
17211721    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
17221722    4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
r1438r1439
18211821
18221822   /* Using the cool code Juergen has provided, I will override
18231823   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);
18301830
18311831   /* Juergen is a cool dude! */
18321832   cpunum_set_irq_callback(0, amstrad_cpu_acknowledge_int);
r1438r1439
23902390/* --------------------
23912391   - AY8910_interface -
23922392   --------------------*/
2393static struct AY8910interface ay8912_interface =
2393static const struct AY8910interface ay8912_interface =
23942394{
23952395   amstrad_psg_porta_read,   /* portA read */
23962396   amstrad_psg_porta_read,   /* portB read */
src/mess/drivers/a310.c
r1438r1439
331331   memory_set_opbase_handler(0, a310_setopbase);
332332}
333333
334static const char *ioc_regnames[] =
334static const char *const ioc_regnames[] =
335335{
336336   "(rw) Control",               // 0
337337   "(read) Keyboard receive (write) keyboard send",   // 1
src/mess/drivers/avigo.c
r1438r1439
282282}
283283
284284
285static struct tc8521_interface avigo_tc8521_interface =
285static const struct tc8521_interface avigo_tc8521_interface =
286286{
287287   avigo_tc8521_alarm_int
288288};
r1438r1439
371371
372372
373373
374static uart8250_interface avigo_com_interface[1]=
374static const uart8250_interface avigo_com_interface[1]=
375375{
376376   {
377377      TYPE16550,
src/mess/drivers/psx.c
r1438r1439
766766   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(2) PORT_NAME("P2 L2")
767767INPUT_PORTS_END
768768
769static struct PSXSPUinterface psxspu_interface =
769static const struct PSXSPUinterface psxspu_interface =
770770{
771771   &g_p_n_psxram,
772772   psx_irq_set,
src/mess/drivers/tutor.c
r1438r1439
547547INPUT_PORTS_END
548548
549549
550static struct tms9995reset_param tutor_processor_config =
550static const struct tms9995reset_param tutor_processor_config =
551551{
552552#if 0
553553   REGION_CPU1,/* region for processor RAM */
src/mess/drivers/trs80.c
r1438r1439
308308   GFXDECODE_ENTRY( REGION_GFX1, 0, trs80_charlayout_double_width, 0, 4 )
309309GFXDECODE_END
310310
311static unsigned char trs80_palette[] =
311static const unsigned char trs80_palette[] =
312312{
313313   0x00,0x00,0x00,
314314   0xff,0xff,0xff
315315};
316316
317static unsigned short trs80_colortable[] =
317static const unsigned short trs80_colortable[] =
318318{
319319   0,1    /* white on black */
320320};
r1438r1439
328328   memcpy(colortable,trs80_colortable,sizeof(trs80_colortable));
329329}
330330
331static INT16 speaker_levels[3] = {0.0*32767,0.46*32767,0.85*32767};
331static const INT16 speaker_levels[3] = {0.0*32767,0.46*32767,0.85*32767};
332332
333static struct Speaker_interface speaker_interface =
333static const struct Speaker_interface speaker_interface =
334334{
335335   3,            /* optional: number of different levels */
336336   speaker_levels   /* optional: level lookup table */
src/mess/drivers/apple2.c
r1438r1439
626626   memcpy(colortable, apple2_colortable, sizeof(apple2_colortable));
627627}
628628
629static struct AY8910interface ay8910_interface =
629static const struct AY8910interface ay8910_interface =
630630{
631631   NULL
632632};
src/mess/drivers/primo.c
r1438r1439
343343   ROM_CART_LOAD(0, "rom", 0x18000, 0x4000, ROM_FILL_FF | ROM_OPTIONAL)
344344ROM_END
345345
346static struct CassetteOptions primo_cassette_options = {
346static const struct CassetteOptions primo_cassette_options = {
347347   1,      /* channels */
348348   16,      /* bits per sample */
349349   22050      /* sample frequency */
src/mess/drivers/svision.c
r1438r1439
471471   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]);
472472}
473473
474static struct CustomSound_interface svision_sound_interface =
474static const struct CustomSound_interface svision_sound_interface =
475475{
476476   svision_custom_start
477477};
src/mess/drivers/c64.c
r1438r1439
698698    ROM_LOAD( "rom80.e0",    0x12000, 0x2000, CRC(e801dadc ))
699699#endif
700700
701static SID6581_interface c64_sound_interface =
701static const SID6581_interface c64_sound_interface =
702702{
703703   c64_paddle_read
704704};
src/mess/drivers/svi318.c
r1438r1439
307307
308308INPUT_PORTS_END
309309
310static struct AY8910interface ay8910_interface =
310static const struct AY8910interface ay8910_interface =
311311{
312312   svi318_psg_port_a_r,
313313   NULL,
src/mess/drivers/ti99_4p.c
r1438r1439
219219static GFXDECODE_START( gfxdecodeinfo )
220220GFXDECODE_END
221221
222static struct TMS5220interface tms5220interface =
222static const struct TMS5220interface tms5220interface =
223223{
224224   NULL,                  /* no IRQ callback */
225225#if 1
src/mess/drivers/pc.c
r1438r1439
11321132   PORT_INCLUDE( pc_joystick )         /* IN15 - IN19 */
11331133INPUT_PORTS_END
11341134
1135static unsigned i86_address_mask = 0x000fffff;
1135static const unsigned i86_address_mask = 0x000fffff;
11361136
11371137#if defined(ADLIB)
11381138/* irq line not connected to pc on adlib cards (and compatibles) */
11391139static void pc_irqhandler(int linestate) {}
11401140
1141static struct YM3812interface ym3812_interface =
1141static const struct YM3812interface ym3812_interface =
11421142{
11431143   pc_irqhandler
11441144};
src/mess/drivers/ti99_4x.c
r1438r1439
494494/*
495495   TMS0285 speech synthesizer
496496*/
497static struct TMS5220interface tms5220interface =
497static const struct TMS5220interface tms5220interface =
498498{
499499   NULL,                  /* no IRQ callback */
500500   spchroms_read,            /* speech ROM read handler */
src/mess/drivers/ip20.c
r1438r1439
5151   return 0;
5252}
5353
54static struct EEPROM_interface eeprom_interface_93C56 =
54static const struct EEPROM_interface eeprom_interface_93C56 =
5555{
5656   7,               // address bits   7
5757   16,               // data bits   16
r1438r1439
562562{
563563}
564564
565static SCSIConfigTable dev_table =
565static const SCSIConfigTable dev_table =
566566{
567567        1,                                      /* 1 SCSI device */
568568        { { SCSI_ID_6, 0, SCSI_DEVICE_CDROM } } /* SCSI ID 6, using CHD 0, and it's a CD-ROM */
569569};
570570
571static struct WD33C93interface scsi_intf =
571static const struct WD33C93interface scsi_intf =
572572{
573573   &dev_table,      /* SCSI device table */
574574   &scsi_irq,      /* command completion IRQ */
r1438r1439
597597   }
598598}
599599
600static struct mips3_config config =
600static const struct mips3_config config =
601601{
602602   32768,   /* code cache size */
603603   32768   /* data cache size */
src/mess/drivers/bbc.c
r1438r1439
713713}
714714
715715
716//static struct TMS5220interface tms5220_interface =
716//static const struct TMS5220interface tms5220_interface =
717717//{
718718//   680000L,
719719//   50,
src/mess/drivers/compis.c
r1438r1439
200200  PORT_DIPSETTING( 0x00, "Disabled" )
201201INPUT_PORTS_END
202202
203static unsigned i86_address_mask = 0x000fffff;
203static const unsigned i86_address_mask = 0x000fffff;
204204
205205static const compis_gdc_interface i82720_interface =
206206{
src/mess/drivers/kc.c
r1438r1439
2323
2424/* pio is last in chain and therefore has highest priority */
2525
26static struct z80_irq_daisy_chain kc85_daisy_chain[] =
26static const struct z80_irq_daisy_chain kc85_daisy_chain[] =
2727{
2828   {z80pio_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0},
2929   {z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0},
docs/messnew.txt
r1438r1439
6969- Added a general 74145 BCD-to-decimal decoder emulation, currently used
7070  by the SYM-1 driver.  [Dirk Best]
7171
72- Fixed M65C02 optimization  [Peter Trauner]
72- Fixed M65C02 optimization.  [Peter Trauner]
7373
74- Staticization and constification.  [Atari Ace]
7475
7576
77
76780.121
7779
7880New System Drivers Supported (in no particular order):

Previous 15994 Revisions Next


© 1998-2018 The MESS Team