Previous 15994 Revisions Next

r9618 Saturday 20th November, 2010 at 10:27:24 UTC by Nathan Woods
Static and const changes. [Atari Ace]
[docs]messnew.txt
[src/mess/audio]upd1771.c
[src/mess/devices]bitbngr.c
[src/mess/drivers]fmtowns.c gba.c jr200.c micronic.c portfoli.c psion.c rmnimbus.c supercon.c svision.c ti89.c ti99_4x.c vg5k.c xor100.c
[src/mess/formats]csw_cas.c hect_tap.c
[src/mess/includes]hec2hrp.h pegasus.h pet.h rmnimbus.h ti89.h vectrex.h
[src/mess/machine]990_tap.c er59256.c er59256.h hec2hrp.c hecdisk2.c mboard.c pc1251.c pc1350.c pc1401.c pc1403.c pet.c rmnimbus.c trs80.c vectrex.c zx.c
[src/mess/machine/ti99]bwg.c crubus.c evpc.c grom.c hfdc.c hsgpl.c myarcmem.c p_code.c peribox.c peribox.h samsmem.c spchsyn.c ti32kmem.c ti_fdc.c ti_rs232.c tn_ide.c tn_usbsm.c
[src/mess/video]bbc.c dgn_beta.c fmtowns.c hd44780.h m6845.c m6845.h pc8801.c pc_cga.c rmnimbus.c saa505x.c super80.c

src/mess/devices/bitbngr.c
r9617r9618
8383    native_output - outputs data to a file
8484-------------------------------------------------*/
8585
86void native_output(running_device *bitbanger, UINT8 data)
86static void native_output(running_device *bitbanger, UINT8 data)
8787{
8888   device_image_interface *image = dynamic_cast<device_image_interface *>(bitbanger);
8989   if (image->exists())
r9617r9618
9797    native_input - inputs data from a file
9898-------------------------------------------------*/
9999
100UINT32 native_input(running_device *bitbanger, void *buffer, UINT32 length)
100static UINT32 native_input(running_device *bitbanger, void *buffer, UINT32 length)
101101{
102102   device_image_interface *image = dynamic_cast<device_image_interface *>(bitbanger);
103103   if (image->exists())
r9617r9618
173173/*-------------------------------------------------
174174    bitbanger_tune_value
175175-------------------------------------------------*/
176float bitbanger_tune_value(running_device *device)
176static float bitbanger_tune_value(running_device *device)
177177{
178178   bitbanger_token *bi = get_token(device);
179179   float tunes[] = {0.97, 0.9825, 0.985, 0.9875, 0.99, 0.9925, 0.995, 0.9975, 1.0,
r9617r9618
187187    bitbanger_baud_value
188188-------------------------------------------------*/
189189
190UINT32 bitbanger_baud_value(running_device *device)
190static UINT32 bitbanger_baud_value(running_device *device)
191191{
192192   bitbanger_token *bi = get_token(device);
193193   float bauds[] = { 150.0, 300.0, 600.0, 1200.0, 2400.0, 4800.0, 9600.0,
src/mess/audio/upd1771.c
r9617r9618
6969#define MAX_PACKET_SIZE 0x8000
7070
7171
72size_t g_count = 0;
7372/*
7473  Each of the 8 waveforms have been sampled at 192Khz using period 0xFF,
7574  filtered, and each of the 32 levels have been calculated with averages on around 10 samples
src/mess/machine/pc1350.c
r9617r9618
77
88static UINT8 outa,outb;
99
10static int power=1; /* simulates pressed cce when mess is started */
10static int power; /* simulates pressed cce when mess is started */
1111
1212void pc1350_outa(running_device *device, int data)
1313{
r9617r9618
121121{
122122   address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
123123
124   power = 1;
124125   timer_set(machine, ATTOTIME_IN_SEC(1), NULL, 0, pc1350_power_up);
125126
126127   memory_install_readwrite_bank(space, 0x6000, 0x6fff, 0, 0, "bank1");
src/mess/machine/ti99/crubus.c
r9617r9618
4040   return (crubus_state *)downcast<legacy_device_base *>(device)->token();
4141}
4242
43void cru_mount_device(running_device *device, running_device *crudev, UINT16 address_mask, UINT16 address_bits, cru_read_function cruread, cru_write_function cruwrite)
43static void cru_mount_device(running_device *device, running_device *crudev, UINT16 address_mask, UINT16 address_bits, cru_read_function cruread, cru_write_function cruwrite)
4444{
4545   crubus_state *crubus = get_safe_token(device);
4646   int index = crubus->devindex++;
src/mess/machine/ti99/grom.c
r9617r9618
108108    access. We do not have a tri-state handling on the read handlers, so this
109109    serves to avoid the read access.
110110*/
111int is_selected(running_device *chip)
111static int is_selected(running_device *chip)
112112{
113113   ti99grom_state *grom = get_safe_token(chip);
114114   return (((grom->address >> 13)&0x07)==grom->ident);
src/mess/machine/ti99/hsgpl.c
r9617r9618
539539   }
540540}
541541
542static ti99_peb_card hsgpl_card =
542static const ti99_peb_card hsgpl_card =
543543{
544544   data_rz,
545545   data_w,
src/mess/machine/ti99/ti_fdc.c
r9617r9618
324324   { PFLOPPY_0, PFLOPPY_1, PFLOPPY_2, NULL }
325325};
326326
327static ti99_peb_card fdc_card =
327static const ti99_peb_card fdc_card =
328328{
329329   data_r,
330330   data_w,
src/mess/machine/ti99/p_code.c
r9617r9618
186186   }
187187}
188188
189static ti99_peb_card pcode_ncard =
189static const ti99_peb_card pcode_ncard =
190190{
191191   data_r,
192192   data_w,
src/mess/machine/ti99/tn_usbsm.c
r9617r9618
297297
298298/**************************************************************************/
299299
300static ti99_peb_card tn_usbsm_card =
300static const ti99_peb_card tn_usbsm_card =
301301{
302302   data_rz, data_w,            // memory access read/write
303303   cru_rz, cru_w,               // CRU access
src/mess/machine/ti99/ti32kmem.c
r9617r9618
5353
5454/**************************************************************************/
5555
56static ti99_peb_card ti32k_card =
56static const ti99_peb_card ti32k_card =
5757{
5858   mem32k_rz, mem32k_w,         // memory access read/write
5959   NULL, NULL,                  // CRU access (none here)
src/mess/machine/ti99/evpc.c
r9617r9618
318318   }
319319}
320320
321static ti99_peb_card evpc_card =
321static const ti99_peb_card evpc_card =
322322{
323323   data_rz,
324324   data_w,
src/mess/machine/ti99/tn_ide.c
r9617r9618
305305
306306/**************************************************************************/
307307
308static ti99_peb_card tn_ide_card =
308static const ti99_peb_card tn_ide_card =
309309{
310310   data_rz, data_w,            // memory access read/write
311311   cru_rz, cru_w,               // CRU access
src/mess/machine/ti99/samsmem.c
r9617r9618
9292
9393/**************************************************************************/
9494
95static ti99_peb_card samsmem_card =
95static const ti99_peb_card samsmem_card =
9696{
9797   samsmem_rz, samsmem_w,         // memory access read/write
9898   NULL, samsmem_cru_w,         // CRU access (no read here)
src/mess/machine/ti99/hfdc.c
r9617r9618
633633   hfdc_harddisk_write_track
634634};
635635
636static ti99_peb_card hfdc_card =
636static const ti99_peb_card hfdc_card =
637637{
638638   data_r,
639639   data_w,
src/mess/machine/ti99/ti_rs232.c
r9617r9618
408408      logerror("ti99/rs232: serdev1 not found\n");
409409}
410410
411WRITE_LINE_DEVICE_HANDLER( senila )
411static WRITE_LINE_DEVICE_HANDLER( senila )
412412{
413413   // put the value on the data bus. We store it in a state variable.
414414   ti_rs232_state *card = (ti_rs232_state*)downcast<legacy_device_base *>(device)->token();
r9617r9618
434434};
435435
436436
437static ti99_peb_card tirs232_card =
437static const ti99_peb_card tirs232_card =
438438{
439439   data_rz, data_w,            // memory access read/write
440440   cru_rz, cru_w,               // CRU access
src/mess/machine/ti99/peribox.c
r9617r9618
151151typedef struct _ti99_peb_slot
152152{
153153   running_device      *card;
154   ti99_peb_card      *intf;
154   const ti99_peb_card   *intf;
155155} ti99_peb_slot;
156156
157157typedef struct _ti99_peb_state
r9617r9618
246246    other cards are stillborn.
247247    Returns TRUE when the card could be mounted.
248248*/
249int mount_card(running_device *device, running_device *cardptr, ti99_peb_card *cardintf, int slotindex)
249int mount_card(running_device *device, running_device *cardptr, const ti99_peb_card *cardintf, int slotindex)
250250{
251251   ti99_peb_state *peb = get_safe_token(device);
252252   if ((slotindex > 0) &&  (slotindex < MAXSLOTS))
src/mess/machine/ti99/myarcmem.c
r9617r9618
8585
8686/**************************************************************************/
8787
88static ti99_peb_card myarcmem_card =
88static const ti99_peb_card myarcmem_card =
8989{
9090   myarcmem_rz, myarcmem_w,         // memory access read/write
9191   NULL, myarcmem_cru_w,         // CRU access (no read here)
src/mess/machine/ti99/peribox.h
r9617r9618
112112/*
113113    Management functions
114114*/
115int mount_card(running_device *device, running_device *cardptr, ti99_peb_card *card, int slotindex);
115int mount_card(running_device *device, running_device *cardptr, const ti99_peb_card *card, int slotindex);
116116void unmount_card(running_device *device, int slotindex);
117117
118118
src/mess/machine/ti99/bwg.c
r9617r9618
496496   if (card->ram) free(card->ram);
497497}
498498
499static ti99_peb_card bwg_card =
499static const ti99_peb_card bwg_card =
500500{
501501   data_r,
502502   data_w,
src/mess/machine/ti99/spchsyn.c
r9617r9618
168168
169169/**************************************************************************/
170170
171static ti99_peb_card speech_adapter_card =
171static const ti99_peb_card speech_adapter_card =
172172{
173173   speech_rz, speech_w,         // memory access read/write
174174   NULL, NULL,                  // CRU access (none here)
src/mess/machine/pet.c
r9617r9618
3232int pet_font;
3333UINT8 *pet_memory;
3434UINT8 *superpet_memory;
35UINT8 *pet_videoram;
3635static UINT8 *pet80_bank1_base;
3736static int pet_keyline_select;
3837
src/mess/machine/er59256.c
r9617r9618
5252    FUNCTION PROTOTYPES
5353************************************************************************/
5454
55void decode_command(er59256_t *er59256);
55static void decode_command(er59256_t *er59256);
5656
5757/***************************************************************************
5858    INLINE FUNCTIONS
r9617r9618
6969    IMPLEMENTATION
7070***************************************************************************/
7171
72void preload_rom(running_device *device, UINT16 *rom_data, int count)
72void er59256_preload_rom(running_device *device, const UINT16 *rom_data, int count)
7373{
7474   er59256_t *er59256 = get_token(device);
7575    int WordNo;
r9617r9618
8787    logerror("\n");
8888}
8989
90UINT8 data_loaded(running_device *device)
90UINT8 er59256_data_loaded(running_device *device)
9191{
9292   er59256_t *er59256 = get_token(device);
9393
r9617r9618
194194}
195195
196196
197void decode_command(er59256_t *er59256)
197static void decode_command(er59256_t *er59256)
198198{
199199    er59256->out_shifter=0x0000;
200200    er59256->command=(er59256->in_shifter & (CMD_MASK | ADDR_MASK));
src/mess/machine/er59256.h
r9617r9618
8888
8989void er59256_set_iobits(running_device *device, UINT8 newbits);
9090UINT8 er59256_get_iobits(running_device *device);
91void preload_rom(running_device *device, UINT16 *rom_data, int count);
92UINT8 data_loaded(running_device *device);
91void er59256_preload_rom(running_device *device, const UINT16 *rom_data, int count);
92UINT8 er59256_data_loaded(running_device *device);
9393#endif
src/mess/machine/hecdisk2.c
r9617r9618
4444static WRITE_LINE_DEVICE_HANDLER( disk2_fdc_dma_irq );
4545
4646UINT8 Disk2memory[0x10000];  /* Memory space for Disk II unit*/
47UINT8 Mem_RNMI =0xff;
47//UINT8 Mem_RNMI =0xff;
4848/* Buffer of the 74374 (IC1 and IC4) linked to the Hector port */
4949UINT8 disk2_data_r_ready=0x0; /* =ff when PC2 = true and data in read buffer (disk2_data_read) */
5050UINT8 disk2_data_w_ready=0x0; /* =ff when Disk 2 Port 40 had send a data in write buffer (disk2_data_write) */
5151UINT8 disk2_data_read=0;    /* Data send by Hector to Disk 2 when PC2=true */
5252UINT8 disk2_data_write=0;   /* Data send by Disk 2 to Hector when Write Port I/O 40 */
53UINT8 disk2_RNMI = 0;      /* State of I/O 50 D5 = authorization for INT / NMI */
53static UINT8 disk2_RNMI = 0;      /* State of I/O 50 D5 = authorization for INT / NMI */
5454static int NMI_current_state=0;
5555static int INT_current_state=0;
56static int Time_arq = 4000;
56static const int Time_arq = 4000;
5757
5858/* Fonctionnement du uPD765 :
5959
r9617r9618
139139return data;
140140}
141141
142void valid_interrupt( running_machine *machine)
142static void valid_interrupt( running_machine *machine)
143143{
144144/* Called at each rising state of INT / NMI and RNMI ! */
145145
r9617r9618
150150    {   
151151      cputag_set_input_line(machine, "disk2cpu", INPUT_LINE_NMI, CLEAR_LINE); // NMI...
152152      timer_adjust_oneshot(DMA_timer, ATTOTIME_IN_NSEC(Time_arq), 0 );
153        Time_arq = 4000; //  6900us for next step !
153        /*Time_arq = 4000;*/ //  6900us for next step !
154154        NMI_current_state=0; /* clear the current request*/
155155   }
156156
src/mess/machine/trs80.c
r9617r9618
3636static UINT8 trs80_mask= 0;      /* interrupt mask */
3737static UINT8 trs80_nmi_mask= 0;      /* nmi mask */
3838static UINT8 trs80_port_ec=0;      /* bit d6..d1 of port EC to be read by port FF */
39static UINT8 trs80_tape_unit=1;      /* selected cassette unit (trs80l2 and sys80 only) (not implemented yet) */
40static UINT8 trs80_reg_load=1;      /* Controls what port EA will do */
41static UINT8 trs80_nmi_data=0xff;   /* Passes FDC int to NMI handler */
39static UINT8 trs80_tape_unit;      /* selected cassette unit (trs80l2 and sys80 only) (not implemented yet) */
40static UINT8 trs80_reg_load;      /* Controls what port EA will do */
41static UINT8 trs80_nmi_data;   /* Passes FDC int to NMI handler */
4242UINT8 trs80_mode = 0;         /* Control bits passed to video output routine */
4343
4444#define IRQ_M1_RTC      0x80   /* RTC on Model I */
r9617r9618
895895
896896MACHINE_START( trs80 )
897897{
898   trs80_tape_unit=1;
899   trs80_reg_load=1;
900   trs80_nmi_data=0xff;
901
898902   cassette_data_timer = timer_alloc(machine,  cassette_data_callback, NULL );
899903   timer_adjust_periodic( cassette_data_timer, attotime_zero, 0, ATTOTIME_IN_HZ(11025) );
900904   trs80_printer = machine->device("centronics");
src/mess/machine/zx.c
r9617r9618
2222#define LOG_ZX81_IOW(_comment) do { if (DEBUG_ZX81_PORTS) logerror("ZX81 IOW: %04x, Data: %02x, Scanline: %d (%s)\n", offset, data, space->machine->primary_screen->vpos(), _comment); } while (0)
2323#define LOG_ZX81_VSYNC do { if (DEBUG_ZX81_VSYNC) logerror("VSYNC starts in scanline: %d\n", space->machine->primary_screen->vpos()); } while (0)
2424
25static UINT8 zx_tape_bit = 0x80;
25static UINT8 zx_tape_bit;
2626
2727static WRITE8_HANDLER( zx_ram_w )
2828{
src/mess/machine/pc1401.c
r9617r9618
2222static UINT8 outa,outb;
2323UINT8 pc1401_portc;
2424
25static int power = 1; /* simulates pressed cce when mess is started */
25static int power; /* simulates pressed cce when mess is started */
2626
2727void pc1401_outa(running_device *device, int data)
2828{
r9617r9618
244244   for (i=0; i<128; i++)
245245      gfx[i]=i;
246246
247   power = 1;
247248   timer_set(machine, ATTOTIME_IN_SEC(1), NULL, 0, pc1401_power_up);
248249}
src/mess/machine/990_tap.c
r9617r9618
110110   0xf3ff      /* Don't overwrite reserved bits */
111111};
112112
113int tape_get_id(running_device *image)
113static int tape_get_id(running_device *image)
114114{
115115   int drive =0;
116116   if (strcmp(image->tag(), "tape0") == 0) drive = 0;
src/mess/machine/mboard.c
r9617r9618
260260      m_board[i]=start_board[i];
261261}
262262
263void clear_board( void )
263static void clear_board( void )
264264{
265265   int i;
266266   for (i=0;i<64;i++)
src/mess/machine/vectrex.c
r9617r9618
353353   }
354354}
355355
356extern UINT8 *gce_vectorram;
357extern size_t gce_vectorram_size;
358
359356DRIVER_INIT(vectrex)
360357{
361358   int i;
src/mess/machine/pc1403.c
r9617r9618
1111static UINT8 outa;
1212UINT8 pc1403_portc;
1313
14static int power=1; /* simulates pressed cce when mess is started */
14static int power; /* simulates pressed cce when mess is started */
1515
1616
1717/*
r9617r9618
177177
178178   for (i=0; i<128; i++) gfx[i]=i;
179179
180   power = 1;
180181   timer_set(machine, ATTOTIME_IN_SEC(1), NULL, 0, pc1403_power_up);
181182
182183   memory_set_bankptr(machine, "bank1", memory_region(machine, "user1"));
src/mess/machine/hec2hrp.c
r9617r9618
7474
7575
7676/* joy map*/
77static UINT8 pot0 = 0x40, pot1 = 0x40;  /* State for joy resistor*/
77static UINT8 pot0, pot1;  /* State for joy resistor*/
7878static UINT8 actions;               /* joy button off*/
7979
8080// Etat des ports Hector (8255)
r9617r9618
701701    sn76477_enable_w(sn76477, Pin_Value[9][AU[14]]);
702702}
703703
704sn76477_interface hector_sn76477_interface =
704const sn76477_interface hector_sn76477_interface =
705705{
706706   RES_K(47),      /*  4  noise_res*/
707707   RES_K(330),      /*  5  filter_res*/
r9617r9618
741741
742742void hector_init(running_machine *machine)
743743{
744   pot0 = pot1 = 0x40;
745
744746   /* For Cassette synchro*/
745747   Cassette_timer = timer_alloc(machine, Callback_CK, 0);
746748   timer_adjust_periodic(Cassette_timer, ATTOTIME_IN_MSEC(100), 0, ATTOTIME_IN_USEC(64));/* => real synchro scan speed for 15,624Khz*/
src/mess/machine/rmnimbus.c
r9617r9618
3131
3232#include "includes/rmnimbus.h"
3333
34static void sio_interrupt(running_device *device, int state);
35//static WRITE8_DEVICE_HANDLER( sio_dtr_w );
36static WRITE8_DEVICE_HANDLER( sio_serial_transmit );
37static int sio_serial_receive( running_device *device, int channel );
38
39
3440/*-------------------------------------------------------------------------*/
3541/* Defines, constants, and global variables                                */
3642/*-------------------------------------------------------------------------*/
r9617r9618
107113   UINT16   timer;
108114   UINT16   dma[2];
109115   UINT16   ext[4];
110    UINT16  ext_vector[2]; // external vectors, when in cascade mode
116   UINT16  ext_vector[2]; // external vectors, when in cascade mode
111117};
112118
113119static struct i186_state
r9617r9618
121127
122128/* Z80 SIO */
123129
124const z80sio_interface sio_intf =
130const z80sio_interface nimbus_sio_intf =
125131{
126132   sio_interrupt,         /* interrupt handler */
127133   0, //sio_dtr_w,             /* DTR changed handler */
r9617r9618
131137   sio_serial_receive      /* receive handler */
132138};
133139
134struct keybord_state
140static struct keyboard_state
135141{
136    UINT8       keyrows[NIMBUS_KEYROWS];
137    emu_timer   *keyscan_timer;
138    UINT8       queue[KEYBOARD_QUEUE_SIZE];
142   UINT8       keyrows[NIMBUS_KEYROWS];
143   emu_timer   *keyscan_timer;
144   UINT8       queue[KEYBOARD_QUEUE_SIZE];
139145   UINT8       head;
140146   UINT8       tail;
141147} keyboard;
r9617r9618
147153
148154const wd17xx_interface nimbus_wd17xx_interface =
149155{
150    DEVCB_LINE_GND,
156   DEVCB_LINE_GND,
151157   DEVCB_LINE(nimbus_fdc_intrq_w),
152158   DEVCB_LINE(nimbus_fdc_drq_w),
153159   {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
r9617r9618
179185    UINT8   int_8f_pending;
180186} ipc_interface;
181187
182static UINT16 def_config[16] =
188static const UINT16 def_config[16] =
183189{
184190    0x0280, 0x017F, 0xE822, 0x8129,
185191    0x0329, 0x0000, 0x0000, 0x0000,
r9617r9618
188194};
189195
190196/* Memory controler */
191UINT8 mcu_reg080;
197static UINT8 mcu_reg080;
192198
193199/* IO Unit */
194UINT8 iou_reg092;
200static UINT8 iou_reg092;
195201
196202/* Sound */
197UINT8 last_playmode;
203static UINT8 last_playmode;
198204
199205/* Mouse/Joystick */
200206
r9617r9618
218224} _mouse_joy_state;
219225
220226static _mouse_joy_state nimbus_mouse;
221UINT8 ay8910_a;
227static UINT8 ay8910_a;
222228
223229static void drq_callback(running_machine *machine, int which);
224230static void nimbus_recalculate_ints(running_machine *machine);
r9617r9618
237243
238244static void nimbus_bank_memory(running_machine *machine);
239245static void memory_reset(running_machine *machine);
240static void fdc_reset(void);
246static void fdc_reset(running_machine *machine);
241247static void set_disk_int(running_machine *machine, int state);
242248static void hdc_reset(running_machine *machine);
243249static void hdc_ctrl_write(running_machine *machine, UINT8 data);
244250static void hdc_post_rw(running_machine *machine);
245251static void hdc_drq(running_machine *machine);
246252
247static void keyboard_reset(void);
253static void keyboard_reset(running_machine *machine);
248254static TIMER_CALLBACK(keyscan_callback);
249255
250256static void pc8031_reset(running_machine *machine);
251static void iou_reset(void);
257static void iou_reset(running_machine *machine);
252258static void sound_reset(running_machine *machine);
253259
254260static void mouse_js_reset(running_machine *machine);
255261static TIMER_CALLBACK(mouse_callback);
256262
257263#define num_ioports 0x80
258static UINT16   IOPorts[num_ioports];
264static UINT16 IOPorts[num_ioports];
259265
260UINT8 nextkey;
261UINT8 sio_int_state;
266static UINT8 sio_int_state;
262267
263268/*************************************
264269 *
r9617r9618
913918    logerror("CPU reset done\n");
914919}
915920
916READ16_HANDLER( i186_internal_port_r )
921READ16_HANDLER( nimbus_i186_internal_port_r )
917922{
918923   int temp, which;
919924
r9617r9618
10891094 *
10901095 *************************************/
10911096
1092WRITE16_HANDLER( i186_internal_port_w )
1097WRITE16_HANDLER( nimbus_i186_internal_port_w )
10931098{
10941099   int temp, which, data16 = data;
10951100
r9617r9618
12921297         temp = (data16 & 0x0fff) << 8;
12931298         if (data16 & 0x1000)
12941299         {
1295            memory_install_read16_handler(cputag_get_address_space(space->machine, MAINCPU_TAG, ADDRESS_SPACE_PROGRAM), temp, temp + 0xff, 0, 0, i186_internal_port_r);
1296            memory_install_write16_handler(cputag_get_address_space(space->machine, MAINCPU_TAG, ADDRESS_SPACE_PROGRAM), temp, temp + 0xff, 0, 0, i186_internal_port_w);
1300            memory_install_read16_handler(cputag_get_address_space(space->machine, MAINCPU_TAG, ADDRESS_SPACE_PROGRAM), temp, temp + 0xff, 0, 0, nimbus_i186_internal_port_r);
1301            memory_install_write16_handler(cputag_get_address_space(space->machine, MAINCPU_TAG, ADDRESS_SPACE_PROGRAM), temp, temp + 0xff, 0, 0, nimbus_i186_internal_port_w);
12971302         }
12981303         else
12991304         {
13001305            temp &= 0xffff;
1301            memory_install_read16_handler(cputag_get_address_space(space->machine, MAINCPU_TAG, ADDRESS_SPACE_IO), temp, temp + 0xff, 0, 0, i186_internal_port_r);
1302            memory_install_write16_handler(cputag_get_address_space(space->machine, MAINCPU_TAG, ADDRESS_SPACE_IO), temp, temp + 0xff, 0, 0, i186_internal_port_w);
1306            memory_install_read16_handler(cputag_get_address_space(space->machine, MAINCPU_TAG, ADDRESS_SPACE_IO), temp, temp + 0xff, 0, 0, nimbus_i186_internal_port_r);
1307            memory_install_write16_handler(cputag_get_address_space(space->machine, MAINCPU_TAG, ADDRESS_SPACE_IO), temp, temp + 0xff, 0, 0, nimbus_i186_internal_port_w);
13031308         }
13041309         break;
13051310
r9617r9618
13131318{
13141319   /* CPU */
13151320   nimbus_cpu_reset(machine);
1316    iou_reset();
1317    fdc_reset();
1318    hdc_reset(machine);
1319    keyboard_reset();
1320    pc8031_reset(machine);
1321    sound_reset(machine);
1322    memory_reset(machine);
1323    mouse_js_reset(machine);
1321   iou_reset(machine);
1322   fdc_reset(machine);
1323   hdc_reset(machine);
1324   keyboard_reset(machine);
1325   pc8031_reset(machine);
1326   sound_reset(machine);
1327   memory_reset(machine);
1328   mouse_js_reset(machine);
13241329}
13251330
13261331DRIVER_INIT(nimbus)
r9617r9618
17461751    logerror("=======================================================================\n");
17471752}
17481753
1749void *get_dssi_ptr(address_space *space, UINT16   ds, UINT16 si)
1754static void *get_dssi_ptr(address_space *space, UINT16   ds, UINT16 si)
17501755{
17511756    int             addr;
17521757
r9617r9618
19051910
19061911struct nimbus_meminfo
19071912{
1908      offs_t   start;      /* start address of bank */
1909      offs_t   end;      /* End address of bank */
1913   offs_t   start;      /* start address of bank */
1914   offs_t   end;      /* End address of bank */
19101915};
19111916
19121917static const struct nimbus_meminfo memmap[] =
r9617r9618
19271932    int     blocksize;
19281933} nimbus_block ;
19291934
1930typedef nimbus_block    nimbus_blocks[3];
1935typedef nimbus_block nimbus_blocks[3];
19311936
19321937static const nimbus_blocks ramblocks[] =
19331938{
r9617r9618
20102015    }
20112016}
20122017
2013READ8_HANDLER( mcu_r )
2018READ8_HANDLER( nimbus_mcu_r )
20142019{
20152020    return mcu_reg080;
20162021}
20172022
2018WRITE8_HANDLER( mcu_w )
2023WRITE8_HANDLER( nimbus_mcu_w )
20192024{
20202025    mcu_reg080=data;
20212026
r9617r9618
20592064
20602065*/
20612066
2062static void keyboard_reset(void)
2067static void keyboard_reset(running_machine *machine)
20632068{
20642069    memset(keyboard.keyrows,0xFF,NIMBUS_KEYROWS);
20652070
r9617r9618
21392144
21402145/* Z80 SIO/2 */
21412146
2142void sio_interrupt(running_device *device, int state)
2147static void sio_interrupt(running_device *device, int state)
21432148{
21442149    if(LOG_SIO)
21452150        logerror("SIO Interrupt state=%02X\n",state);
r9617r9618
21542159    }
21552160}
21562161
2162#ifdef UNUSED_FUNCTION
21572163WRITE8_DEVICE_HANDLER( sio_dtr_w )
21582164{
21592165   if (offset == 1)
21602166   {
21612167   }
21622168}
2169#endif
21632170
2164WRITE8_DEVICE_HANDLER( sio_serial_transmit )
2171static WRITE8_DEVICE_HANDLER( sio_serial_transmit )
21652172{
21662173}
21672174
2168int sio_serial_receive( running_device *device, int channel )
2175static int sio_serial_receive( running_device *device, int channel )
21692176{
21702177   if(channel==0)
21712178    {
r9617r9618
21772184
21782185/* Floppy disk */
21792186
2180static void fdc_reset(void)
2187static void fdc_reset(running_machine *machine)
21812188{
21822189    nimbus_drives.reg400=0;
21832190    nimbus_drives.reg410_in=0;
r9617r9618
24492456
24502457    memset(&ipc_interface,0,sizeof(ipc_interface));
24512458
2452    if(!data_loaded(er59256))
2453        preload_rom(er59256,def_config,ARRAY_LENGTH(def_config));
2459    if(!er59256_data_loaded(er59256))
2460        er59256_preload_rom(er59256,def_config,ARRAY_LENGTH(def_config));
24542461}
24552462
24562463
r9617r9618
24642471}
24652472#endif
24662473
2467READ8_HANDLER( pc8031_r )
2474READ8_HANDLER( nimbus_pc8031_r )
24682475{
24692476   int pc=cpu_get_pc(space->cpu);
24702477    UINT8   result;
r9617r9618
24882495    return result;
24892496}
24902497
2491WRITE8_HANDLER( pc8031_w )
2498WRITE8_HANDLER( nimbus_pc8031_w )
24922499{
24932500   int pc=cpu_get_pc(space->cpu);
24942501
r9617r9618
25142521
25152522/* 8031/8051 Peripheral controler 8031/8051 side */
25162523
2517READ8_HANDLER( pc8031_iou_r )
2524READ8_HANDLER( nimbus_pc8031_iou_r )
25182525{
25192526   int pc=cpu_get_pc(space->cpu);
25202527    UINT8   result = 0;
r9617r9618
25392546    return result;
25402547}
25412548
2542WRITE8_HANDLER( pc8031_iou_w )
2549WRITE8_HANDLER( nimbus_pc8031_iou_w )
25432550{
25442551   int pc=cpu_get_pc(space->cpu);
25452552
r9617r9618
25782585    }
25792586}
25802587
2581READ8_HANDLER( pc8031_port_r )
2588READ8_HANDLER( nimbus_pc8031_port_r )
25822589{
25832590   running_device *er59256 = space->machine->device(ER59256_TAG);
25842591    int pc=cpu_get_pc(space->cpu);
r9617r9618
25952602    return result;
25962603}
25972604
2598WRITE8_HANDLER( pc8031_port_w )
2605WRITE8_HANDLER( nimbus_pc8031_port_w )
25992606{
26002607   running_device *er59256 = space->machine->device(ER59256_TAG);
26012608    int pc=cpu_get_pc(space->cpu);
r9617r9618
26122619
26132620
26142621/* IO Unit */
2615READ8_HANDLER( iou_r )
2622READ8_HANDLER( nimbus_iou_r )
26162623{
26172624   int pc=cpu_get_pc(space->cpu);
26182625    UINT8   result=0;
r9617r9618
26282635    return result;
26292636}
26302637
2631WRITE8_HANDLER( iou_w )
2638WRITE8_HANDLER( nimbus_iou_w )
26322639{
26332640   int pc=cpu_get_pc(space->cpu);
26342641    running_device *msm5205 = space->machine->device(MSM5205_TAG);
r9617r9618
26432650    }
26442651}
26452652
2646static void iou_reset(void)
2653static void iou_reset(running_machine *machine)
26472654{
26482655    iou_reg092=0x00;
26492656}
r9617r9618
26762683    ay8910_a=0;
26772684}
26782685
2679READ8_HANDLER( sound_ay8910_r )
2686READ8_HANDLER( nimbus_sound_ay8910_r )
26802687{
26812688   running_device *ay8910 = space->machine->device(AY8910_TAG);
26822689    UINT8   result=0;
r9617r9618
26872694    return result;
26882695}
26892696
2690WRITE8_HANDLER( sound_ay8910_w )
2697WRITE8_HANDLER( nimbus_sound_ay8910_w )
26912698{
26922699   int pc=cpu_get_pc(space->cpu);
26932700   running_device *ay8910 = space->machine->device(AY8910_TAG);
r9617r9618
27032710
27042711}
27052712
2706WRITE8_HANDLER( sound_ay8910_porta_w )
2713WRITE8_HANDLER( nimbus_sound_ay8910_porta_w )
27072714{
27082715    running_device *msm5205 = space->machine->device(MSM5205_TAG);
27092716
r9617r9618
27132720    ay8910_a=data;
27142721}
27152722
2716WRITE8_HANDLER( sound_ay8910_portb_w )
2723WRITE8_HANDLER( nimbus_sound_ay8910_portb_w )
27172724{
27182725    running_device *msm5205 = space->machine->device(MSM5205_TAG);
27192726
r9617r9618
28872894    state->intstate_y=intstate_y;
28882895}
28892896
2890READ8_HANDLER( mouse_js_r )
2897READ8_HANDLER( nimbus_mouse_js_r )
28912898{
28922899   /*
28932900
r9617r9618
29032910        7       ?? always reads 1
29042911
29052912    */
2906    UINT8   result;
2913   UINT8   result;
29072914//  int     pc=cpu_get_pc(space->machine->device(MAINCPU_TAG));
29082915
2909    _mouse_joy_state *state = &nimbus_mouse;
2916   _mouse_joy_state *state = &nimbus_mouse;
29102917
29112918   if (input_port_read(space->machine, "config") & 0x01)
29122919   {
2913        result=state->reg0a4;
2914        //logerror("mouse_js_r: pc=%05X, result=%02X\n",pc,result);
2915    }
2920      result=state->reg0a4;
2921      //logerror("mouse_js_r: pc=%05X, result=%02X\n",pc,result);
2922   }
29162923   else
29172924   {
29182925      result=input_port_read_safe(space->machine, JOYSTICK0_TAG, 0xff);
29192926   }
29202927
2921    return result;
2928   return result;
29222929}
29232930
2924WRITE8_HANDLER( mouse_js_w )
2931WRITE8_HANDLER( nimbus_mouse_js_w )
29252932{
29262933}
29272934
src/mess/machine/pc1251.c
r9617r9618
88
99static UINT8 outa,outb;
1010
11static int power=1; /* simulates pressed cce when mess is started */
11static int power; /* simulates pressed cce when mess is started */
1212
1313void pc1251_outa(running_device *device, int data)
1414{
r9617r9618
124124   UINT8 *gfx = memory_region(machine, "gfx1");
125125   for (i=0; i<128; i++) gfx[i]=i;
126126
127   power = 1;
127128   timer_set(machine, ATTOTIME_IN_SEC(1), NULL, 0, pc1251_power_up);
128129}
129130
src/mess/video/dgn_beta.c
r9617r9618
120120//static BETA_VID_MODES VIDMODE = TEXT_40x25;
121121
122122/* Debugging variables */
123static int LogRegWrites   = 1;   // Log register writes to debug console.
124static int BoxColour   = 1;
125static int BoxMinX      = 100;
126static int BoxMinY      = 100;
127static int BoxMaxX      = 500;
128static int BoxMaxY      = 500;
123static int LogRegWrites;   // Log register writes to debug console.
124static int BoxColour;
125static int BoxMinX;
126static int BoxMinY;
127static int BoxMaxX;
128static int BoxMaxY;
129129static int HSyncMin      = 0;
130130static int VSyncMin      = 0;
131131static int DEPos      = 0;
r9617r9618
141141static void execute_beta_vid_clkmax(running_machine *machine, int ref, int params, const char *param[]);
142142
143143static bitmap_t   *bit;
144static int MinAddr       = 0xFFFF;
145static int MaxAddr       = 0x0000;
146static int MinX           = 0xFFFF;
147static int MaxX           = 0x0000;
148static int MinY           = 0xFFFF;
149static int MaxY           = 0x0000;
144static int MinAddr;
145static int MaxAddr;
146static int MinX;
147static int MaxX;
148static int MinY;
149static int MaxY;
150150
151151static int VidAddr      = 0;   // Last address reg written
152152
153static void beta_Set_RA(int offset, int data);
153static void beta_Set_RA(running_machine *machine, int offset, int data);
154154static void beta_Set_HSync(running_machine *machine, int offset, int data);
155155static void beta_Set_VSync(running_machine *machine, int offset, int data);
156static void beta_Set_DE(int offset, int data);
156static void beta_Set_DE(running_machine *machine, int offset, int data);
157157
158158static const struct m6845_interface beta_m6845_interface = {
159159   0,              // Memory Address register
r9617r9618
234234}
235235
236236// called when the 6845 changes the character row
237static void beta_Set_RA(int offset, int data)
237static void beta_Set_RA(running_machine *machine, int offset, int data)
238238{
239239   beta_6845_RA=data;
240240}
r9617r9618
297297   dgn_beta_frame_interrupt(machine, data);
298298}
299299
300static void beta_Set_DE(int offset, int data)
300static void beta_Set_DE(running_machine *machine, int offset, int data)
301301{
302302   beta_DE = data;
303303
r9617r9618
336336      debug_console_register_command(machine, "beta_vid_clkmax", CMDFLAG_NONE, 0, 0, 1, execute_beta_vid_clkmax);
337337   }
338338   LogRegWrites=0;
339   BoxColour=1;
340   BoxMinX      = 100;
341   BoxMinY      = 100;
342   BoxMaxX      = 500;
343   BoxMaxY      = 500;
344
345   MinAddr       = 0xFFFF;
346   MaxAddr       = 0x0000;
347   MinX           = 0xFFFF;
348   MaxX           = 0x0000;
349   MinY           = 0xFFFF;
350   MaxY           = 0x0000;
339351}
340352
341353void dgnbeta_video_reset(running_machine *machine)
r9617r9618
720732   {
721733      m6845_address_w(offset,data);
722734      VidAddr=data;                    /* Record reg being written to */
723    }
735   }
724736   if (LogRegWrites)
725737      RegLog(space->machine, offset,data);
726738}
src/mess/video/saa505x.c
r9617r9618
33683368static int teletext_data;
33693369static int teletext_LOSE;
33703370
3371static const char *tt_lookup=teletext_saa5050_characters;
3372static const char *tt_graphics=teletext_graphics;
3371static const char *tt_lookup;
3372static const char *tt_graphics;
33733373static int tt_colour=7;
33743374static int tt_rcolour;
33753375static int tt_bgcolour=0;
r9617r9618
33853385static int tt_frame_count=0;
33863386
33873387// local copy of the 6845 external procedure calls
3388static struct saa505x_interface
3389saa505x_calls= { 0 };
3388static struct saa505x_interface saa505x_calls;
33903389
33913390
33923391void saa505x_config(const struct saa505x_interface *intf)
33933392{
3393   tt_lookup=teletext_saa5050_characters;
3394   tt_graphics=teletext_graphics;
33943395   saa505x_calls.out_Pixel_func=*intf->out_Pixel_func;
33953396}
33963397
src/mess/video/super80.c
r9617r9618
99#include "includes/super80.h"
1010
1111
12static UINT16 vidpg=0xfe00;   /* Home position of video page being displayed */
12static UINT16 vidpg;   /* Home position of video page being displayed */
1313
1414static UINT8 current_palette;   /* for super80m and super80v */
1515static UINT8 current_charset;   /* for super80m */
r9617r9618
285285
286286VIDEO_START( super80 )
287287{
288   vidpg = 0xfe00;
288289   FNT = memory_region(machine, "gfx1");
289290}
290291
src/mess/video/pc8801.c
r9617r9618
1818int pc8801_is_24KHz;
1919static unsigned char *gVRAM = NULL;
2020static int selected_vram;
21static int crtc_on, text_on, text_width = 40, text_height = 20, text_invert, text_color;
21static int crtc_on, text_on, text_width, text_height, text_invert, text_color;
2222static int text_cursor, text_cursorX, text_cursorY;
23static int blink_period = 24;
23static int blink_period;
2424static int analog_palette;
2525static int alu_1, alu_2, alu_on;
2626static unsigned char alu_save0, alu_save1, alu_save2;
r9617r9618
415415
416416VIDEO_START( pc8801 )
417417{
418   text_width = 40;
419   text_height = 20;
420   blink_period = 24;
418421}
419422
420423#define BLOCK_YSIZE (pc8801_is_24KHz ? 4 : 2)
src/mess/video/fmtowns.c
r9617r9618
102102
103103//static UINT32 pshift;  // for debugging
104104
105void draw_sprites(running_machine* machine, const rectangle* rect);
105static void draw_sprites(running_machine* machine, const rectangle* rect);
106106
107void towns_crtc_refresh_mode(running_machine* machine)
107static void towns_crtc_refresh_mode(running_machine* machine)
108108{
109109   towns_state* state = machine->driver_data<towns_state>();
110110   rectangle scr;
r9617r9618
713713 *      +6: Sprite Colour
714714 *          bit 15: use colour data in located in sprite RAM offset in bits 11-0 (x32)
715715 */
716void render_sprite_4(running_machine* machine, UINT32 poffset, UINT32 coffset, UINT16 x, UINT16 y, UINT16 xflip, UINT16 yflip, const rectangle* rect)
716static void render_sprite_4(running_machine* machine, UINT32 poffset, UINT32 coffset, UINT16 x, UINT16 y, UINT16 xflip, UINT16 yflip, const rectangle* rect)
717717{
718718   towns_state* state = machine->driver_data<towns_state>();
719719   UINT16 xpos,ypos;
r9617r9618
790790   }
791791}
792792
793void render_sprite_16(running_machine* machine, UINT32 poffset, UINT16 x, UINT16 y, UINT16 xflip, UINT16 yflip, const rectangle* rect)
793static void render_sprite_16(running_machine* machine, UINT32 poffset, UINT16 x, UINT16 y, UINT16 xflip, UINT16 yflip, const rectangle* rect)
794794{
795795   towns_state* state = machine->driver_data<towns_state>();
796796   UINT16 xpos,ypos;
r9617r9618
854854   }
855855}
856856
857void draw_sprites(running_machine* machine, const rectangle* rect)
857static void draw_sprites(running_machine* machine, const rectangle* rect)
858858{
859859   towns_state* state = machine->driver_data<towns_state>();
860860   UINT16 sprite_limit = (state->video.towns_sprite_reg[0] | (state->video.towns_sprite_reg[1] << 8)) & 0x3ff;
r9617r9618
920920   timer_adjust_oneshot(state->video.sprite_timer,machine->device<cpu_device>("maincpu")->cycles_to_attotime(128 * (1025-sprite_limit)),0);
921921}
922922
923void towns_crtc_draw_scan_layer_hicolour(running_machine* machine, bitmap_t* bitmap,const rectangle* rect,int layer,int line,int scanline)
923static void towns_crtc_draw_scan_layer_hicolour(running_machine* machine, bitmap_t* bitmap,const rectangle* rect,int layer,int line,int scanline)
924924{
925925   towns_state* state = machine->driver_data<towns_state>();
926926   UINT32 off = 0;
r9617r9618
11121112   }
11131113}
11141114
1115void towns_crtc_draw_scan_layer_256(running_machine* machine, bitmap_t* bitmap,const rectangle* rect,int layer,int line,int scanline)
1115static void towns_crtc_draw_scan_layer_256(running_machine* machine, bitmap_t* bitmap,const rectangle* rect,int layer,int line,int scanline)
11161116{
11171117   towns_state* state = machine->driver_data<towns_state>();
11181118   int off = 0;
r9617r9618
13031303   }
13041304}
13051305
1306void towns_crtc_draw_scan_layer_16(running_machine* machine, bitmap_t* bitmap,const rectangle* rect,int layer,int line,int scanline)
1306static void towns_crtc_draw_scan_layer_16(running_machine* machine, bitmap_t* bitmap,const rectangle* rect,int layer,int line,int scanline)
13071307{
13081308   towns_state* state = machine->driver_data<towns_state>();
13091309   int off = 0;
r9617r9618
15741574   }
15751575}
15761576
1577void towns_crtc_draw_layer(running_machine* machine,bitmap_t* bitmap,const rectangle* rect,int layer)
1577static void towns_crtc_draw_layer(running_machine* machine,bitmap_t* bitmap,const rectangle* rect,int layer)
15781578{
15791579   towns_state* state = machine->driver_data<towns_state>();
15801580   int line;
r9617r9618
16751675   }
16761676}
16771677
1678void render_text_char(running_machine* machine, UINT8 x, UINT8 y, UINT8 ascii, UINT16 jis, UINT8 attr)
1678static void render_text_char(running_machine* machine, UINT8 x, UINT8 y, UINT8 ascii, UINT16 jis, UINT8 attr)
16791679{
16801680   towns_state* state = machine->driver_data<towns_state>();
16811681   UINT32 rom_addr;
r9617r9618
17541754   }
17551755}
17561756
1757void draw_text_layer(running_machine* machine)
1757static void draw_text_layer(running_machine* machine)
17581758{
17591759/*
17601760 *  Text format
src/mess/video/hd44780.h
r9617r9618
2424{
2525   UINT8 height;         // number of lines
2626   UINT8 width;         // chars for line
27   UINT8 *custom_layout;   // custom display layout (NULL for default)
27   const UINT8 *custom_layout;   // custom display layout (NULL for default)
2828};
2929
3030
src/mess/video/pc_cga.c
r9617r9618
12211221 *
12221222 *************************************************************************/
12231223
1224WRITE8_HANDLER ( char_ram_w )
1224static WRITE8_HANDLER ( char_ram_w )
12251225{
12261226   UINT8 *gfx = memory_region(space->machine, "gfx1");
12271227   logerror("write char ram %04x %02x\n",offset,data);
r9617r9618
12311231   gfx[offset + 0x1800] = data;
12321232}
12331233
1234WRITE16_HANDLER( char_ram_16le_w ) { write16le_with_write8_handler(char_ram_w, space, offset, data, mem_mask); }
1235WRITE32_HANDLER( char_ram_32_w )   { write32le_with_write8_handler(char_ram_w, space, offset, data, mem_mask); }
1234static WRITE16_HANDLER( char_ram_16le_w ) { write16le_with_write8_handler(char_ram_w, space, offset, data, mem_mask); }
1235static WRITE32_HANDLER( char_ram_32_w )   { write32le_with_write8_handler(char_ram_w, space, offset, data, mem_mask); }
12361236
1237READ8_HANDLER ( char_ram_r )
1237static READ8_HANDLER ( char_ram_r )
12381238{
12391239   UINT8 *gfx = memory_region(space->machine, "gfx1");
12401240   return gfx[offset];
12411241}
12421242
1243READ16_HANDLER( char_ram_16le_r ) { return read16le_with_read8_handler(char_ram_r, space, offset, mem_mask); }
1244READ32_HANDLER( char_ram_32_r )   { return read32le_with_read8_handler(char_ram_r, space, offset, mem_mask); }
1243static READ16_HANDLER( char_ram_16le_r ) { return read16le_with_read8_handler(char_ram_r, space, offset, mem_mask); }
1244static READ32_HANDLER( char_ram_32_r )   { return read32le_with_read8_handler(char_ram_r, space, offset, mem_mask); }
12451245
12461246static READ8_HANDLER( pc_cga8_r )
12471247{
src/mess/video/rmnimbus.c
r9617r9618
3131#include "debug/debugcpu.h"
3232#include "debug/debugcon.h"
3333
34UINT8 video_mem[SCREEN_WIDTH_PIXELS][SCREEN_HEIGHT_LINES];
34static UINT8 video_mem[SCREEN_WIDTH_PIXELS][SCREEN_HEIGHT_LINES];
3535
3636#define WIDTH_MASK      0x07
3737#define XOR_MASK        0x08
r9617r9618
7272#define IS_XOR          (vidregs[reg022]&XOR_MASK)
7373
7474
75UINT16 vidregs[NO_VIDREGS];
75static UINT16 vidregs[NO_VIDREGS];
7676
77UINT8   bpp;            // Bits / pixel
78UINT16  pixel_mask;
79UINT8   hs_count;
77static UINT8   bpp;            // Bits / pixel
78static UINT16  pixel_mask;
79static UINT8   hs_count;
8080
8181static UINT32 debug_flags;
8282
src/mess/video/m6845.c
r9617r9618
558558      {
559559         crtc.Scan_Line_Counter_Reset=True;
560560      }
561      if (crtc.intf->out_RA_func) (crtc.intf->out_RA_func)(0,crtc.Scan_Line_Counter); /* call RA update */
561      if (crtc.intf->out_RA_func) (crtc.intf->out_RA_func)(machine,0,crtc.Scan_Line_Counter); /* call RA update */
562562   }
563563   /* end of vertical clock pulse */
564564
r9617r9618
605605                        if (crtc.intf->out_HS_func) (crtc.intf->out_HS_func)(machine, 0,crtc.HSYNC); /* call HS update */
606606                }
607607        }
608   if (crtc.intf->out_MA_func) (crtc.intf->out_MA_func)(0,crtc.Memory_Address);   /* call MA update */
608   if (crtc.intf->out_MA_func) (crtc.intf->out_MA_func)(machine,0,crtc.Memory_Address);   /* call MA update */
609609
610610
611611
r9617r9618
629629      {
630630         crtc.Delay_Flags=crtc.Delay_Flags^Cursor_On_Flag;
631631         crtc.Cursor_Delayed_Status=False;
632         if (crtc.intf->out_CR_func) (crtc.intf->out_CR_func)(0,crtc.Cursor_Delayed_Status); /* call CR update */
633         if (crtc.intf->out_CRE_func) (crtc.intf->out_CRE_func)(0,0); /* call CRE update */
632         if (crtc.intf->out_CR_func) (crtc.intf->out_CR_func)(machine,0,crtc.Cursor_Delayed_Status); /* call CR update */
633         if (crtc.intf->out_CRE_func) (crtc.intf->out_CRE_func)(machine,0,0); /* call CRE update */
634634      }
635635
636636      /* cursor enabled delay */
r9617r9618
643643            {
644644               crtc.Delay_Flags=(crtc.Delay_Flags^Cursor_Start_Delay_Flag)|Cursor_On_Flag;
645645               crtc.Cursor_Delayed_Status=True;
646               if ((crtc.intf->out_CR_func)&&(crtc.Cursor_Flash_Count>25)) (crtc.intf->out_CR_func)(0,crtc.Cursor_Delayed_Status); /* call CR update */
647               if (crtc.intf->out_CRE_func) (crtc.intf->out_CRE_func)(0,2|((crtc.Cursor_Flash_Count>25)&1)); /* call CR update */
646               if ((crtc.intf->out_CR_func)&&(crtc.Cursor_Flash_Count>25)) (crtc.intf->out_CR_func)(machine,0,crtc.Cursor_Delayed_Status); /* call CR update */
647               if (crtc.intf->out_CRE_func) (crtc.intf->out_CRE_func)(machine,0,2|((crtc.Cursor_Flash_Count>25)&1)); /* call CR update */
648648            }
649649         }
650650      }
r9617r9618
657657         {
658658            crtc.Delay_Flags=crtc.Delay_Flags^Display_Enabled_Delay_Flag;
659659            crtc.Display_Delayed_Enabled=True;
660            if (crtc.intf->out_DE_func) (crtc.intf->out_DE_func)(0,crtc.Display_Delayed_Enabled); /* call DE update */
660            if (crtc.intf->out_DE_func) (crtc.intf->out_DE_func)(machine,0,crtc.Display_Delayed_Enabled); /* call DE update */
661661         }
662662      }
663663
r9617r9618
669669         {
670670            crtc.Delay_Flags=crtc.Delay_Flags^Display_Disable_Delay_Flag;
671671            crtc.Display_Delayed_Enabled=False;
672            if (crtc.intf->out_DE_func) (crtc.intf->out_DE_func)(0,crtc.Display_Delayed_Enabled); /* call DE update */
672            if (crtc.intf->out_DE_func) (crtc.intf->out_DE_func)(machine,0,crtc.Display_Delayed_Enabled); /* call DE update */
673673         }
674674      }
675675   }
src/mess/video/m6845.h
r9617r9618
2121
2222struct m6845_interface
2323{
24   void (*out_MA_func)(int offset, int data);
25   void (*out_RA_func)(int offset, int data);
24   void (*out_MA_func)(running_machine *machine, int offset, int data);
25   void (*out_RA_func)(running_machine *machine, int offset, int data);
2626   void (*out_HS_func)(running_machine *machine, int offset, int data);
2727   void (*out_VS_func)(running_machine *machine, int offset, int data);
28   void (*out_DE_func)(int offset, int data);
29   void (*out_CR_func)(int offset, int data);
30   void (*out_CRE_func)(int offset, int data);
28   void (*out_DE_func)(running_machine *machine, int offset, int data);
29   void (*out_CR_func)(running_machine *machine, int offset, int data);
30   void (*out_CRE_func)(running_machine *machine, int offset, int data);
3131};
3232
3333/* set up the local copy of the 6845 external procedure calls */
src/mess/video/bbc.c
r9617r9618
235235
236236
237237static int VideoULA_DE=0;          // internal videoULA Display Enabled set by 6845 DE and the scanlines<8
238static int VideoULA_CR=7;         // internal videoULA Cursor Enabled set by 6845 CR and then cleared after a number clock cycles
238static int VideoULA_CR;         // internal videoULA Cursor Enabled set by 6845 CR and then cleared after a number clock cycles
239239static int VideoULA_CR_counter=0;  // number of clock cycles left before the CR is disabled
240240
241241static int videoULA_Reg;
r9617r9618
255255static int emulation_pixels_per_byte;
256256
257257static const int width_of_cursor_set[8]={ 0,0,1,2,1,0,2,4 };
258static int emulation_cursor_size=1;
258static int emulation_cursor_size;
259259static int cursor_state=0;
260260
261261static int videoULA_pallet0[16];// flashing colours A
r9617r9618
264264
265265// this is the pixel position of the start of a scanline
266266// -96 sets the screen display to the middle of emulated screen.
267static int x_screen_offset=-96;
267static int x_screen_offset;
268268
269static int y_screen_offset=-8;
269static int y_screen_offset;
270270
271271
272272
r9617r9618
453453}
454454
455455// called when the 6845 changes the character row
456static void BBC_Set_Character_Row(int offset, int data)
456static void BBC_Set_Character_Row(running_machine *machine, int offset, int data)
457457{
458458   BBC_Character_Row=data;
459459   BBC_Set_VideoULA_DE();
r9617r9618
510510}
511511
512512// called when the 6845 changes the Display Enabled
513static void BBC_Set_DE(int offset, int data)
513static void BBC_Set_DE(running_machine *machine, int offset, int data)
514514{
515515   BBC_DE=data;
516516   BBC_Set_VideoULA_DE();
r9617r9618
520520
521521
522522// called when the 6845 changes the Cursor Enabled
523static void BBC_Set_CRE(int offset, int data)
523static void BBC_Set_CRE(running_machine *machine, int offset, int data)
524524{
525525   if (data&2) {
526526      VideoULA_CR_counter=emulation_cursor_size;
r9617r9618
670670 * Initialize the BBC video emulation
671671 ************************************************************************/
672672
673VIDEO_START( bbca )
673static void common_init(running_machine *machine)
674674{
675   emulation_cursor_size = 1;
676   x_screen_offset = -96;
677   y_screen_offset = -8;
678
679   VideoULA_DE = 0;
680   VideoULA_CR = 7;
681   VideoULA_CR_counter = 0;
682
675683   set_pixel_lookup();
676   bbc_set_video_memory_lookups(16);
677684   m6845_config(&BBC6845);
678685   saa505x_config(&BBCsaa5050);
679686
680   BBC_Video_RAM= memory_region(machine, "maincpu");
681   vidmem_RAM=bbc_vidmem;
682   draw_function=*BBC_draw_hi_res;
687   BBC_Video_RAM = memory_region(machine, "maincpu");
688   vidmem_RAM = bbc_vidmem;
689   draw_function = *BBC_draw_hi_res;
683690}
684691
685VIDEO_START( bbcb )
692VIDEO_START( bbca )
686693{
687   set_pixel_lookup();
694   common_init(machine);
695   bbc_set_video_memory_lookups(16);
696}
688697
689   m6845_config(&BBC6845);
690   saa505x_config(&BBCsaa5050);
691
692   BBC_Video_RAM= memory_region(machine, "maincpu");
693   vidmem_RAM=bbc_vidmem;
694   draw_function=*BBC_draw_hi_res;
698VIDEO_START( bbcb )
699{
700   common_init(machine);
695701}
696702
697703VIDEO_START( bbcbp )
698704{
699   /* need to set up the lookups to work with the BBC B plus memory */
700   set_pixel_lookup();
701
705   common_init(machine);
702706   bbc_set_video_memory_lookups(32);
703   m6845_config(&BBC6845);
704   saa505x_config(&BBCsaa5050);
705
706   BBC_Video_RAM= memory_region(machine, "maincpu");
707   vidmem_RAM=bbc_vidmem;
708   draw_function=*BBC_draw_hi_res;
709707}
710708
711709VIDEO_START( bbcm )
712710{
713   /* need to set up the lookups to work with the BBC B plus memory */
714   set_pixel_lookup();
711   common_init(machine);
715712   bbc_set_video_memory_lookups(32);
716   m6845_config(&BBC6845);
717   saa505x_config(&BBCsaa5050);
718
719   BBC_Video_RAM= memory_region(machine, "maincpu");
720   vidmem_RAM=bbc_vidmem;
721   draw_function=*BBC_draw_hi_res;
722713}
src/mess/includes/vectrex.h
r9617r9618
99
1010#include "machine/6522via.h"
1111
12/*----------- defined in drivers/vectrex.c -----------*/
13
14extern UINT8 *gce_vectorram;
15extern size_t gce_vectorram_size;
16
17
1218/*----------- defined in machine/vectrex.c -----------*/
1319
1420DEVICE_IMAGE_LOAD( vectrex_cart );
src/mess/includes/pet.h
r9617r9618
4949extern const pia6821_interface pet_pia1;
5050
5151extern UINT8 *pet_memory;
52extern UINT8 *pet_videoram;
5352extern UINT8 *superpet_memory;
5453
5554WRITE8_HANDLER(cbm8096_w);
src/mess/includes/hec2hrp.h
r9617r9618
6464/*----------- defined in machine/hec2hrp.c -----------*/
6565
6666/* Sound function*/
67extern sn76477_interface hector_sn76477_interface;
67extern const sn76477_interface hector_sn76477_interface;
6868
6969/* Protoype of memory Handler*/
7070extern WRITE8_HANDLER( hector_switch_bank_w );
r9617r9618
106106/* Color status*/
107107extern UINT8 hector_color[4];
108108
109/* Sound function*/
110extern sn76477_interface hector_sn76477_interface;
111
112109// state Hector's port
113110extern UINT8 hector_port_a;
114111extern UINT8 hector_port_b;
r9617r9618
147144extern const floppy_config    disk2_floppy_config;
148145
149146/* Disk II Memory */
150extern UINT8 Disk2memory[0x10000];  /* Memory space for Disk II unit*/
No newline at end of file
147extern UINT8 Disk2memory[0x10000];  /* Memory space for Disk II unit*/
src/mess/includes/pegasus.h
r9617r9618
1/*----------- defined in video/pegasus.c -----------*/
12
3extern UINT8 pegasus_control_bits;
24extern UINT8 *pegasus_video_ram;
35
4extern VIDEO_START( pegasus );
5extern VIDEO_UPDATE( pegasus );
6
7extern UINT8 pegasus_control_bits;
8
6VIDEO_START( pegasus );
7VIDEO_UPDATE( pegasus );
src/mess/includes/rmnimbus.h
r9617r9618
1818#define MAINCPU_TAG "maincpu"
1919#define IOCPU_TAG   "iocpu"
2020
21
22/*----------- defined in machine/rmnimbus.c -----------*/
23
2124DRIVER_INIT(nimbus);
2225MACHINE_RESET(nimbus);
2326MACHINE_START(nimbus);
2427
2528/* 80186 Internal */
26READ16_HANDLER (i186_internal_port_r);
27WRITE16_HANDLER (i186_internal_port_w);
29READ16_HANDLER (nimbus_i186_internal_port_r);
30WRITE16_HANDLER (nimbus_i186_internal_port_w);
2831
2932/* external int priority masks */
3033
r9617r9618
8790#define HIBLOCK_BASE_MASK   0x08
8891#define HIBLOCK_SELECT_MASK 0x10
8992
90READ8_HANDLER( mcu_r );
91WRITE8_HANDLER( mcu_w );
93READ8_HANDLER( nimbus_mcu_r );
94WRITE8_HANDLER( nimbus_mcu_w );
9295
9396
9497/* Z80 SIO for keyboard */
r9617r9618
97100#define NIMBUS_KEYROWS      11
98101#define KEYBOARD_QUEUE_SIZE 32
99102
100extern const z80sio_interface sio_intf;
103extern const z80sio_interface nimbus_sio_intf;
101104
102void sio_interrupt(running_device *device, int state);
103//WRITE8_DEVICE_HANDLER( sio_dtr_w );
104WRITE8_DEVICE_HANDLER( sio_serial_transmit );
105int sio_serial_receive( running_device *device, int channel );
106
107105/* Floppy/Fixed drive interface */
108106
109107#define FDC_TAG                 "wd2793"
r9617r9618
180178#define IPC_IN_BYTE_AVAIL   0X02
181179#define IPC_IN_READ_PEND    0X04
182180
183READ8_HANDLER( pc8031_r );
184WRITE8_HANDLER( pc8031_w );
181READ8_HANDLER( nimbus_pc8031_r );
182WRITE8_HANDLER( nimbus_pc8031_w );
185183
186READ8_HANDLER( pc8031_iou_r );
187WRITE8_HANDLER( pc8031_iou_w );
184READ8_HANDLER( nimbus_pc8031_iou_r );
185WRITE8_HANDLER( nimbus_pc8031_iou_w );
188186
189READ8_HANDLER( pc8031_port_r );
190WRITE8_HANDLER( pc8031_port_w );
187READ8_HANDLER( nimbus_pc8031_port_r );
188WRITE8_HANDLER( nimbus_pc8031_port_w );
191189
192190#define ER59256_TAG             "er59256"
193191
r9617r9618
198196#define MOUSE_INT_ENABLE        0x08
199197#define PC8031_INT_ENABLE       0x10
200198
201READ8_HANDLER( iou_r );
202WRITE8_HANDLER( iou_w );
199READ8_HANDLER( nimbus_iou_r );
200WRITE8_HANDLER( nimbus_iou_w );
203201
204202
205/* Video stuff */
203/*----------- defined in video/rmnimbus.c -----------*/
204
206205READ16_HANDLER (nimbus_video_io_r);
207206WRITE16_HANDLER (nimbus_video_io_w);
208207
r9617r9618
226225#define AY8910_TAG              "ay8910"
227226#define MONO_TAG                "mono"
228227
229READ8_HANDLER( sound_ay8910_r );
230WRITE8_HANDLER( sound_ay8910_w );
228READ8_HANDLER( nimbus_sound_ay8910_r );
229WRITE8_HANDLER( nimbus_sound_ay8910_w );
231230
232WRITE8_HANDLER( sound_ay8910_porta_w );
233WRITE8_HANDLER( sound_ay8910_portb_w );
231WRITE8_HANDLER( nimbus_sound_ay8910_porta_w );
232WRITE8_HANDLER( nimbus_sound_ay8910_portb_w );
234233
235234
236235#define MSM5205_TAG             "msm5205"
r9617r9618
251250   MOUSE_PHASE_NEGATIVE
252251};
253252
254READ8_HANDLER( mouse_js_r );
255WRITE8_HANDLER( mouse_js_w );
253READ8_HANDLER( nimbus_mouse_js_r );
254WRITE8_HANDLER( nimbus_mouse_js_w );
256255
257256#define MOUSE_INT_ENABLED()     ((iou_reg092 & MOUSE_INT_ENABLE) ? 1 : 0)
258257
src/mess/includes/ti89.h
r9617r9618
2121   EPROM
2222 };
2323
24/***************************************************************************
25+    FUNCTION PROTOTYPES
26+***************************************************************************/
24/*----------- defined in drivers/ti89.c -----------*/
2725
2826WRITE16_HANDLER ( ti68k_io_w );
2927READ16_HANDLER ( ti68k_io_r );
3028WRITE16_HANDLER ( ti68k_io2_w );
3129READ16_HANDLER ( ti68k_io2_r );
32WRITE16_HANDLER ( flash_w );
33READ16_HANDLER ( rom_r );
30static WRITE16_HANDLER ( flash_w );
31static READ16_HANDLER ( rom_r );
3432
3533static TIMER_CALLBACK( ti68k_timer_callback );
3634static INPUT_CHANGED( ti68k_on_key );
src/mess/formats/csw_cas.c
r9617r9618
2424
2525#include "emu.h"
2626#include "zlib.h"
27#include "formats/uef_cas.h"
2728#include "formats/csw_cas.h"
2829
2930
r9617r9618
319320   NULL
320321};
321322
322extern const struct CassetteFormat uef_cassette_format;
323
324323CASSETTE_FORMATLIST_START(csw_cassette_formats)
325324   CASSETTE_FORMAT(csw_cassette_format)
326325CASSETTE_FORMATLIST_END
src/mess/formats/hect_tap.c
r9617r9618
2323static int cas_size;
2424
2525
26int  Header_cycles = 77; /* Valeur Th?orique 66 = 44100 * 1.5 / 1000  // mesur? sur jeu Formule1 = 1,75ms*/
27int  Zero_cycles =   27; /* Valeur Th?orique 17 = 44100 * 0.4 / 1000  // mesur? sur jeu Formule1 = 0,61ms*/
28int  Un_cycles =     50; /* Valeur Th?orique 40 = 44100 * 0.9 / 1000  // mesur? sur jeu Formule1 = 1,13ms*/
26static const int  Header_cycles = 77; /* Valeur Th?orique 66 = 44100 * 1.5 / 1000  // mesur? sur jeu Formule1 = 1,75ms*/
27static const int  Zero_cycles =   27; /* Valeur Th?orique 17 = 44100 * 0.4 / 1000  // mesur? sur jeu Formule1 = 0,61ms*/
28static const int  Un_cycles =     50; /* Valeur Th?orique 40 = 44100 * 0.9 / 1000  // mesur? sur jeu Formule1 = 1,13ms*/
2929/* Here I prefer use the value that I read on a real tape, and not the theorical value; note that these
3030   value work best on my HRX...    Yo_fr   (jj.stacino@aliceadsl.fr)  */
3131
src/mess/drivers/xor100.c
r9617r9618
426426   DEVCB_NULL
427427};
428428
429static centronics_interface xor100_centronics_intf =
429static const centronics_interface xor100_centronics_intf =
430430{
431431   0,
432432   DEVCB_DEVICE_LINE(I8255A_TAG, i8255a_pc4_w),
src/mess/drivers/fmtowns.c
r9617r9618
17961796   state->scsi->fmscsi_data_w(data & 0xff);
17971797}
17981798
1799WRITE_LINE_DEVICE_HANDLER( towns_scsi_irq )
1799static WRITE_LINE_DEVICE_HANDLER( towns_scsi_irq )
18001800{
18011801   towns_state* tstate = device->machine->driver_data<towns_state>();
18021802   pic8259_ir0_w(tstate->pic_slave, state);
r9617r9618
18041804      logerror("PIC: IRQ8 (SCSI) set to %i\n",state);
18051805}
18061806
1807WRITE_LINE_DEVICE_HANDLER( towns_scsi_drq )
1807static WRITE_LINE_DEVICE_HANDLER( towns_scsi_drq )
18081808{
18091809   towns_state* tstate = device->machine->driver_data<towns_state>();
18101810   upd71071_dmarq(tstate->dma_1,state,1);  // SCSI HDs use channel 1
r9617r9618
18841884}
18851885
18861886// YM3438 interrupt (IRQ 13)
1887void towns_fm_irq(running_device* device, int irq)
1887static void towns_fm_irq(running_device* device, int irq)
18881888{
18891889   towns_state* state = device->machine->driver_data<towns_state>();
18901890   running_device* pic = state->pic_slave;
r9617r9618
19031903}
19041904
19051905// PCM interrupt (IRQ 13)
1906void towns_pcm_irq(running_device* device, int channel)
1906static void towns_pcm_irq(running_device* device, int channel)
19071907{
19081908   towns_state* state = device->machine->driver_data<towns_state>();
19091909   running_device* pic = state->pic_slave;
src/mess/drivers/jr200.c
r9617r9618
250250   jr200_border_col = data;
251251}
252252
253emu_timer *timer_d;
253static emu_timer *timer_d;
254254
255255static TIMER_CALLBACK(timer_d_callback)
256256{
src/mess/drivers/portfoli.c
r9617r9618
112112   PID_NONE = 0xff
113113};
114114
115static UINT8 INTERRUPT_VECTOR[] = { 0x08, 0x09, 0x00 };
115static const UINT8 INTERRUPT_VECTOR[] = { 0x08, 0x09, 0x00 };
116116
117117//**************************************************************************
118118//   INTERRUPTS
r9617r9618
746746//  centronics_interface centronics_intf
747747//-------------------------------------------------
748748
749static centronics_interface centronics_intf =
749static const centronics_interface centronics_intf =
750750{
751751   TRUE,
752752   DEVCB_NULL,
src/mess/drivers/vg5k.c
r9617r9618
6565};
6666
6767
68READ8_HANDLER( printer_r )
68static READ8_HANDLER( printer_r )
6969{
7070   vg5k_state *vg5k = space->machine->driver_data<vg5k_state>();
7171
r9617r9618
7373}
7474
7575
76WRITE8_HANDLER( printer_w )
76static WRITE8_HANDLER( printer_w )
7777{
7878   vg5k_state *vg5k = space->machine->driver_data<vg5k_state>();
7979
r9617r9618
8181}
8282
8383
84WRITE8_HANDLER ( ef9345_offset_w )
84static WRITE8_HANDLER ( ef9345_offset_w )
8585{
8686   vg5k_state *vg5k = space->machine->driver_data<vg5k_state>();
8787
r9617r9618
8989}
9090
9191
92READ8_HANDLER ( ef9345_io_r )
92static READ8_HANDLER ( ef9345_io_r )
9393{
9494   vg5k_state *vg5k = space->machine->driver_data<vg5k_state>();
9595
r9617r9618
9797}
9898
9999
100WRITE8_HANDLER ( ef9345_io_w )
100static WRITE8_HANDLER ( ef9345_io_w )
101101{
102102   vg5k_state *vg5k = space->machine->driver_data<vg5k_state>();
103103
r9617r9618
105105}
106106
107107
108READ8_HANDLER ( cassette_r )
108static READ8_HANDLER ( cassette_r )
109109{
110110   vg5k_state *vg5k = space->machine->driver_data<vg5k_state>();
111111   double level;
r9617r9618
116116}
117117
118118
119WRITE8_HANDLER ( cassette_w )
119static WRITE8_HANDLER ( cassette_w )
120120{
121121   vg5k_state *vg5k = space->machine->driver_data<vg5k_state>();
122122
src/mess/drivers/rmnimbus.c
r9617r9618
6868   AY8910_DEFAULT_LOADS,
6969   DEVCB_NULL,                       /* portA read */
7070   DEVCB_NULL,                /* portB read */
71   DEVCB_MEMORY_HANDLER(MAINCPU_TAG, PROGRAM, sound_ay8910_porta_w),   /* portA write */
72   DEVCB_MEMORY_HANDLER(MAINCPU_TAG, PROGRAM, sound_ay8910_portb_w)    /* portB write */
71   DEVCB_MEMORY_HANDLER(MAINCPU_TAG, PROGRAM, nimbus_sound_ay8910_porta_w),   /* portA write */
72   DEVCB_MEMORY_HANDLER(MAINCPU_TAG, PROGRAM, nimbus_sound_ay8910_portb_w)    /* portB write */
7373};
7474
7575static const msm5205_interface msm5205_config =
r9617r9618
111111static ADDRESS_MAP_START(nimbus_io, ADDRESS_SPACE_IO, 16)
112112    AM_RANGE( 0x0000, 0x0031) AM_READWRITE( nimbus_video_io_r, nimbus_video_io_w)
113113    AM_RANGE( 0x0032, 0x007f) AM_READWRITE( nimbus_io_r, nimbus_io_w)
114    AM_RANGE( 0x0080, 0x0081) AM_READWRITE8( mcu_r, mcu_w, 0x00FF)
115    AM_RANGE( 0x0092, 0x0093) AM_READWRITE8( iou_r, iou_w, 0x00FF)
116    AM_RANGE( 0x00A4, 0x00A5) AM_READWRITE8( mouse_js_r, mouse_js_w, 0x00FF)
117    AM_RANGE( 0X00c0, 0X00cf) AM_READWRITE8( pc8031_r, pc8031_w, 0x00FF)
118    AM_RANGE( 0X00e0, 0X00ef) AM_READWRITE8( sound_ay8910_r, sound_ay8910_w, 0x00FF)
114    AM_RANGE( 0x0080, 0x0081) AM_READWRITE8( nimbus_mcu_r, nimbus_mcu_w, 0x00FF)
115    AM_RANGE( 0x0092, 0x0093) AM_READWRITE8( nimbus_iou_r, nimbus_iou_w, 0x00FF)
116    AM_RANGE( 0x00A4, 0x00A5) AM_READWRITE8( nimbus_mouse_js_r, nimbus_mouse_js_w, 0x00FF)
117    AM_RANGE( 0X00c0, 0X00cf) AM_READWRITE8( nimbus_pc8031_r, nimbus_pc8031_w, 0x00FF)
118    AM_RANGE( 0X00e0, 0X00ef) AM_READWRITE8( nimbus_sound_ay8910_r, nimbus_sound_ay8910_w, 0x00FF)
119119    AM_RANGE( 0x00f0, 0x00f7) AM_DEVREADWRITE8(Z80SIO_TAG, z80sio_cd_ba_r, z80sio_cd_ba_w, 0x00ff)
120120    AM_RANGE( 0x0400, 0x041f) AM_READWRITE8( nimbus_disk_r, nimbus_disk_w, 0x00FF)
121   AM_RANGE( 0xff00, 0xffff) AM_READWRITE( i186_internal_port_r, i186_internal_port_w)/* CPU 80186         */
121   AM_RANGE( 0xff00, 0xffff) AM_READWRITE( nimbus_i186_internal_port_r, nimbus_i186_internal_port_w)/* CPU 80186         */
122122ADDRESS_MAP_END
123123
124124static INPUT_PORTS_START( nimbus )
r9617r9618
272272
273273static ADDRESS_MAP_START( nimbus_iocpu_io , ADDRESS_SPACE_IO, 8)
274274   ADDRESS_MAP_UNMAP_HIGH
275    AM_RANGE(0x00000, 0x000FF) AM_READWRITE(pc8031_iou_r, pc8031_iou_w)
275   AM_RANGE(0x00000, 0x000FF) AM_READWRITE(nimbus_pc8031_iou_r, nimbus_pc8031_iou_w)
276276   AM_RANGE(0x00010, 0x07fff) AM_RAM
277    AM_RANGE(0x20000, 0x20004) AM_READWRITE(pc8031_port_r, pc8031_port_w)
277   AM_RANGE(0x20000, 0x20004) AM_READWRITE(nimbus_pc8031_port_r, nimbus_pc8031_port_w)
278278ADDRESS_MAP_END
279279
280280
r9617r9618
337337   MDRV_RAM_EXTRA_OPTIONS("128K,256K,384K,512K,640K,1024K")
338338
339339    /* Peripheral chips */
340    MDRV_Z80SIO_ADD(Z80SIO_TAG, 4000000, sio_intf)
340    MDRV_Z80SIO_ADD(Z80SIO_TAG, 4000000, nimbus_sio_intf)
341341
342342    MDRV_ER59256_ADD(ER59256_TAG)
343343
src/mess/drivers/supercon.c
r9617r9618
7676static UINT8 *last_LED=NULL;
7777static UINT8 last_LED_value=0;
7878
79static int led_update=TRUE;
80static int remove_led_flag=TRUE;
79static int led_update;
80static int remove_led_flag;
8181
8282static int selecting=NO_ACTION;
8383static int confirm_board_click=FALSE;
r9617r9618
526526
527527static MACHINE_START( supercon )
528528{
529   led_update=TRUE;
530   remove_led_flag=TRUE;
531
529532   timer_update_irq = timer_alloc(machine,update_irq,NULL);
530533   timer_adjust_periodic( timer_update_irq, attotime_zero, 0, ATTOTIME_IN_HZ(1000) );
531534
src/mess/drivers/svision.c
r9617r9618
451451{
452452   svision.timer1 = timer_alloc(machine, svision_timer, NULL);
453453   svision_sound = machine->device("custom");
454   dma_finished = svision_dma_finished(svision_sound);
454455   memory_set_bankptr(machine, "bank2", memory_region(machine, "user1") + 0x1c000);
455456   svision.timer1 = timer_alloc(machine, svision_timer, NULL);
456457   svision_pet.on = TRUE;
src/mess/drivers/ti89.c
r9617r9618
171171}
172172
173173
174WRITE16_HANDLER ( flash_w )
174static WRITE16_HANDLER ( flash_w )
175175{
176176   t68k_state *state = space->machine->driver_data<t68k_state>();
177177   UINT16 *flash_base = (UINT16 *)memory_region(space->machine, "maincpu");
r9617r9618
211211}
212212
213213
214READ16_HANDLER ( rom_r )
214static READ16_HANDLER ( rom_r )
215215{
216216   t68k_state *state = space->machine->driver_data<t68k_state>();
217217   UINT16 *rom_base = (UINT16 *)memory_region(space->machine, "maincpu");
r9617r9618
239239
240240
241241static TIMER_CALLBACK( ti68k_timer_callback )
242 {
242{
243243   t68k_state *state = machine->driver_data<t68k_state>();
244244   static UINT64 timer;
245245
src/mess/drivers/micronic.c
r9617r9618
135135   return data;
136136}
137137
138READ8_HANDLER( kp_r )
138static READ8_HANDLER( kp_r )
139139{
140140   return  keypad_r(space->machine);
141141}
142142
143READ8_HANDLER( status_flag_r )
143static READ8_HANDLER( status_flag_r )
144144{
145145   micronic_state *state = space->machine->driver_data<micronic_state>();
146146   return  state->status_flag;
147147}
148148
149WRITE8_HANDLER( status_flag_w )
149static WRITE8_HANDLER( status_flag_w )
150150{
151151   micronic_state *state = space->machine->driver_data<micronic_state>();
152152   state->status_flag = data;
153153}
154154
155WRITE8_HANDLER( kp_matrix_w )
155static WRITE8_HANDLER( kp_matrix_w )
156156{
157157   micronic_state *state = space->machine->driver_data<micronic_state>();
158158   state->kp_matrix = data;
159159}
160160
161WRITE8_HANDLER( beep_w )
161static WRITE8_HANDLER( beep_w )
162162{
163163   micronic_state *state = space->machine->driver_data<micronic_state>();
164164   UINT16 frequency = 0;
r9617r9618
188188   beep_set_frequency(state->speaker, frequency);
189189}
190190
191READ8_HANDLER( irq_flag_r )
191static READ8_HANDLER( irq_flag_r )
192192{
193193   return (input_port_read(space->machine, "BACKBATTERY")<<4) | (input_port_read(space->machine, "MAINBATTERY")<<3) | (keypad_r(space->machine) ? 0 : 1);
194194}
195195
196WRITE8_HANDLER( bank_select_w )
196static WRITE8_HANDLER( bank_select_w )
197197{
198198   if (data < 2)
199199   {
r9617r9618
207207   }
208208}
209209
210WRITE8_HANDLER( lcd_contrast_w )
210static WRITE8_HANDLER( lcd_contrast_w )
211211{
212212   micronic_state *state = space->machine->driver_data<micronic_state>();
213213
r9617r9618
219219    RTC-146818
220220***************************************************************************/
221221
222void set_146818_periodic_irq(running_machine *machine, UINT8 data)
222static void set_146818_periodic_irq(running_machine *machine, UINT8 data)
223223{
224224   micronic_state *state = machine->driver_data<micronic_state>();
225225
r9617r9618
248248   timer_adjust_periodic(state->rtc_periodic_irq, timer_per, 0, timer_per);
249249}
250250
251WRITE8_HANDLER( rtc_address_w )
251static WRITE8_HANDLER( rtc_address_w )
252252{
253253   micronic_state *state = space->machine->driver_data<micronic_state>();
254254   state->rtc_address = data;
r9617r9618
256256   rtc->write(*space, 0, data);
257257}
258258
259READ8_HANDLER( rtc_data_r )
259static READ8_HANDLER( rtc_data_r )
260260{
261261   micronic_state *state = space->machine->driver_data<micronic_state>();
262262   UINT8 data = 0;
r9617r9618
274274   return data;
275275}
276276
277WRITE8_HANDLER( rtc_data_w )
277static WRITE8_HANDLER( rtc_data_w )
278278{
279279   micronic_state *state = space->machine->driver_data<micronic_state>();
280280   mc146818_device *rtc = space->machine->device<mc146818_device>("rtc");
src/mess/drivers/ti99_4x.c
r9617r9618
7676    Input ports, used by machine code for TI keyboard and joystick emulation.
7777*/
7878
79INPUT_CHANGED( gk_changed )
79static INPUT_CHANGED( gk_changed )
8080{
8181   running_device *cartsys = field->port->machine->device("gromport");
8282   set_gk_switches(cartsys, (UINT8)((UINT64)param&0x07), newval);
src/mess/drivers/psion.c
r9617r9618
817817   MDRV_FRAGMENT_ADD( psion_slot )
818818MACHINE_CONFIG_END
819819
820UINT8 psion_4line_layout[] =
820const UINT8 psion_4line_layout[] =
821821{
822822   0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
823823   0x40, 0x41, 0x42, 0x43, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
src/mess/drivers/gba.c
r9617r9618
4040   }
4141}
4242
43static UINT32 timer_clks[4] = { 16777216, 16777216/64, 16777216/256, 16777216/1024 };
43static const UINT32 timer_clks[4] = { 16777216, 16777216/64, 16777216/256, 16777216/1024 };
4444
4545static void gba_machine_stop(running_machine &machine)
4646{
docs/messnew.txt
r9617r9618
8787
8888- Refactored the UPD765 DRQ line to use devcb. The read_write parameter is
8989  not present on the real chip, and no driver was using it. [Curt Coder]
90 
91- Static and const changes.  [Atari Ace]
9092
9193
9294

Previous 15994 Revisions Next


© 1998-2018 The MESS Team