Previous 15994 Revisions Next

r9660 Thursday 25th November, 2010 at 06:51:20 UTC by Nathan Woods
Static/const changes. [Atari Ace]
[src/mess/drivers]a7000.c bmjr.c bml3.c cgc7900.c craft.c gba.c gp32.c jr200.c kyocera.c mz2500.c pasopia.c pc2000.c pc6001.c pc8001.c pc8401a.c pce220.c pcw16.c px8.c rx78.c smc777.c x1.c xor100.c
[src/mess/formats]fdi_dsk.c td0_dsk.c
[src/mess/machine]pce.c
[src/mess/video]gba.c poly88.c

src/mess/machine/pce.c
r9659r9660
499499 */
500500static void pce_cd_msm5205_int(running_device *device)
501501{
502   static UINT8 msm_data;
502   UINT8 msm_data;
503503
504504//   popmessage("%08x %08x %08x %02x %02x",pce_cd.msm_start_addr,pce_cd.msm_end_addr,pce_cd.msm_half_addr,pce_cd.regs[0x0c],pce_cd.regs[0x0d]);
505505
r9659r9660
16991699
17001700READ8_HANDLER( pce_cd_acard_r )
17011701{
1702   static UINT8 r_num;
1702   UINT8 r_num;
17031703
17041704   if((offset & 0x2e0) == 0x2e0)
17051705   {
r9659r9660
17621762
17631763WRITE8_HANDLER( pce_cd_acard_w )
17641764{
1765   static UINT8 w_num;
1765   UINT8 w_num;
17661766
17671767   if((offset & 0x2e0) == 0x2e0)
17681768   {
src/mess/video/poly88.c
r9659r9660
1111
1212UINT8* poly88_video_ram;
1313
14static UINT8 mcm6571a[] =
14static const UINT8 mcm6571a[] =
1515{
1616   0x00,0x00,0x00,0x00,0x31,0x4A,0x44,0x4A,0x31,// 0
1717   0x3C,0x22,0x3C,0x22,0x22,0x3C,0x20,0x20,0x40,// 1
r9659r9660
142142   0x30,0x49,0x06,0x00,0x00,0x00,0x00,0x00,0x00,// 126
143143   0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F // 127
144144};
145static UINT8 mcm6571a_shift[] =
145static const UINT8 mcm6571a_shift[] =
146146{
147147   0,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,
148148   1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
src/mess/video/gba.c
r9659r9660
2727   }
2828}
2929
30static int coeff[32] = {
30static const int coeff[32] = {
3131   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
3232   16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
3333};
src/mess/formats/fdi_dsk.c
r9659r9660
5252   TPI_192
5353};
5454
55static int TRACKS_PER_INCH[] = { 48, 67, 96, 100, 135, 192 };
55static const int TRACKS_PER_INCH[] = { 48, 67, 96, 100, 135, 192 };
5656
5757/* high level track types */
5858enum
r9659r9660
7474   TRACK_IBM_SD_10      /* not supported */
7575};
7676
77//static int SECTORS_PER_TRACK[] = { 0, 11, 22, 9, 10, 8, 9, 15, 18, 36, -1, -1, -1, -1, 10 };
77//static const int SECTORS_PER_TRACK[] = { 0, 11, 22, 9, 10, 8, 9, 15, 18, 36, -1, -1, -1, -1, 10 };
7878
7979/***************************************************************************
8080    TYPE DEFINITIONS
src/mess/formats/td0_dsk.c
r9659r9660
298298 */
299299
300300/* decoder table */
301static UINT8 d_code[256] = {
301static const UINT8 d_code[256] = {
302302    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
303303    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
304304    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
r9659r9660
333333    0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
334334};
335335
336static UINT8 d_len[256] = {
336static const UINT8 d_len[256] = {
337337    0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
338338    0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
339339    0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
src/mess/drivers/pc8401a.c
r9659r9660
625625
626626/* MSM8251 Interface */
627627
628static msm8251_interface pc8401a_msm8251_interface = {
628static const msm8251_interface pc8401a_msm8251_interface =
629{
629630   NULL,
630631   NULL,
631632   NULL
src/mess/drivers/pc6001.c
r9659r9660
13601360{
13611361   const char* bank_name[8] = { "bank1","bank2","bank3", "bank4", "bank5", "bank6", "bank7", "bank8" };
13621362   UINT8 *ROM = memory_region(space->machine, "maincpu");
1363   static UINT8 bank_num;
1363   UINT8 bank_num;
13641364
13651365   sr_bank_r[offset] = data;
13661366   bank_num = data & 0x0f;
r9659r9660
13911391#define SR_WRAM_BANK_W(_v_) \
13921392{ \
13931393   UINT8 *ROM = memory_region(space->machine, "maincpu"); \
1394   static UINT8 bank_num; \
1394   UINT8 bank_num; \
13951395   bank_num = sr_bank_w[_v_] & 0x0f; \
13961396   if((sr_bank_w[_v_] & 0xf0) != 0x20) \
13971397      ROM[offset+(SR_WRAM0(bank_num))] = data; \
r9659r9660
18171817   UINT8 p1_key = input_port_read(machine,"P1") ^ 0xff;
18181818   UINT8 shift_key = input_port_read(machine,"key_modifiers") & 0x02;
18191819   UINT8 space_key = input_port_read(machine,"key2") & 0x01;
1820   UINT8 joy_press;
18201821
1821   static UINT8 joy_press;
1822
18231822      /*
18241823            PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
18251824            PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
src/mess/drivers/x1.c
r9659r9660
10301030   int addr;
10311031   int calc_pcg_offset;
10321032   static UINT32 kanji_offset;
1033   static UINT8 bios_offset,pcg_index_r[3],res;
1033   static UINT8 bios_offset,pcg_index_r[3];
1034   UINT8 res;
10341035   UINT8 *gfx_data;
10351036
10361037   addr = (offset & 0x300) >> 8;
r9659r9660
11651166
11661167static WRITE8_HANDLER( x1_ex_gfxram_w )
11671168{
1168   static UINT8 ex_mask;
1169   UINT8 ex_mask;
11691170
11701171   if     (offset >= 0x0000 && offset <= 0x3fff)   { ex_mask = 7; }
11711172   else if(offset >= 0x4000 && offset <= 0x7fff)   { ex_mask = 6; }
src/mess/drivers/xor100.c
r9659r9660
370370
371371/* Printer 8251A Interface */
372372
373static msm8251_interface printer_8251_intf =
373static const msm8251_interface printer_8251_intf =
374374{
375375   NULL,
376376   NULL,
r9659r9660
379379
380380/* Terminal 8251A Interface */
381381
382static msm8251_interface terminal_8251_intf =
382static const msm8251_interface terminal_8251_intf =
383383{
384384   NULL,
385385   NULL,
src/mess/drivers/smc777.c
r9659r9660
3939{
4040   int x,y,yi;
4141   UINT16 count;
42   static UINT8 *vram = memory_region(screen->machine, "vram");
43   static UINT8 *attr = memory_region(screen->machine, "attr");
44   static UINT8 *gram = memory_region(screen->machine, "fbuf");
45   static int x_width;
42   UINT8 *vram = memory_region(screen->machine, "vram");
43   UINT8 *attr = memory_region(screen->machine, "attr");
44   UINT8 *gram = memory_region(screen->machine, "fbuf");
45   int x_width;
4646
4747   bitmap_fill(bitmap, cliprect, screen->machine->pens[backdrop_pen+0x10]);
4848
r9659r9660
5757      {
5858         for(x=0;x<x_width;x++)
5959         {
60            static UINT16 color;
60            UINT16 color;
6161
6262            color = (gram[count] & 0xf0) >> 4;
6363            *BITMAP_ADDR16(bitmap, y+yi+CRTC_MIN_Y, x*4+0+CRTC_MIN_X) = screen->machine->pens[color+0x10];
r9659r9660
161161
162162static READ8_HANDLER( smc777_vram_r )
163163{
164   static UINT8 *vram = memory_region(space->machine, "vram");
165   static UINT16 vram_index;
164   UINT8 *vram = memory_region(space->machine, "vram");
165   UINT16 vram_index;
166166
167167   vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B);
168168
r9659r9660
171171
172172static READ8_HANDLER( smc777_attr_r )
173173{
174   static UINT8 *attr = memory_region(space->machine, "attr");
175   static UINT16 vram_index;
174   UINT8 *attr = memory_region(space->machine, "attr");
175   UINT16 vram_index;
176176
177177   vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B);
178178
r9659r9660
181181
182182static READ8_HANDLER( smc777_pcg_r )
183183{
184   static UINT8 *pcg = memory_region(space->machine, "pcg");
185   static UINT16 vram_index;
184   UINT8 *pcg = memory_region(space->machine, "pcg");
185   UINT16 vram_index;
186186
187187   vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B);
188188
r9659r9660
191191
192192static WRITE8_HANDLER( smc777_vram_w )
193193{
194   static UINT8 *vram = memory_region(space->machine, "vram");
195   static UINT16 vram_index;
194   UINT8 *vram = memory_region(space->machine, "vram");
195   UINT16 vram_index;
196196
197197   vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B);
198198
r9659r9660
201201
202202static WRITE8_HANDLER( smc777_attr_w )
203203{
204   static UINT8 *attr = memory_region(space->machine, "attr");
205   static UINT16 vram_index;
204   UINT8 *attr = memory_region(space->machine, "attr");
205   UINT16 vram_index;
206206
207207   vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B);
208208
r9659r9660
211211
212212static WRITE8_HANDLER( smc777_pcg_w )
213213{
214   static UINT8 *pcg = memory_region(space->machine, "pcg");
215   static UINT16 vram_index;
214   UINT8 *pcg = memory_region(space->machine, "pcg");
215   UINT16 vram_index;
216216
217217   vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B);
218218
r9659r9660
223223
224224static READ8_HANDLER( smc777_fbuf_r )
225225{
226   static UINT8 *fbuf = memory_region(space->machine, "fbuf");
227   static UINT16 vram_index;
226   UINT8 *fbuf = memory_region(space->machine, "fbuf");
227   UINT16 vram_index;
228228
229229   vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B);
230230
r9659r9660
233233
234234static WRITE8_HANDLER( smc777_fbuf_w )
235235{
236   static UINT8 *fbuf = memory_region(space->machine, "fbuf");
237   static UINT16 vram_index;
236   UINT8 *fbuf = memory_region(space->machine, "fbuf");
237   UINT16 vram_index;
238238
239239   vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B);
240240
r9659r9660
328328
329329static READ8_HANDLER( key_r )
330330{
331   static UINT8 res;
331   UINT8 res;
332332
333333   if(offset == 1) //keyboard status
334334      return (0xfc) | keyb_press_flag;
r9659r9660
605605
606606static MACHINE_START(smc777)
607607{
608   static UINT8 *rom = memory_region(machine, "bios");
608   UINT8 *rom = memory_region(machine, "bios");
609609   int i;
610610
611611   for(i=0;i<0x4000;i++)
src/mess/drivers/px8.c
r9659r9660
792792    msm8251_interface i8251_intf
793793-------------------------------------------------*/
794794
795static msm8251_interface i8251_intf =
795static const msm8251_interface i8251_intf =
796796{
797797   NULL,
798798   NULL,
src/mess/drivers/cgc7900.c
r9659r9660
351351    msm8251_interface rs232_intf
352352-------------------------------------------------*/
353353
354static msm8251_interface rs232_intf =
354static const msm8251_interface rs232_intf =
355355{
356356   NULL,
357357   NULL,
r9659r9660
362362    msm8251_interface rs449_intf
363363-------------------------------------------------*/
364364
365static msm8251_interface rs449_intf =
365static const msm8251_interface rs449_intf =
366366{
367367   NULL,
368368   NULL,
src/mess/drivers/a7000.c
r9659r9660
249249   int x_size,y_size,x_start,y_start;
250250   int x,y,xi;
251251   UINT32 count;
252   static UINT8 *vram = memory_region(screen->machine, "vram");
252   UINT8 *vram = memory_region(screen->machine, "vram");
253253
254254   bitmap_fill(bitmap, cliprect, screen->machine->pens[0x100]);
255255
r9659r9660
618618   {
619619      case IOMD_IOCR:
620620      {
621         static UINT8 flyback;
621         UINT8 flyback;
622622         int vert_pos;
623623
624624         vert_pos = space->machine->primary_screen->vpos();
src/mess/drivers/mz2500.c
r9659r9660
312312
313313static void draw_cg4_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int pri)
314314{
315   static UINT32 count;
315   UINT32 count;
316316   UINT8 *vram = memory_region(machine, "maincpu");
317317   UINT8 pen,pen_bit[2];
318318   int x,y,xi,pen_i;
r9659r9660
353353
354354static void draw_cg16_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int plane,int x_size,int pri)
355355{
356   static UINT32 count;
356   UINT32 count;
357357   UINT8 *vram = memory_region(machine, "maincpu");
358358   UINT8 pen,pen_bit[4];
359359   int x,y,xi,pen_i;
r9659r9660
410410
411411static void draw_cg256_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int plane,int pri)
412412{
413   static UINT32 count;
413   UINT32 count;
414414   UINT8 *vram = memory_region(machine, "maincpu");
415415   UINT8 pen,pen_bit[8];
416416   int x,y,xi,pen_i;
r9659r9660
587587
588588   /* calculate TV window parameters here */
589589   {
590      static int x_offs,y_offs;
590      int x_offs,y_offs;
591591
592592      monitor_type = ((text_reg[0x0f] & 0x08) >> 3);
593593
594594      switch((monitor_type|text_col_size<<1) & 3)
595595      {
596         default:
596597         case 0: x_offs = 64; break;
597598         case 1: x_offs = 80; break;
598599         case 2: x_offs = 72; break;
r9659r9660
863864
864865static READ8_HANDLER( mz2500_bank_data_r )
865866{
866   static UINT8 res;
867   UINT8 res;
867868
868869   res = bank_val[bank_addr];
869870
r9659r9660
902903/* 0xf4 - 0xf7 all returns vblank / hblank states */
903904static READ8_HANDLER( mz2500_crtc_hvblank_r )
904905{
905   static UINT8 vblank_bit, hblank_bit;
906   UINT8 vblank_bit, hblank_bit;
906907
907908   vblank_bit = space->machine->primary_screen->vblank() ? 0 : 1;
908909   hblank_bit = space->machine->primary_screen->hblank() ? 0 : 2;
r9659r9660
11401141static WRITE8_HANDLER( palette4096_io_w )
11411142{
11421143   static UINT8 r[16],g[16],b[16];
1143   static UINT8 pal_index;
1144   static UINT8 pal_entry;
1144   UINT8 pal_index;
1145   UINT8 pal_entry;
11451146
11461147   pal_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B);
11471148   pal_entry = (pal_index & 0x1e) >> 1;
r9659r9660
11801181{
11811182   if(cg_reg[0x07] & 0x10)
11821183   {
1183      static UINT8 vblank_bit;
1184      UINT8 vblank_bit;
11841185
11851186      vblank_bit = space->machine->primary_screen->vblank() ? 0 : 0x80 | cg_clear_flag;
11861187
r9659r9660
13011302
13021303static READ8_HANDLER( mz2500_joystick_r )
13031304{
1304   static UINT8 res,dir_en,in_r;
1305   UINT8 res,dir_en,in_r;
13051306
13061307   res = 0xff;
13071308   in_r = ~input_port_read(space->machine, joy_mode & 0x40 ? "JOY_2P" : "JOY_1P");
r9659r9660
17501751
17511752static READ8_DEVICE_HANDLER( mz2500_portb_r )
17521753{
1753   static UINT8 vblank_bit;
1754   UINT8 vblank_bit;
17541755
17551756   vblank_bit = device->machine->primary_screen->vblank() ? 0 : 1; //Guess: NOBO wants this bit to be high/low
17561757
src/mess/drivers/bml3.c
r9659r9660
4747   int x,y,count;
4848   int xi,yi;
4949   int width,height;
50   static UINT8 *gfx_rom = memory_region(screen->machine, "char");
51   static UINT8 *vram = memory_region(screen->machine, "vram");
50   UINT8 *gfx_rom = memory_region(screen->machine, "char");
51   UINT8 *vram = memory_region(screen->machine, "vram");
5252
5353   count = 0x0000;
5454
r9659r9660
163163/* Note: this custom code is there just for simplicity, it'll be nuked in the end */
164164static READ8_HANDLER( bml3_io_r )
165165{
166   static UINT8 *rom = memory_region(space->machine, "maincpu");
166   UINT8 *rom = memory_region(space->machine, "maincpu");
167167
168168   if(offset == 0x19) return io_latch;
169169   if(offset == 0xc4) return 0xff; //some video modes wants this to be high
r9659r9660
251251
252252static READ8_HANDLER( bml3_vram_r )
253253{
254   static UINT8 *vram = memory_region(space->machine, "vram");
254   UINT8 *vram = memory_region(space->machine, "vram");
255255
256256   /* TODO: this presumably also triggers an attr latch read, unsure yet */
257257   attr_latch = vram[offset+0x4000];
r9659r9660
261261
262262static WRITE8_HANDLER( bml3_vram_w )
263263{
264   static UINT8 *vram = memory_region(space->machine, "vram");
264   UINT8 *vram = memory_region(space->machine, "vram");
265265
266266   vram[offset] = data;
267267   vram[offset+0x4000] = attr_latch;
src/mess/drivers/kyocera.c
r9659r9660
11271127
11281128/* MSM8251 Interface */
11291129
1130static msm8251_interface tandy200_msm8251_interface = {
1130static const msm8251_interface tandy200_msm8251_interface =
1131{
11311132   NULL,
11321133   NULL,
11331134   NULL
src/mess/drivers/pce220.c
r9659r9660
2626   int x, y, xi,yi;
2727   int count = 0;
2828//  static int test_x,test_y;
29   static UINT8 *vram = memory_region(screen->machine, "lcd_vram");
29   UINT8 *vram = memory_region(screen->machine, "lcd_vram");
3030
3131   for (y = 0; y < 4; y++)
3232   {
r9659r9660
6666
6767static WRITE8_HANDLER( lcd_data_w )
6868{
69   static UINT8 *vram = memory_region(space->machine, "lcd_vram");
69   UINT8 *vram = memory_region(space->machine, "lcd_vram");
7070
7171   vram[lcd_index_row*0x40|lcd_index_col] = data;
7272
src/mess/drivers/pcw16.c
r9659r9660
650650
651651#ifdef UNUSED_FUNCTION
652652/* issue a begin byte transfer */
653static void   pcw16_begin_byte_transfer(void)
653static void pcw16_begin_byte_transfer(void)
654654{
655655}
656656#endif
657657
658658/* signal a code has been received */
659static void   pcw16_keyboard_signal_byte_received(running_machine *machine, int data)
659static void pcw16_keyboard_signal_byte_received(running_machine *machine, int data)
660660{
661661   /* clear clock */
662662   pcw16_keyboard_set_clock_state(0);
r9659r9660
11881188   return pc_fdc_r(space, PC_FDC_DIGITIAL_INPUT_REGISTER);
11891189}
11901190
1191static void   pcw16_fdc_interrupt(running_machine *machine, int state)
1191static void pcw16_fdc_interrupt(running_machine *machine, int state)
11921192{
11931193   /* IRQ6 */
11941194   /* bit 6 of PCW16 system status indicates floppy ints */
src/mess/drivers/pasopia.c
r9659r9660
122122
123123static void draw_cg4_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int width)
124124{
125   static UINT8 *vram = memory_region(machine, "vram");
125   UINT8 *vram = memory_region(machine, "vram");
126126   int x,y,xi,yi;
127127   int count;
128128
r9659r9660
153153
154154static void draw_tv_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int width)
155155{
156   static UINT8 *vram = memory_region(machine, "vram");
156   UINT8 *vram = memory_region(machine, "vram");
157157   int x,y/*,xi,yi*/;
158158   int count;
159159
r9659r9660
201201
202202static void draw_mixed_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int width)
203203{
204   static UINT8 *vram = memory_region(machine, "vram");
205   static UINT8 *gfx_data = memory_region(machine,"font");
204   UINT8 *vram = memory_region(machine, "vram");
205   UINT8 *gfx_data = memory_region(machine,"font");
206206   int x,y,xi,yi;
207207   int count;
208208
r9659r9660
302302
303303static READ8_HANDLER( vram_r )
304304{
305   static UINT8 *vram = memory_region(space->machine, "vram");
306   static UINT8 res;
305   UINT8 *vram = memory_region(space->machine, "vram");
306   UINT8 res;
307307
308308   if(vram_sel == 0)
309309   {
r9659r9660
332332
333333static WRITE8_HANDLER( vram_w )
334334{
335   static UINT8 *vram = memory_region(space->machine, "vram");
335   UINT8 *vram = memory_region(space->machine, "vram");
336336
337337   if(vram_sel)
338338   {
r9659r9660
525525
526526static READ8_HANDLER( pasopia7_io_r )
527527{
528   static UINT16 io_port;
528   UINT16 io_port;
529529
530530   if(mio_sel)
531531   {
r9659r9660
568568
569569static WRITE8_HANDLER( pasopia7_io_w )
570570{
571   static UINT16 io_port;
571   UINT16 io_port;
572572
573573   if(mio_sel)
574574   {
src/mess/drivers/pc2000.c
r9659r9660
2020static VIDEO_UPDATE( pc2000 )
2121{
2222   int x,y;
23   static UINT8 *vram = memory_region(screen->machine, "lcd_vram");
23   UINT8 *vram = memory_region(screen->machine, "lcd_vram");
2424
2525   for(y=0;y<2;y++)
2626   {
r9659r9660
4343
4444static WRITE8_HANDLER( lcd_vram_data_w )
4545{
46   static UINT8 *vram = memory_region(space->machine, "lcd_vram");
46   UINT8 *vram = memory_region(space->machine, "lcd_vram");
4747
4848   vram[lcd_vram_index] = data;
4949}
src/mess/drivers/pc8001.c
r9659r9660
376376
377377/* 8251 Interface */
378378
379static msm8251_interface pc8001_8251_intf =
379static const msm8251_interface pc8001_8251_intf =
380380{
381381   NULL,
382382   NULL,
src/mess/drivers/jr200.c
r9659r9660
140140
141141static READ8_HANDLER( jr200_pcg_1_r )
142142{
143   static UINT8 *pcg = memory_region(space->machine, "pcg");
143   UINT8 *pcg = memory_region(space->machine, "pcg");
144144
145145   return pcg[offset+0x000];
146146}
147147
148148static READ8_HANDLER( jr200_pcg_2_r )
149149{
150   static UINT8 *pcg = memory_region(space->machine, "pcg");
150   UINT8 *pcg = memory_region(space->machine, "pcg");
151151
152152   return pcg[offset+0x400];
153153}
154154
155155static WRITE8_HANDLER( jr200_pcg_1_w )
156156{
157   static UINT8 *pcg = memory_region(space->machine, "pcg");
157   UINT8 *pcg = memory_region(space->machine, "pcg");
158158
159159   pcg[offset+0x000] = data;
160160   gfx_element_mark_dirty(space->machine->gfx[1], (offset+0x000) >> 3);
r9659r9660
162162
163163static WRITE8_HANDLER( jr200_pcg_2_w )
164164{
165   static UINT8 *pcg = memory_region(space->machine, "pcg");
165   UINT8 *pcg = memory_region(space->machine, "pcg");
166166
167167   pcg[offset+0x400] = data;
168168   gfx_element_mark_dirty(space->machine->gfx[1], (offset+0x400) >> 3);
r9659r9660
170170
171171static READ8_HANDLER( jr200_bios_char_r )
172172{
173   static UINT8 *gfx = memory_region(space->machine, "gfx_ram");
173   UINT8 *gfx = memory_region(space->machine, "gfx_ram");
174174
175175   return gfx[offset];
176176}
r9659r9660
178178
179179static WRITE8_HANDLER( jr200_bios_char_w )
180180{
181//  static UINT8 *gfx = memory_region(space->machine, "gfx_ram");
181//  UINT8 *gfx = memory_region(space->machine, "gfx_ram");
182182
183183   /* TODO: writing is presumably controlled by an I/O bit */
184184//  gfx[offset] = data;
r9659r9660
458458
459459static MACHINE_RESET(jr200)
460460{
461   static UINT8 *gfx_rom = memory_region(machine, "gfx_rom");
462   static UINT8 *gfx_ram = memory_region(machine, "gfx_ram");
461   UINT8 *gfx_rom = memory_region(machine, "gfx_rom");
462   UINT8 *gfx_ram = memory_region(machine, "gfx_ram");
463463   int i;
464464   memset(mn1271_ram,0,0x800);
465465
src/mess/drivers/rx78.c
r9659r9660
7676
7777static VIDEO_UPDATE( rx78 )
7878{
79   static UINT8 *vram = memory_region(screen->machine,"vram");
79   UINT8 *vram = memory_region(screen->machine,"vram");
8080   int x,y,count;
8181
8282   bitmap_fill(bitmap, cliprect, screen->machine->pens[0x10]);
r9659r9660
155155
156156static READ8_HANDLER( rx78_vram_r )
157157{
158   static UINT8 *vram = memory_region(space->machine,"vram");
158   UINT8 *vram = memory_region(space->machine,"vram");
159159
160160   if(vram_read_bank == 0 || vram_read_bank > 6)
161161      return 0xff;
r9659r9660
165165
166166static WRITE8_HANDLER( rx78_vram_w )
167167{
168   static UINT8 *vram = memory_region(space->machine,"vram");
168   UINT8 *vram = memory_region(space->machine,"vram");
169169
170170   if(vram_write_bank & 0x01) { vram[offset + 0 * 0x2000] = data; }
171171   if(vram_write_bank & 0x02) { vram[offset + 1 * 0x2000] = data; }
src/mess/drivers/gp32.c
r9659r9660
569569// PWM TIMER
570570
571571#if 0
572static const char *timer_reg_names[] =
572static const char *const timer_reg_names[] =
573573{
574574   "Timer config 0",
575575   "Timer config 1",
src/mess/drivers/craft.c
r9659r9660
5858   AVR8_REG_D,
5959};
6060
61static char avr8_reg_name[4] = { 'A', 'B', 'C', 'D' };
61static const char avr8_reg_name[4] = { 'A', 'B', 'C', 'D' };
6262
6363#if 0
6464static UINT64 avr8_get_timer_1_frequency(craft_state *state)
r9659r9660
362362   verboselog(machine, 0, "avr8_spi_update_clock_phase: TODO; Sampling edge is %s\n", AVR8_SPCR_CPHA ? "Trailing" : "Leading");
363363}
364364
365static UINT8 avr8_spi_clock_divisor[8] = { 4, 16, 64, 128, 2, 8, 32, 64 };
365static const UINT8 avr8_spi_clock_divisor[8] = { 4, 16, 64, 128, 2, 8, 32, 64 };
366366
367367static void avr8_spi_update_clock_rate(running_machine *machine)
368368{
src/mess/drivers/gba.c
r9659r9660
9595{
9696   int ctrl;
9797   FPTR ch;
98   static UINT32 ch_int[4] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3 };
98   static const UINT32 ch_int[4] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3 };
9999   gba_state *state = machine->driver_data<gba_state>();
100100
101101   ch = param;
r9659r9660
363363
364364static TIMER_CALLBACK(timer_expire)
365365{
366   static UINT32 tmr_ints[4] = { INT_TM0_OVERFLOW, INT_TM1_OVERFLOW, INT_TM2_OVERFLOW, INT_TM3_OVERFLOW };
366   static const UINT32 tmr_ints[4] = { INT_TM0_OVERFLOW, INT_TM1_OVERFLOW, INT_TM2_OVERFLOW, INT_TM3_OVERFLOW };
367367   FPTR tmr = (FPTR) param;
368368   gba_state *state = machine->driver_data<gba_state>();
369369
src/mess/drivers/bmjr.c
r9659r9660
2929static VIDEO_UPDATE( bmjr )
3030{
3131   int x,y,xi,yi,count;
32   static UINT8 *gfx_rom = memory_region(screen->machine, "char");
32   UINT8 *gfx_rom = memory_region(screen->machine, "char");
3333
3434   count = 0x0100;
3535

Previous 15994 Revisions Next


© 1998-2018 The MESS Team