Previous 15994 Revisions Next

r9733 Sunday 5th December, 2010 at 18:46:02 UTC by Nathan Woods
Static/const changes. [Atari Ace]
[src/mess/devices]bitbngr.c cassette.c
[src/mess/drivers]a2600.c arcadia.c bml3.c cat.c fm7.c fmtowns.c gp2x.c gp32.c multi8.c nc.c pasogo.c pc6001.c pcw16.c smc777.c socrates.c tk80bs.c vii.c x1.c
[src/mess/formats]spec_snqk.c
[src/mess/includes]x07.h
[src/mess/machine]mac.c mc80.c mekd2.c rp5c01a.c smc92x4.c trs80.c upd1990a.c vtech2.c
[src/mess/machine/ti99]genboard.c hfdc.c mapper8.c sgcpu.c tiboard.c
[src/mess/tools/imgtool/modules]amiga.c d64.c fmsx_cas.c psion.c svi_cas.c
[src/mess/video]fm7.c galaxy.c gba.c odyssey2.c ssystem3.c trs80.c

src/mess/devices/cassette.c
r9732r9733
343343   double position, length;
344344   cassette_state uistate;
345345   running_device *dev;
346   UINT8 shapes[8] = { 0x2d, 0x5c, 0x7c, 0x2f, 0x2d, 0x20, 0x20, 0x20 };
346   static const UINT8 shapes[8] = { 0x2d, 0x5c, 0x7c, 0x2f, 0x2d, 0x20, 0x20, 0x20 };
347347
348348   /* abort if we should not be showing the image */
349349   if (!image.exists())
src/mess/devices/bitbngr.c
r9732r9733
115115const char *bitbanger_mode_string(running_device *device)
116116{
117117   bitbanger_token *bi = get_token(device);
118   static const char *modes[] = {"Printer", "Modem"};
118   static const char *const modes[] = {"Printer", "Modem"};
119119
120   return(modes[bi->mode]);
120   return(modes[bi->mode]);
121121}
122122
123123
r9732r9733
163163const char *bitbanger_tune_string(running_device *device)
164164{
165165   bitbanger_token *bi = get_token(device);
166   static const char *tunes[] = {"-2.0%", "-1.75%", "-1.5%", "-1.25%", "-1.0%", "-0.75%", "-0.5", "-0.25%", "\xc2\xb1""0%",
166   static const char *const tunes[] = {"-2.0%", "-1.75%", "-1.5%", "-1.25%", "-1.0%", "-0.75%", "-0.5", "-0.25%", "\xc2\xb1""0%",
167167                                 "+0.25%",  "+0.5%", "+0.75%", "+1.0%", "+1.25%", "+1.5%", "+1.75%", "+2.0%"};
168168
169   return(tunes[bi->tune]);
169   return(tunes[bi->tune]);
170170}
171171
172172
r9732r9733
176176static float bitbanger_tune_value(running_device *device)
177177{
178178   bitbanger_token *bi = get_token(device);
179 float tunes[] = {0.97f, 0.9825f, 0.985f, 0.9875f, 0.99f, 0.9925f, 0.995f, 0.9975f, 1.0f,
179   static const float tunes[] = {0.97f, 0.9825f, 0.985f, 0.9875f, 0.99f, 0.9925f, 0.995f, 0.9975f, 1.0f,
180180                  1.0025f, 1.005f, 1.0075f, 1.01f, 1.0125f, 1.015f, 1.0175f, 1.02f};
181181
182   return(tunes[bi->tune]);
182   return(tunes[bi->tune]);
183183}
184184
185185
r9732r9733
190190static UINT32 bitbanger_baud_value(running_device *device)
191191{
192192   bitbanger_token *bi = get_token(device);
193 float bauds[] = { 150.0f, 300.0f, 600.0f, 1200.0f, 2400.0f, 4800.0f, 9600.0f,
193   static const float bauds[] = { 150.0f, 300.0f, 600.0f, 1200.0f, 2400.0f, 4800.0f, 9600.0f,
194194            14400.0f, 28800.0f, 38400.0f, 57600.0f, 115200.0f};
195   float result = bitbanger_tune_value(device) * bauds[bi->baud];
196   return (UINT32)result;
195   float result = bitbanger_tune_value(device) * bauds[bi->baud];
196   return (UINT32)result;
197197}
198198
199199
r9732r9733
204204const char *bitbanger_baud_string(running_device *device)
205205{
206206   bitbanger_token *bi = get_token(device);
207   static const char *bauds[] = { "150", "300", "600", "1200", "2400", "4800",
207   static const char *const bauds[] = { "150", "300", "600", "1200", "2400", "4800",
208208                     "9600", "14400", "28800", "38400", "57600", "115200"};
209209
210   return(bauds[bi->baud]);
210   return(bauds[bi->baud]);
211211}
212212
213213
r9732r9733
304304   static UINT8 bit_buffer[1000];
305305   UINT32 byte_buffer_size, bit_buffer_size;
306306   int i, j;
307   const UINT8 bitmask[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
307   static const UINT8 bitmask[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
308308
309309   bit_buffer_size = 0;
310310   byte_buffer_size = 100;
src/mess/tools/imgtool/modules/fmsx_cas.c
r9732r9733
6767   CAS_IMAGE *image;
6868   int len;
6969   char *pbase;
70   char default_name[] = "msxtape";
70   static const char default_name[] = "msxtape";
7171
7272   image = (CAS_IMAGE*)malloc (sizeof (CAS_IMAGE) );
7373   if (!image) return IMGTOOLERR_OUTOFMEMORY;
src/mess/tools/imgtool/modules/amiga.c
r9732r9733
301301/* Convert amiga time to standard time */
302302static time_t amiga_crack_time(amiga_date *date)
303303{
304   int month_days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
304   static const int month_days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
305305   int year = 1978, month = 1, year_days = 365; /* base date */
306306   int day = date->days;
307307   struct tm t;
src/mess/tools/imgtool/modules/d64.c
r9732r9733
11211121
11221122static int x64_image_create(const imgtool_module *mod, imgtool_stream *f, const ResolvedOption *options_)
11231123{
1124   struct {
1125      unsigned char data[0x40];
1126   } x64_header={
1124   static const unsigned char x64_header[40] =
11271125      { 0x43, 0x15, 0x41, 0x64,
11281126        0x01, 0x02, 0x01, 0x23,
11291127        0x01
1130      }
1131   };
1128      };
11321129   if (stream_write(f, &x64_header, sizeof(x64_header)) != sizeof(x64_header))
11331130      return  IMGTOOLERR_WRITEERROR;
11341131
src/mess/tools/imgtool/modules/svi_cas.c
r9732r9733
6868   CAS_IMAGE *image;
6969   int len, i;
7070   char *pbase;
71   char default_name[] = "svitape";
71   static const char default_name[] = "svitape";
7272
7373   image = (CAS_IMAGE*)malloc (sizeof (CAS_IMAGE) );
7474   if (!image) return IMGTOOLERR_OUTOFMEMORY;
src/mess/tools/imgtool/modules/psion.c
r9732r9733
360360{
361361   UINT8 data, *buffer = NULL;
362362   UINT16 size = 0;
363   char ob3_magic[3] = {'O', 'R', 'G'};
363   static const char ob3_magic[3] = {'O', 'R', 'G'};
364364
365365   stream_read(instream, &data, 1);
366366
r9732r9733
407407static imgtoolerr_t datapack_create( imgtool_image *image, imgtool_stream *stream, option_resolution *opts)
408408{
409409   psion_pack *pack = (psion_pack*)imgtool_image_extra_bytes(image);
410   UINT8 opk_magic[4] = {'O', 'P', 'K', 0x00};
411   UINT8 pack_head[8] = {0x40, 0x00, 0x59, 0x01, 0x01, 0x01, 0x00, 0x00};
410   static const UINT8 opk_magic[4] = {'O', 'P', 'K', 0x00};
411   static const UINT8 pack_head[8] = {0x40, 0x00, 0x59, 0x01, 0x01, 0x01, 0x00, 0x00};
412412   UINT16 checksum;
413413
414414   pack_head[0] |= (option_resolution_lookup_int(opts, 'R')) ? 0x00 : 0x02;
r9732r9733
548548{
549549   imgtool_image *image = imgtool_partition_image(partition);
550550   psion_pack *pack = (psion_pack*)imgtool_image_extra_bytes(image);
551   UINT8 data_head[4] = {0x02, 0x80, 0x00, 0x00};
551   static const UINT8 data_head[4] = {0x02, 0x80, 0x00, 0x00};
552552   UINT8 head[3];
553553   UINT16 size = 0;
554554   UINT8 type = option_resolution_lookup_int(opts, 'T');
src/mess/machine/mc80.c
r9732r9733
103103   // reg B
104104   //
105105   UINT16 addr = ((offset & 0xff00) >> 2) | ((offset & 0x08) << 2) | (data >> 3);
106   UINT8 val[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
106   static const UINT8 val[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
107107   int c = offset & 1;
108108   state->mc8030_video_mem[addr] = state->mc8030_video_mem[addr] | (val[data & 7]*c);
109109
src/mess/machine/ti99/genboard.c
r9732r9733
116116static void read_key_if_possible(genboard_state *board);
117117static UINT8 get_recent_key(running_device *device);
118118
119static const char *keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7" };
119static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7" };
120120
121121INLINE genboard_state *get_safe_token(running_device *device)
122122{
src/mess/machine/ti99/sgcpu.c
r9732r9733
421421/***************************************************************************
422422    Keyboard/tape control
423423****************************************************************************/
424static const char *keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3" };
424static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3" };
425425
426426/*
427427    Called by the 9901 core whenever the state of INTREQ and IC0-3 changes
src/mess/machine/ti99/hfdc.c
r9732r9733
671671static DEVICE_RESET( ti99_hfdc )
672672{
673673   ti99_hfdc_state *card = (ti99_hfdc_state*)downcast<legacy_device_base *>(device)->token();
674   const char *flopname[] = {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3};
675   const char *hardname[] = {MFMHD_0, MFMHD_1, MFMHD_2};
674   static const char *const flopname[] = {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3};
675   static const char *const hardname[] = {MFMHD_0, MFMHD_1, MFMHD_2};
676676
677677   /* If the card is selected in the menu, register the card */
678678   if (input_port_read(device->machine, "DISKCTRL") == DISK_HFDC)
src/mess/machine/ti99/mapper8.c
r9732r9733
559559   mapper->logindex = 0;
560560   mapper->physindex = 0;
561561
562   const char *list[6] = { SRAMNAME, ROM0NAME, ROM1NAME, ROM1ANAME, DRAMNAME, INTSNAME };
562   static const char *const list[6] = { SRAMNAME, ROM0NAME, ROM1NAME, ROM1ANAME, DRAMNAME, INTSNAME };
563563   while (!done)
564564   {
565565      void *dev = NULL;
src/mess/machine/ti99/tiboard.c
r9732r9733
3636
3737} tiboard_state;
3838
39static const char *keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3" };
40static const char *keynames8[] = {
39static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3" };
40static const char *const keynames8[] = {
4141      "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7",
4242      "KEY8", "KEY9", "KEY10", "KEY11", "KEY12", "KEY13", "KEY14", "KEY15"
4343   };
src/mess/machine/mekd2.c
r9732r9733
562562
563563DEVICE_IMAGE_LOAD( mekd2_cart )
564564{
565   const char magic[] = "MEK6800D2";
565   static const char magic[] = "MEK6800D2";
566566   char buff[9];
567567   UINT16 addr, size;
568568   UINT8 ident, *RAM = memory_region(image.device().machine, "maincpu");
src/mess/machine/rp5c01a.c
r9732r9733
212212
213213static void advance_seconds(rp5c01a_t *rp5c01a)
214214{
215   int days_per_month[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
215   static const int days_per_month[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
216216
217217   int seconds = (rp5c01a->reg[RP5C01A_MODE_TIME][RP5C01A_REGISTER_10_SECOND] * 10) + rp5c01a->reg[RP5C01A_MODE_TIME][RP5C01A_REGISTER_1_SECOND];
218218   int minutes = (rp5c01a->reg[RP5C01A_MODE_TIME][RP5C01A_REGISTER_10_MINUTE] * 10) + rp5c01a->reg[RP5C01A_MODE_TIME][RP5C01A_REGISTER_1_MINUTE];
src/mess/machine/trs80.c
r9732r9733
462462    EEh    9600
463463    FFh    19200 */
464464
465   int baud_clock[]={ 800, 1200, 1760, 2152, 2400, 4800, 9600, 19200, 28800, 32000, 38400, 57600, 76800, 115200, 153600, 307200 };
465   static const int baud_clock[]={ 800, 1200, 1760, 2152, 2400, 4800, 9600, 19200, 28800, 32000, 38400, 57600, 76800, 115200, 153600, 307200 };
466466   ay31015_set_receiver_clock( state->ay31015, baud_clock[data & 0x0f]);
467467   ay31015_set_transmitter_clock( state->ay31015, baud_clock[data>>4]);
468468}
src/mess/machine/vtech2.c
r9732r9733
6464};
6565
6666/* read banked memory (plain ROM/RAM) */
67static const char* mra_bank_hard[4] =
67static const char *const mra_bank_hard[4] =
6868{
6969    "bank1",  /* mapped in 0000-3fff */
7070    "bank2",  /* mapped in 4000-7fff */
r9732r9733
7373};
7474
7575/* write banked memory (plain ROM/RAM) */
76static const char* mwa_bank_hard[4] =
76static const char *const mwa_bank_hard[4] =
7777{
7878    "bank1",  /* mapped in 0000-3fff */
7979    "bank2",  /* mapped in 4000-7fff */
src/mess/machine/upd1990a.c
r9732r9733
384384
385385static void advance_seconds(upd1990a_t *upd1990a)
386386{
387   int days_per_month[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
387   static const int days_per_month[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
388388
389389   int seconds = bcd_to_integer(upd1990a->time_counter[0]);
390390   int minutes = bcd_to_integer(upd1990a->time_counter[1]);
src/mess/machine/mac.c
r9732r9733
417417   {   
418418      address_space* space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
419419      UINT32 onboard_amt, simm_amt, simm_size;
420      UINT32 simm_sizes[4] = { 0, 2*1024*1024, 4*1024*1024, 8*1024*1024 };
420      static const UINT32 simm_sizes[4] = { 0, 2*1024*1024, 4*1024*1024, 8*1024*1024 };
421421
422422      // force unmap of entire RAM region
423423      memory_unmap_write(space, 0, 0x9fffff, 0x9fffff, 0);
r9732r9733
32933293
32943294void mac_state::nubus_slot_interrupt(UINT8 slot, UINT32 state)
32953295{
3296   UINT8 masks[6] = { 0x1, 0x2, 0x4, 0x8, 0x10, 0x20 };
3296   static const UINT8 masks[6] = { 0x1, 0x2, 0x4, 0x8, 0x10, 0x20 };
32973297   mac_state *mac = machine->driver_data<mac_state>();
32983298
32993299   slot -= 9;
src/mess/machine/smc92x4.c
r9732r9733
654654   // Flags for current head register. Note that the sizes are not in
655655   // sequence (128, 256, 512, 1024). This is only interesting for AT
656656   // mode.
657   UINT8 sizeflag[] = { 0x60, 0x00, 0x20, 0x40 };
657   static const UINT8 sizeflag[] = { 0x60, 0x00, 0x20, 0x40 };
658658   smc92x4_state *w = get_safe_token(device);
659659
660660   w->register_r[CURRENT_CYLINDER] = id.C & 0xff;
src/mess/video/ssystem3.c
r9732r9733
206206   ssystem3_draw_led(bitmap, state->lcd.data[3]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '3');
207207   ssystem3_draw_led(bitmap, state->lcd.data[4]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '4');
208208
209   if (input_port_read(screen->machine, "Configuration")&1) { // state->playfield(optional device)
210     const int lcd_signs_on[]={
209   if (input_port_read(screen->machine, "Configuration")&1) { // playfield(optional device)
210     static const int lcd_signs_on[]={
211211       0, // empty
212212       1, // bauer
213213       3, // springer
src/mess/video/trs80.c
r9732r9733
278278{
279279   trs80_state *state = screen->machine->driver_data<trs80_state>();
280280   UINT8 *videoram = state->videoram;
281   const UINT16 rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 };
281   static const UINT16 rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 };
282282   UINT8 chr,gfx,gfxbit,bg=7,fg=0;
283283   UINT16 sy=0,ma=0,x,y,ra;
284284   UINT8 *FNT = memory_region(screen->machine, "gfx1");
src/mess/video/odyssey2.c
r9732r9733
271271   if ( vpos < state->start_vblank )
272272   {
273273      rectangle rect;
274      //int sprite_width[4] = { 8, 8, 8, 8 };
274      //static const int sprite_width[4] = { 8, 8, 8, 8 };
275275      int i;
276276
277277      state->control_status &= ~ 0x01;
src/mess/video/galaxy.c
r9732r9733
127127   timer_adjust_periodic(state->gal_video_timer, attotime_zero, 0, attotime_never);
128128   if (state->interrupts_enabled == FALSE)
129129   {
130      rectangle black_area = {0, 384 - 1, 0, 208 - 1};
130      static const rectangle black_area = {0, 384 - 1, 0, 208 - 1};
131131      bitmap_fill(screen->machine->generic.tmpbitmap, &black_area, 0);
132132   }
133133   state->interrupts_enabled = FALSE;
src/mess/video/gba.c
r9732r9733
230230static void draw_roz_scanline(gba_state *state, UINT32 *scanline, int ypos, UINT32 enablemask, UINT32 ctrl, INT32 X, INT32 Y, INT32 PA, INT32 PB, INT32 PC, INT32 PD, INT32 *currentx, INT32 *currenty, int changed)
231231{
232232   UINT32 base, mapbase, size;
233   INT32 sizes[4] = { 128, 256, 512, 1024 };
233   static const INT32 sizes[4] = { 128, 256, 512, 1024 };
234234   INT32 cx, cy, x, pixx, pixy;
235235   UINT8 *mgba_vram = (UINT8 *)state->gba_vram;
236236   UINT32 tile;
src/mess/video/fm7.c
r9732r9733
494494static UINT32 fm7_line_set_pixel(fm7_state *state, int x, int y)
495495{
496496   UINT32 addr;
497   UINT8 pixel_mask[8] = {0x7f, 0xbf, 0xdf, 0xef, 0xf7, 0xfb, 0xfd, 0xfe };
497   static const UINT8 pixel_mask[8] = {0x7f, 0xbf, 0xdf, 0xef, 0xf7, 0xfb, 0xfd, 0xfe };
498498
499499
500500   if(state->video.modestatus & 0x40) // 320 pixels wide
src/mess/includes/x07.h
r9732r9733
88/***************************************************************************
99    CONSTANTS
1010***************************************************************************/
11static const char *udk_ini[12] = {
11static const char *const udk_ini[12] = {
1212   "tim?TIME$\15",
1313   "cldCLOAD\"",
1414   "locLOCATE ",
src/mess/formats/spec_snqk.c
r9732r9733
20202020
20212021    /* Memory dump */
20222022    addr = 0;
2023    const UINT8 banks[] = { 5, 2, 0, 1, 3, 4, 6, 7 };
2023    static const UINT8 banks[] = { 5, 2, 0, 1, 3, 4, 6, 7 };
20242024    logerror("Loading %05X bytes of RAM at %04X\n", 8*SPECTRUM_BANK, BASE_RAM);
20252025    for (i = 0; i < 8; i++)
20262026    {
src/mess/drivers/pc6001.c
r9732r9733
441441            for(i=0;i<4;i++)
442442            {
443443               int pen[2];
444#if 0
445               /* palette reference: */
446               static const UINT8 pal_num[] = { 0x00, 0x04, 0x01, 0x05,
447                  0x02, 0x06, 0x03, 0x07,
448                  0x08, 0x0c, 0x09, 0x0d,
449                  0x0a, 0x0e, 0x0b, 0x0f };
444450
445               /*
446                    palette reference:
447                    UINT8 pal_num[] = { 0x00, 0x04, 0x01, 0x05,
448                                        0x02, 0x06, 0x03, 0x07,
449                                        0x08, 0x0c, 0x09, 0x0d,
450                                        0x0a, 0x0e, 0x0b, 0x0f };
451               color |= pal_num[(pen[0] & 3) | ((pen[1] & 3) << 2)];
452#endif
451453
452                    color |= pal_num[(pen[0] & 3) | ((pen[1] & 3) << 2)];
453                    */
454
455454               pen[0] = state->video_ram[count+0x0000] >> (6-i*2) & 3;
456455               pen[1] = state->video_ram[count+0x2000] >> (6-i*2) & 3;
457456
r9732r9733
484483            for(i=0;i<8;i++)
485484            {
486485               int pen[2];
486#if 0
487               /* palette reference: */
488               static const UINT8 pal_num[] = { 0x00, 0x04, 0x01, 0x05 };
487489
488               /*
489                    palette reference:
490                    UINT8 pal_num[] = { 0x00, 0x04, 0x01, 0x05 };
490               color |= pal_num[(pen[0] & 1) | ((pen[1] & 1) << 1)];
491#endif
491492
492                    color |= pal_num[(pen[0] & 1) | ((pen[1] & 1) << 1)];
493                    */
494
495493               pen[0] = state->video_ram[count+0x0000] >> (7-i) & 1;
496494               pen[1] = state->video_ram[count+0x2000] >> (7-i) & 1;
497495
r9732r9733
664662static WRITE8_HANDLER ( pc6001_system_latch_w )
665663{
666664   pc6001_state *state = space->machine->driver_data<pc6001_state>();
667   UINT16 startaddr[] = {0xC000, 0xE000, 0x8000, 0xA000 };
665   static const UINT16 startaddr[] = {0xC000, 0xE000, 0x8000, 0xA000 };
668666
669667   state->video_ram =  state->ram + startaddr[(data >> 1) & 0x03] - 0x8000;
670668
r9732r9733
11931191static WRITE8_HANDLER( pc6001m2_vram_bank_w )
11941192{
11951193   pc6001_state *state = space->machine->driver_data<pc6001_state>();
1196// UINT32 startaddr[] = {WRAM(6), WRAM(6), WRAM(0), WRAM(4) };
1194   //static const UINT32 startaddr[] = {WRAM(6), WRAM(6), WRAM(0), WRAM(4) };
11971195
11981196   state->ex_vram_bank = data;
11991197   vram_bank_change(space->machine,(state->ex_vram_bank & 0x06) | ((state->sys_latch & 0x06) << 4));
r9732r9733
14571455static WRITE8_HANDLER( pc6001sr_bank_rn_w )
14581456{
14591457   pc6001_state *state = space->machine->driver_data<pc6001_state>();
1460   const char* bank_name[8] = { "bank1","bank2","bank3", "bank4", "bank5", "bank6", "bank7", "bank8" };
1458   static const char *const bank_name[8] = { "bank1","bank2","bank3", "bank4", "bank5", "bank6", "bank7", "bank8" };
14611459   UINT8 *ROM = memory_region(space->machine, "maincpu");
14621460   UINT8 bank_num;
14631461
r9732r9733
18811879
18821880static UINT8 check_keyboard_press(running_machine *machine)
18831881{
1884   const char* portnames[3] = { "key1","key2","key3" };
1882   static const char *const portnames[3] = { "key1","key2","key3" };
18851883   int i,port_i,scancode;
18861884   UINT8 shift_pressed,caps_lock;
18871885   scancode = 0;
src/mess/drivers/vii.c
r9732r9733
568568
569569static READ16_HANDLER( vii_io_r )
570570{
571   static const char *gpioregs[] = { "GPIO Data Port", "GPIO Buffer Port", "GPIO Direction Port", "GPIO Attribute Port", "GPIO IRQ/Latch Port" };
571   static const char *const gpioregs[] = { "GPIO Data Port", "GPIO Buffer Port", "GPIO Direction Port", "GPIO Attribute Port", "GPIO IRQ/Latch Port" };
572572   static const char gpioports[] = { 'A', 'B', 'C' };
573573
574574   vii_state *state = space->machine->driver_data<vii_state>();
r9732r9733
639639
640640static WRITE16_HANDLER( vii_io_w )
641641{
642   static const char *gpioregs[] = { "GPIO Data Port", "GPIO Buffer Port", "GPIO Direction Port", "GPIO Attribute Port", "GPIO IRQ/Latch Port" };
642   static const char *const gpioregs[] = { "GPIO Data Port", "GPIO Buffer Port", "GPIO Direction Port", "GPIO Attribute Port", "GPIO IRQ/Latch Port" };
643643   static const char gpioports[3] = { 'A', 'B', 'C' };
644644
645645   vii_state *state = space->machine->driver_data<vii_state>();
src/mess/drivers/x1.c
r9732r9733
501501
502502static UINT8 check_keyboard_press(running_machine *machine)
503503{
504   const char* portnames[3] = { "key1","key2","key3" };
504   static const char *const portnames[3] = { "key1","key2","key3" };
505505   int i,port_i,scancode;
506506   UINT8 keymod = input_port_read(machine,"key_modifiers") & 0x1f;
507507   UINT32 pad = input_port_read(machine,"tenkey");
src/mess/drivers/arcadia.c
r9732r9733
496496       so it could be burned in a arcadia 2001 cartridge
497497       activate it and use debugger to save patched version */
498498   // not enough yet (some pointers stored as data?)
499   struct { UINT16 address; UINT8 old; UINT8 new; }
500   int i:
499   int i;
500   static const struct { UINT16 address; UINT8 old; UINT8 new; }
501501   patch[]= {
502502      { 0x0077,0x40,0x20 },
503503      { 0x011e,0x40,0x20 },
src/mess/drivers/smc777.c
r9732r9733
593593static TIMER_CALLBACK( keyboard_callback )
594594{
595595   smc777_state *state = machine->driver_data<smc777_state>();
596   const char* portnames[3] = { "key1","key2","key3" };
596   static const char *const portnames[3] = { "key1","key2","key3" };
597597   int i,port_i,scancode;
598598   //UINT8 keymod = input_port_read(machine,"key_modifiers") & 0x1f;
599599   scancode = 0;
src/mess/drivers/cat.c
r9732r9733
307307         }
308308      }
309309   } else {
310      rectangle black_area = {0, 672 - 1, 0, 344 - 1};
310      static const rectangle black_area = {0, 672 - 1, 0, 344 - 1};
311311      bitmap_fill(bitmap, &black_area, 0);
312312   }
313313   return 0;
src/mess/drivers/a2600.c
r9732r9733
13721372
13731373   for (i = 0; i < count; i++)
13741374   {
1375      static const char *handler[] =
1375      static const char *const handler[] =
13761376      {
13771377         "bank1",
13781378         "bank2",
src/mess/drivers/fmtowns.c
r9732r9733
170170   // TODO: init serial ROM contents
171171   towns_state* state = machine->driver_data<towns_state>();
172172   int x;
173   UINT8 code[8] = { 0x04,0x65,0x54,0xA4,0x95,0x45,0x35,0x5F };
173   static const UINT8 code[8] = { 0x04,0x65,0x54,0xA4,0x95,0x45,0x35,0x5F };
174174   UINT8* srom = memory_region(machine,"serial");
175175
176176   memset(state->towns_serial_rom,0,256/8);
src/mess/drivers/tk80bs.c
r9732r9733
245245static TIMER_CALLBACK( keyboard_callback )
246246{
247247   tk80bs_state *state = machine->driver_data<tk80bs_state>();
248   const char* portnames[3] = { "key1","key2","key3" };
248   static const char *const portnames[3] = { "key1","key2","key3" };
249249   int i,port_i,scancode;
250250   UINT8 keymod = input_port_read(machine,"key_modifiers") & 0x1f;
251251   scancode = 0;
src/mess/drivers/multi8.c
r9732r9733
398398static TIMER_CALLBACK( keyboard_callback )
399399{
400400   multi8_state *state = machine->driver_data<multi8_state>();
401   const char* portnames[3] = { "key1","key2","key3" };
401   static const char *const portnames[3] = { "key1","key2","key3" };
402402   int i,port_i,scancode;
403403   UINT8 keymod = input_port_read(machine,"key_modifiers") & 0x1f;
404404   scancode = 0;
src/mess/drivers/bml3.c
r9732r9733
412412static TIMER_CALLBACK( keyboard_callback )
413413{
414414   bml3_state *state = machine->driver_data<bml3_state>();
415   const char* portnames[3] = { "key1","key2","key3" };
415   static const char *const portnames[3] = { "key1","key2","key3" };
416416   int i,port_i,scancode;
417417   scancode = 0;
418418
src/mess/drivers/gp2x.c
r9732r9733
4141
4242
4343#if 0
44static const char* gp2x_regnames[0x200] =
44static const char *const gp2x_regnames[0x200] =
4545{
4646   "DPC Control",
4747   "PAD Control",
src/mess/drivers/fm7.c
r9732r9733
12601260static void fm7_keyboard_poll_scan(running_machine* machine)
12611261{
12621262   fm7_state *state = machine->driver_data<fm7_state>();
1263   const char* portnames[3] = { "key1","key2","key3" };
1263   static const char *const portnames[3] = { "key1","key2","key3" };
12641264   int bit = 0;
12651265   int x,y;
12661266   UINT32 keys;
12671267   UINT32 modifiers = input_port_read(machine,"key_modifiers");
1268   UINT16 modscancodes[6] = { 0x52, 0x53, 0x54, 0x55, 0x56, 0x5a };
1268   static const UINT16 modscancodes[6] = { 0x52, 0x53, 0x54, 0x55, 0x56, 0x5a };
12691269
12701270   for(x=0;x<3;x++)
12711271   {
r9732r9733
13061306static TIMER_CALLBACK( fm7_keyboard_poll )
13071307{
13081308   fm7_state *state = machine->driver_data<fm7_state>();
1309   const char* portnames[3] = { "key1","key2","key3" };
1309   static const char *const portnames[3] = { "key1","key2","key3" };
13101310   int x,y;
13111311   int bit = 0;
13121312   int mod = 0;
src/mess/drivers/nc.c
r9732r9733
318318}
319319
320320
321static const char *nc_bankhandler_r[]={
321static const char *const nc_bankhandler_r[]={
322322"bank1", "bank2", "bank3", "bank4"};
323323
324static const char *nc_bankhandler_w[]={
324static const char *const nc_bankhandler_w[]={
325325"bank5", "bank6", "bank7", "bank8"};
326326
327327static void nc_refresh_memory_bank_config(running_machine *machine, int bank)
src/mess/drivers/pcw16.c
r9732r9733
168168}
169169
170170
171static const char *pcw16_write_handler_dram[4] =
171static const char *const pcw16_write_handler_dram[4] =
172172{
173173   "bank5",
174174   "bank6",
r9732r9733
176176   "bank8"
177177};
178178
179static const char *pcw16_read_handler_dram[4] =
179static const char *const pcw16_read_handler_dram[4] =
180180{
181181   "bank1",
182182   "bank2",
src/mess/drivers/pasogo.c
r9732r9733
401401{
402402   //static int width=-1,height=-1;
403403   UINT8 *rom = memory_region(screen->machine, "maincpu")+0xb8000;
404   UINT16 c[]={ 3, 0 };
404   static const UINT16 c[]={ 3, 0 };
405405   int x,y;
406406//  plot_box(bitmap, 0, 0, 64/*bitmap->width*/, bitmap->height, 0);
407407   int w=640;
src/mess/drivers/socrates.c
r9732r9733
489489static rgb_t socrates_create_color(UINT8 color)
490490{
491491  rgb_t composedcolor;
492  double lumatable[256] = {
492  static const double lumatable[256] = {
493493    LUMA_COL_0
494494    LUMA_COL_COMMON
495495    LUMA_COL_2
r9732r9733
507507    LUMA_COL_COMMON
508508    LUMA_COL_F
509509  };
510  double chromaintensity[256] = {
510  static const double chromaintensity[256] = {
511511  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
512512    CHROMA_COL_COMMON
513513    CHROMA_COL_2
r9732r9733
543543     E: blue-purple (more blue than color 1, 120 is closest)
544544     F: grey-thru-white (0 assumed chroma)
545545  */
546  double phaseangle[16] = { 0, 90, 220, 150, 270, 40, 0, 315, 180, 210, 240, 300, 330, 60, 120, 0 }; // note: these are guessed, not measured yet!
546  static const double phaseangle[16] = { 0, 90, 220, 150, 270, 40, 0, 315, 180, 210, 240, 300, 330, 60, 120, 0 }; // note: these are guessed, not measured yet!
547547  int chromaindex = color&0x0F;
548548  int swappedcolor = ((color&0xf0)>>4)|((color&0x0f)<<4);
549549  double finalY, finalI, finalQ, finalR, finalG, finalB;
src/mess/drivers/gp32.c
r9732r9733
605605static void s3c240x_pwm_start( running_machine *machine, int timer)
606606{
607607   gp32_state *state = machine->driver_data<gp32_state>();
608   const int mux_table[] = { 2, 4, 8, 16};
609   const int prescaler_shift[] = { 0, 0, 8, 8, 8};
610   const int mux_shift[] = { 0, 4, 8, 12, 16};
611   const int tcon_shift[] = { 0, 8, 12, 16, 20};
608   static const int mux_table[] = { 2, 4, 8, 16 };
609   static const int prescaler_shift[] = { 0, 0, 8, 8, 8 };
610   static const int mux_shift[] = { 0, 4, 8, 12, 16 };
611   static const int tcon_shift[] = { 0, 8, 12, 16, 20 };
612612   const UINT32 *regs = &state->s3c240x_pwm_regs[3+timer*3];
613613   UINT32 prescaler, mux, cnt, cmp, auto_reload;
614614   double freq, hz;
r9732r9733
649649static void s3c240x_pwm_recalc( running_machine *machine, int timer)
650650{
651651   gp32_state *state = machine->driver_data<gp32_state>();
652   const int tcon_shift[] = { 0, 8, 12, 16, 20};
652   static const int tcon_shift[] = { 0, 8, 12, 16, 20 };
653653   if (state->s3c240x_pwm_regs[2] & (1 << tcon_shift[timer]))
654654   {
655655      s3c240x_pwm_start( machine, timer);
r9732r9733
700700{
701701   gp32_state *state = machine->driver_data<gp32_state>();
702702   int ch = param;
703   const int ch_int[] = { INT_TIMER0, INT_TIMER1, INT_TIMER2, INT_TIMER3, INT_TIMER4 };
703   static const int ch_int[] = { INT_TIMER0, INT_TIMER1, INT_TIMER2, INT_TIMER3, INT_TIMER4 };
704704   verboselog( machine, 2, "PWM %d timer callback\n", ch);
705705   if (BITS( state->s3c240x_pwm_regs[1], 23, 20) == (ch + 1))
706706   {
r9732r9733
731731   UINT32 curr_tc, curr_src, curr_dst;
732732   address_space *space = cputag_get_address_space( machine, "maincpu", ADDRESS_SPACE_PROGRAM);
733733   int dsz, inc_src, inc_dst, servmode;
734   const UINT32 ch_int[] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3};
734   static const UINT32 ch_int[] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3 };
735735   verboselog( machine, 5, "DMA %d trigger\n", dma);
736736   curr_tc = BITS( regs[3], 19, 0);
737737   curr_src = BITS( regs[4], 28, 0);
r9732r9733
14601460      {
14611461         int interrupt_pending_flag;
14621462#if 0
1463         const int div_table[] = { 16, 512};
1463         static const int div_table[] = { 16, 512 };
14641464         int enable_interrupt, transmit_clock_value, tx_clock_source_selection
14651465         double clock;
14661466         transmit_clock_value = (data >> 0) & 0xF;
r9732r9733
15521552static void s3c240x_iis_start( running_machine *machine)
15531553{
15541554   gp32_state *state = machine->driver_data<gp32_state>();
1555   const UINT32 codeclk_table[] = { 256, 384};
1555   static const UINT32 codeclk_table[] = { 256, 384 };
15561556   double freq;
15571557   int prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk;
15581558   verboselog( machine, 1, "IIS start\n");

Previous 15994 Revisions Next


© 1998-2018 The MESS Team