src/mess/video/poly88.c
| r9659 | r9660 | |
| 11 | 11 | |
| 12 | 12 | UINT8* poly88_video_ram; |
| 13 | 13 | |
| 14 | | static UINT8 mcm6571a[] = |
| 14 | static const UINT8 mcm6571a[] = |
| 15 | 15 | { |
| 16 | 16 | 0x00,0x00,0x00,0x00,0x31,0x4A,0x44,0x4A,0x31,// 0 |
| 17 | 17 | 0x3C,0x22,0x3C,0x22,0x22,0x3C,0x20,0x20,0x40,// 1 |
| r9659 | r9660 | |
| 142 | 142 | 0x30,0x49,0x06,0x00,0x00,0x00,0x00,0x00,0x00,// 126 |
| 143 | 143 | 0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F // 127 |
| 144 | 144 | }; |
| 145 | | static UINT8 mcm6571a_shift[] = |
| 145 | static const UINT8 mcm6571a_shift[] = |
| 146 | 146 | { |
| 147 | 147 | 0,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0, |
| 148 | 148 | 1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, |
src/mess/video/gba.c
| r9659 | r9660 | |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | | static int coeff[32] = { |
| 30 | static const int coeff[32] = { |
| 31 | 31 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 32 | 32 | 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 |
| 33 | 33 | }; |
src/mess/formats/fdi_dsk.c
| r9659 | r9660 | |
| 52 | 52 | TPI_192 |
| 53 | 53 | }; |
| 54 | 54 | |
| 55 | | static int TRACKS_PER_INCH[] = { 48, 67, 96, 100, 135, 192 }; |
| 55 | static const int TRACKS_PER_INCH[] = { 48, 67, 96, 100, 135, 192 }; |
| 56 | 56 | |
| 57 | 57 | /* high level track types */ |
| 58 | 58 | enum |
| r9659 | r9660 | |
| 74 | 74 | TRACK_IBM_SD_10 /* not supported */ |
| 75 | 75 | }; |
| 76 | 76 | |
| 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 }; |
| 78 | 78 | |
| 79 | 79 | /*************************************************************************** |
| 80 | 80 | TYPE DEFINITIONS |
src/mess/formats/td0_dsk.c
| r9659 | r9660 | |
| 298 | 298 | */ |
| 299 | 299 | |
| 300 | 300 | /* decoder table */ |
| 301 | | static UINT8 d_code[256] = { |
| 301 | static const UINT8 d_code[256] = { |
| 302 | 302 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 303 | 303 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 304 | 304 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| r9659 | r9660 | |
| 333 | 333 | 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, |
| 334 | 334 | }; |
| 335 | 335 | |
| 336 | | static UINT8 d_len[256] = { |
| 336 | static const UINT8 d_len[256] = { |
| 337 | 337 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, |
| 338 | 338 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, |
| 339 | 339 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, |
src/mess/drivers/pc6001.c
| r9659 | r9660 | |
| 1360 | 1360 | { |
| 1361 | 1361 | const char* bank_name[8] = { "bank1","bank2","bank3", "bank4", "bank5", "bank6", "bank7", "bank8" }; |
| 1362 | 1362 | UINT8 *ROM = memory_region(space->machine, "maincpu"); |
| 1363 | | static UINT8 bank_num; |
| 1363 | UINT8 bank_num; |
| 1364 | 1364 | |
| 1365 | 1365 | sr_bank_r[offset] = data; |
| 1366 | 1366 | bank_num = data & 0x0f; |
| r9659 | r9660 | |
| 1391 | 1391 | #define SR_WRAM_BANK_W(_v_) \ |
| 1392 | 1392 | { \ |
| 1393 | 1393 | UINT8 *ROM = memory_region(space->machine, "maincpu"); \ |
| 1394 | | static UINT8 bank_num; \ |
| 1394 | UINT8 bank_num; \ |
| 1395 | 1395 | bank_num = sr_bank_w[_v_] & 0x0f; \ |
| 1396 | 1396 | if((sr_bank_w[_v_] & 0xf0) != 0x20) \ |
| 1397 | 1397 | ROM[offset+(SR_WRAM0(bank_num))] = data; \ |
| r9659 | r9660 | |
| 1817 | 1817 | UINT8 p1_key = input_port_read(machine,"P1") ^ 0xff; |
| 1818 | 1818 | UINT8 shift_key = input_port_read(machine,"key_modifiers") & 0x02; |
| 1819 | 1819 | UINT8 space_key = input_port_read(machine,"key2") & 0x01; |
| 1820 | UINT8 joy_press; |
| 1820 | 1821 | |
| 1821 | | static UINT8 joy_press; |
| 1822 | | |
| 1823 | 1822 | /* |
| 1824 | 1823 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 1825 | 1824 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
src/mess/drivers/smc777.c
| r9659 | r9660 | |
| 39 | 39 | { |
| 40 | 40 | int x,y,yi; |
| 41 | 41 | 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; |
| 46 | 46 | |
| 47 | 47 | bitmap_fill(bitmap, cliprect, screen->machine->pens[backdrop_pen+0x10]); |
| 48 | 48 | |
| r9659 | r9660 | |
| 57 | 57 | { |
| 58 | 58 | for(x=0;x<x_width;x++) |
| 59 | 59 | { |
| 60 | | static UINT16 color; |
| 60 | UINT16 color; |
| 61 | 61 | |
| 62 | 62 | color = (gram[count] & 0xf0) >> 4; |
| 63 | 63 | *BITMAP_ADDR16(bitmap, y+yi+CRTC_MIN_Y, x*4+0+CRTC_MIN_X) = screen->machine->pens[color+0x10]; |
| r9659 | r9660 | |
| 161 | 161 | |
| 162 | 162 | static READ8_HANDLER( smc777_vram_r ) |
| 163 | 163 | { |
| 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; |
| 166 | 166 | |
| 167 | 167 | vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B); |
| 168 | 168 | |
| r9659 | r9660 | |
| 171 | 171 | |
| 172 | 172 | static READ8_HANDLER( smc777_attr_r ) |
| 173 | 173 | { |
| 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; |
| 176 | 176 | |
| 177 | 177 | vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B); |
| 178 | 178 | |
| r9659 | r9660 | |
| 181 | 181 | |
| 182 | 182 | static READ8_HANDLER( smc777_pcg_r ) |
| 183 | 183 | { |
| 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; |
| 186 | 186 | |
| 187 | 187 | vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B); |
| 188 | 188 | |
| r9659 | r9660 | |
| 191 | 191 | |
| 192 | 192 | static WRITE8_HANDLER( smc777_vram_w ) |
| 193 | 193 | { |
| 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; |
| 196 | 196 | |
| 197 | 197 | vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B); |
| 198 | 198 | |
| r9659 | r9660 | |
| 201 | 201 | |
| 202 | 202 | static WRITE8_HANDLER( smc777_attr_w ) |
| 203 | 203 | { |
| 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; |
| 206 | 206 | |
| 207 | 207 | vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B); |
| 208 | 208 | |
| r9659 | r9660 | |
| 211 | 211 | |
| 212 | 212 | static WRITE8_HANDLER( smc777_pcg_w ) |
| 213 | 213 | { |
| 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; |
| 216 | 216 | |
| 217 | 217 | vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B); |
| 218 | 218 | |
| r9659 | r9660 | |
| 223 | 223 | |
| 224 | 224 | static READ8_HANDLER( smc777_fbuf_r ) |
| 225 | 225 | { |
| 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; |
| 228 | 228 | |
| 229 | 229 | vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B); |
| 230 | 230 | |
| r9659 | r9660 | |
| 233 | 233 | |
| 234 | 234 | static WRITE8_HANDLER( smc777_fbuf_w ) |
| 235 | 235 | { |
| 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; |
| 238 | 238 | |
| 239 | 239 | vram_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B); |
| 240 | 240 | |
| r9659 | r9660 | |
| 328 | 328 | |
| 329 | 329 | static READ8_HANDLER( key_r ) |
| 330 | 330 | { |
| 331 | | static UINT8 res; |
| 331 | UINT8 res; |
| 332 | 332 | |
| 333 | 333 | if(offset == 1) //keyboard status |
| 334 | 334 | return (0xfc) | keyb_press_flag; |
| r9659 | r9660 | |
| 605 | 605 | |
| 606 | 606 | static MACHINE_START(smc777) |
| 607 | 607 | { |
| 608 | | static UINT8 *rom = memory_region(machine, "bios"); |
| 608 | UINT8 *rom = memory_region(machine, "bios"); |
| 609 | 609 | int i; |
| 610 | 610 | |
| 611 | 611 | for(i=0;i<0x4000;i++) |
src/mess/drivers/mz2500.c
| r9659 | r9660 | |
| 312 | 312 | |
| 313 | 313 | static void draw_cg4_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int pri) |
| 314 | 314 | { |
| 315 | | static UINT32 count; |
| 315 | UINT32 count; |
| 316 | 316 | UINT8 *vram = memory_region(machine, "maincpu"); |
| 317 | 317 | UINT8 pen,pen_bit[2]; |
| 318 | 318 | int x,y,xi,pen_i; |
| r9659 | r9660 | |
| 353 | 353 | |
| 354 | 354 | static void draw_cg16_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int plane,int x_size,int pri) |
| 355 | 355 | { |
| 356 | | static UINT32 count; |
| 356 | UINT32 count; |
| 357 | 357 | UINT8 *vram = memory_region(machine, "maincpu"); |
| 358 | 358 | UINT8 pen,pen_bit[4]; |
| 359 | 359 | int x,y,xi,pen_i; |
| r9659 | r9660 | |
| 410 | 410 | |
| 411 | 411 | static void draw_cg256_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int plane,int pri) |
| 412 | 412 | { |
| 413 | | static UINT32 count; |
| 413 | UINT32 count; |
| 414 | 414 | UINT8 *vram = memory_region(machine, "maincpu"); |
| 415 | 415 | UINT8 pen,pen_bit[8]; |
| 416 | 416 | int x,y,xi,pen_i; |
| r9659 | r9660 | |
| 587 | 587 | |
| 588 | 588 | /* calculate TV window parameters here */ |
| 589 | 589 | { |
| 590 | | static int x_offs,y_offs; |
| 590 | int x_offs,y_offs; |
| 591 | 591 | |
| 592 | 592 | monitor_type = ((text_reg[0x0f] & 0x08) >> 3); |
| 593 | 593 | |
| 594 | 594 | switch((monitor_type|text_col_size<<1) & 3) |
| 595 | 595 | { |
| 596 | default: |
| 596 | 597 | case 0: x_offs = 64; break; |
| 597 | 598 | case 1: x_offs = 80; break; |
| 598 | 599 | case 2: x_offs = 72; break; |
| r9659 | r9660 | |
| 863 | 864 | |
| 864 | 865 | static READ8_HANDLER( mz2500_bank_data_r ) |
| 865 | 866 | { |
| 866 | | static UINT8 res; |
| 867 | UINT8 res; |
| 867 | 868 | |
| 868 | 869 | res = bank_val[bank_addr]; |
| 869 | 870 | |
| r9659 | r9660 | |
| 902 | 903 | /* 0xf4 - 0xf7 all returns vblank / hblank states */ |
| 903 | 904 | static READ8_HANDLER( mz2500_crtc_hvblank_r ) |
| 904 | 905 | { |
| 905 | | static UINT8 vblank_bit, hblank_bit; |
| 906 | UINT8 vblank_bit, hblank_bit; |
| 906 | 907 | |
| 907 | 908 | vblank_bit = space->machine->primary_screen->vblank() ? 0 : 1; |
| 908 | 909 | hblank_bit = space->machine->primary_screen->hblank() ? 0 : 2; |
| r9659 | r9660 | |
| 1140 | 1141 | static WRITE8_HANDLER( palette4096_io_w ) |
| 1141 | 1142 | { |
| 1142 | 1143 | 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; |
| 1145 | 1146 | |
| 1146 | 1147 | pal_index = cpu_get_reg(space->machine->device("maincpu"), Z80_B); |
| 1147 | 1148 | pal_entry = (pal_index & 0x1e) >> 1; |
| r9659 | r9660 | |
| 1180 | 1181 | { |
| 1181 | 1182 | if(cg_reg[0x07] & 0x10) |
| 1182 | 1183 | { |
| 1183 | | static UINT8 vblank_bit; |
| 1184 | UINT8 vblank_bit; |
| 1184 | 1185 | |
| 1185 | 1186 | vblank_bit = space->machine->primary_screen->vblank() ? 0 : 0x80 | cg_clear_flag; |
| 1186 | 1187 | |
| r9659 | r9660 | |
| 1301 | 1302 | |
| 1302 | 1303 | static READ8_HANDLER( mz2500_joystick_r ) |
| 1303 | 1304 | { |
| 1304 | | static UINT8 res,dir_en,in_r; |
| 1305 | UINT8 res,dir_en,in_r; |
| 1305 | 1306 | |
| 1306 | 1307 | res = 0xff; |
| 1307 | 1308 | in_r = ~input_port_read(space->machine, joy_mode & 0x40 ? "JOY_2P" : "JOY_1P"); |
| r9659 | r9660 | |
| 1750 | 1751 | |
| 1751 | 1752 | static READ8_DEVICE_HANDLER( mz2500_portb_r ) |
| 1752 | 1753 | { |
| 1753 | | static UINT8 vblank_bit; |
| 1754 | UINT8 vblank_bit; |
| 1754 | 1755 | |
| 1755 | 1756 | vblank_bit = device->machine->primary_screen->vblank() ? 0 : 1; //Guess: NOBO wants this bit to be high/low |
| 1756 | 1757 | |
src/mess/drivers/bml3.c
| r9659 | r9660 | |
| 47 | 47 | int x,y,count; |
| 48 | 48 | int xi,yi; |
| 49 | 49 | 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"); |
| 52 | 52 | |
| 53 | 53 | count = 0x0000; |
| 54 | 54 | |
| r9659 | r9660 | |
| 163 | 163 | /* Note: this custom code is there just for simplicity, it'll be nuked in the end */ |
| 164 | 164 | static READ8_HANDLER( bml3_io_r ) |
| 165 | 165 | { |
| 166 | | static UINT8 *rom = memory_region(space->machine, "maincpu"); |
| 166 | UINT8 *rom = memory_region(space->machine, "maincpu"); |
| 167 | 167 | |
| 168 | 168 | if(offset == 0x19) return io_latch; |
| 169 | 169 | if(offset == 0xc4) return 0xff; //some video modes wants this to be high |
| r9659 | r9660 | |
| 251 | 251 | |
| 252 | 252 | static READ8_HANDLER( bml3_vram_r ) |
| 253 | 253 | { |
| 254 | | static UINT8 *vram = memory_region(space->machine, "vram"); |
| 254 | UINT8 *vram = memory_region(space->machine, "vram"); |
| 255 | 255 | |
| 256 | 256 | /* TODO: this presumably also triggers an attr latch read, unsure yet */ |
| 257 | 257 | attr_latch = vram[offset+0x4000]; |
| r9659 | r9660 | |
| 261 | 261 | |
| 262 | 262 | static WRITE8_HANDLER( bml3_vram_w ) |
| 263 | 263 | { |
| 264 | | static UINT8 *vram = memory_region(space->machine, "vram"); |
| 264 | UINT8 *vram = memory_region(space->machine, "vram"); |
| 265 | 265 | |
| 266 | 266 | vram[offset] = data; |
| 267 | 267 | vram[offset+0x4000] = attr_latch; |
src/mess/drivers/pasopia.c
| r9659 | r9660 | |
| 122 | 122 | |
| 123 | 123 | static void draw_cg4_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int width) |
| 124 | 124 | { |
| 125 | | static UINT8 *vram = memory_region(machine, "vram"); |
| 125 | UINT8 *vram = memory_region(machine, "vram"); |
| 126 | 126 | int x,y,xi,yi; |
| 127 | 127 | int count; |
| 128 | 128 | |
| r9659 | r9660 | |
| 153 | 153 | |
| 154 | 154 | static void draw_tv_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int width) |
| 155 | 155 | { |
| 156 | | static UINT8 *vram = memory_region(machine, "vram"); |
| 156 | UINT8 *vram = memory_region(machine, "vram"); |
| 157 | 157 | int x,y/*,xi,yi*/; |
| 158 | 158 | int count; |
| 159 | 159 | |
| r9659 | r9660 | |
| 201 | 201 | |
| 202 | 202 | static void draw_mixed_screen(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int width) |
| 203 | 203 | { |
| 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"); |
| 206 | 206 | int x,y,xi,yi; |
| 207 | 207 | int count; |
| 208 | 208 | |
| r9659 | r9660 | |
| 302 | 302 | |
| 303 | 303 | static READ8_HANDLER( vram_r ) |
| 304 | 304 | { |
| 305 | | static UINT8 *vram = memory_region(space->machine, "vram"); |
| 306 | | static UINT8 res; |
| 305 | UINT8 *vram = memory_region(space->machine, "vram"); |
| 306 | UINT8 res; |
| 307 | 307 | |
| 308 | 308 | if(vram_sel == 0) |
| 309 | 309 | { |
| r9659 | r9660 | |
| 332 | 332 | |
| 333 | 333 | static WRITE8_HANDLER( vram_w ) |
| 334 | 334 | { |
| 335 | | static UINT8 *vram = memory_region(space->machine, "vram"); |
| 335 | UINT8 *vram = memory_region(space->machine, "vram"); |
| 336 | 336 | |
| 337 | 337 | if(vram_sel) |
| 338 | 338 | { |
| r9659 | r9660 | |
| 525 | 525 | |
| 526 | 526 | static READ8_HANDLER( pasopia7_io_r ) |
| 527 | 527 | { |
| 528 | | static UINT16 io_port; |
| 528 | UINT16 io_port; |
| 529 | 529 | |
| 530 | 530 | if(mio_sel) |
| 531 | 531 | { |
| r9659 | r9660 | |
| 568 | 568 | |
| 569 | 569 | static WRITE8_HANDLER( pasopia7_io_w ) |
| 570 | 570 | { |
| 571 | | static UINT16 io_port; |
| 571 | UINT16 io_port; |
| 572 | 572 | |
| 573 | 573 | if(mio_sel) |
| 574 | 574 | { |
src/mess/drivers/jr200.c
| r9659 | r9660 | |
| 140 | 140 | |
| 141 | 141 | static READ8_HANDLER( jr200_pcg_1_r ) |
| 142 | 142 | { |
| 143 | | static UINT8 *pcg = memory_region(space->machine, "pcg"); |
| 143 | UINT8 *pcg = memory_region(space->machine, "pcg"); |
| 144 | 144 | |
| 145 | 145 | return pcg[offset+0x000]; |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | static READ8_HANDLER( jr200_pcg_2_r ) |
| 149 | 149 | { |
| 150 | | static UINT8 *pcg = memory_region(space->machine, "pcg"); |
| 150 | UINT8 *pcg = memory_region(space->machine, "pcg"); |
| 151 | 151 | |
| 152 | 152 | return pcg[offset+0x400]; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | static WRITE8_HANDLER( jr200_pcg_1_w ) |
| 156 | 156 | { |
| 157 | | static UINT8 *pcg = memory_region(space->machine, "pcg"); |
| 157 | UINT8 *pcg = memory_region(space->machine, "pcg"); |
| 158 | 158 | |
| 159 | 159 | pcg[offset+0x000] = data; |
| 160 | 160 | gfx_element_mark_dirty(space->machine->gfx[1], (offset+0x000) >> 3); |
| r9659 | r9660 | |
| 162 | 162 | |
| 163 | 163 | static WRITE8_HANDLER( jr200_pcg_2_w ) |
| 164 | 164 | { |
| 165 | | static UINT8 *pcg = memory_region(space->machine, "pcg"); |
| 165 | UINT8 *pcg = memory_region(space->machine, "pcg"); |
| 166 | 166 | |
| 167 | 167 | pcg[offset+0x400] = data; |
| 168 | 168 | gfx_element_mark_dirty(space->machine->gfx[1], (offset+0x400) >> 3); |
| r9659 | r9660 | |
| 170 | 170 | |
| 171 | 171 | static READ8_HANDLER( jr200_bios_char_r ) |
| 172 | 172 | { |
| 173 | | static UINT8 *gfx = memory_region(space->machine, "gfx_ram"); |
| 173 | UINT8 *gfx = memory_region(space->machine, "gfx_ram"); |
| 174 | 174 | |
| 175 | 175 | return gfx[offset]; |
| 176 | 176 | } |
| r9659 | r9660 | |
| 178 | 178 | |
| 179 | 179 | static WRITE8_HANDLER( jr200_bios_char_w ) |
| 180 | 180 | { |
| 181 | | // static UINT8 *gfx = memory_region(space->machine, "gfx_ram"); |
| 181 | // UINT8 *gfx = memory_region(space->machine, "gfx_ram"); |
| 182 | 182 | |
| 183 | 183 | /* TODO: writing is presumably controlled by an I/O bit */ |
| 184 | 184 | // gfx[offset] = data; |
| r9659 | r9660 | |
| 458 | 458 | |
| 459 | 459 | static MACHINE_RESET(jr200) |
| 460 | 460 | { |
| 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"); |
| 463 | 463 | int i; |
| 464 | 464 | memset(mn1271_ram,0,0x800); |
| 465 | 465 | |
src/mess/drivers/rx78.c
| r9659 | r9660 | |
| 76 | 76 | |
| 77 | 77 | static VIDEO_UPDATE( rx78 ) |
| 78 | 78 | { |
| 79 | | static UINT8 *vram = memory_region(screen->machine,"vram"); |
| 79 | UINT8 *vram = memory_region(screen->machine,"vram"); |
| 80 | 80 | int x,y,count; |
| 81 | 81 | |
| 82 | 82 | bitmap_fill(bitmap, cliprect, screen->machine->pens[0x10]); |
| r9659 | r9660 | |
| 155 | 155 | |
| 156 | 156 | static READ8_HANDLER( rx78_vram_r ) |
| 157 | 157 | { |
| 158 | | static UINT8 *vram = memory_region(space->machine,"vram"); |
| 158 | UINT8 *vram = memory_region(space->machine,"vram"); |
| 159 | 159 | |
| 160 | 160 | if(vram_read_bank == 0 || vram_read_bank > 6) |
| 161 | 161 | return 0xff; |
| r9659 | r9660 | |
| 165 | 165 | |
| 166 | 166 | static WRITE8_HANDLER( rx78_vram_w ) |
| 167 | 167 | { |
| 168 | | static UINT8 *vram = memory_region(space->machine,"vram"); |
| 168 | UINT8 *vram = memory_region(space->machine,"vram"); |
| 169 | 169 | |
| 170 | 170 | if(vram_write_bank & 0x01) { vram[offset + 0 * 0x2000] = data; } |
| 171 | 171 | if(vram_write_bank & 0x02) { vram[offset + 1 * 0x2000] = data; } |
src/mess/drivers/craft.c
| r9659 | r9660 | |
| 58 | 58 | AVR8_REG_D, |
| 59 | 59 | }; |
| 60 | 60 | |
| 61 | | static char avr8_reg_name[4] = { 'A', 'B', 'C', 'D' }; |
| 61 | static const char avr8_reg_name[4] = { 'A', 'B', 'C', 'D' }; |
| 62 | 62 | |
| 63 | 63 | #if 0 |
| 64 | 64 | static UINT64 avr8_get_timer_1_frequency(craft_state *state) |
| r9659 | r9660 | |
| 362 | 362 | verboselog(machine, 0, "avr8_spi_update_clock_phase: TODO; Sampling edge is %s\n", AVR8_SPCR_CPHA ? "Trailing" : "Leading"); |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | | static UINT8 avr8_spi_clock_divisor[8] = { 4, 16, 64, 128, 2, 8, 32, 64 }; |
| 365 | static const UINT8 avr8_spi_clock_divisor[8] = { 4, 16, 64, 128, 2, 8, 32, 64 }; |
| 366 | 366 | |
| 367 | 367 | static void avr8_spi_update_clock_rate(running_machine *machine) |
| 368 | 368 | { |