Previous 15994 Revisions Next

r6475 Saturday 28th November, 2009 at 04:26:47 UTC by Nathan Woods
More Atari Ace cleanups :-)
[src/mess]infomess.c
[src/mess/devices]aescart.c cartslot.c messram.c messram.h multcart.c multcart.h ti99cart.c ti99cart.h
[src/mess/drivers]3do.c amstrad.c atarist.c bbc.c coco.c compis.c dai.c enterp.c galaxy.c intv.c ip20.c mac.c mz700.c odyssey2.c poly88.c vector06.c vt100.c x68k.c
[src/mess/includes]3do.h amstrad.h apf.h bbc.h cbm.h coco.h compis.h dai.h galaxy.h intv.h mac.h mz700.h odyssey2.h pc8801.h poly88.h vector06.h vectrex.h
[src/mess/machine]3do.c 6883sam.c 6883sam.h 8530scc.c 8530scc.h 99_hsgpl.c amstrad.c apple2gs.c bbc.c c128.c c64.c c65.c cbm.c coco.c compis.c dai.c galaxy.c intv.c mac.c mz700.c nes.c nes_ines.c nes_mmc.c nes_mmc.h odyssey2.c pc8801.c poly88.c sms.c spectrum.c ti99_4x.c ti99_4x.h vector06.c vectrex.c
[src/mess/osd/winui]propertiesms.c
[src/mess/tools/messtest]testmess.c
[src/mess/video]bbc.c border.c border.h coco.c coco3.c epnick.c epnick.h galaxy.c intv.c mac.c odyssey2.c pc8801.c poly88.c smsvdp.c smsvdp.h spectrum.c stic.c stic.h timex.c vector06.c vectrex.c vtvideo.c vtvideo.h

src/mess/devices/multcart.h
r6474r6475
8585};
8686typedef enum _multicart_open_error multicart_open_error;
8787
88const char *mc_error_text(multicart_open_error error);
88const char *multicart_error_text(multicart_open_error error);
8989
9090/***************************************************************************
9191    PROTOTYPES
src/mess/devices/ti99cart.c
r6474r6475
164164    Interestingly, cartridge subroutines are found nevertheless, even when
165165    the cartridge is plugged into a higher slot.
166166*/
167void cartridge_slot_set(const device_config *cartsys, int slotnumber)
167void ti99_cartridge_slot_set(const device_config *cartsys, int slotnumber)
168168{
169169   ti99_multicart_t *cartslots = (ti99_multicart_t *)cartsys->token;
170170   assert(slotnumber>=0 && slotnumber<=255);
r6474r6475
180180    Called from the machine driver, taking the dipswitch setting.
181181    We take slot numbers from 0 (automatic mode) to the maximum.
182182*/
183void lock_cartridge_slot(const device_config *cartsys, int slotnumber)
183void ti99_lock_cartridge_slot(const device_config *cartsys, int slotnumber)
184184{
185185   ti99_multicart_t *cartslots = (ti99_multicart_t *)cartsys->token;
186186   assert(slotnumber>=0 && slotnumber<=255);
r6474r6475
227227    Note that the GROM access mechanism is identical for all cartridge
228228    types.
229229*/
230UINT8 cartridge_grom_read(const device_config *device, int cart_offset)
230UINT8 ti99_cartridge_grom_read(const device_config *device, int cart_offset)
231231{
232232   UINT8 value;
233233   int slot;
r6474r6475
340340   {
341341      cartridge->rom_ptr = socketcont;
342342      cartridge->rom_size = reslength;
343      if (!is_99_8())
343      if (!ti99_is_99_8())
344344      {
345345         /* Big-endianize it for 16 bit access. */
346346         UINT16 *cont16b = (UINT16 *)socketcont;
r6474r6475
355355   {
356356      cartridge->rom2_ptr = (UINT16 *)socketcont;
357357      assert(cartridge->rom2_ptr != NULL);
358      if (!is_99_8())
358      if (!ti99_is_99_8())
359359      {
360360         /* Big-endianize it for 16 bit access. */
361361         UINT16 *cont16b = (UINT16 *)socketcont;
r6474r6475
370370   {
371371      cartridge->ram_ptr = socketcont;
372372      cartridge->ram_size = reslength;
373      if (!is_99_8())
373      if (!ti99_is_99_8())
374374      {
375375         /* Big-endianize it for 16 bit access. */
376376         UINT16 *cont16b = (UINT16 *)socketcont;
r6474r6475
533533
534534   /* Do we have RAM? If so, swap the bytes (undo the BIG_ENDIANIZE) */
535535   cart = &cartslots->cartridge[slotnumber];
536   if (!is_99_8())
536   if (!ti99_is_99_8())
537537   {
538538      for (i = 0; i < cart->ram_size/2; i++)
539539         ((UINT16 *)cart->ram_ptr)[i] = BIG_ENDIANIZE_INT16(((UINT16 *)cart->ram_ptr)[i]);
r6474r6475
18981898         if (me == MCERR_NONE)
18991899            result = pcb->assemble(image);
19001900         else
1901            fatalerror("Error loading multicart: %s\n", mc_error_text(me));
1901            fatalerror("Error loading multicart: %s\n", multicart_error_text(me));
19021902
19031903         /* This is for legacy support. If we have no multicart left
19041904         but there are still legacy dumps, we switch to legacy mode. */
r6474r6475
23272327            savembx = TRUE;
23282328         }
23292329
2330         if (is_99_8())
2330         if (ti99_is_99_8())
23312331         {
23322332            // printf("** is 99/8\n");
23332333            if (savembx==TRUE)
r6474r6475
23672367      case SLOTC_MINIMEM:
23682368         /* Load the NVRAM. Need to BIG_ENDIANIZE it.
23692369         MiniMemory has only one cartridge page. */
2370         if (is_99_8())
2370         if (ti99_is_99_8())
23712371         {
23722372            // printf("** is 99/8\n");
23732373            image_battery_load(image, cart8rom+0x1000,0x1000);
r6474r6475
23862386
23872387      case SLOTC_MBX:
23882388         /* Load the NVRAM. Need to BIG_ENDIANIZE it. */
2389         if (is_99_8())
2389         if (ti99_is_99_8())
23902390         {
23912391            // printf("** is 99/8\n");
23922392            image_battery_load(image, cart8rom+0x0c00, 0x0400);
r6474r6475
24052405
24062406      case SLOTC_DROM:
24072407         maxrom = 0x2000;
2408         if (is_99_8())
2408         if (ti99_is_99_8())
24092409         {
24102410            // printf("** is 99/8\n");
24112411            filesize = image_fread(image, cart8rom2, maxrom);
r6474r6475
24562456         break;
24572457
24582458      case SLOTC_MINIMEM:
2459         if (is_99_8())
2459         if (ti99_is_99_8())
24602460         {
24612461            // printf("** is 99/8\n");
24622462            image_battery_save(image, cartslots->cartridge[slot].ram_ptr, 0x1000);
r6474r6475
24742474         }
24752475         break;
24762476      case SLOTC_MBX:
2477         if (is_99_8())
2477         if (ti99_is_99_8())
24782478         {
24792479            // printf("** is 99/8\n");
24802480            image_battery_save(image, cartslots->cartridge[slot].ram_ptr, 0x0400);
src/mess/devices/ti99cart.h
r6474r6475
8484typedef struct _cartridge_t cartridge_t;
8585
8686/* Functions to be called from the console. */
87void   cartridge_slot_set(const device_config *cartsys, int slotnumber);
88void   lock_cartridge_slot(const device_config *cartsys, int slotnumber);
89UINT8  cartridge_grom_read(const device_config *cartsys, int offset);
87void   ti99_cartridge_slot_set(const device_config *cartsys, int slotnumber);
88void   ti99_lock_cartridge_slot(const device_config *cartsys, int slotnumber);
89UINT8  ti99_cartridge_grom_read(const device_config *cartsys, int offset);
9090
9191DEVICE_GET_INFO(ti99_multicart);
9292
src/mess/devices/cartslot.c
r6474r6475
345345      else
346346      {
347347         if (me != MCERR_NOT_MULTICART)
348            fatalerror("multicart error: %s\n", mc_error_text(me));
348            fatalerror("multicart error: %s\n", multicart_error_text(me));
349349         if (image_pcb(device) != NULL)
350350         {
351351            /* read from hash file */
src/mess/devices/messram.c
r6474r6475
5252*****************************************************************************/
5353
5454/*-------------------------------------------------
55    parse_string - convert a ram string to an
55    messram_parse_string - convert a ram string to an
5656    integer value
5757-------------------------------------------------*/
5858
59UINT32 ram_parse_string(const char *s)
59UINT32 messram_parse_string(const char *s)
6060{
6161   UINT32 ram;
6262   char suffix = '\0';
r6474r6475
8888   return ram;
8989}
9090
91const char *ram_string(char *buffer, UINT32 ram)
91#ifdef UNUSED_FUNCTION
92const char *messram_string(char *buffer, UINT32 ram)
9293{
9394   const char *suffix;
9495
r6474r6475
109110   sprintf(buffer, "%u%s", ram, suffix);
110111   return buffer;
111112}
113#endif
112114
113115
114116/*****************************************************************************
r6474r6475
126128      const char *ramsize_string = options_get_string(mame_options(), OPTION_RAMSIZE);
127129
128130      if ((ramsize_string != NULL) && (ramsize_string[0] != '\0'))
129         messram->size = ram_parse_string(ramsize_string);
131         messram->size = messram_parse_string(ramsize_string);
130132   }
131133
132134   /* if we didn't get a size yet, use the default */
133135   if (messram->size == 0)
134      messram->size = ram_parse_string(config->default_size);
136      messram->size = messram_parse_string(config->default_size);
135137
136138   /* allocate space for the ram */
137139   messram->ram = auto_alloc_array(device->machine, UINT8, messram->size);
r6474r6475
154156   const char *gamename_option = NULL;
155157
156158   /* verify default ram value */
157   if (config!=NULL && ram_parse_string(config->default_size) == 0)
159   if (config!=NULL && messram_parse_string(config->default_size) == 0)
158160   {
159161      mame_printf_error("%s: '%s' has an invalid default RAM option: %s\n", driver->source_file, driver->name, config->default_size);
160162      error = TRUE;
r6474r6475
170172
171173      if ((ramsize_string != NULL) && (ramsize_string[0] != '\0'))
172174      {
173         specified_ram = ram_parse_string(ramsize_string);
175         specified_ram = messram_parse_string(ramsize_string);
174176
175177         if (specified_ram == 0)
176178         {
r6474r6475
180182         if (gamename_option!=NULL && strlen(gamename_option) > 0 && strcmp(gamename_option, driver->name) == 0)
181183         {                     
182184            /* compare command line option to default value */
183            if (ram_parse_string(config->default_size) == specified_ram)
185            if (messram_parse_string(config->default_size) == specified_ram)
184186               is_valid = TRUE;
185187
186188            /* verify extra ram options */
r6474r6475
197199               /* try to parse each option */
198200               while(*s != '\0')
199201               {
200                  UINT32 option_ram_size = ram_parse_string(s);
202                  UINT32 option_ram_size = messram_parse_string(s);
201203
202204                  if (option_ram_size == 0)
203205                  {
r6474r6475
289291}
290292
291293
294#ifdef UNUSED_FUNCTION
292295void messram_dump(const device_config *device, const char *filename)
293296{
294297   messram_state *messram = get_safe_token(device);
r6474r6475
310313      mame_fclose(file);
311314   }
312315}
316#endif
src/mess/devices/messram.h
r6474r6475
6969DEVICE_GET_INFO( messram );
7070UINT32 messram_get_size(const device_config *device);
7171UINT8 *messram_get_ptr(const device_config *device);
72#ifdef UNUSED_FUNCTION
7273void messram_dump(const device_config *device, const char *filename);
73UINT32 ram_parse_string(const char *s);
74const char *ram_string(char *buffer, UINT32 ram);
74const char *messram_string(char *buffer, UINT32 ram);
75#endif
76UINT32 messram_parse_string(const char *s);
7577
7678#endif /* __MESSRAM_H__ */
src/mess/devices/aescart.c
r6474r6475
435435      if (me == MCERR_NONE)
436436         result = pcb->assemble(pcbdev->machine, image);
437437      else
438         fatalerror("Error loading multicart: %s\n", mc_error_text(me));
438         fatalerror("Error loading multicart: %s\n", multicart_error_text(me));
439439   }
440440   else
441441   {
src/mess/devices/multcart.c
r6474r6475
3838   multicart_socket *      sockets;
3939};
4040
41static const char multicart_error_text[14][30] =
41static const char error_text[14][30] =
4242{
4343   "no error",
4444   "not a multicart",
r6474r6475
5656   "no pcb or resource found"
5757};
5858
59const char *mc_error_text(multicart_open_error error)
59const char *multicart_error_text(multicart_open_error error)
6060{
61   return multicart_error_text[(int)error];
61   return error_text[(int)error];
6262}
6363
6464/***************************************************************************
r6474r6475
227227      return MCERR_MISSING_RAM_LENGTH;
228228
229229   /* ...and parse it */
230   resource->length = ram_parse_string(length_string);
230   resource->length = messram_parse_string(length_string);
231231   if (resource->length <= 0)
232232      return MCERR_INVALID_RAM_SPEC;
233233
src/mess/tools/messtest/testmess.c
r6474r6475
15031503
15041504   /* 'ramsize' attribute */
15051505   attr_node = xml_get_attribute(node, "ramsize");
1506   current_testcase.ram = attr_node ? ram_parse_string(attr_node->value) : 0;
1506   current_testcase.ram = attr_node ? messram_parse_string(attr_node->value) : 0;
15071507
15081508   /* 'wavwrite' attribute */
15091509   attr_node = xml_get_attribute(node, "wavwrite");
src/mess/infomess.c
r6474r6475
123123   for (device = ram_first(config); device != NULL; device = ram_next(device))
124124   {
125125      ram_config *config = device->inline_config;   
126      fprintf(out, "\t\t<ramoption default=\"1\">%u</ramoption>\n",  ram_parse_string(config->default_size));
126      fprintf(out, "\t\t<ramoption default=\"1\">%u</ramoption>\n",  messram_parse_string(config->default_size));
127127      if (config->extra_options != NULL)
128128      {
129129         const char *s;
r6474r6475
137137         /* try to parse each option */
138138         while(*s != '\0')
139139         {
140            fprintf(out, "\t\t<ramoption>%u</ramoption>\n",  ram_parse_string(s));
140            fprintf(out, "\t\t<ramoption>%u</ramoption>\n",  messram_parse_string(s));
141141            s += strlen(s) + 1;
142142         }
143143         astring_free(buffer);
src/mess/video/stic.h
r6474r6475
1#ifndef __STIC_H
2#define __STIC_H
3
4READ16_HANDLER( stic_r );
5WRITE16_HANDLER( stic_w );
6
7struct intv_sprite_type
8{
9   int visible;
10   int xpos;
11   int ypos;
12   int coll;
13   int collision;
14   int doublex;
15   int doubley;
16   int quady;
17   int xflip;
18   int yflip;
19   int behind_foreground;
20   int grom;
21   int card;
22   int color;
23   int doubleyres;
24
25    int dirty;
26};
27
28extern struct intv_sprite_type intv_sprite[];
29extern UINT8 intv_sprite_buffers[8][16][128];
30extern int intv_color_stack_mode;
31extern int intv_collision_registers[];
32extern int intv_color_stack_offset;
33extern int intv_color_stack[];
34extern int intv_stic_handshake;
35extern int intv_border_color;
36extern int intv_col_delay;
37extern int intv_row_delay;
38extern int intv_left_edge_inhibit;
39extern int intv_top_edge_inhibit;
40
41#endif
src/mess/video/stic.c
r6474r6475
11#include "driver.h"
2#include "video/stic.h"
32#include "includes/intv.h"
43
54
r6474r6475
1716int intv_left_edge_inhibit = 0;  // for now
1817int intv_top_edge_inhibit = 0;  // for now
1918
20READ16_HANDLER( stic_r )
19READ16_HANDLER( intv_stic_r )
2120{
2221   //logerror("%x = stic_r(%x)\n",0,offset);
2322   switch (offset)
r6474r6475
3938   return 0;
4039}
4140
42WRITE16_HANDLER( stic_w )
41WRITE16_HANDLER( intv_stic_w )
4342{
4443   struct intv_sprite_type *s;
4544
src/mess/video/mac.c
r6474r6475
1515#include "includes/mac.h"
1616#include "devices/messram.h"
1717
18UINT32 *mac_se30_vram;
1819static int screen_buffer;
1920
2021PALETTE_INIT( mac )
r6474r6475
7879   int y, x, b;
7980
8081   video_base = screen_buffer ? 0x8000 : 0;
81   video_ram = (const UINT16 *) &se30_vram[video_base/4];
82   video_ram = (const UINT16 *) &mac_se30_vram[video_base/4];
8283
8384   for (y = 0; y < MAC_V_VIS; y++)
8485   {
src/mess/video/coco.c
r6474r6475
7979static const UINT8 *get_video_ram_coco(running_machine *machine,int scanline)
8080{
8181   coco_state *state = machine->driver_data;
82   return sam_m6847_get_video_ram(state->sam, scanline);
82   return sam6883_videoram(state->sam, scanline);
8383}
8484
8585static void internal_video_start_coco(running_machine *machine, m6847_type type)
src/mess/video/epnick.c
r6474r6475
154154return a 8-bit colour value for the index specified.  */
155155
156156/* initial the palette */
157PALETTE_INIT( nick )
157PALETTE_INIT( epnick )
158158{
159159   int i;
160160
r6474r6475
961961  return 0;
962962}
963963
964#if 0
965int   Nick_reg_r(int RegIndex)
964#ifdef UNUSED_FUNCTION
965READ8_HANDLER( nick_reg_r )
966966{
967967  /* read from a nick register - return floating bus,
968968   because the registers are not readable! */
r6474r6475
970970}
971971#endif
972972
973WRITE8_HANDLER( Nick_reg_w )
973WRITE8_HANDLER( epnick_reg_w )
974974{
975975   //mame_printf_info("Nick write %02x %02x\r\n",offset, data);
976976
r6474r6475
10261026}
10271027
10281028
1029VIDEO_START( nick )
1029VIDEO_START( epnick )
10301030{
10311031   Nick_vh_start();
10321032   VIDEO_START_CALL(generic_bitmapped);
10331033}
10341034
10351035
1036VIDEO_UPDATE( nick )
1036VIDEO_UPDATE( epnick )
10371037{
10381038   Nick_DoScreen(screen->machine,tmpbitmap);
10391039   return VIDEO_UPDATE_CALL(generic_bitmapped);
src/mess/video/epnick.h
r6474r6475
2424
2525/*----------- defined in video/epnick.c -----------*/
2626
27PALETTE_INIT( nick );
28VIDEO_START( nick );
29VIDEO_UPDATE( nick );
27PALETTE_INIT( epnick );
28VIDEO_START( epnick );
29VIDEO_UPDATE( epnick );
3030
31WRITE8_HANDLER( Nick_reg_w );
31WRITE8_HANDLER( epnick_reg_w );
3232
3333
3434#endif /* __EPNICK_H__ */
src/mess/video/vectrex.c
r6474r6475
6464
6565const via6522_interface vectrex_via6522_interface =
6666{
67   DEVCB_HANDLER(v_via_pa_r), DEVCB_HANDLER(v_via_pb_r),         /* read PA/B */
67   DEVCB_HANDLER(vectrex_via_pa_r), DEVCB_HANDLER(vectrex_via_pb_r),         /* read PA/B */
6868   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,                     /* read ca1, cb1, ca2, cb2 */
6969   DEVCB_HANDLER(v_via_pa_w), DEVCB_HANDLER(v_via_pb_w),         /* write PA/B */
7070   DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(v_via_ca2_w), DEVCB_HANDLER(v_via_cb2_w), /* write ca1, cb1, ca2, cb2 */
71   DEVCB_LINE(v_via_irq),                      /* IRQ */
71   DEVCB_LINE(vectrex_via_irq),                      /* IRQ */
7272};
7373
7474static int x_center, y_center, x_max, y_max;
r6474r6475
474474
475475const via6522_interface spectrum1_via6522_interface =
476476{
477   /*inputs : A/B,CA/B1,CA/B2 */ DEVCB_HANDLER(v_via_pa_r), DEVCB_HANDLER(s1_via_pb_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
477   /*inputs : A/B,CA/B1,CA/B2 */ DEVCB_HANDLER(vectrex_via_pa_r), DEVCB_HANDLER(vectrex_s1_via_pb_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
478478   /*outputs: A/B,CA/B1,CA/B2 */ DEVCB_HANDLER(v_via_pa_w), DEVCB_HANDLER(v_via_pb_w), DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(v_via_ca2_w), DEVCB_HANDLER(v_via_cb2_w),
479   /*irq                      */ DEVCB_LINE(v_via_irq),
479   /*irq                      */ DEVCB_LINE(vectrex_via_irq),
480480};
481481
482482
src/mess/video/spectrum.c
r6474r6475
7979        if (NumItems)
8080        {
8181                pItem = EventList_GetFirstItem();
82                set_last_border_color ( pItem[NumItems-1].Event_Data );
82                border_set_last_color ( pItem[NumItems-1].Event_Data );
8383                EventList_Reset();
8484            EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu, attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
8585                logerror ("Event log reset in callback fn.\n");
r6474r6475
158158                }
159159   }
160160
161   draw_border(screen->machine, bitmap, full_refresh,
161   border_draw(screen->machine, bitmap, full_refresh,
162162      SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER,
163163      SPEC_LEFT_BORDER, SPEC_DISPLAY_XSIZE, SPEC_RIGHT_BORDER,
164164      SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES,
src/mess/video/border.c
r6474r6475
2222static int LastDisplayedBorderColor = -1; /* Negative value indicates redraw */
2323
2424/* Force the border to be redrawn on the next frame */
25void force_border_redraw (void)
25void border_force_redraw (void)
2626{
2727        LastDisplayedBorderColor = -1;
2828}
2929
3030/* Set the last border colour to have been displayed. Used when loading snap
3131   shots and to record the last colour change in a frame that was skipped. */
32void set_last_border_color (int NewColor)
32void border_set_last_color (int NewColor)
3333{
3434        CurrBorderColor = NewColor;
3535}
3636
37void draw_border(running_machine *machine, bitmap_t *bitmap,
37void border_draw(running_machine *machine, bitmap_t *bitmap,
3838   int full_refresh,               /* Full refresh flag */
3939   int TopBorderLines,             /* Border lines before actual screen */
4040   int ScreenLines,                /* Screen height in pixels */
src/mess/video/border.h
r6474r6475
1extern void force_border_redraw (void);
2extern void set_last_border_color (int NewColor);
3extern void draw_border(running_machine *machine, bitmap_t *bitmap, int full_refresh,
1extern void border_force_redraw (void);
2extern void border_set_last_color (int NewColor);
3extern void border_draw(running_machine *machine, bitmap_t *bitmap, int full_refresh,
44                int TopBorderLines, int ScreenLines, int BottomBorderLines,
55                int LeftBorderPixels, int ScreenPixels, int RightBorderPixels,
66                int LeftBorderCycles, int ScreenCycles, int RightBorderCycles,
src/mess/video/pc8801.c
r6474r6475
261261static WRITE8_HANDLER(write_gvram_alu3_bank6){write_gvram_alu3(space, offset + 0x3000,data);}
262262
263263
264int is_pc8801_vram_select( running_machine *machine )
264int pc8801_is_vram_select( running_machine *machine )
265265{
266266   read8_space_func rh5 = NULL, rh6 = NULL;
267267   write8_space_func wh5 = NULL, wh6 = NULL;
src/mess/video/timex.c
r6474r6475
4343        if (NumItems)
4444        {
4545                pItem = EventList_GetFirstItem();
46                set_last_border_color ( pItem[NumItems-1].Event_Data );
46                border_set_last_color ( pItem[NumItems-1].Event_Data );
4747                EventList_Reset();
4848            EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu, attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
4949                logerror ("Event log reset in callback fn.\n");
r6474r6475
229229                        ts2068_lores_scanline(screen->machine,bitmap, count, TS2068_TOP_BORDER, 0);
230230        }
231231
232        draw_border(screen->machine, bitmap, full_refresh,
232        border_draw(screen->machine, bitmap, full_refresh,
233233                TS2068_TOP_BORDER, SPEC_DISPLAY_YSIZE, TS2068_BOTTOM_BORDER,
234234                TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER,
235235                SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES,
r6474r6475
269269         ts2068_lores_scanline(screen->machine,bitmap, count, SPEC_TOP_BORDER, 0);
270270   }
271271
272   draw_border(screen->machine, bitmap, full_refresh,
272   border_draw(screen->machine, bitmap, full_refresh,
273273      SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER,
274274      TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER,
275275      SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES,
src/mess/video/vector06.c
r6474r6475
2121    UINT8 col;
2222   int y, x, b,draw_y;
2323
24   int width = (vector_video_mode==0x00) ? 256 : 512;
24   int width = (vector06_video_mode==0x00) ? 256 : 512;
2525   rectangle screen_area = {0,width+64-1,0,256+64-1};
2626   // fill border color
27   bitmap_fill(bitmap, &screen_area, vector_color_index);
27   bitmap_fill(bitmap, &screen_area, vector06_color_index);
2828
2929   // draw image
3030   for (x = 0; x < 32; x++)
r6474r6475
4040         for (b = 0; b < 8; b++)
4141         {
4242            col = ((code1 >> b) & 0x01) * 8 + ((code2 >> b) & 0x01) * 4 + ((code3 >> b) & 0x01)* 2+ ((code4 >> b) & 0x01);
43            if (vector_video_mode==0x00) {
43            if (vector06_video_mode==0x00) {
4444               *BITMAP_ADDR16(bitmap, draw_y, x*8+(7-b)+32) =  col;
4545            } else {
4646               *BITMAP_ADDR16(bitmap, draw_y, x*16+(7-b)*2+1+32) =  ((code2 >> b) & 0x01) * 2;
src/mess/video/vtvideo.c
r6474r6475
7171/***************************************************************************
7272    IMPLEMENTATION
7373***************************************************************************/
74READ8_DEVICE_HANDLER( lba7_r )
74READ8_DEVICE_HANDLER( vt_video_lba7_r )
7575{
7676   vt_video_t *vt = get_safe_token(device);
7777   return vt->lba7;
7878}
7979
8080
81WRITE8_DEVICE_HANDLER( dc012_w )
81WRITE8_DEVICE_HANDLER( vt_video_dc012_w )
8282{
8383   vt_video_t *vt = get_safe_token(device);
8484
r6474r6475
128128}
129129
130130
131WRITE8_DEVICE_HANDLER( dc011_w )
131WRITE8_DEVICE_HANDLER( vt_video_dc011_w )
132132{
133133   vt_video_t *vt = get_safe_token(device);
134134   if (BIT(data,5)==0) {
r6474r6475
319319}
320320
321321/*-------------------------------------------------
322    DEVICE_GET_INFO( dc012 )
322    DEVICE_GET_INFO( vt100_video )
323323-------------------------------------------------*/
324324
325325DEVICE_GET_INFO( vt100_video )
src/mess/video/vtvideo.h
r6474r6475
4848DEVICE_GET_INFO( vt100_video );
4949
5050/* register access */
51READ8_DEVICE_HANDLER  ( lba7_r );
52WRITE8_DEVICE_HANDLER ( dc012_w );
53WRITE8_DEVICE_HANDLER ( dc011_w );
51READ8_DEVICE_HANDLER  ( vt_video_lba7_r );
52WRITE8_DEVICE_HANDLER ( vt_video_dc012_w );
53WRITE8_DEVICE_HANDLER ( vt_video_dc011_w );
5454WRITE8_DEVICE_HANDLER ( vt_video_brightness_w );
5555
5656
src/mess/video/coco3.c
r6474r6475
792792static const UINT8 *get_video_ram_coco3(running_machine *machine,int scanline)
793793{
794794   const device_config *sam = devtag_get_device(machine, "sam");
795   return sam_m6847_get_video_ram(sam,scanline);
795   return sam6883_videoram(sam,scanline);
796796}
797797
798798static void internal_video_start_coco3(running_machine *machine, m6847_type type)
src/mess/video/smsvdp.c
r6474r6475
250250}
251251
252252
253void sms_set_ggsmsmode( const device_config *device, int mode )
253void sms_vdp_set_ggsmsmode( const device_config *device, int mode )
254254{
255255   smsvdp_t *smsvdp = get_safe_token(device);
256256
r6474r6475
13361336}
13371337
13381338
1339UINT32 smsvdp_update( const device_config *device, bitmap_t *bitmap, const rectangle *cliprect )
1339UINT32 sms_vdp_update( const device_config *device, bitmap_t *bitmap, const rectangle *cliprect )
13401340{
13411341   smsvdp_t *smsvdp = get_safe_token(device);
13421342   const device_config *screen = video_screen_first(device->machine->config);
src/mess/video/intv.c
r6474r6475
11#include "driver.h"
22#include "includes/intv.h"
3#include "video/stic.h"
43
54#define FOREGROUND_BIT 0x0010
65
r6474r6475
697696static int col_delay = 0;
698697static int row_delay = 0;
699698
700void stic_screenrefresh(running_machine *machine)
699void intv_stic_screenrefresh(running_machine *machine)
701700{
702701   int i;
703702
src/mess/video/smsvdp.h
r6474r6475
7979
8080/* prototypes */
8181
82UINT32 smsvdp_update( const device_config *device, bitmap_t *bitmap, const rectangle *cliprect );
82UINT32 sms_vdp_update( const device_config *device, bitmap_t *bitmap, const rectangle *cliprect );
8383READ8_DEVICE_HANDLER( sms_vdp_vcount_r );
8484READ8_DEVICE_HANDLER( sms_vdp_hcount_latch_r );
8585WRITE8_DEVICE_HANDLER( sms_vdp_hcount_latch_w );
r6474r6475
8787WRITE8_DEVICE_HANDLER( sms_vdp_data_w );
8888READ8_DEVICE_HANDLER( sms_vdp_ctrl_r );
8989WRITE8_DEVICE_HANDLER( sms_vdp_ctrl_w );
90void sms_set_ggsmsmode( const device_config *device, int mode );
90void sms_vdp_set_ggsmsmode( const device_config *device, int mode );
9191
9292#endif /* __SMSVDP_H__ */
src/mess/video/poly88.c
r6474r6475
99#include "driver.h"
1010#include "includes/poly88.h"
1111
12UINT8* poly_video_ram;
12UINT8* poly88_video_ram;
1313
1414static UINT8 mcm6571a[] =
1515{
r6474r6475
192192      xpos = 0;
193193      for(x = 0; x < 64; x++ )
194194      {
195         UINT8 code = poly_video_ram[addr + x];
195         UINT8 code = poly88_video_ram[addr + x];
196196         if ((code & 0x80)==0) {
197197            for(j = 0; j < 15; j++ )
198198            {
src/mess/video/odyssey2.c
r6474r6475
769769   }
770770}
771771
772void ef9341_w( int command, int b, UINT8 data )
772void odyssey2_ef9341_w( int command, int b, UINT8 data )
773773{
774774   logerror("ef9341 %s write, t%s, data %02X\n", command ? "command" : "data", b ? "B" : "A", data );
775775
r6474r6475
843843   }
844844}
845845
846UINT8 ef9341_r( int command, int b )
846UINT8 odyssey2_ef9341_r( int command, int b )
847847{
848848   UINT8   data = 0xFF;
849849
src/mess/video/galaxy.c
r6474r6475
1212#include "includes/galaxy.h"
1313#include "cpu/z80/z80.h"
1414
15UINT32 gal_cnt = 0;
15static UINT32 gal_cnt = 0;
1616static UINT8 code = 0;
1717static UINT8 first = 0;
1818static UINT32 start_addr = 0;
19emu_timer *gal_video_timer = NULL;
19static emu_timer *gal_video_timer = NULL;
2020
21TIMER_CALLBACK( gal_video )
21static TIMER_CALLBACK( gal_video )
2222{
2323   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
2424   int y, x;
r6474r6475
107107   }
108108}
109109
110void galaxy_set_timer(void)
111{
112   gal_cnt = 0;
113   timer_adjust_periodic(gal_video_timer, attotime_zero, 0, ATTOTIME_IN_HZ(6144000 / 8));
114}
115
116VIDEO_START( galaxy )
117{
118   gal_cnt = 0;
119
120   gal_video_timer = timer_alloc(machine, gal_video, NULL);
121   timer_adjust_periodic(gal_video_timer, attotime_zero, 0, attotime_never);
122
123   VIDEO_START_CALL( generic_bitmapped );
124}
125
110126VIDEO_UPDATE( galaxy )
111127{
112128   timer_adjust_periodic(gal_video_timer, attotime_zero, 0, attotime_never);
src/mess/video/bbc.c
r6474r6475
552552 * memory interface to BBC's 6845
553553 ************************************************************************/
554554
555WRITE8_HANDLER ( BBC_6845_w )
555WRITE8_HANDLER ( bbc_6845_w )
556556{
557557   switch (offset&1)
558558   {
r6474r6475
568568   video_refresh=1;
569569}
570570
571 READ8_HANDLER (BBC_6845_r)
571 READ8_HANDLER (bbc_6845_r)
572572{
573573   int retval=0;
574574
src/mess/includes/apf.h
r6474r6475
1/*****************************************************************************
2 *
3 * includes/apf.h
4 *
5 ****************************************************************************/
6
7#ifndef APF_H_
8#define APF_H_
9
10
11/*----------- defined in drivers/apf.c -----------*/
12
13extern unsigned char apf_ints;
14
15void apf_update_ints(running_machine *machine);
16
17#endif /* APF_H_ */
src/mess/includes/compis.h
r6474r6475
3939WRITE16_HANDLER (compis_usart_w);
4040
4141/* 80186 Internal */
42READ16_HANDLER (i186_internal_port_r);
43WRITE16_HANDLER (i186_internal_port_w);
42READ16_HANDLER (compis_i186_internal_port_r);
43WRITE16_HANDLER (compis_i186_internal_port_w);
4444
4545/* FDC 8272 */
4646READ16_HANDLER (compis_fdc_dack_r);
src/mess/includes/cbm.h
r6474r6475
1919extern UINT8 c64_keyline[10];
2020void cbm_common_interrupt( const device_config *device );
2121
22UINT8 common_cia0_port_a_r( const device_config *device, UINT8 output_b );
23UINT8 common_cia0_port_b_r( const device_config *device, UINT8 output_a );
22UINT8 cbm_common_cia0_port_a_r( const device_config *device, UINT8 output_b );
23UINT8 cbm_common_cia0_port_b_r( const device_config *device, UINT8 output_a );
2424
2525
2626/***********************************************
src/mess/includes/3do.h
r6474r6475
1010
1111/*----------- defined in machine/3do.c -----------*/
1212
13READ32_HANDLER( nvarea_r );
14WRITE32_HANDLER( nvarea_w );
13READ32_HANDLER( _3do_nvarea_r );
14WRITE32_HANDLER( _3do_nvarea_w );
1515
16READ32_HANDLER( unk_318_r );
17WRITE32_HANDLER( unk_318_w );
16READ32_HANDLER( _3do_unk_318_r );
17WRITE32_HANDLER( _3do_unk_318_w );
1818
19READ32_HANDLER( vram_sport_r );
20WRITE32_HANDLER( vram_sport_w );
19READ32_HANDLER( _3do_vram_sport_r );
20WRITE32_HANDLER( _3do_vram_sport_w );
2121
22READ32_HANDLER( madam_r );
23WRITE32_HANDLER( madam_w );
24void madam_init( void );
22READ32_HANDLER( _3do_madam_r );
23WRITE32_HANDLER( _3do_madam_w );
24void _3do_madam_init( void );
2525
26READ32_HANDLER( clio_r );
27WRITE32_HANDLER( clio_w );
28void clio_init( void );
26READ32_HANDLER( _3do_clio_r );
27WRITE32_HANDLER( _3do_clio_w );
28void _3do_clio_init( void );
2929
3030
3131#endif /* _3DO_H_ */
src/mess/includes/dai.h
r6474r6475
2424READ8_HANDLER( dai_io_discrete_devices_r );
2525WRITE8_HANDLER( dai_io_discrete_devices_w );
2626WRITE8_HANDLER( dai_stack_interrupt_circuit_w );
27READ8_HANDLER( amd9511_r );
28WRITE8_HANDLER( amd9511_w );
27READ8_HANDLER( dai_amd9511_r );
28WRITE8_HANDLER( dai_amd9511_w );
2929extern UINT8 dai_noise_volume;
3030extern UINT8 dai_osc_volume[3];
3131
src/mess/includes/mac.h
r6474r6475
4747#define MAC_H_TOTAL   (704)      // (512+192)
4848#define MAC_V_TOTAL   (370)      // (342+28)
4949
50/*----------- defined in drivers/mac.c -----------*/
51extern UINT32 *se30_vram;
52
5350/*----------- defined in machine/mac.c -----------*/
5451
5552extern mac_model_t mac_model;
r6474r6475
103100
104101/*----------- defined in video/mac.c -----------*/
105102
103extern UINT32 *mac_se30_vram;
104
106105VIDEO_START( mac );
107106VIDEO_UPDATE( mac );
108107VIDEO_UPDATE( macse30 );
src/mess/includes/coco.h
r6474r6475
120120void coco_halt_w(const device_config *device, int data);
121121
122122/* Compusense Dragon Plus board */
123READ8_HANDLER ( plus_reg_r );
124WRITE8_HANDLER ( plus_reg_w );
123READ8_HANDLER ( dgnplus_reg_r );
124WRITE8_HANDLER ( dgnplus_reg_w );
125125
126READ8_HANDLER( dragon_alpha_mapped_irq_r );
126READ8_HANDLER( dgnalpha_mapped_irq_r );
127127
128128/* Dragon Alpha AY-8912 */
129129READ8_HANDLER ( dgnalpha_psg_porta_read );
130130WRITE8_HANDLER ( dgnalpha_psg_porta_write );
131131
132132/* Dragon Alpha WD2797 FDC */
133READ8_HANDLER(wd2797_r);
134WRITE8_HANDLER(wd2797_w);
133READ8_HANDLER(dgnalpha_wd2797_r);
134WRITE8_HANDLER(dgnalpha_wd2797_w);
135135
136136/* Dragon Alpha Modem, just dummy funcs at the mo */
137READ8_HANDLER(alpha_modem_r);
138WRITE8_HANDLER(alpha_modem_w);
137READ8_HANDLER(dgnalpha_modem_r);
138WRITE8_HANDLER(dgnalpha_modem_w);
139139
140140#ifdef UNUSED_FUNCTION
141141void coco_set_halt_line(running_machine *machine, int halt_line);
src/mess/includes/mz700.h
r6474r6475
5858
5959/* bank switching */
6060WRITE8_HANDLER( mz700_bank_0_w );
61WRITE8_HANDLER( mz800_bank_0_w );
62WRITE8_HANDLER( mz_bank_1_w );
63WRITE8_HANDLER( mz_bank_2_w );
64WRITE8_HANDLER( mz_bank_3_w );
65WRITE8_HANDLER( mz_bank_4_w );
66WRITE8_HANDLER( mz_bank_5_w );
67WRITE8_HANDLER( mz_bank_6_w );
61WRITE8_HANDLER( mz700_bank_1_w );
62WRITE8_HANDLER( mz700_bank_2_w );
63WRITE8_HANDLER( mz700_bank_3_w );
64WRITE8_HANDLER( mz700_bank_4_w );
65WRITE8_HANDLER( mz700_bank_5_w );
66WRITE8_HANDLER( mz700_bank_6_w );
6867
6968/* bankswitching, mz800 only */
7069READ8_HANDLER( mz800_bank_0_r );
7170READ8_HANDLER( mz800_bank_1_r );
71WRITE8_HANDLER( mz800_bank_0_w );
7272
7373
7474READ8_HANDLER( mz800_crtc_r );
src/mess/includes/vectrex.h
r6474r6475
2323
2424TIMER_CALLBACK(vectrex_imager_eye);
2525void vectrex_configuration(running_machine *machine);
26READ8_DEVICE_HANDLER (v_via_pa_r);
27READ8_DEVICE_HANDLER(v_via_pb_r );
28void v_via_irq (const device_config *device, int level);
26READ8_DEVICE_HANDLER (vectrex_via_pa_r);
27READ8_DEVICE_HANDLER(vectrex_via_pb_r );
28void vectrex_via_irq (const device_config *device, int level);
2929WRITE8_HANDLER ( vectrex_psg_port_w );
3030
3131DRIVER_INIT( vectrex );
3232
3333/* for spectrum 1+ */
34READ8_DEVICE_HANDLER( s1_via_pb_r );
34READ8_DEVICE_HANDLER( vectrex_s1_via_pb_r );
3535
3636
3737/*----------- defined in video/vectrex.c -----------*/
src/mess/includes/pc8801.h
r6474r6475
7979/*----------- defined in video/pc8801.c -----------*/
8080
8181void pc8801_video_init (running_machine *machine, int hireso);
82int is_pc8801_vram_select(running_machine *machine);
82int pc8801_is_vram_select(running_machine *machine);
8383WRITE8_HANDLER(pc88_vramsel_w);
8484 READ8_HANDLER(pc88_vramtest_r);
8585extern unsigned char *pc88sr_textRAM;
src/mess/includes/vector06.h
r6474r6475
2020
2121extern INTERRUPT_GEN( vector06_interrupt );
2222
23extern READ8_HANDLER(vector_8255_1_r);
24extern WRITE8_HANDLER(vector_8255_1_w);
25extern READ8_HANDLER(vector_8255_2_r);
26extern WRITE8_HANDLER(vector_8255_2_w);
23extern READ8_HANDLER(vector06_8255_1_r);
24extern WRITE8_HANDLER(vector06_8255_1_w);
25extern READ8_HANDLER(vector06_8255_2_r);
26extern WRITE8_HANDLER(vector06_8255_2_w);
2727
2828extern WRITE8_HANDLER(vector06_color_set);
29extern WRITE8_HANDLER(vector_disc_w);
29extern WRITE8_HANDLER(vector06_disc_w);
3030
3131extern UINT8 vector06_keyboard_mask;
32extern UINT8 vector_color_index;
33extern UINT8 vector_video_mode;
32extern UINT8 vector06_color_index;
33extern UINT8 vector06_video_mode;
3434
3535/*----------- defined in video/vector06.c -----------*/
3636
src/mess/includes/intv.h
r6474r6475
77#ifndef INTV_H_
88#define INTV_H_
99
10struct intv_sprite_type
11{
12   int visible;
13   int xpos;
14   int ypos;
15   int coll;
16   int collision;
17   int doublex;
18   int doubley;
19   int quady;
20   int xflip;
21   int yflip;
22   int behind_foreground;
23   int grom;
24   int card;
25   int color;
26   int doubleyres;
1027
28   int dirty;
29};
30
31/*----------- defined in video/stic.c -----------*/
32
33READ16_HANDLER( intv_stic_r );
34WRITE16_HANDLER( intv_stic_w );
35
36extern struct intv_sprite_type intv_sprite[];
37extern UINT8 intv_sprite_buffers[8][16][128];
38extern int intv_color_stack_mode;
39extern int intv_collision_registers[];
40extern int intv_color_stack_offset;
41extern int intv_color_stack[];
42extern int intv_stic_handshake;
43extern int intv_border_color;
44extern int intv_col_delay;
45extern int intv_row_delay;
46extern int intv_left_edge_inhibit;
47extern int intv_top_edge_inhibit;
48
1149/*----------- defined in video/intv.c -----------*/
1250
1351extern VIDEO_START( intv );
1452extern VIDEO_UPDATE( intvkbd );
1553
16void stic_screenrefresh(running_machine *machine);
54void intv_stic_screenrefresh(running_machine *machine);
1755
1856READ8_HANDLER ( intvkbd_tms9927_r );
1957WRITE8_HANDLER ( intvkbd_tms9927_w );
src/mess/includes/amstrad.h
r6474r6475
4141
4242DEVICE_IMAGE_LOAD(amstrad_plus_cartridge);
4343
44extern const mc6845_interface mc6845_amstrad_intf;
45extern const mc6845_interface mc6845_amstrad_plus_intf;
44extern const mc6845_interface amstrad_mc6845_intf;
45extern const mc6845_interface amstrad_plus_mc6845_intf;
4646
4747VIDEO_START( amstrad );
4848VIDEO_UPDATE( amstrad );
src/mess/includes/poly88.h
r6474r6475
1414DRIVER_INIT(poly88);
1515MACHINE_RESET(poly88);
1616INTERRUPT_GEN( poly88_interrupt );
17READ8_HANDLER(poly_keyboard_r);
18WRITE8_HANDLER(poly_intr_w);
19WRITE8_HANDLER(poly_baud_rate_w);
17READ8_HANDLER(poly88_keyboard_r);
18WRITE8_HANDLER(poly88_intr_w);
19WRITE8_HANDLER(poly88_baud_rate_w);
20
2021extern const msm8251_interface poly88_usart_interface;
2122
2223extern SNAPSHOT_LOAD( poly88 );
2324
25
2426/*----------- defined in video/poly88.c -----------*/
25extern UINT8 *poly_video_ram;
2627
28extern UINT8 *poly88_video_ram;
29
2730extern VIDEO_START( poly88 );
2831extern VIDEO_UPDATE( poly88 );
2932
src/mess/includes/odyssey2.h
r6474r6475
4141
4242STREAM_UPDATE( odyssey2_sh_update );
4343
44void ef9341_w( int command, int b, UINT8 data );
45UINT8 ef9341_r( int command, int b );
44void odyssey2_ef9341_w( int command, int b, UINT8 data );
45UINT8 odyssey2_ef9341_r( int command, int b );
4646
4747#define SOUND_ODYSSEY2      DEVICE_GET_INFO_NAME( odyssey2_sound )
4848
r6474r6475
6767WRITE8_HANDLER ( odyssey2_putbus );
6868
6969READ8_HANDLER( odyssey2_t0_r );
70void the_voice_lrq_callback( const device_config *device, int state );
70void odyssey2_the_voice_lrq_callback( const device_config *device, int state );
7171
7272READ8_HANDLER ( g7400_bus_r );
7373WRITE8_HANDLER ( g7400_bus_w );
src/mess/includes/galaxy.h
r6474r6475
2929
3030/*----------- defined in video/galaxy.c -----------*/
3131
32extern UINT32 gal_cnt;
32extern VIDEO_START( galaxy );
3333extern VIDEO_UPDATE( galaxy );
34extern TIMER_CALLBACK( gal_video );
3534
36extern emu_timer *gal_video_timer;
35void galaxy_set_timer(void);
3736
3837#endif /* GALAXY_H_ */
src/mess/includes/bbc.h
r6474r6475
9292
9393/* tape support */
9494
95WRITE8_HANDLER ( BBC_SerialULA_w );
95WRITE8_HANDLER ( bbc_SerialULA_w );
9696
9797extern const i8271_interface bbc_i8271_interface;
98extern const uPD7002_interface BBC_uPD7002;
98extern const uPD7002_interface bbc_uPD7002;
9999
100100/*----------- defined in video/bbc.c -----------*/
101101
r6474r6475
114114
115115WRITE8_HANDLER ( bbc_videoULA_w );
116116
117WRITE8_HANDLER ( BBC_6845_w );
118READ8_HANDLER ( BBC_6845_r );
117WRITE8_HANDLER ( bbc_6845_w );
118READ8_HANDLER ( bbc_6845_r );
119119
120120
121121#endif /* BBC_H_ */
src/mess/osd/winui/propertiesms.c
r6474r6475
413413     
414414      // identify the current amount of RAM
415415      this_ram_string = options_get_string(opts, OPTION_RAMSIZE);
416      current_ram = (this_ram_string != NULL) ? ram_parse_string(this_ram_string) : 0;
416      current_ram = (this_ram_string != NULL) ? messram_parse_string(this_ram_string) : 0;
417417      if (current_ram == 0)
418         current_ram = ram_parse_string(config->default_size);
418         current_ram = messram_parse_string(config->default_size);
419419
420420      // by default, assume index 0
421421      current_index = 0;
422422
423423      {
424         ram = ram_parse_string(config->default_size);
424         ram = messram_parse_string(config->default_size);
425425         t_ramstring = tstring_from_utf8(config->default_size);
426426         if( !t_ramstring )
427427            return FALSE;
r6474r6475
444444         {           
445445            i++;
446446            // identify this option
447            ram = ram_parse_string(s);
447            ram = messram_parse_string(s);
448448            this_ram_string = s;
449449
450450            t_ramstring = tstring_from_utf8(this_ram_string);
src/mess/machine/3do.c
r6474r6475
1818static CLIO      clio;
1919
2020
21READ32_HANDLER( nvarea_r ) {
21READ32_HANDLER( _3do_nvarea_r ) {
2222   logerror( "%08X: NVRAM read offset = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset );
2323   return 0;
2424}
2525
26WRITE32_HANDLER( nvarea_w ) {
26WRITE32_HANDLER( _3do_nvarea_w ) {
2727   logerror( "%08X: NVRAM write offset = %08X, data = %08X, mask = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset, data, mem_mask );
2828}
2929
r6474r6475
7070    write 00002000 to 03180000
7171    several groups of 16 write actions or 16 read actions
7272*/
73READ32_HANDLER( unk_318_r ) {
73READ32_HANDLER( _3do_unk_318_r ) {
7474   logerror( "%08X: UNK_318 read offset = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset );
7575#if 0
7676   switch( offset ) {
r6474r6475
8282   return 0;
8383}
8484
85WRITE32_HANDLER( unk_318_w )
85WRITE32_HANDLER( _3do_unk_318_w )
8686{
8787   logerror( "%08X: UNK_318 write offset = %08X, data = %08X, mask = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset, data, mem_mask );
8888
r6474r6475
9999
100100
101101
102READ32_HANDLER( vram_sport_r ) {
102READ32_HANDLER( _3do_vram_sport_r ) {
103103   logerror( "%08X: VRAM SPORT read offset = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset );
104104   switch( offset ) {
105105   case 0x1840:   /* 03206100 - ?? */
r6474r6475
110110   return 0;
111111}
112112
113WRITE32_HANDLER( vram_sport_w ) {
113WRITE32_HANDLER( _3do_vram_sport_w ) {
114114   logerror( "%08X: VRAM SPORT write offset = %08X, data = %08X, mask = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset, data, mem_mask );
115115   switch( offset ) {
116116   case 0x0800:   /* 03202000 - ?? during boot 00190019 gets written */
r6474r6475
122122
123123
124124
125READ32_HANDLER( madam_r ) {
125READ32_HANDLER( _3do_madam_r ) {
126126   logerror( "%08X: MADAM read offset = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset );
127127   switch( offset ) {
128128   case 0:      /* 03300000 - Revision */
r6474r6475
134134}
135135
136136
137WRITE32_HANDLER( madam_w ) {
137WRITE32_HANDLER( _3do_madam_w ) {
138138   logerror( "%08X: MADAM write offset = %08X, data = %08X, mask = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset, data, mem_mask );
139139   switch( offset ) {
140140   case 0x01:   /* 03300004 - Memory configuration 29 = 2MB DRAM, 1MB VRAM */
r6474r6475
148148}
149149
150150
151void madam_init( void )
151void _3do_madam_init( void )
152152{
153153   memset( &madam, 0, sizeof(MADAM) );
154154   madam.revision = 0x00000001;
155155}
156156
157157
158READ32_HANDLER( clio_r )
158READ32_HANDLER( _3do_clio_r )
159159{
160160   logerror( "%08X: CLIO read offset = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset );
161161
r6474r6475
174174   return 0;
175175}
176176
177WRITE32_HANDLER( clio_w )
177WRITE32_HANDLER( _3do_clio_w )
178178{
179179   logerror( "%08X: CLIO write offset = %08X, data = %08X, mask = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset, data, mem_mask );
180180
r6474r6475
194194   }
195195}
196196
197void clio_init( void )
197void _3do_clio_init( void )
198198{
199199   memset( &clio, 0, sizeof(CLIO) );
200200}
src/mess/machine/c65.c
r6474r6475
8686{
8787   UINT8 cia0portb = cia_get_output_b(devtag_get_device(device->machine, "cia_0"));
8888
89   return common_cia0_port_a_r(device, cia0portb);
89   return cbm_common_cia0_port_a_r(device, cia0portb);
9090}
9191
9292static READ8_DEVICE_HANDLER( c65_cia0_port_b_r )
r6474r6475
9494    UINT8 value = 0xff;
9595   UINT8 cia0porta = cia_get_output_a(devtag_get_device(device->machine, "cia_0"));
9696
97   value &= common_cia0_port_b_r(device, cia0porta);
97   value &= cbm_common_cia0_port_b_r(device, cia0porta);
9898
9999   if (!(c65_6511_port & 0x02))
100100      value &= c65_keyline;
src/mess/machine/dai.c
r6474r6475
249249
250250***************************************************************************/
251251
252READ8_HANDLER( amd9511_r )
252READ8_HANDLER( dai_amd9511_r )
253253{
254254   /* optional and no present at this moment */
255255   return 0xff;
256256}
257257
258WRITE8_HANDLER( amd9511_w )
258WRITE8_HANDLER( dai_amd9511_w )
259259{
260260   logerror ("Writing to AMD9511 math chip, %04x, %02x\n", offset, data);
261261}
src/mess/machine/coco.c
r6474r6475
641641     * access that bit or or whether it is something else.  So that is why
642642     * I am specifying 0x7fff instead of 0xffff here
643643     */
644   sam_set_state(state->sam, trailer->sam, 0x7fff);
644   sam6883_set_state(state->sam, trailer->sam, 0x7fff);
645645}
646646
647647static int generic_pak_load(const device_config *image, int rambase_index, int rombase_index, int pakbase_index)
r6474r6475
17631763}
17641764
17651765/* The Dragon Alpha hardware reverses the order of the WD2797 registers */
1766READ8_HANDLER(wd2797_r)
1766READ8_HANDLER(dgnalpha_wd2797_r)
17671767{
17681768   const device_config *fdc = devtag_get_device(space->machine, "wd2797");
17691769   int result = 0;
r6474r6475
17891789   return result;
17901790}
17911791
1792WRITE8_HANDLER(wd2797_w)
1792WRITE8_HANDLER(dgnalpha_wd2797_w)
17931793{
17941794   const device_config *fdc = devtag_get_device(space->machine, "wd2797");
17951795    switch(offset & 0x3)
r6474r6475
18121812   };
18131813}
18141814
1815READ8_HANDLER(alpha_modem_r)
1815READ8_HANDLER(dgnalpha_modem_r)
18161816{
18171817   return 0xFF;
18181818}
18191819
1820WRITE8_HANDLER(alpha_modem_w)
1820WRITE8_HANDLER(dgnalpha_modem_w)
18211821{
18221822}
18231823
r6474r6475
19061906*/
19071907
19081908/* The read handler will eventually return the 6845 status */
1909READ8_HANDLER ( plus_reg_r )
1909READ8_HANDLER ( dgnplus_reg_r )
19101910{
19111911   return 0;
19121912}
r6474r6475
19241924        1,1 Undefined. I will assume that it's the same as 00.
19251925    3-7     Unused.
19261926*/
1927WRITE8_HANDLER ( plus_reg_w )
1927WRITE8_HANDLER ( dgnplus_reg_w )
19281928{
19291929   int map;
19301930
r6474r6475
19771977    cpu_set_clockscale(cputag_get_cpu(device->machine, "maincpu"), val ? 2 : 1);
19781978}
19791979
1980READ8_HANDLER(dragon_alpha_mapped_irq_r)
1980READ8_HANDLER(dgnalpha_mapped_irq_r)
19811981{
19821982   return bas_rom_bank[0x3ff0 + offset];
19831983}
r6474r6475
20362036   /* We need to init these vars from the sam, as this may be called from outside the sam callbacks */
20372037   const address_space *space = cputag_get_address_space( machine, "maincpu", ADDRESS_SPACE_PROGRAM );
20382038   coco_state *state = machine->driver_data;
2039   UINT8 memsize   = get_sam_memorysize(state->sam);
2040   UINT8 maptype   = get_sam_maptype(state->sam);
2041//  UINT8 pagemode  = get_sam_pagemode(machine);
2039   UINT8 memsize   = sam6883_memorysize(state->sam);
2040   UINT8 maptype   = sam6883_maptype(state->sam);
2041   //UINT8 pagemode  = sam6883_pagemode(machine);
20422042   int       last_ram_block;      /* Last block that will be RAM, dependent on maptype */
20432043   int       block_index;      /* Index of block being processed */
20442044   int       wbank;         /* bank no to go in this block */
r6474r6475
21162116     * this (it probably ignored it)
21172117     */
21182118
2119   if (!get_sam_maptype(device))      // Ignored in maptype 1
2119   if (!sam6883_maptype(device))      // Ignored in maptype 1
21202120   {
21212121      if((messram_get_size(devtag_get_device(device->machine, "messram"))>0x8000) && val)
21222122         bottom_32k=&messram_get_ptr(devtag_get_device(device->machine, "messram"))[0x8000];
src/mess/machine/8530scc.c
r6474r6475
7474    scc_set_status
7575-------------------------------------------------*/
7676
77void scc_set_status(const device_config *device, int status)
77void scc8530_set_status(const device_config *device, int status)
7878{
7979   scc8530_t *scc = get_token(device);
8080   scc->status = status;
r6474r6475
172172
173173
174174/*-------------------------------------------------
175    scc_get_reg_a
175    scc8530_get_reg_a
176176-------------------------------------------------*/
177177
178UINT8 scc_get_reg_a(const device_config *device, int reg)
178UINT8 scc8530_get_reg_a(const device_config *device, int reg)
179179{
180180   scc8530_t *scc = get_token(device);
181181   return scc->reg_val_a[reg];
r6474r6475
184184
185185
186186/*-------------------------------------------------
187    scc_get_reg_b
187    scc8530_get_reg_b
188188-------------------------------------------------*/
189189
190UINT8 scc_get_reg_b(const device_config *device, int reg)
190UINT8 scc8530_get_reg_b(const device_config *device, int reg)
191191{
192192   scc8530_t *scc = get_token(device);
193193   return scc->reg_val_b[reg];
r6474r6475
196196
197197
198198/*-------------------------------------------------
199    scc_set_reg_a
199    scc8530_set_reg_a
200200-------------------------------------------------*/
201201
202void scc_set_reg_a(const device_config *device, int reg, UINT8 data)
202void scc8530_set_reg_a(const device_config *device, int reg, UINT8 data)
203203{
204204   scc8530_t *scc = get_token(device);
205205   scc->reg_val_a[reg] = data;
r6474r6475
208208
209209
210210/*-------------------------------------------------
211    scc_set_reg_a
211    scc8530_set_reg_a
212212-------------------------------------------------*/
213213
214void scc_set_reg_b(const device_config *device, int reg, UINT8 data)
214void scc8530_set_reg_b(const device_config *device, int reg, UINT8 data)
215215{
216216   scc8530_t *scc = get_token(device);
217217   scc->reg_val_b[reg] = data;
r6474r6475
220220
221221
222222/*-------------------------------------------------
223    scc_r
223    scc8530_r
224224-------------------------------------------------*/
225225
226READ8_DEVICE_HANDLER(scc_r)
226READ8_DEVICE_HANDLER(scc8530_r)
227227{
228228   scc8530_t *scc = get_token(device);
229229   UINT8 result = 0;
r6474r6475
271271
272272
273273/*-------------------------------------------------
274    scc_w
274    scc8530_w
275275-------------------------------------------------*/
276276
277WRITE8_DEVICE_HANDLER(scc_w)
277WRITE8_DEVICE_HANDLER(scc8530_w)
278278{
279279   scc8530_t *scc = get_token(device);
280280
src/mess/machine/8530scc.h
r6474r6475
4646    FUNCTION PROTOTYPES
4747***************************************************************************/
4848
49void scc_set_status(const device_config *device, int status);
49void scc8530_set_status(const device_config *device, int status);
5050
51UINT8 scc_get_reg_a(const device_config *device, int reg);
52UINT8 scc_get_reg_b(const device_config *device, int reg);
53void scc_set_reg_a(const device_config *device, int reg, UINT8 data);
54void scc_set_reg_b(const device_config *device, int reg, UINT8 data);
51UINT8 scc8530_get_reg_a(const device_config *device, int reg);
52UINT8 scc8530_get_reg_b(const device_config *device, int reg);
53void scc8530_set_reg_a(const device_config *device, int reg, UINT8 data);
54void scc8530_set_reg_b(const device_config *device, int reg, UINT8 data);
5555
5656DEVICE_GET_INFO(scc8530);
5757
58READ8_DEVICE_HANDLER(scc_r);
59WRITE8_DEVICE_HANDLER(scc_w);
58READ8_DEVICE_HANDLER(scc8530_r);
59WRITE8_DEVICE_HANDLER(scc8530_w);
6060
6161#endif /* __8530SCC_H__ */
src/mess/machine/spectrum.c
r6474r6475
255255   /* Set border colour */
256256   spectrum_PreviousFE = (spectrum_PreviousFE & 0xf8) | (pSnapshot[34] & 0x07);
257257   EventList_Reset();
258   set_last_border_color(pSnapshot[34] & 0x07);
259   force_border_redraw();
258   border_set_last_color(pSnapshot[34] & 0x07);
259   border_force_redraw();
260260
261261   if ((pSnapshot[35]&0x0ff)!=0)
262262      logerror("Unknown meaning of byte on position 35: %02x.\n", pSnapshot[35]&0x0ff);
r6474r6475
384384   /* Set border colour */
385385   spectrum_PreviousFE = (spectrum_PreviousFE & 0xf8) | (pSnapshot[26] & 0x07);
386386   EventList_Reset();
387   set_last_border_color(pSnapshot[26] & 0x07);
388   force_border_redraw();
387   border_set_last_color(pSnapshot[26] & 0x07);
388   border_force_redraw();
389389
390390   cputag_set_input_line(machine, "maincpu", 0, data);
391391   cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, data);
r6474r6475
656656   /* Set border colour */
657657   spectrum_PreviousFE = (spectrum_PreviousFE & 0xf8) | ((pSnapshot[12] & 0x0e) >> 1);
658658   EventList_Reset();
659   set_last_border_color((pSnapshot[12] & 0x0e) >> 1);
660   force_border_redraw();
659   border_set_last_color((pSnapshot[12] & 0x0e) >> 1);
660   border_force_redraw();
661661
662662   lo = pSnapshot[13] & 0x0ff;
663663   hi = pSnapshot[14] & 0x0ff;
src/mess/machine/6883sam.c
r6474r6475
148148   update_sam(device);
149149}
150150
151void sam_set_state(const device_config *device, UINT16 state, UINT16 mask)
151void sam6883_set_state(const device_config *device, UINT16 state, UINT16 mask)
152152{
153153   sam6883_t *sam = get_safe_token(device);
154154   sam->state &= ~mask;
r6474r6475
184184}
185185#endif
186186
187const UINT8 *sam_m6847_get_video_ram(const device_config *device,int scanline)
187const UINT8 *sam6883_videoram(const device_config *device,int scanline)
188188{
189189   sam6883_t *sam = get_safe_token(device);
190190   const UINT8 *ram_base;
r6474r6475
228228   return &ram_base[video_position];
229229}
230230
231UINT8 get_sam_memorysize(const device_config *device)
231UINT8 sam6883_memorysize(const device_config *device)
232232{
233233   sam6883_t *sam = get_safe_token(device);
234234   return (sam->state & 0x6000) / 0x2000;
235235}
236236
237UINT8 get_sam_pagemode(const device_config *device)
237UINT8 sam6883_pagemode(const device_config *device)
238238{
239239   sam6883_t *sam = get_safe_token(device);
240240   return (sam->state & 0x0400) / 0x0400;
241241}
242242
243UINT8 get_sam_maptype(const device_config *device)
243UINT8 sam6883_maptype(const device_config *device)
244244{
245245   sam6883_t *sam = get_safe_token(device);
246246   return (sam->state & 0x8000) / 0x8000;
src/mess/machine/c128.c
r6474r6475
123123{
124124   UINT8 cia0portb = cia_get_output_b(devtag_get_device(device->machine, "cia_0"));
125125
126   return common_cia0_port_a_r(device, cia0portb);
126   return cbm_common_cia0_port_a_r(device, cia0portb);
127127}
128128
129129static READ8_DEVICE_HANDLER( c128_cia0_port_b_r )
r6474r6475
131131   UINT8 value = 0xff;
132132   UINT8 cia0porta = cia_get_output_a(devtag_get_device(device->machine, "cia_0"));
133133
134   value &= common_cia0_port_b_r(device, cia0porta);
134   value &= cbm_common_cia0_port_b_r(device, cia0porta);
135135
136136   if (!vic2e_k0_r())
137137      value &= c128_keyline[0];
src/mess/machine/6883sam.h
r6474r6475
7171WRITE8_DEVICE_HANDLER(sam6883_w);
7272
7373/* set the state of the SAM */
74void sam_set_state(const device_config *device,UINT16 state, UINT16 mask);
74void sam6883_set_state(const device_config *device,UINT16 state, UINT16 mask);
7575
7676/* used by video/m6847.c to read the position of the SAM */
77const UINT8 *sam_m6847_get_video_ram(const device_config *device,int scanline);
77const UINT8 *sam6883_videoram(const device_config *device,int scanline);
7878
7979/* used to get memory size and pagemode independent of callbacks */
80UINT8 get_sam_memorysize(const device_config *device);
81UINT8 get_sam_pagemode(const device_config *device);
82UINT8 get_sam_maptype(const device_config *device);
80UINT8 sam6883_memorysize(const device_config *device);
81UINT8 sam6883_pagemode(const device_config *device);
82UINT8 sam6883_maptype(const device_config *device);
8383
8484#if 0
8585WRITE_LINE_DEVICE_HANDLER( sam6883_hs_w );
src/mess/machine/vector06.c
r6474r6475
1616#include "devices/messram.h"
1717
1818UINT8 vector06_keyboard_mask;
19UINT8 vector_color_index;
20UINT8 vector_video_mode;
19UINT8 vector06_color_index;
20UINT8 vector06_video_mode;
2121
2222/* Driver initialization */
2323DRIVER_INIT(vector06)
r6474r6475
5454   vector06_keyboard_mask = data ^ 0xff;
5555}
5656
57static void vector_set_video_mode(running_machine *machine, int width) {
57static void vector06_set_video_mode(running_machine *machine, int width) {
5858   rectangle visarea;
5959
6060   visarea.min_x = 0;
r6474r6475
6666
6767static WRITE8_DEVICE_HANDLER (vector06_8255_portb_w )
6868{
69   vector_color_index = data & 0x0f;
70   if ((data & 0x10) != vector_video_mode)
69   vector06_color_index = data & 0x0f;
70   if ((data & 0x10) != vector06_video_mode)
7171   {
72      vector_video_mode = data & 0x10;
73      vector_set_video_mode(device->machine,(vector_video_mode==0x10) ? 512 : 256);
72      vector06_video_mode = data & 0x10;
73      vector06_set_video_mode(device->machine,(vector06_video_mode==0x10) ? 512 : 256);
7474   }
7575}
7676
r6474r6475
7979   UINT8 r = (data & 7) << 5;
8080   UINT8 g = ((data >> 3) & 7) << 5;
8181   UINT8 b = ((data >>6) & 3) << 6;
82   palette_set_color( space->machine, vector_color_index, MAKE_RGB(r,g,b) );
82   palette_set_color( space->machine, vector06_color_index, MAKE_RGB(r,g,b) );
8383}
8484
8585static UINT8 romdisk_msb;
r6474r6475
123123   DEVCB_NULL
124124};
125125
126READ8_HANDLER(vector_8255_1_r) {
126READ8_HANDLER(vector06_8255_1_r) {
127127   return i8255a_r(devtag_get_device(space->machine, "ppi8255"), (offset ^ 0x03));
128128}
129129
130WRITE8_HANDLER(vector_8255_1_w) {
130WRITE8_HANDLER(vector06_8255_1_w) {
131131   i8255a_w(devtag_get_device(space->machine, "ppi8255"), (offset ^0x03) , data );
132132
133133}
134134
135READ8_HANDLER(vector_8255_2_r) {
135READ8_HANDLER(vector06_8255_2_r) {
136136   return i8255a_r(devtag_get_device(space->machine, "ppi8255_2"), (offset ^ 0x03));
137137}
138138
139WRITE8_HANDLER(vector_8255_2_w) {
139WRITE8_HANDLER(vector06_8255_2_w) {
140140   i8255a_w(devtag_get_device(space->machine, "ppi8255_2"), (offset ^0x03) , data );
141141
142142}
r6474r6475
169169   }
170170}
171171
172WRITE8_HANDLER(vector_disc_w)
172WRITE8_HANDLER(vector06_disc_w)
173173{
174174   const device_config *fdc = devtag_get_device(space->machine, "wd1793");
175175   wd17xx_set_side (fdc,((data & 4) >> 2) ^ 1);
r6474r6475
198198   memory_set_bankptr(machine, 4, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x8000);
199199
200200   vector06_keyboard_mask = 0;
201   vector_color_index = 0;
202   vector_video_mode = 0;
201   vector06_color_index = 0;
202   vector06_video_mode = 0;
203203   timer_pulse(machine, ATTOTIME_IN_HZ(50), NULL, 0, reset_check_callback);
204204}
src/mess/machine/amstrad.c
r6474r6475
13121312}
13131313
13141314
1315const mc6845_interface mc6845_amstrad_intf =
1315const mc6845_interface amstrad_mc6845_intf =
13161316{
13171317   "screen",               /* screen name */
13181318   16,                     /* number of pixels per video memory address */
r6474r6475
13271327};
13281328
13291329
1330const mc6845_interface mc6845_amstrad_plus_intf =
1330const mc6845_interface amstrad_plus_mc6845_intf =
13311331{
13321332   "screen",               /* screen name */
13331333   16,                     /* number of pixels per video memory address */
src/mess/machine/sms.c
r6474r6475
14451445   }
14461446
14471447   if (sms_state.cartridge[sms_state.current_cartridge].features & CF_GG_SMS_MODE)
1448      sms_set_ggsmsmode(smsvdp, 1);
1448      sms_vdp_set_ggsmsmode(smsvdp, 1);
14491449
14501450   /* Initialize SIO stuff for GG */
14511451   sms_state.gg_sio[0] = 0x7f;
r6474r6475
16331633
16341634   if (screen == main_scr)
16351635   {
1636      smsvdp_update(smsvdp, bitmap, cliprect);
1636      sms_vdp_update(smsvdp, bitmap, cliprect);
16371637   }
16381638   else if (screen == left_lcd)
16391639   {
r6474r6475
16441644      if (segascope)
16451645      {
16461646         if (sms_state.sscope_state & 0x01)  /* 1 = left screen ON, right screen OFF */
1647            smsvdp_update(smsvdp, bitmap, cliprect);
1647            sms_vdp_update(smsvdp, bitmap, cliprect);
16481648         else                                /* 0 = left screen OFF, right screen ON */
16491649         {
16501650            for (y = 0; y < height; y++)
r6474r6475
16741674                  *BITMAP_ADDR32(bitmap, y, x) = MAKE_RGB(0,0,0);
16751675         }
16761676         else                                /* 0 = left screen OFF, right screen ON */
1677            smsvdp_update(smsvdp, bitmap, cliprect);
1677            sms_vdp_update(smsvdp, bitmap, cliprect);
16781678      }
16791679      else   /* We only use the third screen for SegaScope, if it not selected return a black screen */
16801680      {
r6474r6475
16901690VIDEO_UPDATE( sms )
16911691{
16921692   const device_config *smsvdp = devtag_get_device(screen->machine, "sms_vdp");
1693   smsvdp_update(smsvdp, bitmap, cliprect);
1693   sms_vdp_update(smsvdp, bitmap, cliprect);
16941694
16951695   return 0;
16961696}
src/mess/machine/poly88.c
r6474r6475
2727   cpu_set_input_line(cputag_get_cpu(machine, "maincpu"), 0, HOLD_LINE);
2828}
2929
30WRITE8_HANDLER(poly_baud_rate_w)
30WRITE8_HANDLER(poly88_baud_rate_w)
3131{
32   logerror("poly_baud_rate_w %02x\n",data);
32   logerror("poly88_baud_rate_w %02x\n",data);
3333   poly88_usart_timer = timer_alloc(space->machine, poly88_usart_timer_callback, NULL);
3434   timer_adjust_periodic(poly88_usart_timer, attotime_zero, 0, ATTOTIME_IN_HZ(300));
3535
r6474r6475
245245   poly88_usart_rxready
246246};
247247
248READ8_HANDLER(poly_keyboard_r)
248READ8_HANDLER(poly88_keyboard_r)
249249{
250250   UINT8 retVal = last_code;
251251   cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
r6474r6475
253253   return retVal;
254254}
255255
256WRITE8_HANDLER(poly_intr_w)
256WRITE8_HANDLER(poly88_intr_w)
257257{
258258   cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
259259}
src/mess/machine/odyssey2.c
r6474r6475
3737   }
3838}
3939
40void the_voice_lrq_callback(const device_config *device, int state) {
40void odyssey2_the_voice_lrq_callback(const device_config *device, int state) {
4141   the_voice_lrq_state = state;
4242}
4343
src/mess/machine/galaxy.c
r6474r6475
5555
5656static IRQ_CALLBACK ( galaxy_irq_callback )
5757{
58   gal_cnt = 0;
58   galaxy_set_timer();
5959   galaxy_interrupts_enabled = TRUE;
60   timer_adjust_periodic(gal_video_timer, attotime_zero, 0, ATTOTIME_IN_HZ(6144000 / 8));
6160   return 0xff;
6261}
6362
r6474r6475
185184
186185   cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"), galaxy_irq_callback);
187186   galaxy_interrupts_enabled = TRUE;
188
189   gal_video_timer = timer_alloc(machine, gal_video, NULL);
190   timer_adjust_periodic(gal_video_timer, attotime_zero, 0,attotime_never);
191187}
192188
193189DRIVER_INIT( galaxyp )
r6474r6475
211207   memory_install_write8_handler(space, 0xe000, 0xefff, 0, 0, SMH_NOP);
212208   memory_set_bankptr(machine,11, memory_region(machine, "maincpu") + 0xe000);
213209   galaxy_interrupts_enabled = TRUE;
214
215   gal_video_timer = timer_alloc(machine, gal_video, NULL);
216   timer_adjust_periodic(gal_video_timer, attotime_zero, 0, attotime_never);
217
218210}
src/mess/machine/compis.c
r6474r6475
981981 *************************************/
982982
983983
984READ16_HANDLER( i186_internal_port_r )
984READ16_HANDLER( compis_i186_internal_port_r )
985985{
986986   int temp, which;
987987
r6474r6475
11631163 *
11641164 *************************************/
11651165
1166WRITE16_HANDLER( i186_internal_port_w )
1166WRITE16_HANDLER( compis_i186_internal_port_w )
11671167{
11681168   int temp, which, data16 = data;
11691169
r6474r6475
13851385         temp = (data16 & 0x0fff) << 8;
13861386         if (data16 & 0x1000)
13871387         {
1388            memory_install_read16_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), temp, temp + 0xff, 0, 0, i186_internal_port_r);
1389            memory_install_write16_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), temp, temp + 0xff, 0, 0, i186_internal_port_w);
1388            memory_install_read16_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), temp, temp + 0xff, 0, 0, compis_i186_internal_port_r);
1389            memory_install_write16_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), temp, temp + 0xff, 0, 0, compis_i186_internal_port_w);
13901390         }
13911391         else
13921392         {
13931393            temp &= 0xffff;
1394            memory_install_read16_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_IO), temp, temp + 0xff, 0, 0, i186_internal_port_r);
1395            memory_install_write16_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_IO), temp, temp + 0xff, 0, 0, i186_internal_port_w);
1394            memory_install_read16_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_IO), temp, temp + 0xff, 0, 0, compis_i186_internal_port_r);
1395            memory_install_write16_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_IO), temp, temp + 0xff, 0, 0, compis_i186_internal_port_w);
13961396         }
13971397/*          popmessage("Sound CPU reset");*/
13981398         break;
src/mess/machine/cbm.c
r6474r6475
178178 * irq to irq connected
179179 */
180180
181UINT8 common_cia0_port_a_r( const device_config *device, UINT8 output_b )
181UINT8 cbm_common_cia0_port_a_r( const device_config *device, UINT8 output_b )
182182{
183183   UINT8 value = 0xff;
184184
r6474r6475
302302   return value;
303303}
304304
305UINT8 common_cia0_port_b_r( const device_config *device, UINT8 output_a )
305UINT8 cbm_common_cia0_port_b_r( const device_config *device, UINT8 output_a )
306306{
307307   UINT8 value = 0xff;
308308
src/mess/machine/apple2gs.c
r6474r6475
10451045      case 0x3A:   /* C03A - SCCBDATA */
10461046      case 0x3B:   /* C03B - SCCADATA */
10471047         scc = devtag_get_device(space->machine, "scc");
1048         result = scc_r(scc, offset & 0x03);
1048         result = scc8530_r(scc, offset & 0x03);
10491049         break;
10501050
10511051      case 0x3C:   /* C03C - SOUNDCTL */
r6474r6475
11851185      case 0x3A:   /* C03A - SCCBDATA */
11861186      case 0x3B:   /* C03B - SCCADATA */
11871187         scc = devtag_get_device(space->machine, "scc");
1188         scc_w(scc, offset & 0x03, data);
1188         scc8530_w(scc, offset & 0x03, data);
11891189         break;
11901190
11911191      case 0x3C:   /* C03C - SOUNDCTL */
src/mess/machine/mac.c
r6474r6475
995995   if (x && y)
996996   {
997997      if (last_was_x)
998         scc_set_status(scc, 0x0a);
998         scc8530_set_status(scc, 0x0a);
999999      else
1000         scc_set_status(scc, 0x02);
1000         scc8530_set_status(scc, 0x02);
10011001
10021002      last_was_x ^= 1;
10031003   }
10041004   else
10051005   {
10061006      if (x)
1007         scc_set_status(scc, 0x0a);
1007         scc8530_set_status(scc, 0x0a);
10081008      else
1009         scc_set_status(scc, 0x02);
1009         scc8530_set_status(scc, 0x02);
10101010   }
10111011
10121012   //cputag_set_input_line(machine, "maincpu", 2, ASSERT_LINE);
r6474r6475
10201020   const device_config *scc = devtag_get_device(space->machine, "scc");
10211021   UINT16 result;
10221022
1023   result = scc_r(scc, offset);
1023   result = scc8530_r(scc, offset);
10241024   return (result << 8) | result;
10251025}
10261026
r6474r6475
10291029WRITE16_HANDLER ( mac_scc_w )
10301030{
10311031   const device_config *scc = devtag_get_device(space->machine, "scc");
1032   scc_w(scc, offset, (UINT8) data);
1032   scc8530_w(scc, offset, (UINT8) data);
10331033}
10341034
10351035WRITE16_HANDLER ( mac_scc_2_w )
r6474r6475
10371037   const device_config *scc = devtag_get_device(space->machine, "scc");
10381038   UINT8 wdata = data>>8;
10391039
1040   scc_w(scc, offset, wdata);
1040   scc8530_w(scc, offset, wdata);
10411041}
10421042
10431043
src/mess/machine/nes.c
r6474r6475
9696            memory for the bank 2 pointer */
9797         if (nes_fds.data == NULL)
9898            nes_fds.data = auto_alloc_array(machine, UINT8, 0x8000 );
99         memory_install_read8_handler(space, 0x4030, 0x403f, 0, 0, fds_r);
99         memory_install_read8_handler(space, 0x4030, 0x403f, 0, 0, nes_fds_r);
100100         memory_install_read8_handler(space, 0x6000, 0xdfff, 0, 0, SMH_BANK(2));
101101         memory_install_read8_handler(space, 0xe000, 0xffff, 0, 0, SMH_BANK(1));
102102
103         memory_install_write8_handler(space, 0x4020, 0x402f, 0, 0, fds_w);
103         memory_install_write8_handler(space, 0x4020, 0x402f, 0, 0, nes_fds_w);
104104         memory_install_write8_handler(space, 0x6000, 0xdfff, 0, 0, SMH_BANK(2));
105105
106106         memory_set_bankptr(machine, 1, &nes.rom[0xe000]);
107107         memory_set_bankptr(machine, 2, nes_fds.data );
108108         break;
109109      case 50:
110         memory_install_write8_handler(space, 0x4020, 0x403f, 0, 0, mapper50_add_w);
111         memory_install_write8_handler(space, 0x40a0, 0x40bf, 0, 0, mapper50_add_w);
110         memory_install_write8_handler(space, 0x4020, 0x403f, 0, 0, nes_mapper50_add_w);
111         memory_install_write8_handler(space, 0x40a0, 0x40bf, 0, 0, nes_mapper50_add_w);
112112      default:
113113         nes.slow_banking = 0;
114114         memory_install_read8_handler(space, 0x6000, 0x7fff, 0, 0, SMH_BANK(5));
r6474r6475
130130   /* Set up the mapper callbacks */
131131   if (nes.format == 1)
132132   {
133      mmc_intf intf = { 0 };
133134      const mmc *mapper;
134135
135136      mapper = nes_mapper_lookup(nes.mapper);
136137      if (mapper)
137138      {
138         mmc_write_low = mapper->mmc_write_low;
139         mmc_read_low = mapper->mmc_read_low;
140         mmc_write_mid = mapper->mmc_write_mid;
141         mmc_write = mapper->mmc_write;
139         intf.mmc_write_low = mapper->mmc_write_low;
140         intf.mmc_read_low = mapper->mmc_read_low;
141         intf.mmc_write_mid = mapper->mmc_write_mid;
142         intf.mmc_write = mapper->mmc_write;
143         nes_mapper_init(&intf);
142144         ppu_latch = mapper->ppu_latch;
143145      }
144146      else
145147      {
146148         logerror("Mapper %d is not yet supported, defaulting to no mapper.\n",nes.mapper);
147         mmc_write_low = mmc_write_mid = mmc_write = NULL;
148         mmc_read_low = NULL;
149         ppu_latch = NULL;
149         nes_mapper_init(&intf);
150150      }
151151   }
152152   else if (nes.format == 2)
153153   {
154      mmc_intf intf = { 0 };
154155      const unif *board;
155156
156157      board = nes_unif_lookup(nes.board);
157158      if (board)
158159      {
159         mmc_write_low = board->mmc_write_low;
160         mmc_read_low = board->mmc_read_low;
161         mmc_write_mid = board->mmc_write_mid;
162         mmc_write = board->mmc_write;
160         intf.mmc_write_low = board->mmc_write_low;
161         intf.mmc_read_low = board->mmc_read_low;
162         intf.mmc_write_mid = board->mmc_write_mid;
163         intf.mmc_write = board->mmc_write;
164         nes_mapper_init(&intf);
163165         ppu_latch = board->ppu_latch;
164166      }
165167      else
166168      {
167169         logerror("Board %s is not yet supported, defaulting to no mapper.\n", nes.board);
168         mmc_write_low = mmc_write_mid = mmc_write = NULL;
169         mmc_read_low = NULL;
170         nes_mapper_init(&intf);
170171         ppu_latch = NULL;
171172      }
172173   }
r6474r6475
209210
210211   /* Reset the mapper variables. Will also mark the char-gen ram as dirty */
211212   if (nes.format == 1)
212      mapper_reset(machine, nes.mapper);
213      nes_mapper_reset(machine, nes.mapper);
213214
214215   if (nes.format == 2)
215      unif_reset(machine, nes.board);
216      nes_unif_reset(machine, nes.board);
216217
217218   /* Reset the serial input ports */
218219   in_0.shift = 0;
src/mess/machine/mz700.c
r6474r6475
115115   mz->ppi = devtag_get_device(machine, "ppi8255");
116116
117117   /* reset memory map to defaults */
118   mz_bank_4_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0, 0);
118   mz700_bank_4_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0, 0);
119119}
120120
121121
r6474r6475
221221   return 0xff;
222222}
223223
224WRITE8_HANDLER( mz_bank_1_w )
224WRITE8_HANDLER( mz700_bank_1_w )
225225{
226226   const address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
227227   mz_state *mz = space->machine->driver_data;
r6474r6475
248248   }
249249}
250250
251WRITE8_HANDLER( mz_bank_2_w )
251WRITE8_HANDLER( mz700_bank_2_w )
252252{
253253   const address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
254254
r6474r6475
256256   memory_set_bankptr(space->machine, 1, memory_region(space->machine, "monitor"));
257257}
258258
259WRITE8_HANDLER( mz_bank_3_w )
259WRITE8_HANDLER( mz700_bank_3_w )
260260{
261261   const address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
262262   mz_state *mz = space->machine->driver_data;
r6474r6475
304304   }
305305}
306306
307WRITE8_HANDLER( mz_bank_4_w )
307WRITE8_HANDLER( mz700_bank_4_w )
308308{
309309   const address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
310310   mz_state *mz = space->machine->driver_data;
r6474r6475
312312   if (mz->mz700_mode)
313313   {
314314      mz->mz700_ram_lock = FALSE;      /* reset lock */
315      mz_bank_2_w(space, 0, 0);   /* switch in monitor rom */
316      mz_bank_3_w(space, 0, 0);   /* switch in videoram, colorram, and mmio */
315      mz700_bank_2_w(space, 0, 0);   /* switch in monitor rom */
316      mz700_bank_3_w(space, 0, 0);   /* switch in videoram, colorram, and mmio */
317317
318318      /* rest is ram is always ram in mz700 mode */
319319      memory_install_readwrite8_handler(spc, 0x1000, 0xcfff, 0, 0, SMH_BANK(2), SMH_BANK(2));
r6474r6475
359359   }
360360}
361361
362WRITE8_HANDLER( mz_bank_5_w )
362WRITE8_HANDLER( mz700_bank_5_w )
363363{
364364   const address_space *spc = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
365365   mz_state *mz = space->machine->driver_data;
r6474r6475
378378   }
379379}
380380
381WRITE8_HANDLER( mz_bank_6_w )
381WRITE8_HANDLER( mz700_bank_6_w )
382382{
383383   mz_state *mz = space->machine->driver_data;
384384
r6474r6475
388388
389389      /* restore access */
390390      if (mz->mz700_ram_vram)
391         mz_bank_3_w(space, 0, 0);
391         mz700_bank_3_w(space, 0, 0);
392392      else
393         mz_bank_1_w(space, 0, 0);
393         mz700_bank_1_w(space, 0, 0);
394394   }
395395   else
396396   {
r6474r6475
398398
399399      /* restore access from 0xe000 to 0xffff */
400400      if (mz->mz800_ram_monitor)
401         mz_bank_3_w(space, 0, 0);
401         mz700_bank_3_w(space, 0, 0);
402402      else
403         mz_bank_1_w(space, 0, 0);
403         mz700_bank_1_w(space, 0, 0);
404404   }
405405}
406406
r6474r6475
654654//  {
655655//      logerror("mz800_display_mode_w: switching mode to %s\n", (BIT(data, 3) ? "mz700" : "mz800"));
656656//      mz->mz700_mode = BIT(data, 3);
657//      mz_bank_4_w(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0, 0);
657//      mz700_bank_4_w(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0, 0);
658658//  }
659659}
660660
src/mess/machine/vectrex.c
r6474r6475
215215
216216*********************************************************************/
217217
218void v_via_irq(const device_config *device, int level)
218void vectrex_via_irq(const device_config *device, int level)
219219{
220220   cputag_set_input_line(device->machine, "maincpu", M6809_IRQ_LINE, level);
221221}
222222
223223
224READ8_DEVICE_HANDLER(v_via_pb_r)
224READ8_DEVICE_HANDLER(vectrex_via_pb_r)
225225{
226226   int pot;
227227   static const char *const ctrlnames[] = { "CONTR1X", "CONTR1Y", "CONTR2X", "CONTR2Y" };
r6474r6475
237237}
238238
239239
240READ8_DEVICE_HANDLER(v_via_pa_r)
240READ8_DEVICE_HANDLER(vectrex_via_pa_r)
241241{
242242   if ((!(vectrex_via_out[PORTB] & 0x10)) && (vectrex_via_out[PORTB] & 0x08))
243243      /* BDIR inactive, we can read the PSG. BC1 has to be active. */
r6474r6475
251251}
252252
253253
254READ8_DEVICE_HANDLER(s1_via_pb_r)
254READ8_DEVICE_HANDLER(vectrex_s1_via_pb_r)
255255{
256256   return (vectrex_via_out[PORTB] & ~0x40) | (input_port_read(device->machine, "COIN") & 0x40);
257257}
src/mess/machine/nes_mmc.c
r6474r6475
176176static UINT8 IRQ_status;
177177static UINT8 IRQ_mode;
178178
179int MMC1_extended;   /* 0 = normal MMC1 cart, 1 = 512k MMC1, 2 = 1024k MMC1 */
179//int MMC1_extended;   /* 0 = normal MMC1 cart, 1 = 512k MMC1, 2 = 1024k MMC1 */
180180
181write8_space_func mmc_write_low;
182read8_space_func mmc_read_low;
183write8_space_func mmc_write_mid;
184read8_space_func mmc_read_mid;
185write8_space_func mmc_write;
181static write8_space_func mmc_write_low;
182static read8_space_func mmc_read_low;
183static write8_space_func mmc_write_mid;
184static write8_space_func mmc_write;
186185
187186static int mult1, mult2;
188187
r6474r6475
216215static int MMC5_scanline;
217216static int MMC5_floodtile;
218217static int MMC5_floodattr;
219UINT8 MMC5_vram[0x400];
220int MMC5_vram_control;
218UINT8 nes_mmc5_vram[0x400];
219int nes_mmc5_vram_control;
221220
222221// these might be unified in single mmc_reg[] array, together with mmc_cmd1 & mmc_cmd2
223222// but be careful that MMC3 clones often use mmc_cmd1/mmc_cmd2 (from base MMC3) AND additional regs below!
r6474r6475
657656         base_ptr = nes.vrom;
658657         break;
659658      case EXRAM:
660         base_ptr = MMC5_vram;
659         base_ptr = nes_mmc5_vram;
661660         break;
662661      case CIRAM:
663662      default:
r6474r6475
15511550
15521551/*************************************************************
15531552
1554    mapper_reset
1553    nes_mapper_reset
15551554
15561555    Resets the mapper bankswitch areas to their defaults.
15571556    It returns a value "err" that indicates if it was
r6474r6475
15631562
15641563*************************************************************/
15651564
1566int mapper_reset( running_machine *machine, int mmc_num )
1565int nes_mapper_reset( running_machine *machine, int mmc_num )
15671566{
15681567   nes_state *state = machine->driver_data;
15691568   int err = 0, i;
r6474r6475
15901589
15911590   mapper_warning = 0;
15921591
1593   MMC5_vram_control = 0;
1592   nes_mmc5_vram_control = 0;
15941593
15951594   /* Point the WRAM/battery area to the first RAM bank */
15961595   if (mmc_num != 20)
r6474r6475
16141613   return err;
16151614}
16161615
1616void nes_mapper_init(const mmc_intf *intf)
1617{
1618   mmc_write_low = intf->mmc_write_low;
1619   mmc_read_low = intf->mmc_read_low;
1620   mmc_write_mid = intf->mmc_write_mid;
1621   mmc_write = intf->mmc_write;
1622}
1623
16171624/*************************************************************
16181625
16191626    Support for .unf Files
r6474r6475
16241631#include "machine/nes_unif.c"
16251632
16261633// WIP code
1627int unif_reset( running_machine *machine, const char *board )
1634int nes_unif_reset( running_machine *machine, const char *board )
16281635{
16291636   nes_state *state = machine->driver_data;
16301637   int err = 0;
src/mess/machine/nes_mmc.h
r6474r6475
11#ifndef __MMC_H
22#define __MMC_H
33
4typedef struct __mmc_intf
5{
6   write8_space_func mmc_write_low; /* $4100-$5fff write routine */
7   read8_space_func mmc_read_low; /* $4100-$5fff read routine */
8   write8_space_func mmc_write_mid; /* $6000-$7fff write routine */
9   write8_space_func mmc_write; /* $8000-$ffff write routine */
10} mmc_intf;
11
412typedef struct __mmc
513{
614   int iNesMapper; /* iNES Mapper # */
r6474r6475
4048
4149const unif *nes_unif_lookup(const char *board);
4250
43extern int MMC1_extended; /* 0 = normal MMC1 cart, 1 = 512k MMC1, 2 = 1024k MMC1 */
51//extern int MMC1_extended; /* 0 = normal MMC1 cart, 1 = 512k MMC1, 2 = 1024k MMC1 */
4452
4553#define MMC5_VRAM
4654
47extern UINT8 MMC5_vram[0x400];
48extern int MMC5_vram_control;
55extern UINT8 nes_mmc5_vram[0x400];
56extern int nes_mmc5_vram_control;
4957
50extern write8_space_func mmc_write_low;
51extern read8_space_func mmc_read_low;
52extern write8_space_func mmc_write_mid;
53extern read8_space_func mmc_read_mid;
54extern write8_space_func mmc_write;
58void nes_mapper_init( const mmc_intf *intf );
59int nes_mapper_reset( running_machine *machine, int mapperNum );
60int nes_unif_reset( running_machine *machine, const char *board );
5561
56int mapper_reset( running_machine *machine, int mapperNum );
57int unif_reset( running_machine *machine, const char *board );
58
5962WRITE8_HANDLER( nes_low_mapper_w );
6063READ8_HANDLER( nes_low_mapper_r );
6164READ8_HANDLER( nes_mid_mapper_r );
r6474r6475
6669WRITE8_HANDLER( nes_nt_w );
6770READ8_HANDLER( nes_nt_r );
6871
69READ8_HANDLER( fds_r );
70WRITE8_HANDLER( fds_w );
71WRITE8_HANDLER( mapper50_add_w );
72READ8_HANDLER( nes_fds_r );
73WRITE8_HANDLER( nes_fds_w );
74WRITE8_HANDLER( nes_mapper50_add_w );
7275
7376//TEMPORARY PPU STUFF
7477
src/mess/machine/pc8801.c
r6474r6475
383383
384384   memory_set_bankptr(machine, 4, pc8801_mainRAM + 0x8400);
385385
386   if(is_pc8801_vram_select(machine))
386   if (pc8801_is_vram_select(machine))
387387   {
388388      /* VRAM */
389389      /* already maped */
src/mess/machine/nes_ines.c
r6474r6475
386386   /* $5c00 - $5fff: extended videoram attributes */
387387   if ((offset >= 0x1b00) && (offset <= 0x1eff))
388388   {
389      return MMC5_vram[offset - 0x1b00];
389      return nes_mmc5_vram[offset - 0x1b00];
390390   }
391391
392392   switch (offset)
r6474r6475
442442   if ((offset >= 0x1b00) && (offset <= 0x1eff))
443443   {
444444      if (MMC5_vram_protect == 0x03)
445         MMC5_vram[offset - 0x1b00] = data;
445         nes_mmc5_vram[offset - 0x1b00] = data;
446446      return;
447447   }
448448
r6474r6475
474474         break;
475475
476476      case 0x1004: /* $5104 - Extra VRAM (EXRAM) control */
477         MMC5_vram_control = data;
477         nes_mmc5_vram_control = data;
478478         LOG_MMC(("MMC5 exram control: %02x\n", data));
479479         break;
480480
r6474r6475
18621862   }
18631863}
18641864
1865READ8_HANDLER( fds_r )
1865READ8_HANDLER( nes_fds_r )
18661866{
18671867   UINT8 ret = 0x00;
18681868   LOG_MMC(("fds_r, offset: %04x\n", offset));
r6474r6475
19141914   return ret;
19151915}
19161916
1917WRITE8_HANDLER( fds_w )
1917WRITE8_HANDLER( nes_fds_w )
19181918{
19191919   LOG_MMC(("fds_w, offset: %04x, data: %02x\n", offset, data));
19201920
r6474r6475
32073207}
32083208
32093209/* This goes to 0x4020-0x403f */
3210WRITE8_HANDLER( mapper50_add_w )
3210WRITE8_HANDLER( nes_mapper50_add_w )
32113211{
32123212   UINT8 prg;
3213   LOG_MMC(("mapper50_add_w, offset: %04x, data: %02x\n", offset, data));
3213   LOG_MMC(("nes_mapper50_add_w, offset: %04x, data: %02x\n", offset, data));
32143214
32153215   prg = (data & 0x08) | ((data & 0x06) >> 1) | ((data & 0x01) << 2);
32163216   prg8_cd(space->machine, prg);
src/mess/machine/intv.c
r6474r6475
11#include "driver.h"
2#include "video/stic.h"
32#include "includes/intv.h"
43#include "cpu/cp1610/cp1610.h"
54#include "image.h"
r6474r6475
501500   cputag_set_input_line(device->machine, "maincpu", CP1610_INT_INTRM, ASSERT_LINE);
502501   sr1_int_pending = 1;
503502   timer_set(device->machine, cputag_clocks_to_attotime(device->machine, "maincpu", 3791), NULL, 0, intv_interrupt_complete);
504   stic_screenrefresh(device->machine);
503   intv_stic_screenrefresh(device->machine);
505504}
506505
507506static const UINT8 controller_table[] =
src/mess/machine/c64.c
r6474r6475
108108{
109109   UINT8 cia0portb = cia_get_output_b(devtag_get_device(device->machine, "cia_0"));
110110
111   return common_cia0_port_a_r(device, cia0portb);
111   return cbm_common_cia0_port_a_r(device, cia0portb);
112112}
113113
114114static READ8_DEVICE_HANDLER( c64_cia0_port_b_r )
115115{
116116   UINT8 cia0porta = cia_get_output_a(devtag_get_device(device->machine, "cia_0"));
117117
118   return common_cia0_port_b_r(device, cia0porta);
118   return cbm_common_cia0_port_b_r(device, cia0porta);
119119}
120120
121121static WRITE8_DEVICE_HANDLER( c64_cia0_port_b_w )
src/mess/machine/99_hsgpl.c
r6474r6475
280280   hsgpl.cur_port = 0;
281281   hsgpl.cur_bank = 0;
282282   hsgpl.cru_reg = 0;
283   set_hsgpl_crdena(/*0*/1);
283   ti99_set_hsgpl_crdena(/*0*/1);
284284
285285   ti99_peb_set_card_handlers(0x1b00, & hsgpl_handlers);
286286}
r6474r6475
299299      hsgpl.cru_reg &= ~ (1 << offset);
300300
301301   if (offset == cr_crdena_bit)
302      set_hsgpl_crdena(data);
302      ti99_set_hsgpl_crdena(data);
303303}
304304
305305/*
src/mess/machine/ti99_4x.c
r6474r6475
287287        }
288288}
289289
290int is_99_8()
290int ti99_is_99_8()
291291{
292292   return ti99_model == model_99_8;
293293}
r6474r6475
540540   }
541541   /* Check whether we have locked the cartslot. This uses GROM, which the 4p doesn't have. */
542542   if (ti99_model != model_99_4p)
543      lock_cartridge_slot(cartslots, (input_port_read(machine, "CFG") >> config_cartslot_bit) & config_cartslot_mask);
543      ti99_lock_cartridge_slot(cartslots, (input_port_read(machine, "CFG") >> config_cartslot_bit) & config_cartslot_mask);
544544
545545   switch (xRAM_kind)
546546   {
r6474r6475
675675    Backdoor function that is called by hsgpl, so that the machine code knows
676676    whether hsgpl or console GROMs are active
677677*/
678void set_hsgpl_crdena(int data)
678void ti99_set_hsgpl_crdena(int data)
679679{
680680   hsgpl_crdena = (data != 0);
681681}
r6474r6475
928928   {
929929      /* Pass the (one and only) program counter for GROMs. The
930930           buffer is set and used in the cartridge chip. */
931      reply = cartridge_grom_read(cartslots, console_GROMs.addr-0x6000);
931      reply = ti99_cartridge_grom_read(cartslots, console_GROMs.addr-0x6000);
932932   }
933933   else
934934   {
r6474r6475
984984    */
985985
986986   /* Activates a slot in the multi-cartridge extender. */
987   cartridge_slot_set(cartslots, (offset & 0x01fe)/2);
987   ti99_cartridge_slot_set(cartslots, (offset & 0x01fe)/2);
988988
989989   if (offset & 1)
990990   {   /* Read GROM address
r6474r6475
10351035//  cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
10361036
10371037   /* Activates a slot in the multi-cartridge extender. */
1038   cartridge_slot_set(cartslots, (offset & 0x01fe)/2);
1038   ti99_cartridge_slot_set(cartslots, (offset & 0x01fe)/2);
10391039
10401040   // 1001 1wbb bbbb bbr0
10411041
r6474r6475
10961096
10971097   /* Activates a slot in the multi-cartridge extender. */
10981098   // 1001 1wbb bbbb bbr0
1099   cartridge_slot_set(cartslots, (offset & 0x03fc)/4);
1099   ti99_cartridge_slot_set(cartslots, (offset & 0x03fc)/4);
11001100
11011101   if (offset & 2)
11021102   {
r6474r6475
11281128   cpu_adjust_icount(space->machine->firstcpu,-4/*20+3*/);      /* from 4 to 23? */
11291129
11301130   /* Activates a slot in the multi-cartridge extender. */
1131   cartridge_slot_set(cartslots, (offset & 0x03fc)/4);
1131   ti99_cartridge_slot_set(cartslots, (offset & 0x03fc)/4);
11321132
11331133   if (offset & 2)
11341134   {
src/mess/machine/ti99_4x.h
r6474r6475
168168INTERRUPT_GEN( ti99_vblank_interrupt );
169169INTERRUPT_GEN( ti99_4ev_hblank_interrupt );
170170
171void set_hsgpl_crdena(int data);
171void ti99_set_hsgpl_crdena(int data);
172172void ti99_common_init(running_machine *machine, const TMS9928a_interface *gfxparm);
173int is_99_8(void);
173int ti99_is_99_8(void);
174174
175175READ16_HANDLER ( ti99_nop_8_r );
176176WRITE16_HANDLER ( ti99_nop_8_w );
src/mess/machine/bbc.c
r6474r6475
614614      const device_config *via_1 = devtag_get_device(space->machine, "via6522_1");
615615
616616      myo=offset-0x200;
617      if ((myo>=0x00) && (myo<=0x07)) return BBC_6845_r(space, myo-0x00);      /* Video Controller */
617      if ((myo>=0x00) && (myo<=0x07)) return bbc_6845_r(space, myo-0x00);      /* Video Controller */
618618      if ((myo>=0x08) && (myo<=0x0f))
619619      {
620620         const device_config *acia = devtag_get_device(space->machine, "acia6850");
r6474r6475
653653      const device_config *via_1 = devtag_get_device(space->machine, "via6522_1");
654654
655655      myo=offset-0x200;
656      if ((myo>=0x00) && (myo<=0x07)) BBC_6845_w(space, myo-0x00,data);         /* Video Controller */
656      if ((myo>=0x00) && (myo<=0x07)) bbc_6845_w(space, myo-0x00,data);         /* Video Controller */
657657      if ((myo>=0x08) && (myo<=0x0f))
658658      {
659659         const device_config *acia = devtag_get_device(space->machine, "acia6850");
r6474r6475
663663         else
664664            acia6850_data_w(acia, 0, data);
665665      }
666      if ((myo>=0x10) && (myo<=0x17)) BBC_SerialULA_w(space, myo-0x10,data);      /* Serial System Chip */
666      if ((myo>=0x10) && (myo<=0x17)) bbc_SerialULA_w(space, myo-0x10,data);      /* Serial System Chip */
667667      if ((myo>=0x18) && (myo<=0x1f)) uPD7002_w(devtag_get_device(space->machine, "upd7002"),myo-0x18,data);         /* A to D converter */
668668      if ((myo>=0x20) && (myo<=0x23)) bbc_videoULA_w(space, myo-0x20,data);         /* VideoULA */
669669      if ((myo>=0x24) && (myo<=0x27)) bbcm_wd1770l_write(space, myo-0x24,data);    /* 1770 */
r6474r6475
13401340   via_cb1_w(via_0, 0,data);
13411341}
13421342
1343const uPD7002_interface BBC_uPD7002 =
1343const uPD7002_interface bbc_uPD7002 =
13441344{
13451345   BBC_get_analogue_input,
13461346   BBC_uPD7002_EOC
r6474r6475
14541454
14551455
14561456
1457WRITE8_HANDLER ( BBC_SerialULA_w )
1457WRITE8_HANDLER ( bbc_SerialULA_w )
14581458{
14591459   BBC_Cassette_motor(space->machine, (data & 0x80) >> 7);
14601460}
src/mess/drivers/3do.c
r6474r6475
116116   AM_RANGE(0x00000000, 0x001FFFFF) AM_RAMBANK(1) AM_BASE(&dram)               /* DRAM */
117117   AM_RANGE(0x00200000, 0x002FFFFF) AM_RAM   AM_BASE(&vram)                     /* VRAM */
118118   AM_RANGE(0x03000000, 0x030FFFFF) AM_ROMBANK(2)                           /* BIOS */
119   AM_RANGE(0x03140000, 0x0315FFFF) AM_READWRITE(nvarea_r, nvarea_w)            /* NVRAM */
120   AM_RANGE(0x03180000, 0x031FFFFF) AM_READWRITE(unk_318_r, unk_318_w)            /* ???? */
121   AM_RANGE(0x03200000, 0x032FFFFF) AM_READWRITE(vram_sport_r, vram_sport_w)      /* special vram access1 */
122   AM_RANGE(0x03300000, 0x033FFFFF) AM_READWRITE(madam_r, madam_w)               /* address decoder */
123   AM_RANGE(0x03400000, 0x034FFFFF) AM_READWRITE(clio_r, clio_w)               /* io controller */
119   AM_RANGE(0x03140000, 0x0315FFFF) AM_READWRITE(_3do_nvarea_r, _3do_nvarea_w)            /* NVRAM */
120   AM_RANGE(0x03180000, 0x031FFFFF) AM_READWRITE(_3do_unk_318_r, _3do_unk_318_w)            /* ???? */
121   AM_RANGE(0x03200000, 0x032FFFFF) AM_READWRITE(_3do_vram_sport_r, _3do_vram_sport_w)      /* special vram access1 */
122   AM_RANGE(0x03300000, 0x033FFFFF) AM_READWRITE(_3do_madam_r, _3do_madam_w)               /* address decoder */
123   AM_RANGE(0x03400000, 0x034FFFFF) AM_READWRITE(_3do_clio_r, _3do_clio_w)               /* io controller */
124124ADDRESS_MAP_END
125125
126126
r6474r6475
135135   /* start with overlay enabled */
136136   memory_set_bank(machine, 1, 1);
137137
138   madam_init();
139   clio_init();
138   _3do_madam_init();
139   _3do_clio_init();
140140}
141141
142142
src/mess/drivers/dai.c
r6474r6475
7979   AM_RANGE( 0xe000, 0xefff) AM_ROMBANK(2)
8080   AM_RANGE( 0xf000, 0xf7ff) AM_WRITE( dai_stack_interrupt_circuit_w )
8181   AM_RANGE( 0xf800, 0xf8ff) AM_RAM
82   AM_RANGE( 0xfb00, 0xfbff) AM_READWRITE( amd9511_r, amd9511_w )
82   AM_RANGE( 0xfb00, 0xfbff) AM_READWRITE( dai_amd9511_r, dai_amd9511_w )
8383   AM_RANGE( 0xfc00, 0xfcff) AM_DEVREADWRITE("pit8253", pit8253_r, pit8253_w )
8484   AM_RANGE( 0xfd00, 0xfdff) AM_READWRITE( dai_io_discrete_devices_r, dai_io_discrete_devices_w )
8585   AM_RANGE( 0xfe00, 0xfeff) AM_DEVREADWRITE("ppi8255", i8255a_r, i8255a_w )
src/mess/drivers/coco.c
r6474r6475
196196   AM_RANGE(0xff90, 0xffbf) AM_NOP
197197   AM_RANGE(0xffc0, 0xffdf) AM_DEVWRITE("sam", sam6883_w)
198198   AM_RANGE(0xffe0, 0xffe1) AM_NOP
199   AM_RANGE(0xffe2, 0xffe2) AM_READWRITE(plus_reg_r,plus_reg_w)   /* Dragon plus control / status reg */
199   AM_RANGE(0xffe2, 0xffe2) AM_READWRITE(dgnplus_reg_r,dgnplus_reg_w)   /* Dragon plus control / status reg */
200200   AM_RANGE(0xffe3, 0xffef) AM_NOP
201201   AM_RANGE(0xfff0, 0xffff) AM_ROM AM_REGION("maincpu", 0x3ff0)
202202ADDRESS_MAP_END
r6474r6475
271271   AM_RANGE(0xff04, 0xff07) AM_DEVREADWRITE("acia", acia_6551_r, acia_6551_w)
272272   AM_RANGE(0xff20, 0xff23) AM_DEVREADWRITE("pia_1", pia6821_r, coco_pia_1_w)
273273   AM_RANGE(0xff24, 0xff27) AM_DEVREADWRITE("pia_2", pia6821_r, pia6821_w)    /* Third PIA on Dragon Alpha */
274   AM_RANGE(0Xff28, 0xff2b) AM_READWRITE(alpha_modem_r, alpha_modem_w)      /* Modem, dummy to stop eror log ! */
275   AM_RANGE(0xff2c, 0xff2f) AM_READWRITE(wd2797_r,   wd2797_w)            /* Alpha onboard disk interface */
274   AM_RANGE(0Xff28, 0xff2b) AM_READWRITE(dgnalpha_modem_r, dgnalpha_modem_w)      /* Modem, dummy to stop eror log ! */
275   AM_RANGE(0xff2c, 0xff2f) AM_READWRITE(dgnalpha_wd2797_r, dgnalpha_wd2797_w)            /* Alpha onboard disk interface */
276276   AM_RANGE(0xff40, 0xff7f) AM_DEVREADWRITE("coco_cartslot", coco_cartridge_r, coco_cartridge_w)
277277   AM_RANGE(0xff90, 0xffbf) AM_NOP
278278   AM_RANGE(0xffc0, 0xffdf) AM_DEVWRITE("sam", sam6883_w)
279279   AM_RANGE(0xffe0, 0xffef) AM_NOP
280   AM_RANGE(0xfff0, 0xffff) AM_READ(dragon_alpha_mapped_irq_r)
280   AM_RANGE(0xfff0, 0xffff) AM_READ(dgnalpha_mapped_irq_r)
281281ADDRESS_MAP_END
282282
283283
src/mess/drivers/atarist.c
r6474r6475
976976   AM_RANGE(0xff8e20, 0xff8e21) AM_READWRITE(megaste_cache_r, megaste_cache_w)
977977   AM_RANGE(0xfffa00, 0xfffa3f) AM_DEVREADWRITE8(MC68901_TAG, mc68901_register_r, mc68901_register_w, 0xff)
978978//  AM_RANGE(0xfffa40, 0xfffa5f) AM_READWRITE(megast_fpu_r, megast_fpu_w)
979   AM_RANGE(0xff8c80, 0xff8c87) AM_DEVREADWRITE8("scc", scc_r, scc_w, 0xff00)
979   AM_RANGE(0xff8c80, 0xff8c87) AM_DEVREADWRITE8("scc", scc8530_r, scc8530_w, 0xff00)
980980   AM_RANGE(0xfffc00, 0xfffc01) AM_DEVREADWRITE8("acia_0", acia6850_stat_r, acia6850_ctrl_w, 0xff00)
981981   AM_RANGE(0xfffc02, 0xfffc03) AM_DEVREADWRITE8("acia_0", acia6850_data_r, acia6850_data_w, 0xff00)
982982   AM_RANGE(0xfffc04, 0xfffc05) AM_DEVREADWRITE8("acia_1", acia6850_stat_r, acia6850_ctrl_w, 0xff00)
src/mess/drivers/vector06.c
r6474r6475
2929static ADDRESS_MAP_START( vector06_io , ADDRESS_SPACE_IO, 8)
3030   ADDRESS_MAP_GLOBAL_MASK(0xff)
3131   ADDRESS_MAP_UNMAP_HIGH
32   AM_RANGE( 0x00, 0x03) AM_READWRITE(vector_8255_1_r, vector_8255_1_w )
33   AM_RANGE( 0x04, 0x07) AM_READWRITE(vector_8255_2_r, vector_8255_2_w )
32   AM_RANGE( 0x00, 0x03) AM_READWRITE(vector06_8255_1_r, vector06_8255_1_w )
33   AM_RANGE( 0x04, 0x07) AM_READWRITE(vector06_8255_2_r, vector06_8255_2_w )
3434   AM_RANGE( 0x0C, 0x0C) AM_WRITE ( vector06_color_set )
3535   AM_RANGE( 0x18, 0x18) AM_DEVREADWRITE("wd1793", wd17xx_data_r,wd17xx_data_w)
3636   AM_RANGE( 0x19, 0x19) AM_DEVREADWRITE("wd1793", wd17xx_sector_r,wd17xx_sector_w)
3737   AM_RANGE( 0x1A, 0x1A) AM_DEVREADWRITE("wd1793", wd17xx_track_r,wd17xx_track_w)
3838     AM_RANGE( 0x1B, 0x1B) AM_DEVREADWRITE("wd1793", wd17xx_status_r,wd17xx_command_w)
39     AM_RANGE( 0x1C, 0x1C) AM_WRITE(vector_disc_w)
39     AM_RANGE( 0x1C, 0x1C) AM_WRITE(vector06_disc_w)
4040ADDRESS_MAP_END
4141
4242/* Input ports */
src/mess/drivers/amstrad.c
r6474r6475
889889   MDRV_PALETTE_LENGTH(32)
890890   MDRV_PALETTE_INIT(amstrad_cpc)
891891
892   MDRV_MC6845_ADD( "mc6845", MC6845, XTAL_16MHz / 16, mc6845_amstrad_intf )
892   MDRV_MC6845_ADD( "mc6845", MC6845, XTAL_16MHz / 16, amstrad_mc6845_intf )
893893
894894   MDRV_VIDEO_START(amstrad)
895895   MDRV_VIDEO_UPDATE(amstrad)
r6474r6475
951951   MDRV_PALETTE_LENGTH(4096)
952952   MDRV_PALETTE_INIT(amstrad_plus)
953953
954   MDRV_MC6845_ADD( "mc6845", MC6845, XTAL_40MHz / 40, mc6845_amstrad_plus_intf )
954   MDRV_MC6845_ADD( "mc6845", MC6845, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
955955
956956   MDRV_VIDEO_START(amstrad)
957957   MDRV_VIDEO_UPDATE(amstrad)
r6474r6475
10071007   MDRV_PALETTE_LENGTH(4096)
10081008   MDRV_PALETTE_INIT(amstrad_plus)
10091009
1010   MDRV_MC6845_ADD( "mc6845", MC6845, XTAL_40MHz / 40, mc6845_amstrad_plus_intf )
1010   MDRV_MC6845_ADD( "mc6845", MC6845, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
10111011
10121012   MDRV_VIDEO_START(amstrad)
10131013   MDRV_VIDEO_UPDATE(amstrad)
src/mess/drivers/poly88.c
r6474r6475
2020   AM_RANGE(0x1000, 0x1fff) AM_ROM // System Expansion area
2121   AM_RANGE(0x2000, 0x3fff) AM_RAM // Minimal user RAM area
2222   AM_RANGE(0x4000, 0xf7ff) AM_RAM
23   AM_RANGE(0xf800, 0xfbff) AM_RAM AM_BASE(&poly_video_ram) // Video RAM
23   AM_RANGE(0xf800, 0xfbff) AM_RAM AM_BASE(&poly88_video_ram) // Video RAM
2424ADDRESS_MAP_END
2525
2626static ADDRESS_MAP_START( poly88_io , ADDRESS_SPACE_IO, 8)
2727   ADDRESS_MAP_UNMAP_HIGH
2828   AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("uart", msm8251_data_r,msm8251_data_w)
2929   AM_RANGE(0x01, 0x01) AM_DEVREADWRITE("uart", msm8251_status_r,msm8251_control_w)
30   AM_RANGE(0x04, 0x04) AM_WRITE(poly_baud_rate_w)
31   AM_RANGE(0x08, 0x08) AM_WRITE(poly_intr_w)
32   AM_RANGE(0xf8, 0xf8) AM_READ(poly_keyboard_r)
30   AM_RANGE(0x04, 0x04) AM_WRITE(poly88_baud_rate_w)
31   AM_RANGE(0x08, 0x08) AM_WRITE(poly88_intr_w)
32   AM_RANGE(0xf8, 0xf8) AM_READ(poly88_keyboard_r)
3333ADDRESS_MAP_END
3434
3535static ADDRESS_MAP_START(poly8813_mem, ADDRESS_SPACE_PROGRAM, 8)
r6474r6475
3737   AM_RANGE(0x0000, 0x03ff) AM_ROM // Monitor ROM
3838   AM_RANGE(0x0400, 0x0bff) AM_ROM // Disk System ROM
3939   AM_RANGE(0x0c00, 0x0fff) AM_RAM // System RAM
40   AM_RANGE(0x1800, 0x1bff) AM_RAM AM_BASE(&poly_video_ram) // Video RAM
40   AM_RANGE(0x1800, 0x1bff) AM_RAM AM_BASE(&poly88_video_ram) // Video RAM
4141   AM_RANGE(0x2000, 0xffff) AM_RAM // RAM
4242ADDRESS_MAP_END
4343
src/mess/drivers/odyssey2.c
r6474r6475
162162
163163static const sp0256_interface the_voice_sp0256 =
164164{
165   DEVCB_LINE(the_voice_lrq_callback),
165   DEVCB_LINE(odyssey2_the_voice_lrq_callback),
166166   DEVCB_NULL
167167};
168168
src/mess/drivers/galaxy.c
r6474r6475
179179   MDRV_PALETTE_LENGTH(2)
180180   MDRV_PALETTE_INIT( black_and_white )
181181
182   MDRV_VIDEO_START( generic_bitmapped )
182   MDRV_VIDEO_START( galaxy )
183183   MDRV_VIDEO_UPDATE( galaxy )
184184
185185   /* snapshot */
r6474r6475
215215   MDRV_PALETTE_LENGTH(2)
216216   MDRV_PALETTE_INIT( black_and_white )
217217
218   MDRV_VIDEO_START( generic_bitmapped )
218   MDRV_VIDEO_START( galaxy )
219219   MDRV_VIDEO_UPDATE( galaxy )
220220
221221   /* snapshot */
src/mess/drivers/compis.c
r6474r6475
8282   AM_RANGE( 0x0330, 0x033f) AM_READWRITE( compis_gdc_16_r, compis_gdc_16_w )   /* GDC 82720 PCS6:6     */
8383   AM_RANGE( 0x0340, 0x0343) AM_READWRITE( compis_fdc_r, compis_fdc_w )   /* iSBX0 (J8) FDC 8272      */
8484   AM_RANGE( 0x0350, 0x0351) AM_READ( compis_fdc_dack_r)   /* iSBX0 (J8) DMA ACK       */
85   AM_RANGE( 0xff00, 0xffff) AM_READWRITE( i186_internal_port_r, i186_internal_port_w)/* CPU 80186         */
85   AM_RANGE( 0xff00, 0xffff) AM_READWRITE( compis_i186_internal_port_r, compis_i186_internal_port_w)/* CPU 80186         */
8686//{ 0x0100, 0x017e, compis_null_r },    /* RTC              */
8787//{ 0x0180, 0x01ff, compis_null_r },    /* PCS3?            */
8888//{ 0x0200, 0x027f, compis_null_r },    /* Reserved         */
src/mess/drivers/mac.c
r6474r6475
5050#include "devices/messram.h"
5151#include "sound/dmadac.h"
5252
53UINT32 *se30_vram;
54
5553/*
5654   Apple Sound Chip
5755
r6474r6475
587585
588586   AM_RANGE(0x50f40000, 0x50f41fff) AM_READWRITE16(mac_via_r, mac_via_w, 0xffffffff)   // mirror
589587
590   AM_RANGE(0xfe000000, 0xfe00ffff) AM_RAM   AM_BASE(&se30_vram)
588   AM_RANGE(0xfe000000, 0xfe00ffff) AM_RAM   AM_BASE(&mac_se30_vram)
591589   AM_RANGE(0xfeffe000, 0xfeffffff) AM_ROM AM_REGION("se30vrom", 0x0)
592590ADDRESS_MAP_END
593591
src/mess/drivers/vt100.c
r6474r6475
5050static READ8_HANDLER(vt100_flags_r)
5151{
5252   UINT8 retVal = 0;
53    retVal |= lba7_r(devtag_get_device(space->machine, "vt100_video"),0) * 0x40;
53    retVal |= vt_video_lba7_r(devtag_get_device(space->machine, "vt100_video"),0) * 0x40;
5454   retVal |= vt100_keyboard_int * 0x80;
5555   return retVal;
5656}
r6474r6475
130130   // 0x82 Keyboard UART data input
131131   AM_RANGE (0x82, 0x82) AM_WRITE(vt100_keyboard_w)
132132   // 0xA2 Video processor DC012
133   AM_RANGE (0xa2, 0xa2) AM_DEVWRITE("vt100_video", dc012_w)
133   AM_RANGE (0xa2, 0xa2) AM_DEVWRITE("vt100_video", vt_video_dc012_w)
134134   // 0xC2 Video processor DC011
135   AM_RANGE (0xc2, 0xc2) AM_DEVWRITE("vt100_video", dc011_w)
135   AM_RANGE (0xc2, 0xc2) AM_DEVWRITE("vt100_video", vt_video_dc011_w)
136136   // 0xE2 Graphics port
137137   // AM_RANGE (0xe2, 0xe2)
138138ADDRESS_MAP_END
src/mess/drivers/mz700.c
r6474r6475
106106static ADDRESS_MAP_START( mz700_io, ADDRESS_SPACE_IO, 8 )
107107   ADDRESS_MAP_GLOBAL_MASK(0xff)
108108   AM_RANGE(0xe0, 0xe0) AM_WRITE(mz700_bank_0_w)
109   AM_RANGE(0xe1, 0xe1) AM_WRITE(mz_bank_1_w)
110   AM_RANGE(0xe2, 0xe2) AM_WRITE(mz_bank_2_w)
111   AM_RANGE(0xe3, 0xe3) AM_WRITE(mz_bank_3_w)
112   AM_RANGE(0xe4, 0xe4) AM_WRITE(mz_bank_4_w)
113   AM_RANGE(0xe5, 0xe5) AM_WRITE(mz_bank_5_w)
114   AM_RANGE(0xe6, 0xe6) AM_WRITE(mz_bank_6_w)
109   AM_RANGE(0xe1, 0xe1) AM_WRITE(mz700_bank_1_w)
110   AM_RANGE(0xe2, 0xe2) AM_WRITE(mz700_bank_2_w)
111   AM_RANGE(0xe3, 0xe3) AM_WRITE(mz700_bank_3_w)
112   AM_RANGE(0xe4, 0xe4) AM_WRITE(mz700_bank_4_w)
113   AM_RANGE(0xe5, 0xe5) AM_WRITE(mz700_bank_5_w)
114   AM_RANGE(0xe6, 0xe6) AM_WRITE(mz700_bank_6_w)
115115ADDRESS_MAP_END
116116
117117static ADDRESS_MAP_START( mz800_mem, ADDRESS_SPACE_PROGRAM, 8 )
r6474r6475
126126   AM_RANGE(0xd0, 0xd3) AM_DEVREADWRITE("ppi8255", i8255a_r, i8255a_w)
127127   AM_RANGE(0xd4, 0xd7) AM_DEVREADWRITE("pit8253", pit8253_r, pit8253_w)
128128   AM_RANGE(0xe0, 0xe0) AM_READWRITE(mz800_bank_0_r, mz800_bank_0_w)
129   AM_RANGE(0xe1, 0xe1) AM_READWRITE(mz800_bank_1_r, mz_bank_1_w)
130   AM_RANGE(0xe2, 0xe2) AM_WRITE(mz_bank_2_w)
131   AM_RANGE(0xe3, 0xe3) AM_WRITE(mz_bank_3_w)
132   AM_RANGE(0xe4, 0xe4) AM_WRITE(mz_bank_4_w)
133   AM_RANGE(0xe5, 0xe5) AM_WRITE(mz_bank_5_w)
134   AM_RANGE(0xe6, 0xe6) AM_WRITE(mz_bank_6_w)
129   AM_RANGE(0xe1, 0xe1) AM_READWRITE(mz800_bank_1_r, mz700_bank_1_w)
130   AM_RANGE(0xe2, 0xe2) AM_WRITE(mz700_bank_2_w)
131   AM_RANGE(0xe3, 0xe3) AM_WRITE(mz700_bank_3_w)
132   AM_RANGE(0xe4, 0xe4) AM_WRITE(mz700_bank_4_w)
133   AM_RANGE(0xe5, 0xe5) AM_WRITE(mz700_bank_5_w)
134   AM_RANGE(0xe6, 0xe6) AM_WRITE(mz700_bank_6_w)
135135   AM_RANGE(0xea, 0xea) AM_READWRITE( mz800_ramdisk_r, mz800_ramdisk_w )
136136   AM_RANGE(0xeb, 0xeb) AM_WRITE( mz800_ramaddr_w )
137137   AM_RANGE(0xf0, 0xf0) AM_READ_PORT("atari_joy1") AM_WRITE(mz800_palette_w)
src/mess/drivers/x68k.c
r6474r6475
540540   char val = 0;
541541   char ipt = 0;
542542
543   if(!(scc_get_reg_b(scc,5) & 0x02))
543   if(!(scc8530_get_reg_b(scc,5) & 0x02))
544544      return 0xff;
545545
546546   switch(x68k_sys.mouse.inputtype)
r6474r6475
562562   x68k_sys.mouse.inputtype++;
563563   if(x68k_sys.mouse.inputtype > 2)
564564   {
565      int val = scc_get_reg_b(scc, 0);
565      int val = scc8530_get_reg_b(scc, 0);
566566      x68k_sys.mouse.inputtype = 0;
567567      x68k_sys.mouse.bufferempty = 1;
568568      val &= ~0x01;
569      scc_set_reg_b(scc, 0, val);
569      scc8530_set_reg_b(scc, 0, val);
570570      logerror("SCC: mouse buffer empty\n");
571571   }
572572
r6474r6475
586586   switch(offset)
587587   {
588588   case 0:
589      return scc_r(scc, 0);
589      return scc8530_r(scc, 0);
590590   case 1:
591591      return x68k_read_mouse(space->machine);
592592   case 2:
593      return scc_r(scc, 1);
593      return scc8530_r(scc, 1);
594594   case 3:
595      return scc_r(scc, 3);
595      return scc8530_r(scc, 3);
596596   default:
597597      return 0xff;
598598   }
r6474r6475
607607   switch(offset)
608608   {
609609   case 0:
610      scc_w(scc, 0,(UINT8)data);
611      if((scc_get_reg_b(scc, 5) & 0x02) != prev)
610      scc8530_w(scc, 0,(UINT8)data);
611      if((scc8530_get_reg_b(scc, 5) & 0x02) != prev)
612612      {
613         if(scc_get_reg_b(scc, 5) & 0x02)  // Request to Send
613         if(scc8530_get_reg_b(scc, 5) & 0x02)  // Request to Send
614614         {
615            int val = scc_get_reg_b(scc, 0);
615            int val = scc8530_get_reg_b(scc, 0);
616616            x68k_sys.mouse.bufferempty = 0;
617617            val |= 0x01;
618            scc_set_reg_b(scc, 0,val);
618            scc8530_set_reg_b(scc, 0,val);
619619         }
620620      }
621621      break;
622622   case 1:
623      scc_w(scc, 2,(UINT8)data);
623      scc8530_w(scc, 2,(UINT8)data);
624624      break;
625625   case 2:
626      scc_w(scc, 1,(UINT8)data);
626      scc8530_w(scc, 1,(UINT8)data);
627627      break;
628628   case 3:
629      scc_w(scc, 3,(UINT8)data);
629      scc8530_w(scc, 3,(UINT8)data);
630630      break;
631631   }
632   prev = scc_get_reg_b(scc, 5) & 0x02;
632   prev = scc8530_get_reg_b(scc, 5) & 0x02;
633633}
634634
635635static TIMER_CALLBACK(x68k_scc_ack)
r6474r6475
642642//      return;
643643
644644   // hard-code the IRQ vector for now, until the SCC code is more complete
645   if((scc_get_reg_a(scc, 9) & 0x08) || (scc_get_reg_b(scc, 9) & 0x08))  // SCC reg WR9 is the same for both channels
645   if((scc8530_get_reg_a(scc, 9) & 0x08) || (scc8530_get_reg_b(scc, 9) & 0x08))  // SCC reg WR9 is the same for both channels
646646   {
647      if((scc_get_reg_b(scc, 1) & 0x18) != 0)  // if bits 3 and 4 of WR1 are 0, then Rx IRQs are disabled on this channel
647      if((scc8530_get_reg_b(scc, 1) & 0x18) != 0)  // if bits 3 and 4 of WR1 are 0, then Rx IRQs are disabled on this channel
648648      {
649         if(scc_get_reg_b(scc, 5) & 0x02)  // RTS signal
649         if(scc8530_get_reg_b(scc, 5) & 0x02)  // RTS signal
650650         {
651651            x68k_sys.mouse.irqactive = 1;
652652            current_vector[5] = 0x54;
src/mess/drivers/enterp.c
r6474r6475
261261   ADDRESS_MAP_GLOBAL_MASK(0xff)
262262   AM_RANGE(0x10, 0x13) AM_MIRROR(0x04) AM_DEVREADWRITE("wd1770", wd17xx_r, wd17xx_w)
263263   AM_RANGE(0x18, 0x18) AM_MIRROR(0x04) AM_READWRITE(exdos_card_r, exdos_card_w)
264   AM_RANGE(0x80, 0x8f) AM_WRITE(Nick_reg_w)
264   AM_RANGE(0x80, 0x8f) AM_WRITE(epnick_reg_w)
265265   AM_RANGE(0xa0, 0xbf) AM_DEVREADWRITE("custom", dave_reg_r, dave_reg_w)
266266ADDRESS_MAP_END
267267
r6474r6475
466466   MDRV_SCREEN_VISIBLE_AREA(0, ENTERPRISE_SCREEN_WIDTH-1, 0, ENTERPRISE_SCREEN_HEIGHT-1)
467467
468468   MDRV_PALETTE_LENGTH(NICK_PALETTE_SIZE)
469   MDRV_PALETTE_INIT(nick)
469   MDRV_PALETTE_INIT(epnick)
470470
471   MDRV_VIDEO_START(nick)
472   MDRV_VIDEO_UPDATE(nick)
471   MDRV_VIDEO_START(epnick)
472   MDRV_VIDEO_UPDATE(epnick)
473473
474474   /* sound hardware */
475475   MDRV_SPEAKER_STANDARD_MONO("mono")
src/mess/drivers/intv.c
r6474r6475
3434#include "driver.h"
3535#include "cpu/m6502/m6502.h"
3636#include "cpu/cp1610/cp1610.h"
37#include "video/stic.h"
3837#include "includes/intv.h"
3938#include "devices/cartslot.h"
4039#include "sound/ay8910.h"
r6474r6475
342341INPUT_PORTS_END
343342
344343static ADDRESS_MAP_START( intv_mem , ADDRESS_SPACE_PROGRAM, 16)
345   AM_RANGE(0x0000, 0x003f) AM_READWRITE( stic_r, stic_w )
344   AM_RANGE(0x0000, 0x003f) AM_READWRITE( intv_stic_r, intv_stic_w )
346345   AM_RANGE(0x0100, 0x01ef) AM_READWRITE( intv_ram8_r, intv_ram8_w )
347346   AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE("ay8910", AY8914_directread_port_0_lsb_r, AY8914_directwrite_port_0_lsb_w )
348347    AM_RANGE(0x0200, 0x035f) AM_READWRITE( intv_ram16_r, intv_ram16_w )
r6474r6475
353352ADDRESS_MAP_END
354353
355354static ADDRESS_MAP_START( intvkbd_mem , ADDRESS_SPACE_PROGRAM, 16)
356   AM_RANGE(0x0000, 0x003f) AM_READWRITE( stic_r, stic_w )
355   AM_RANGE(0x0000, 0x003f) AM_READWRITE( intv_stic_r, intv_stic_w )
357356   AM_RANGE(0x0100, 0x01ef) AM_READWRITE( intv_ram8_r, intv_ram8_w )
358357   AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE("ay8910", AY8914_directread_port_0_lsb_r, AY8914_directwrite_port_0_lsb_w )
359358    AM_RANGE(0x0200, 0x035f) AM_READWRITE( intv_ram16_r, intv_ram16_w )
src/mess/drivers/ip20.c
r6474r6475
168168   case 0x0d00:
169169      verboselog(machine, 2, "HPC DUART0 Channel B Control Read\n" );
170170//      return 0x00000004;
171      return 0x7c; //scc_r(machine, 0);
171      return 0x7c; //scc8530_r(machine, 0);
172172   case 0x0d04:
173173      verboselog(machine, 2, "HPC DUART0 Channel B Data Read\n" );
174174//      return 0;
175175      scc = devtag_get_device(space->machine, "scc");
176      return scc_r(scc, 2);
176      return scc8530_r(scc, 2);
177177   case 0x0d08:
178178      verboselog(machine, 2, "HPC DUART0 Channel A Control Read (%08x)\n", mem_mask    );
179179//      return 0x40;
180      return 0x7c; //scc_r(machine, 1);
180      return 0x7c; //scc8530_r(machine, 1);
181181   case 0x0d0c:
182182      verboselog(machine, 2, "HPC DUART0 Channel A Data Read\n" );
183183//      return 0;
184184      scc = devtag_get_device(space->machine, "scc");
185      return scc_r(scc, 3);
185      return scc8530_r(scc, 3);
186186   case 0x0d10:
187187//      verboselog(machine, 2, "HPC DUART1 Channel B Control Read\n" );
188188      return 0x00000004;
r6474r6475
364364   case 0x0d00:
365365      verboselog(machine, 2, "HPC DUART0 Channel B Control Write: %08x (%08x)\n", data, mem_mask );
366366      scc = devtag_get_device(space->machine, "scc");
367      scc_w(scc, 0, data);
367      scc8530_w(scc, 0, data);
368368      break;
369369   case 0x0d04:
370370      verboselog(machine, 2, "HPC DUART0 Channel B Data Write: %08x (%08x)\n", data, mem_mask );
371371      scc = devtag_get_device(space->machine, "scc");
372      scc_w(scc, 2, data);
372      scc8530_w(scc, 2, data);
373373      break;
374374   case 0x0d08:
375375      verboselog(machine, 2, "HPC DUART0 Channel A Control Write: %08x (%08x)\n", data, mem_mask );
376376      scc = devtag_get_device(space->machine, "scc");
377      scc_w(scc, 1, data);
377      scc8530_w(scc, 1, data);
378378      break;
379379   case 0x0d0c:
380380      verboselog(machine, 2, "HPC DUART0 Channel A Data Write: %08x (%08x)\n", data, mem_mask );
381381      scc = devtag_get_device(space->machine, "scc");
382      scc_w(scc, 3, data);
382      scc8530_w(scc, 3, data);
383383      break;
384384   case 0x0d10:
385385      if( ( data & 0x000000ff ) >= 0x00000020 )
src/mess/drivers/bbc.c
r6474r6475
108108   AM_RANGE(0xfc00, 0xfdff) AM_NOP   /*    fc00-fdff                 FRED & JIM Pages                */
109109
110110                                                               /*    fe00-feff                 Shiela Address Page             */
111   AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(BBC_6845_r       , BBC_6845_w      )   /*    fe00-fe07  6845 CRTA      Video controller                */
111   AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(bbc_6845_r       , bbc_6845_w      )   /*    fe00-fe07  6845 CRTA      Video controller                */
112112   AM_RANGE(0xfe08, 0xfe08) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_stat_r, acia6850_ctrl_w)
113113   AM_RANGE(0xfe09, 0xfe09) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_data_r, acia6850_data_w)
114   AM_RANGE(0xfe10, 0xfe17) AM_READWRITE(bbc_fe_r      , BBC_SerialULA_w   )   /*    fe10-fe17  Serial ULA     Serial system chip              */
114   AM_RANGE(0xfe10, 0xfe17) AM_READWRITE(bbc_fe_r      , bbc_SerialULA_w   )   /*    fe10-fe17  Serial ULA     Serial system chip              */
115115   AM_RANGE(0xfe18, 0xfe1f) AM_NOP                                       /*    fe18-fe1f  INTOFF/STATID  1 ECONET Interrupt Off / ID No. */
116116   AM_RANGE(0xfe20, 0xfe2f) AM_WRITE    (                   bbc_videoULA_w    )   /* R: fe20-fe2f  INTON          1 ECONET Interrupt On           */
117117                                                               /* W: fe20-fe2f  Video ULA      Video system chip               */
r6474r6475
142142   AM_RANGE(0xfc00, 0xfdff) AM_READWRITE(bbc_opus_read     , bbc_opus_write   )   /*    fc00-fdff                 OPUS Disc Controller            */
143143
144144                                                               /*    fe00-feff                 Shiela Address Page             */
145   AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(BBC_6845_r       , BBC_6845_w        )   /*    fe00-fe07  6845 CRTC      Video controller                */
145   AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(bbc_6845_r       , bbc_6845_w        )   /*    fe00-fe07  6845 CRTC      Video controller                */
146146   AM_RANGE(0xfe08, 0xfe08) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_stat_r, acia6850_ctrl_w)
147147   AM_RANGE(0xfe09, 0xfe09) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_data_r, acia6850_data_w)
148   AM_RANGE(0xfe10, 0xfe17) AM_READWRITE(bbc_fe_r      , BBC_SerialULA_w   )   /*    fe10-fe17  Serial ULA     Serial system chip              */
148   AM_RANGE(0xfe10, 0xfe17) AM_READWRITE(bbc_fe_r      , bbc_SerialULA_w   )   /*    fe10-fe17  Serial ULA     Serial system chip              */
149149   AM_RANGE(0xfe18, 0xfe1f) AM_NOP                                       /*    fe18-fe1f  INTOFF/STATID  ECONET Interrupt Off / ID No.   */
150150   AM_RANGE(0xfe20, 0xfe2f) AM_WRITE    (                   bbc_videoULA_w    )   /* R: fe20-fe2f  INTON          ECONET Interrupt On             */
151151                                                               /* W: fe20-fe2f  Video ULA      Video system chip               */
r6474r6475
177177   AM_RANGE(0xfc00, 0xfdff) AM_NOP   /*    fc00-fdff                 FRED & JIM Pages                */
178178
179179                                                               /*    fe00-feff                 Shiela Address Page             */
180   AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(BBC_6845_r      , BBC_6845_w      )   /*    fe00-fe07  6845 CRTC      Video controller                */
180   AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(bbc_6845_r      , bbc_6845_w      )   /*    fe00-fe07  6845 CRTC      Video controller                */
181181   AM_RANGE(0xfe08, 0xfe08) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_stat_r, acia6850_ctrl_w)
182182   AM_RANGE(0xfe09, 0xfe09) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_data_r, acia6850_data_w)
183   AM_RANGE(0xfe10, 0xfe17) AM_READWRITE(bbc_fe_r      , BBC_SerialULA_w   )   /*    fe10-fe17  Serial ULA     Serial system chip              */
183   AM_RANGE(0xfe10, 0xfe17) AM_READWRITE(bbc_fe_r      , bbc_SerialULA_w   )   /*    fe10-fe17  Serial ULA     Serial system chip              */
184184   AM_RANGE(0xfe18, 0xfe1f) AM_NOP                                       /*    fe18-fe1f  INTOFF/STATID  ECONET Interrupt Off / ID No.   */
185185   AM_RANGE(0xfe20, 0xfe2f) AM_WRITE    (bbc_videoULA_w                  )   /* R: fe20-fe2f  INTON          ECONET Interrupt On             */
186186                                                               /* W: fe20-fe2f  Video ULA      Video system chip               */
r6474r6475
213213   AM_RANGE(0xfc00, 0xfdff) AM_NOP   /*    fc00-fdff                 FRED & JIM Pages                */
214214
215215                                                               /*    fe00-feff                 Shiela Address Page             */
216   AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(BBC_6845_r      , BBC_6845_w      )   /*    fe00-fe07  6845 CRTC      Video controller                */
216   AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(bbc_6845_r      , bbc_6845_w      )   /*    fe00-fe07  6845 CRTC      Video controller                */
217217   AM_RANGE(0xfe08, 0xfe08) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_stat_r, acia6850_ctrl_w)
218218   AM_RANGE(0xfe09, 0xfe09) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_data_r, acia6850_data_w)
219   AM_RANGE(0xfe10, 0xfe17) AM_READWRITE(bbc_fe_r      , BBC_SerialULA_w   )   /*    fe10-fe17  Serial ULA     Serial system chip              */
219   AM_RANGE(0xfe10, 0xfe17) AM_READWRITE(bbc_fe_r      , bbc_SerialULA_w   )   /*    fe10-fe17  Serial ULA     Serial system chip              */
220220   AM_RANGE(0xfe10, 0xfe17) AM_NOP                                       /*    fe10-fe17  Serial ULA     Serial system chip              */
221221   AM_RANGE(0xfe18, 0xfe1f) AM_NOP                                       /*    fe18-fe1f  INTOFF/STATID  ECONET Interrupt Off / ID No.   */
222222   AM_RANGE(0xfe20, 0xfe2f) AM_WRITE    (bbc_videoULA_w                  )   /* R: fe20-fe2f  INTON          ECONET Interrupt On             */
r6474r6475
278278    AM_RANGE(0xfc00, 0xfdff) AM_READWRITE(SMH_BANK(2)        , SMH_ROM          )       fc00-fdff                   FRED & JIM Pages
279279
280280                                                                                          fe00-feff                 Shiela Address Page
281    AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(BBC_6845_r        , BBC_6845_w        )         fe00-fe07  6845 CRTC      Video controller
281    AM_RANGE(0xfe00, 0xfe07) AM_READWRITE(bbc_6845_r        , bbc_6845_w        )         fe00-fe07  6845 CRTC      Video controller
282282    AM_RANGE(0xfe08, 0xfe08) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_stat_r, acia6850_ctrl_w)
283283    AM_RANGE(0xfe09, 0xfe09) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_data_r, acia6850_data_w)
284284    AM_RANGE(0xfe10, 0xfe17) AM_NOP                                                       fe10-fe17  Serial ULA     Serial system chip
r6474r6475
835835   MDRV_ACIA6850_ADD("acia6850", bbc_acia6850_interface)
836836
837837   /* devices */
838   MDRV_UPD7002_ADD("upd7002",BBC_uPD7002)
838   MDRV_UPD7002_ADD("upd7002", bbc_uPD7002)
839839   MDRV_VIA6522_ADD("via6522_0", 1000000, bbcb_system_via)
840840
841841   MDRV_I8271_ADD("i8271", bbc_i8271_interface)
r6474r6475
933933   MDRV_ACIA6850_ADD("acia6850", bbc_acia6850_interface)
934934
935935   /* devices */
936   MDRV_UPD7002_ADD("upd7002",BBC_uPD7002)
936   MDRV_UPD7002_ADD("upd7002", bbc_uPD7002)
937937   MDRV_VIA6522_ADD("via6522_0", 1000000, bbcb_system_via)
938938   MDRV_VIA6522_ADD("via6522_1", 1000000, bbcb_user_via)
939939

Previous 15994 Revisions Next


© 1998-2018 The MESS Team