Previous 15994 Revisions Next

r10059 Sunday 16th January, 2011 at 14:27:10 UTC by Nathan Woods
Cleanups; static qualifiers. [Atari Ace]
[docs]messnew.txt
[src/mess/drivers]geneve.c h19.c ipds.c mac.c mc1000.c nc.c pb1000.c pegasus.c portfoli.c sgi_ip2.c sm1800.c supracan.c vboy.c
[src/mess/includes]hec2hrp.h nes.h vectrex.h
[src/mess/machine]compis.c galaxy.c hec2hrp.c hp48.c teleprinter.c vectrex.c
[src/mess/video]channelf.c microtan.c pegasus.c vectrex.c

src/mess/machine/hp48.c
r10058r10059
8585 */
8686
8787
88/* I/O memory (each UINT8 stores one nibble) */
89UINT8 hp48_io[64]; /* 64 nibbles */
90
9188/* CRC state */
9289
9390/* timers state */
src/mess/machine/teleprinter.c
r10058r10059
217217/***************************************************************************
218218    VIDEO HARDWARE
219219***************************************************************************/
220void generic_teleprinter_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect)
220static void generic_teleprinter_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect)
221221{
222222   UINT8 code;
223223   int y, c, x, b;
src/mess/machine/galaxy.c
r10058r10059
3232   }
3333}
3434
35UINT8 galaxy_latch_value = 0;
36
3735WRITE8_HANDLER( galaxy_latch_w )
3836{
3937   galaxy_state *state = space->machine->driver_data<galaxy_state>();
r10058r10059
4745/***************************************************************************
4846  Interrupts
4947***************************************************************************/
50int galaxy_interrupts_enabled = TRUE;
5148
5249INTERRUPT_GEN( galaxy_interrupt )
5350{
src/mess/machine/compis.c
r10058r10059
373373/*-------------------------------------------------------------------------*/
374374/*  USART 8251                                                             */
375375/*-------------------------------------------------------------------------*/
376WRITE_LINE_DEVICE_HANDLER( compis_usart_rxready )
376static WRITE_LINE_DEVICE_HANDLER( compis_usart_rxready )
377377{
378378#if 0
379379   if (state)
src/mess/machine/vectrex.c
r10058r10059
136136      if (state->imager_status == 0)
137137         state->imager_status = cport & 0x01;
138138
139      vector_add_point_function = cport & 0x02 ? vectrex_add_point_stereo: vectrex_add_point;
139      state->vector_add_point_function = cport & 0x02 ? vectrex_add_point_stereo: vectrex_add_point;
140140
141141      switch ((cport >> 2) & 0x07)
142142      {
r10058r10059
199199   }
200200   else
201201   {
202      vector_add_point_function = vectrex_add_point;
202      state->vector_add_point_function = vectrex_add_point;
203203      state->beam_color = RGB_WHITE;
204204      state->imager_colors[0] = state->imager_colors[1] = state->imager_colors[2] = state->imager_colors[3] = state->imager_colors[4] = state->imager_colors[5] = RGB_WHITE;
205205   }
src/mess/machine/hec2hrp.c
r10058r10059
694694   /* VCO oscillateur*/
695695   if (AU[12]==1)
696696      sn76477_vco_res_w(      sn76477, Pin_Value[18][AU[10]]/12.0); /* en non AU11*/
697    else
697   else
698698      sn76477_vco_res_w(      sn76477, Pin_Value[18][AU[10]]); /* en non AU11*/
699699
700700   sn76477_vco_cap_w(      sn76477, Pin_Value[17][AU[2 ]]);
r10058r10059
734734   sn76477_enable_w(sn76477, Pin_Value[9][AU[14]]);
735735}
736736
737sn76477_interface hector_sn76477_interface =
737const sn76477_interface hector_sn76477_interface =
738738{
739739   RES_K(47),      /*  4  noise_res*/
740740   RES_K(330),      /*  5  filter_res*/
src/mess/video/vectrex.c
r10058r10059
6464};
6565
6666
67typedef void (*vector_add_point_fn)(running_machine *, int, int, rgb_t, int);
68vector_add_point_fn vector_add_point_function;
6967
70
7168/*********************************************************************
7269
7370   Lightpen
r10058r10059
233230   vectrex_state *state = machine->driver_data<vectrex_state>();
234231   state->x_int = state->x_center + (state->analog[A_ZR] * INT_PER_CLOCK);
235232   state->y_int = state->y_center + (state->analog[A_ZR] * INT_PER_CLOCK);
236   vector_add_point_function(machine, state->x_int, state->y_int, state->beam_color, 0);
233   (*state->vector_add_point_function)(machine, state->x_int, state->y_int, state->beam_color, 0);
237234}
238235
239236
r10058r10059
260257      state->x_int += length * (state->analog[A_X] + state->analog[A_ZR]);
261258      state->y_int += length * (state->analog[A_Y] + state->analog[A_ZR]);
262259
263      vector_add_point_function(machine, state->x_int, state->y_int, state->beam_color, 2 * state->analog[A_Z] * state->blank);
260      (*state->vector_add_point_function)(machine, state->x_int, state->y_int, state->beam_color, 2 * state->analog[A_Z] * state->blank);
264261   }
265262   else
266263   {
267264      if (state->blank)
268         vector_add_point_function(machine, state->x_int, state->y_int, state->beam_color, 2 * state->analog[A_Z]);
265         (*state->vector_add_point_function)(machine, state->x_int, state->y_int, state->beam_color, 2 * state->analog[A_Z]);
269266   }
270267
271268   state->vector_start_time = timer_get_time(machine);
r10058r10059
294291
295292   state->imager_freq = 1;
296293
297   vector_add_point_function = vectrex_add_point;
294   state->vector_add_point_function = vectrex_add_point;
298295   state->imager_timer = timer_alloc(machine, vectrex_imager_eye, NULL);
299296   timer_adjust_periodic(state->imager_timer,
300297                    ATTOTIME_IN_HZ(state->imager_freq),
r10058r10059
492489   state->x_max = visarea.max_x << 16;
493490   state->y_max = visarea.max_y << 16;
494491
495   vector_add_point_function = vectrex_add_point;
492   state->vector_add_point_function = vectrex_add_point;
496493   state->refresh = timer_alloc(machine, vectrex_refresh, NULL);
497494
498495   VIDEO_START_CALL(vector);
src/mess/video/channelf.c
r10058r10059
11#include "emu.h"
22#include "includes/channelf.h"
33
4UINT8 channelf_val_reg = 0;
5UINT8 channelf_row_reg = 0;
6UINT8 channelf_col_reg = 0;
7
84static const rgb_t channelf_palette[] =
95{
106   MAKE_RGB(0x10, 0x10, 0x10),   /* black */
src/mess/video/pegasus.c
r10058r10059
1313#include "emu.h"
1414#include "includes/pegasus.h"
1515
16UINT8* pegasus_video_ram;
17
1816static const UINT8 mcm6571a[] =
1917{
2018   0x00,0x00,0x00,0x00,0x31,0x4A,0x44,0x4A,0x31,// 0
src/mess/video/microtan.c
r10058r10059
1616#include "includes/microtan.h"
1717
1818
19UINT8 microtan_chunky_graphics = 0;
20UINT8 *microtan_chunky_buffer = NULL;
2119
2220
2321WRITE8_HANDLER( microtan_videoram_w )
src/mess/includes/nes.h
r10058r10059
269269
270270/*----------- defined in video/nes.c -----------*/
271271
272extern int nes_vram_sprite[8];
273
274272PALETTE_INIT( nes );
275273VIDEO_START( nes );
276274VIDEO_UPDATE( nes );
src/mess/includes/vectrex.h
r10058r10059
6060   UINT16 via_timer2;
6161   attotime vector_start_time;
6262   UINT8 cb2;
63   void (*vector_add_point_function) (running_machine *, int, int, rgb_t, int);
6364};
6465
6566
r10058r10059
9899
99100void vectrex_add_point_stereo (running_machine *machine, int x, int y, rgb_t color, int intensity);
100101void vectrex_add_point (running_machine *machine, int x, int y, rgb_t color, int intensity);
101extern void (*vector_add_point_function) (running_machine *, int, int, rgb_t, int);
102102
103103#endif /* VECTREX_H_ */
src/mess/includes/hec2hrp.h
r10058r10059
110110extern UINT8 hector_color[4];
111111
112112/* Sound function*/
113extern sn76477_interface hector_sn76477_interface;
113extern const sn76477_interface hector_sn76477_interface;
114114
115115// state disc2 port
116116extern UINT8 hector_disc2_data_r_ready; /* =ff when PC2 = true and data in read buffer (hector_disc2_data_read) */
src/mess/drivers/pb1000.c
r10058r10059
330330   return m_hd44352->video_update(bitmap, cliprect);
331331}
332332
333void lcd_control(hd61700_cpu_device &device, UINT8 data)
333static void lcd_control(hd61700_cpu_device &device, UINT8 data)
334334{
335335   pb1000_state *state = device.machine->driver_data<pb1000_state>();
336336
r10058r10059
338338}
339339
340340
341UINT8 lcd_data_r(hd61700_cpu_device &device)
341static UINT8 lcd_data_r(hd61700_cpu_device &device)
342342{
343343   pb1000_state *state = device.machine->driver_data<pb1000_state>();
344344
r10058r10059
346346}
347347
348348
349void lcd_data_w(hd61700_cpu_device &device, UINT8 data)
349static void lcd_data_w(hd61700_cpu_device &device, UINT8 data)
350350{
351351   pb1000_state *state = device.machine->driver_data<pb1000_state>();
352352
r10058r10059
440440//  HD61700 interface
441441//-------------------------------------------------
442442
443void kb_matrix_w_call(hd61700_cpu_device &device, UINT8 matrix)
443static void kb_matrix_w_call(hd61700_cpu_device &device, UINT8 matrix)
444444{
445445   pb1000_state *state = device.machine->driver_data<pb1000_state>();
446446
447447   state->kb_matrix_w(device.machine, matrix);
448448}
449449
450UINT8 pb1000_port_r(hd61700_cpu_device &device)
450static UINT8 pb1000_port_r(hd61700_cpu_device &device)
451451{
452452   //TODO
453453   return 0x00;
454454}
455455
456UINT8 pb2000c_port_r(hd61700_cpu_device &device)
456static UINT8 pb2000c_port_r(hd61700_cpu_device &device)
457457{
458458   //TODO
459459   return 0xfc;
460460}
461461
462void port_w(hd61700_cpu_device &device, UINT8 data)
462static void port_w(hd61700_cpu_device &device, UINT8 data)
463463{
464464   beep_set_state(device.machine->device("beep"), (BIT(data,7) ^ BIT(data,6)));
465465   //printf("%x\n", data);
466466}
467467
468UINT16 pb1000_kb_r_call(hd61700_cpu_device &device)
468static UINT16 pb1000_kb_r_call(hd61700_cpu_device &device)
469469{
470470   pb1000_state *state = device.machine->driver_data<pb1000_state>();
471471
472472   return state->pb1000_kb_r(device.machine);
473473}
474474
475UINT16 pb2000c_kb_r_call(hd61700_cpu_device &device)
475static UINT16 pb2000c_kb_r_call(hd61700_cpu_device &device)
476476{
477477   pb1000_state *state = device.machine->driver_data<pb1000_state>();
478478
r10058r10059
521521};
522522
523523static MACHINE_CONFIG_START( pb1000, pb1000_state )
524    /* basic machine hardware */
525    MCFG_CPU_ADD("maincpu", HD61700, 910000)
526    MCFG_CPU_PROGRAM_MAP(pb1000_mem)
524   /* basic machine hardware */
525   MCFG_CPU_ADD("maincpu", HD61700, 910000)
526   MCFG_CPU_PROGRAM_MAP(pb1000_mem)
527527   MCFG_HD61700_CONFIG(pb1000_config)
528528
529    /* video hardware */
530    MCFG_SCREEN_ADD("screen", RASTER)
531    MCFG_SCREEN_REFRESH_RATE(50)
532    MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
533    MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
529   /* video hardware */
530   MCFG_SCREEN_ADD("screen", RASTER)
531   MCFG_SCREEN_REFRESH_RATE(50)
532   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
533   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
534534   MCFG_SCREEN_SIZE(192, 32)
535535   MCFG_SCREEN_VISIBLE_AREA(0, 192-1, 0, 32-1)
536536   MCFG_DEFAULT_LAYOUT(layout_lcd)
537    MCFG_PALETTE_LENGTH(2)
537   MCFG_PALETTE_LENGTH(2)
538538   MCFG_PALETTE_INIT( pb1000 )
539539   MCFG_GFXDECODE( pb1000 )
540540
r10058r10059
550550MACHINE_CONFIG_END
551551
552552static MACHINE_CONFIG_START( pb2000c, pb1000_state )
553    /* basic machine hardware */
554    MCFG_CPU_ADD("maincpu",HD61700, 910000)
555    MCFG_CPU_PROGRAM_MAP(pb2000c_mem)
553   /* basic machine hardware */
554   MCFG_CPU_ADD("maincpu",HD61700, 910000)
555   MCFG_CPU_PROGRAM_MAP(pb2000c_mem)
556556   MCFG_HD61700_CONFIG(pb2000c_config)
557557
558    /* video hardware */
559    MCFG_SCREEN_ADD("screen", RASTER)
560    MCFG_SCREEN_REFRESH_RATE(50)
561    MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
562    MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
558   /* video hardware */
559   MCFG_SCREEN_ADD("screen", RASTER)
560   MCFG_SCREEN_REFRESH_RATE(50)
561   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
562   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
563563   MCFG_SCREEN_SIZE(192, 32)
564564   MCFG_SCREEN_VISIBLE_AREA(0, 192-1, 0, 32-1)
565565   MCFG_DEFAULT_LAYOUT(layout_lcd)
566    MCFG_PALETTE_LENGTH(2)
566   MCFG_PALETTE_LENGTH(2)
567567   MCFG_PALETTE_INIT( pb1000 )
568568   MCFG_GFXDECODE( pb1000 )
569569
src/mess/drivers/mc1000.c
r10058r10059
299299   return mc6847_update(state->mc6847, bitmap, cliprect);
300300}
301301
302UINT8 mc1000_get_char_rom(running_machine *machine, UINT8 ch,int line)
302static UINT8 mc1000_get_char_rom(running_machine *machine, UINT8 ch, int line)
303303{
304304   return ch;
305305}
src/mess/drivers/vboy.c
r10058r10059
706706   return IMAGE_INIT_PASS;
707707}
708708
709INTERRUPT_GEN( vboy_interrupt )
709static INTERRUPT_GEN( vboy_interrupt )
710710{
711711   vboy_state *state = device->machine->driver_data<vboy_state>();
712712
src/mess/drivers/sm1800.c
r10058r10059
2424public:
2525   sm1800_state(running_machine &machine, const driver_device_config_base &config)
2626      : driver_device(machine, config) { }
27
28   UINT8 irq_state;
2729};
2830
2931static ADDRESS_MAP_START(sm1800_mem, ADDRESS_SPACE_PROGRAM, 8)
r10058r10059
6567   return 0;
6668}
6769
68UINT8 state = 0;
69
70INTERRUPT_GEN( sm1800_vblank_interrupt )
70static INTERRUPT_GEN( sm1800_vblank_interrupt )
7171{
72   cputag_set_input_line(device->machine, "maincpu", 0, state ?  HOLD_LINE : CLEAR_LINE);
73   state ^= 1;
72   sm1800_state *state = device->machine->driver_data<sm1800_state>();
73   cputag_set_input_line(device->machine, "maincpu", 0, state->irq_state ?  HOLD_LINE : CLEAR_LINE);
74   state->irq_state ^= 1;
7475}
7576
76I8275_DISPLAY_PIXELS(sm1800_display_pixels)
77static I8275_DISPLAY_PIXELS(sm1800_display_pixels)
7778{
7879   int i;
7980   bitmap_t *bitmap = device->machine->generic.tmpbitmap;
r10058r10059
119120{
120121   return 0;
121122}
123
122124I8255A_INTERFACE( sm1800_ppi8255_interface )
123125{
124126   DEVCB_HANDLER(sm1800_8255_porta_r),
src/mess/drivers/mac.c
r10058r10059
6767// CA2: SCSI interrupt = 0x01
6868// CB1: ASC interrupt = 0x10
6969
70INTERRUPT_GEN( mac_rbv_vbl )
70static INTERRUPT_GEN( mac_rbv_vbl )
7171{
7272   mac_state *mac = device->machine->driver_data<mac_state>();
7373
src/mess/drivers/nc.c
r10058r10059
268268   drvstate->card_status = state;
269269}
270270
271/* card ram */
272unsigned char *nc_card_ram = NULL;
273271
274
275
276
277272/* latched interrupts are interrupts that cannot be cleared by writing to the irq
278273mask. latched interrupts can only be cleared by accessing the interrupting
279274device e.g. serial chip, fdc */
src/mess/drivers/sgi_ip2.c
r10058r10059
222222#define PAR_MBR      0x40   /* Check parity on multibus reads */
223223#define PAR_MBW      0x80   /* Check parity on multibus writes */
224224
225UINT8 sgi_ip2_parctl;
225static UINT8 sgi_ip2_parctl;
226226
227227static READ8_HANDLER(sgi_ip2_parctl_r)
228228{
r10058r10059
245245#define MBP_LMACC   0x40   /* Allow lower memory access (0x0nnnnn - 0x7nnnnn) */
246246#define MBP_HMACC   0x80   /* Allow upper memory access (0x8nnnnn - 0xfnnnnn) */
247247
248UINT8 sgi_ip2_mbp;
248static UINT8 sgi_ip2_mbp;
249249
250250static READ8_HANDLER(sgi_ip2_mbp_r)
251251{
src/mess/drivers/geneve.c
r10058r10059
449449
450450INPUT_PORTS_END
451451
452DRIVER_INIT( genmod )
452static DRIVER_INIT( genmod )
453453{
454454   /*has_genmod = TRUE;*/
455455}
456456
457DRIVER_INIT( geneve )
457static DRIVER_INIT( geneve )
458458{
459459   /*has_genmod = FALSE;*/
460460}
461461
462MACHINE_START( geneve )
462static MACHINE_START( geneve )
463463{
464464}
465465
466466/*
467467    Reset the machine.
468468*/
469MACHINE_RESET( geneve )
469static MACHINE_RESET( geneve )
470470{
471471}
472472
src/mess/drivers/portfoli.c
r10058r10059
177177//  IRQ_CALLBACK( portfolio_int_ack )
178178//-------------------------------------------------
179179
180IRQ_CALLBACK( portfolio_int_ack )
180static IRQ_CALLBACK( portfolio_int_ack )
181181{
182182   portfolio_state *state = device->machine->driver_data<portfolio_state>();
183183
r10058r10059
383383//  TIMER_DEVICE_CALLBACK( system_tick )
384384//-------------------------------------------------
385385
386TIMER_DEVICE_CALLBACK( system_tick )
386static TIMER_DEVICE_CALLBACK( system_tick )
387387{
388388   portfolio_state *state = timer.machine->driver_data<portfolio_state>();
389389
r10058r10059
394394//  TIMER_DEVICE_CALLBACK( counter_tick )
395395//-------------------------------------------------
396396
397TIMER_DEVICE_CALLBACK( counter_tick )
397static TIMER_DEVICE_CALLBACK( counter_tick )
398398{
399399   portfolio_state *state = timer.machine->driver_data<portfolio_state>();
400400
r10058r10059
668668//  HD61830_INTERFACE( lcdc_intf )
669669//-------------------------------------------------
670670
671READ8_DEVICE_HANDLER( hd61830_rd_r )
671static READ8_DEVICE_HANDLER( hd61830_rd_r )
672672{
673673   UINT16 address = ((offset & 0xff) << 3) | ((offset >> 12) & 0x07);
674674   UINT8 data = device->machine->region(HD61830_TAG)->base()[address];
src/mess/drivers/supracan.c
r10058r10059
105105struct _acan_sprdma_regs_t
106106{
107107   UINT32 src;
108    UINT16 src_inc;
108   UINT16 src_inc;
109109   UINT32 dst;
110    UINT16 dst_inc;
110   UINT16 dst_inc;
111111   UINT16 count;
112112   UINT16 control;
113113};
r10058r10059
116116{
117117public:
118118   supracan_state(running_machine &machine, const driver_device_config_base &config) : driver_device(machine, config)
119    {
120        m6502_reset = 0;
121    }
119   {
120      m6502_reset = 0;
121   }
122122
123123   acan_dma_regs_t acan_dma_regs;
124124   acan_sprdma_regs_t acan_sprdma_regs;
125125
126126   UINT16 m6502_reset;
127127   UINT8 *soundram;
128    UINT8 soundlatch;
129    UINT8 soundcpu_irq_src;
130    UINT8 sound_irq_enable_reg;
131    UINT8 sound_irq_source_reg;
132    UINT8 sound_cpu_68k_irq_reg;
128   UINT8 soundlatch;
129   UINT8 soundcpu_irq_src;
130   UINT8 sound_irq_enable_reg;
131   UINT8 sound_irq_source_reg;
132   UINT8 sound_cpu_68k_irq_reg;
133133
134134   emu_timer *video_timer;
135    emu_timer *hbl_timer;
136    emu_timer *line_on_timer;
137    emu_timer *line_off_timer;
135   emu_timer *hbl_timer;
136   emu_timer *line_on_timer;
137   emu_timer *line_off_timer;
138138   UINT16 *vram;
139139   UINT16 *vram_swapped;
140140   UINT8 *vram_addr_swapped;
141141
142    UINT16 *pram;
142   UINT16 *pram;
143143
144    UINT16 sprite_count;
144   UINT16 sprite_count;
145145   UINT32 sprite_base_addr;
146    UINT8 sprite_flags;
146   UINT8 sprite_flags;
147147
148148    UINT32 tilemap_base_addr[3];
149149   int tilemap_scrollx[3];
150    int tilemap_scrolly[3];
150   int tilemap_scrolly[3];
151151   UINT16 video_flags;
152152   UINT16 tilemap_flags[3];
153    UINT16 tilemap_mode[3];
153   UINT16 tilemap_mode[3];
154154   UINT16 irq_mask;
155    UINT16 hbl_mask;
155   UINT16 hbl_mask;
156156
157157   UINT32 roz_base_addr;
158158   UINT16 roz_mode;
159159   UINT32 roz_scrollx;
160    UINT32 roz_scrolly;
160   UINT32 roz_scrolly;
161161   UINT16 roz_tile_bank;
162    UINT32 roz_unk_base0;
163    UINT32 roz_unk_base1;
164    UINT32 roz_unk_base2;
165    UINT16 roz_coeffa;
166    UINT16 roz_coeffb;
167    UINT16 roz_coeffc;
168    UINT16 roz_coeffd;
169    INT32 roz_changed;
170    INT32 roz_cx;
171    INT32 roz_cy;
172    UINT16 unk_1d0;
162   UINT32 roz_unk_base0;
163   UINT32 roz_unk_base1;
164   UINT32 roz_unk_base2;
165   UINT16 roz_coeffa;
166   UINT16 roz_coeffb;
167   UINT16 roz_coeffc;
168   UINT16 roz_coeffd;
169   INT32 roz_changed;
170   INT32 roz_cx;
171   INT32 roz_cy;
172   UINT16 unk_1d0;
173173
174174   UINT16 video_regs[256];
175175
176    bool hack_68k_to_6502_access;
176   bool hack_68k_to_6502_access;
177177
178   tilemap_t    *tilemap_sizes[4][4];
178   tilemap_t *tilemap_sizes[4][4];
179179   bitmap_t    *sprite_final_bitmap;
180
181
182
183180};
184181
185182static READ16_HANDLER( supracan_68k_soundram_r );
r10058r10059
207204#define verboselog(w,x,y,z,...)
208205#endif
209206
210int supracan_tilemap_get_region(running_machine* machine, int layer)
207static int supracan_tilemap_get_region(running_machine* machine, int layer)
211208{
212    supracan_state *state = machine->driver_data<supracan_state>();
209   supracan_state *state = machine->driver_data<supracan_state>();
213210
214211   // HACK!!!
215212   if (layer==2)
r10058r10059
253250
254251static void supracan_tilemap_get_info_common(running_machine* machine, int layer, tile_data *tileinfo, int count)
255252{
256    supracan_state *state = machine->driver_data<supracan_state>();
253   supracan_state *state = machine->driver_data<supracan_state>();
257254
258255   UINT16* supracan_vram = state->vram;
259256
r10058r10059
263260
264261   count += base;
265262
266    UINT16 tile_bank = 0;
267    UINT16 palette_bank = 0;
263   UINT16 tile_bank = 0;
264   UINT16 palette_bank = 0;
268265   switch(gfx_mode)
269266   {
270267      case 7:
r10058r10059
293290   }
294291
295292
296    if(layer == 2)
297    {
298        tile_bank = 0x1000;
299    }
293   if(layer == 2)
294   {
295      tile_bank = 0x1000;
296   }
300297
301298   int tile = (supracan_vram[count] & 0x03ff) + tile_bank;
302299   int flipxy = (supracan_vram[count] & 0x0c00)>>10;
r10058r10059
308305// I wonder how different this really is.. my guess, not at all.
309306static void supracan_tilemap_get_info_roz(running_machine* machine, int layer, tile_data *tileinfo, int count)
310307{
311    supracan_state *state = machine->driver_data<supracan_state>();
308   supracan_state *state = machine->driver_data<supracan_state>();
312309
313310   UINT16* supracan_vram = state->vram;
314311
315312   UINT32 base = state->roz_base_addr;
316313
317314
318    int region = 1;
319    UINT16 tile_bank = 0;
320    UINT16 palette_bank = 0;
315   int region = 1;
316   UINT16 tile_bank = 0;
317   UINT16 palette_bank = 0;
321318
322319   region = supracan_tilemap_get_region(machine, layer);
323320
r10058r10059
388385
389386static VIDEO_START( supracan )
390387{
391    supracan_state *state = machine->driver_data<supracan_state>();
392    state->sprite_final_bitmap = auto_bitmap_alloc(machine, 1024, 1024, BITMAP_FORMAT_INDEXED16);
388   supracan_state *state = machine->driver_data<supracan_state>();
389   state->sprite_final_bitmap = auto_bitmap_alloc(machine, 1024, 1024, BITMAP_FORMAT_INDEXED16);
393390
394391   state->vram = (UINT16*)machine->region("ram_gfx")->base();
395392   state->vram_swapped = (UINT16*)machine->region("ram_gfx2")->base();
r10058r10059
418415
419416static int get_tilemap_dimensions(running_machine* machine, int &xsize, int &ysize, int layer)
420417{
421    supracan_state *state = (supracan_state *)machine->driver_data<supracan_state>();
418   supracan_state *state = (supracan_state *)machine->driver_data<supracan_state>();
422419   int select;
423420
424421   xsize = 32;
r10058r10059
455452
456453static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
457454{
458    supracan_state *state = machine->driver_data<supracan_state>();
455   supracan_state *state = machine->driver_data<supracan_state>();
459456   UINT16 *supracan_vram = state->vram;
460457
461458//      [0]
r10058r10059
608605
609606
610607
611void mark_active_tilemap_all_dirty(running_machine* machine, int layer)
608static void mark_active_tilemap_all_dirty(running_machine* machine, int layer)
612609{
613    supracan_state *state = (supracan_state *)machine->driver_data<supracan_state>();
610   supracan_state *state = (supracan_state *)machine->driver_data<supracan_state>();
614611   int xsize = 0;
615612   int ysize = 0;
616613
r10058r10059
751748
752749static VIDEO_UPDATE( supracan )
753750{
754    supracan_state *state = (supracan_state *)screen->machine->driver_data<supracan_state>();
751   supracan_state *state = (supracan_state *)screen->machine->driver_data<supracan_state>();
755752
756753
757754
r10058r10059
848845                  if (scrolly&0x8000) scrolly-= 0x10000;
849846
850847                    int mosaic_count = (state->tilemap_flags[layer] & 0x001c) >> 2;
851                   int mosaic_mask = 0xffffffff << mosaic_count;
848                  int mosaic_mask = 0xffffffff << mosaic_count;
852849
853850                  int y,x;
854851                  // yes, it will draw a single line if you specify a cliprect as such (partial updates...)
r10058r10059
984981
985982static WRITE16_HANDLER( supracan_dma_w )
986983{
987    supracan_state *state = (supracan_state *)space->machine->driver_data<supracan_state>();
984   supracan_state *state = (supracan_state *)space->machine->driver_data<supracan_state>();
988985   acan_dma_regs_t *acan_dma_regs = &state->acan_dma_regs;
989    int ch = (offset < 0x10/2) ? 0 : 1;
986   int ch = (offset < 0x10/2) ? 0 : 1;
990987
991988   switch(offset)
992989   {
r10058r10059
10591056   }
10601057}
10611058
1062/*
1059#if 0
10631060static WRITE16_HANDLER( supracan_pram_w )
10641061{
1065    supracan_state *state = (supracan_state *)space->machine->driver_data<supracan_state>();
1066    state->pram[offset] &= ~mem_mask;
1067    state->pram[offset] |= data & mem_mask;
1062   supracan_state *state = (supracan_state *)space->machine->driver_data<supracan_state>();
1063   state->pram[offset] &= ~mem_mask;
1064   state->pram[offset] |= data & mem_mask;
10681065}
1069*/
1066#endif
10701067
10711068// swap address around so that 64x64 tile can be decoded as 8x8 tiles..
1072void write_swapped_byte(running_machine* machine, int offset, UINT8 byte )
1069static void write_swapped_byte(running_machine* machine, int offset, UINT8 byte )
10731070{
1074    supracan_state *state = (supracan_state *)machine->driver_data<supracan_state>();
1071   supracan_state *state = (supracan_state *)machine->driver_data<supracan_state>();
10751072   int swapped_offset = BITSWAP32(offset, 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,2,1,0,6,5,4,3);
10761073
10771074   state->vram_addr_swapped[swapped_offset] = byte;
r10058r10059
10801077
10811078static READ16_HANDLER( supracan_vram_r )
10821079{
1083    supracan_state *state = (supracan_state *)space->machine->driver_data<supracan_state>();
1080   supracan_state *state = (supracan_state *)space->machine->driver_data<supracan_state>();
10841081   return state->vram[offset];
10851082}
10861083
10871084
10881085static WRITE16_HANDLER( supracan_vram_w )
10891086{
1090    supracan_state *state = (supracan_state *)space->machine->driver_data<supracan_state>();
1087   supracan_state *state = (supracan_state *)space->machine->driver_data<supracan_state>();
10911088   COMBINE_DATA(&state->vram[offset]);
10921089
10931090   // store a byteswapped vesrion for easier gfx-decode
r10058r10059
11151112   AM_RANGE( 0xe80202, 0xe80203 ) AM_READ_PORT("P2")
11161113   AM_RANGE( 0xe80208, 0xe80209 ) AM_READ_PORT("P3")
11171114   AM_RANGE( 0xe8020c, 0xe8020d ) AM_READ_PORT("P4")
1118    AM_RANGE( 0xe80000, 0xe8ffff ) AM_READWRITE( supracan_68k_soundram_r, supracan_68k_soundram_w )
1115   AM_RANGE( 0xe80000, 0xe8ffff ) AM_READWRITE( supracan_68k_soundram_r, supracan_68k_soundram_w )
11191116   AM_RANGE( 0xe90000, 0xe9001f ) AM_READWRITE( supracan_sound_r, supracan_sound_w )
11201117   AM_RANGE( 0xe90020, 0xe9003f ) AM_WRITE( supracan_dma_w )
11211118   AM_RANGE( 0xf00000, 0xf001ff ) AM_READWRITE( supracan_video_r, supracan_video_w )
1122    AM_RANGE( 0xf00200, 0xf003ff ) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
1119   AM_RANGE( 0xf00200, 0xf003ff ) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
11231120   AM_RANGE( 0xf40000, 0xf5ffff ) AM_READWRITE(supracan_vram_r, supracan_vram_w)
11241121   AM_RANGE( 0xfc0000, 0xfdffff ) AM_MIRROR(0x30000) AM_RAM /* System work ram */
11251122ADDRESS_MAP_END
r10058r10059
15201517
15211518static TIMER_CALLBACK( supracan_video_callback )
15221519{
1523    supracan_state *state = machine->driver_data<supracan_state>();
1520   supracan_state *state = machine->driver_data<supracan_state>();
15241521   int vpos = machine->primary_screen->vpos();
15251522
1526    state->video_regs[0] &= ~0x0002;
1523   state->video_regs[0] &= ~0x0002;
15271524
15281525   switch( vpos )
15291526   {
r10058r10059
17301727
17311728      case 0x1f0/2: //FIXME: this register is mostly not understood
17321729         state->irq_mask = data;//(data & 8) ? 0 : 1;
1733            /*
1730#if 0
17341731            if(!state->irq_mask && !state->hbl_mask)
17351732            {
17361733                cpu_set_input_line(devtag_get_device(space->machine, "maincpu"), 7, CLEAR_LINE);
17371734            }
1738            */
1735#endif
17391736            verboselog("maincpu", space->machine, 3, "irq_mask = %04x\n", data);
17401737         break;
17411738      default:
r10058r10059
18821879
18831880static INTERRUPT_GEN( supracan_irq )
18841881{
1885    /*
1882#if 0
18861883    supracan_state *state = (supracan_state *)device->machine->driver_data<supracan_state>();
18871884
18881885    if(state->irq_mask)
18891886    {
18901887        cpu_set_input_line(device, 7, HOLD_LINE);
18911888    }
1892    */
1889#endif
18931890}
18941891
18951892static INTERRUPT_GEN( supracan_sound_irq )
r10058r10059
19161913
19171914   MCFG_CPU_ADD( "soundcpu", M6502, XTAL_3_579545MHz )      /* TODO: Verfiy actual clock */
19181915   MCFG_CPU_PROGRAM_MAP( supracan_sound_mem )
1919    MCFG_CPU_VBLANK_INT("screen", supracan_sound_irq)
1916   MCFG_CPU_VBLANK_INT("screen", supracan_sound_irq)
19201917
19211918#if !(SOUNDCPU_BOOT_HACK)
1922    MCFG_QUANTUM_PERFECT_CPU("maincpu")
1923    MCFG_QUANTUM_PERFECT_CPU("soundcpu")
1919   MCFG_QUANTUM_PERFECT_CPU("maincpu")
1920   MCFG_QUANTUM_PERFECT_CPU("soundcpu")
19241921#endif
19251922
19261923   MCFG_MACHINE_START( supracan )
r10058r10059
19281925
19291926   MCFG_SCREEN_ADD( "screen", RASTER )
19301927   MCFG_SCREEN_FORMAT( BITMAP_FORMAT_INDEXED16 )
1931    //MCFG_SCREEN_FORMAT( BITMAP_FORMAT_RGB32 )
1928   //MCFG_SCREEN_FORMAT( BITMAP_FORMAT_RGB32 )
19321929   MCFG_SCREEN_RAW_PARAMS(XTAL_10_738635MHz/2, 348, 0, 256, 256, 0, 240 )   /* No idea if this is correct */
19331930
19341931   MCFG_PALETTE_LENGTH( 32768 )
src/mess/drivers/pegasus.c
r10058r10059
3636#include "imagedev/cassette.h"
3737#include "includes/pegasus.h"
3838
39UINT8 pegasus_control_bits = 0;
40
4139static TIMER_DEVICE_CALLBACK( pegasus_firq )
4240{
4341   device_t *cpu = timer.machine->device( "maincpu" );
src/mess/drivers/h19.c
r10058r10059
332332   }
333333}
334334
335INS8250_INTERRUPT(h19_ace_irq)
335static INS8250_INTERRUPT(h19_ace_irq)
336336{
337337   cputag_set_input_line(device->machine, "maincpu", 0, (state ? HOLD_LINE : CLEAR_LINE));
338338}
src/mess/drivers/ipds.c
r10058r10059
3535INPUT_PORTS_END
3636
3737
38I8275_DISPLAY_PIXELS(ipds_display_pixels)
38static I8275_DISPLAY_PIXELS(ipds_display_pixels)
3939{
4040   int i;
4141   bitmap_t *bitmap = device->machine->generic.tmpbitmap;
docs/messnew.txt
r10058r10059
5050- softlists: Added new lists, new dumps and info [anondumper, Barry Rodewald,
5151  Curt Coder, MESSfan, Fabio Priuli]
5252
53- Cleanups; static qualifiers.  [Atari Ace]
5354
5455
56
55570.141
5658
5759New System Drivers Supported:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team