Previous 15994 Revisions Next

r1433 Monday 24th December, 2007 at 18:32:50 UTC by Nathan Woods
Added static qualifiers [Atari Ace]
[src/mess]filemngr.c uimess.c utils.c
[src/mess/audio]arcadia.c channelf.c gb.c osi.c vc4000.c wswan.c
[src/mess/devices]chd_cd.c mfmdisk.c
[src/mess/drivers]3do.c a2600.c a310.c abc80.c abc80x.c amstrad.c apexc.c apf.c aquarius.c astrocde.c avigo.c bbcbc.c c16.c cbmb.c cgenie.c channelf.c comquest.c coupe.c cpschngr.c dai.c dgn_beta.c einstein.c enterp.c exidy.c galaxy.c gamecom.c gb.c genesis.c glasgow.c intv.c ip20.c ip22.c jaguar.c jupiter.c kaypro.c kc.c lviv.c lynx.c mekd2.c mpf1.c msx.c mtx.c mz700.c n64.c nascom1.c nes.c odyssey2.c osi.c pc8801.c pce.c pcw.c pcw16.c pet.c pmd85.c primo.c psx.c saturn.c sg1000.c sms.c sord.c ssystem3.c studio2.c svision.c sym1.c ti85.c tm990189.c tmc600.c trs80.c tx0.c vectrex.c vip.c x68k.c zx.c
[src/mess/formats]a26_cas.c ap_dsk35.c apf_apt.c csw_cas.c fmsx_cas.c lviv_lvt.c mz_cas.c oric_tap.c pmd_pmd.c primoptp.c sord_cas.c svi_cas.c thom_cas.c thom_dsk.c tzx_cas.c uef_cas.c vt_cas.c wavfile.c zx81_p.c
[src/mess/includes]msx_slot.h
[src/mess/machine]74145.c 8530scc.c 99_dsk.c 99_ide.c 99_peb.c adam.c advision.c aim65.c apple2.c atarifdc.c atom.c bbc.c c128.c c64.c cbmb.c cgenie.c coco.c compis.c concept.c cpm_bios.c dgn_beta.c electron.c gamecom.c gb.c hd63450.c intv.c lisa.c lviv.c mbee.c mc6850.c msx_slot.c mz700.c nes.c nes_mmc.c oric.c osi.c pc8801.c pc_fdc.c pmd85.c pokemini.c primo.c rp5c15.c sgi.c sms.c sym1.c ti99_4x.c uart8250.c vc1541.c vc20tape.c wswan.c
[src/mess/osd/windows]menu.c
[src/mess/osd/winui]layoutms.c
[src/mess/tools/dat2html]dat2html.c
[src/mess/tools/imgtool]iflopimg.c imghd.c imgtool.c stubs.c
[src/mess/tools/imgtool/modules]cybiko.c fat.c pc_hard.c rsdos.c thomson.c ti99.c ti990hd.c vzdos.c
[src/mess/tools/messtest]tststubs.c
[src/mess/video]733_asr.c a7800.c aim65.c amstrad.c astrocde.c avigo.c bbc.c dgn_beta.c electron.c gamecom.c gb.c i82720.c m6847.c newport.c odyssey2.c pc1403.c pc8801.c pc_aga.c pc_cga.c pcw16.c saa5050.c spectrum.c thomson.c vtech1.c wswan.c x68k.c zx.c
[src/osd/winui]columnedit.c datafile.c dialogs.c mkhelp.c mui_audit.c mui_opts.c properties.c splitters.c treeview.c winui.c

src/osd/winui/columnedit.c
r1432r1433
3333#include "winui.h"
3434
3535// Returns TRUE if successful
36int DoExchangeItem(HWND hFrom, HWND hTo, int nMinItem)
36static int DoExchangeItem(HWND hFrom, HWND hTo, int nMinItem)
3737{
3838   LV_ITEM lvi;
3939   TCHAR   buf[80];
r1432r1433
6969   return FALSE;
7070}
7171
72void DoMoveItem( HWND hWnd, BOOL bDown)
72static void DoMoveItem( HWND hWnd, BOOL bDown)
7373{
7474   LV_ITEM lvi;
7575   TCHAR   buf[80];
src/osd/winui/datafile.c
r1432r1433
5757 ****************************************************************************/
5858#define DATAFILE_TAG '$'
5959
60const char *DATAFILE_TAG_KEY = "$info";
61const char *DATAFILE_TAG_BIO = "$bio";
62const char *DATAFILE_TAG_MAME = "$mame";
60static const char *DATAFILE_TAG_KEY = "$info";
61static const char *DATAFILE_TAG_BIO = "$bio";
62static const char *DATAFILE_TAG_MAME = "$mame";
6363
6464const char *history_filename = NULL;
6565const char *mameinfo_filename = NULL;
src/osd/winui/mui_audit.c
r1432r1433
6363#define SAMPLES_NOT_USED    3
6464#define MAX_AUDITBOX_TEXT   0x7FFFFFFE
6565
66HWND hAudit;
66static HWND hAudit;
6767static int rom_index;
6868static int roms_correct;
6969static int roms_incorrect;
src/osd/winui/splitters.c
r1432r1433
8686
8787
8888/* Called with hWnd = Parent Window */
89void CalcSplitter(HWND hWnd, LPHZSPLITTER lpSplitter)
89static void CalcSplitter(HWND hWnd, LPHZSPLITTER lpSplitter)
9090{
9191   POINT   p = {0,0};
9292   RECT   leftRect, rightRect;
r1432r1433
226226   numSplitters++;
227227}
228228
229void OnInvertTracker(HWND hWnd, const RECT *rect)
229static void OnInvertTracker(HWND hWnd, const RECT *rect)
230230{
231231   HDC    hDC = GetDC(hWnd);
232232   HBRUSH   hBrush = CreateSolidBrush(RGB(0xFF, 0xFF, 0xFF));
r1432r1433
241241   DeleteObject(hBrush);
242242}
243243
244void StartTracking(HWND hWnd, UINT hitArea)
244static void StartTracking(HWND hWnd, UINT hitArea)
245245{
246246   if (!bTracking && lpCurSpltr != 0 && hitArea == SPLITTER_HITITEM)
247247   {
r1432r1433
257257   }
258258}
259259
260void StopTracking(HWND hWnd)
260static void StopTracking(HWND hWnd)
261261{
262262   if (bTracking)
263263   {
r1432r1433
277277   }
278278}
279279
280UINT SplitterHitTest(HWND hWnd, POINTS p)
280static UINT SplitterHitTest(HWND hWnd, POINTS p)
281281{
282282   RECT  rect;
283283   POINT pt;
src/osd/winui/mui_opts.c
r1432r1433
405405// Screen shot Page tab control text
406406// these must match the order of the options flags in options.h
407407// (TAB_...)
408const char* image_tabs_long_name[MAX_TAB_TYPES] =
408static const char* image_tabs_long_name[MAX_TAB_TYPES] =
409409{
410410   "Snapshot ",
411411   "Flyer ",
r1432r1433
417417   "History ",
418418};
419419
420const char* image_tabs_short_name[MAX_TAB_TYPES] =
420static const char* image_tabs_short_name[MAX_TAB_TYPES] =
421421{
422422   "snapshot",
423423   "flyer",
src/osd/winui/mkhelp.c
r1432r1433
2525#include "osdcore.h"
2626
2727
28int compare( const void *arg1, const void *arg2 );
29void extract_help_ids(const char *buffer, FILE *fp);
28static int compare( const void *arg1, const void *arg2 );
29static void extract_help_ids(const char *buffer, FILE *fp);
3030
3131/*-------------------------------------------------
3232    main - primary entry point
r1432r1433
101101   return 0;
102102}
103103
104int compare( const void *arg1, const void *arg2 )
104static int compare( const void *arg1, const void *arg2 )
105105{
106106   /* Compare all of both strings: */
107107   return _stricmp( * ( char** ) arg1, * ( char** ) arg2 );
108108}
109109
110void extract_help_ids(const char *buffer, FILE *fp)
110static void extract_help_ids(const char *buffer, FILE *fp)
111111{
112112   const char *ptr = buffer;
113113   char **help_ids = malloc(500 * sizeof(char *));
src/osd/winui/dialogs.c
r1432r1433
6262#define NUM_EXCLUSIONS  10
6363
6464/* Pairs of filters that exclude each other */
65DWORD filterExclusion[NUM_EXCLUSIONS] =
65static DWORD filterExclusion[NUM_EXCLUSIONS] =
6666{
6767   IDC_FILTER_CLONES,      IDC_FILTER_ORIGINALS,
6868   IDC_FILTER_NONWORKING,  IDC_FILTER_WORKING,
src/osd/winui/treeview.c
r1432r1433
111111
112112/* this only has an entry for each TOP LEVEL extra folder + SubFolders*/
113113LPEXFOLDERDATA      ExtraFolderData[MAX_EXTRA_FOLDERS * MAX_EXTRA_SUBFOLDERS];
114int                 numExtraFolders = 0;
114static int                 numExtraFolders = 0;
115115static int          numExtraIcons = 0;
116116static char         *ExtraFolderIcons[MAX_EXTRA_FOLDERS];
117117
r1432r1433
230230   SetWindowLongPtr(GetTreeView(), GWLP_WNDPROC, (LONG_PTR)TreeWndProc);
231231}
232232
233#ifdef UNUSED_FUNCTION
233234void DestroyTree(HWND hWnd)
234235{
235236    if ( hTreeSmall )
r1432r1433
238239        hTreeSmall = NULL;
239240    }
240241}
242#endif
241243
242244void SetCurrentFolder(LPTREEFOLDER lpFolder)
243245{
r1432r1433
21572159   *num_folders = numFolders;
21582160}
21592161
2160BOOL TryRenameCustomFolderIni(LPTREEFOLDER lpFolder,const char *old_name,const char *new_name)
2162static BOOL TryRenameCustomFolderIni(LPTREEFOLDER lpFolder,const char *old_name,const char *new_name)
21612163{
21622164   char filename[MAX_PATH];
21632165   char new_filename[MAX_PATH];
src/osd/winui/winui.c
r1432r1433
216216#define DBU_MIN_WIDTH  292
217217#define DBU_MIN_HEIGHT 190
218218
219int MIN_WIDTH  = DBU_MIN_WIDTH;
220int MIN_HEIGHT = DBU_MIN_HEIGHT;
219static int MIN_WIDTH  = DBU_MIN_WIDTH;
220static int MIN_HEIGHT = DBU_MIN_HEIGHT;
221221
222222/* Max number of bkground picture files */
223223#define MAX_BGFILES 100
r1432r1433
349349static void             UpdateHistory(void);
350350
351351
352void RemoveCurrentGameCustomFolder(void);
353void RemoveGameCustomFolder(int driver_index);
352static void RemoveCurrentGameCustomFolder(void);
353static void RemoveGameCustomFolder(int driver_index);
354354
355void BeginListViewDrag(NM_LISTVIEW *pnmv);
356void MouseMoveListViewDrag(POINTS pt);
357void ButtonUpListViewDrag(POINTS p);
355static void BeginListViewDrag(NM_LISTVIEW *pnmv);
356static void MouseMoveListViewDrag(POINTS pt);
357static void ButtonUpListViewDrag(POINTS p);
358358
359void CalculateBestScreenShotRect(HWND hWnd, RECT *pRect, BOOL restrict_height);
359static void CalculateBestScreenShotRect(HWND hWnd, RECT *pRect, BOOL restrict_height);
360360
361361BOOL MouseHasBeenMoved(void);
362void SwitchFullScreenMode(void);
362static void SwitchFullScreenMode(void);
363363
364364/***************************************************************************
365365    External variables
r1432r1433
795795static BOOL use_gui_romloading = FALSE;
796796
797797static BOOL g_listview_dragging = FALSE;
798HIMAGELIST himl_drag;
799int game_dragged; /* which game started the drag */
800HTREEITEM prev_drag_drop_target; /* which tree view item we're currently highlighting */
798static HIMAGELIST himl_drag;
799static int game_dragged; /* which game started the drag */
800static HTREEITEM prev_drag_drop_target; /* which tree view item we're currently highlighting */
801801
802802static BOOL g_in_treeview_edit = FALSE;
803803
r1432r1433
10471047 *          March '00- Seriously butchered from MSDN for mine own
10481048 *          purposes, sayeth H0ek.
10491049 */
1050HICON FormatICOInMemoryToHICON(PBYTE ptrBuffer, UINT nBufferSize)
1050static HICON FormatICOInMemoryToHICON(PBYTE ptrBuffer, UINT nBufferSize)
10511051{
10521052   ICONIMAGE           IconImage;
10531053   LPICONDIRENTRY      lpIDE = NULL;
r1432r1433
16461646   free(buf);
16471647}
16481648
1649void SetMainTitle(void)
1649static void SetMainTitle(void)
16501650{
16511651   char version[50];
16521652   char buffer[100];
r1432r1433
46924692   Picker_SetSelectedItem(hwndList, driver_index);
46934693}
46944694
4695int GamePicker_GetItemImage(HWND hwndPicker, int nItem)
4695static int GamePicker_GetItemImage(HWND hwndPicker, int nItem)
46964696{
46974697   return GetIconForDriver(nItem);
46984698}
46994699
4700const TCHAR *GamePicker_GetItemString(HWND hwndPicker, int nItem, int nColumn,
4700static const TCHAR *GamePicker_GetItemString(HWND hwndPicker, int nItem, int nColumn,
47014701   TCHAR *pszBuffer, UINT nBufferLength)
47024702{
47034703   const TCHAR *s = NULL;
r1432r1433
64576457   return CallWindowProc(g_lpPictureWndProc, hWnd, uMsg, wParam, lParam);
64586458}
64596459
6460void RemoveCurrentGameCustomFolder(void)
6460static void RemoveCurrentGameCustomFolder(void)
64616461{
64626462    RemoveGameCustomFolder(Picker_GetSelectedItem(hwndList));
64636463}
64646464
6465void RemoveGameCustomFolder(int driver_index)
6465static void RemoveGameCustomFolder(int driver_index)
64666466{
64676467    int i;
64686468   TREEFOLDER **folders;
r1432r1433
64996499}
65006500
65016501
6502void BeginListViewDrag(NM_LISTVIEW *pnmv)
6502static void BeginListViewDrag(NM_LISTVIEW *pnmv)
65036503{
65046504    LV_ITEM lvi;
65056505   POINT pt;
r1432r1433
65346534
65356535}
65366536
6537void MouseMoveListViewDrag(POINTS p)
6537static void MouseMoveListViewDrag(POINTS p)
65386538{
65396539   HTREEITEM htiTarget;
65406540   TV_HITTESTINFO tvht;
r1432r1433
65656565   }
65666566}
65676567
6568void ButtonUpListViewDrag(POINTS p)
6568static void ButtonUpListViewDrag(POINTS p)
65696569{
65706570    POINT pt;
65716571    HTREEITEM htiTarget;
r1432r1433
66766676                      ListView_GetTopIndex(hwndList)+ ListView_GetCountPerPage(hwndList) );
66776677}
66786678
6679void CalculateBestScreenShotRect(HWND hWnd, RECT *pRect, BOOL restrict_height)
6679static void CalculateBestScreenShotRect(HWND hWnd, RECT *pRect, BOOL restrict_height)
66806680{
66816681   int    destX, destY;
66826682   int    destW, destH;
r1432r1433
68236823  knew to remove the menu dynamically.
68246824*/
68256825
6826void SwitchFullScreenMode(void)
6826static void SwitchFullScreenMode(void)
68276827{
68286828   LONG lMainStyle;
68296829   
src/osd/winui/properties.c
r1432r1433
210210#endif
211211
212212static void UpdateBackgroundBrush(HWND hwndTab);
213HBRUSH hBkBrush;
213static HBRUSH hBkBrush;
214214
215215/**************************************************************
216216 * Local private variables
r1432r1433
233233/* Property sheets */
234234
235235#define HIGHLIGHT_COLOR RGB(0,196,0)
236HBRUSH highlight_brush = NULL;
237HBRUSH background_brush = NULL;
236static HBRUSH highlight_brush = NULL;
237static HBRUSH background_brush = NULL;
238238#define VECTOR_COLOR RGB( 190, 0, 0) //DARK RED
239239#define FOLDER_COLOR RGB( 0, 128, 0 ) // DARK GREEN
240240#define PARENT_COLOR RGB( 190, 128, 192 ) // PURPLE
src/mess/utils.c
r1432r1433
226226   an extension list
227227-------------------------------------------------*/
228228
229int internal_find_extension(const char *extension_list, const char *target_extension)
229static int internal_find_extension(const char *extension_list, const char *target_extension)
230230{
231231   /* this version allows target_extension to be delimited with a comma */
232232   int pos = 0;
src/mess/devices/mfmdisk.c
r1432r1433
3838#define mfm_disk_header_size   0x0100
3939
4040/* size of a double density track in this image */
41const int TrackSizeMFMLo = 0x01900;
41static const int TrackSizeMFMLo = 0x01900;
4242
4343/* number of disk images that this code can handle at one time */
4444#define MAX_MFM_DISK   4
src/mess/devices/chd_cd.c
r1432r1433
9393 *
9494 *************************************/
9595
96int device_init_mess_cd(mess_image *image)
96static int device_init_mess_cd(mess_image *image)
9797{
9898   struct mess_cd *cd;
9999
r1432r1433
149149
150150
151151
152int device_load_mess_cd(mess_image *image)
152static int device_load_mess_cd(mess_image *image)
153153{
154154   return internal_load_mess_cd(image, NULL);
155155}
r1432r1433
164164 *
165165 *************************************/
166166
167void device_unload_mess_cd(mess_image *image)
167static void device_unload_mess_cd(mess_image *image)
168168{
169169   struct mess_cd *cd = get_drive(image);
170170   assert(cd->cdrom_handle);
src/mess/uimess.c
r1432r1433
1212#include "uimess.h"
1313#include "input.h"
1414
15int mess_pause_for_ui = 0;
15//int mess_pause_for_ui = 0;
1616static int ui_active = 0;
1717
1818int mess_ui_active(void)
src/mess/tools/dat2html/dat2html.c
r1432r1433
1616#include "osdmess.h"
1717#include "utils.h"
1818
19void replace_lt_gt(char *line)
19static void replace_lt_gt(char *line)
2020{
2121   char buff[1024] = "", *src = line, *dst = buff;
2222
r1432r1433
3838   strcpy(line, buff);
3939}
4040
41void a_href_url(char *line)
41static void a_href_url(char *line)
4242{
4343   char buff[1024], c;
4444   char *url_beg = strstr(line, "http://"), *url_end;
src/mess/tools/messtest/tststubs.c
r1432r1433
1010#include "debug/debugcpu.h"
1111#endif /* MAME_DEBUG */
1212
13#ifdef UNUSED_FUNCTION
1314int osd_create_display(const osd_create_params *params, UINT32 *rgb_components)
1415{
1516   rgb_components[0] = 0xff0000;
r1432r1433
3132{
3233   return NULL;
3334}
35#endif
3436
3537void osd_set_mastervolume(int attenuation)
3638{
3739}
3840
41#ifdef UNUSED_FUNCTION
3942int osd_get_mastervolume(void)
4043{
4144   return 0;
r1432r1433
9497void osd_trak_read(int player, int *deltax, int *deltay)
9598{
9699}
100#endif
97101
98102void osd_customize_inputport_list(input_port_default_entry *defaults)
99103{
100104}
101105
106#ifdef UNUSED_FUNCTION
102107void osd_logerror(const char *text)
103108{
104109}
110#endif
105111
106112int osd_keyboard_disabled(void)
107113{
108114   return 0;
109115}
110116
117#ifdef UNUSED_FUNCTION
111118void osd_begin_final_unloading(void)
112119{
113120}
r1432r1433
115122void osd_image_load_status_changed(mess_image *img, int is_final_unload)
116123{
117124}
125#endif
118126
119127#ifdef MAME_DEBUG
120128void osd_wait_for_debugger(void)
r1432r1433
123131}
124132#endif // MAME_DEBUG
125133
134#ifdef UNUSED_FUNCTION
126135int win_mess_config_init(void)
127136{
128137   return 0;
129138}
139#endif
130140
131141void osd_break_into_debugger(const char *message)
132142{
133143}
134144
145#ifdef UNUSED_FUNCTION
135146void win_mess_options_init(void)
136147{
137148}
149#endif
138150
139151//============================================================
140152//   osd_alloc_executable
r1432r1433
191203}
192204
193205
206#ifdef UNUSED_FUNCTION
194207void osd_mess_config_init(running_machine *machine)
195208{
196209}
210#endif
src/mess/tools/imgtool/stubs.c
r1432r1433
77
88const game_driver *const drivers[1];
99int rompath_extra;
10int cheatfile;
11const char *db_filename;
10//int cheatfile;
11//const char *db_filename;
1212int history_filename;
1313int mameinfo_filename;
1414
src/mess/tools/imgtool/iflopimg.c
r1432r1433
200200
201201
202202
203imgtoolerr_t imgtool_floppy_get_sector_size(imgtool_image *image, UINT32 track, UINT32 head, UINT32 sector, UINT32 *sector_size)
203static imgtoolerr_t imgtool_floppy_get_sector_size(imgtool_image *image, UINT32 track, UINT32 head, UINT32 sector, UINT32 *sector_size)
204204{
205205   floperr_t ferr;
206206
r1432r1433
213213
214214
215215
216imgtoolerr_t imgtool_floppy_read_sector(imgtool_image *image, UINT32 track, UINT32 head, UINT32 sector, void *buffer, size_t len)
216static imgtoolerr_t imgtool_floppy_read_sector(imgtool_image *image, UINT32 track, UINT32 head, UINT32 sector, void *buffer, size_t len)
217217{
218218   floperr_t ferr;
219219
r1432r1433
226226
227227
228228
229imgtoolerr_t imgtool_floppy_write_sector(imgtool_image *image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len)
229static imgtoolerr_t imgtool_floppy_write_sector(imgtool_image *image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len)
230230{
231231   floperr_t ferr;
232232
src/mess/tools/imgtool/imgtool.c
r1432r1433
8282    GLOBALS
8383***************************************************************************/
8484
85imgtool_library *global_imgtool_library;
85static imgtool_library *global_imgtool_library;
8686
8787static int global_omit_untested;
8888static void (*global_warn)(const char *message);
src/mess/tools/imgtool/modules/ti99.c
r1432r1433
38603860   dsk_createopts_density = 'F'
38613861};
38623862
3863OPTION_GUIDE_START( dsk_create_optionguide )
3863static OPTION_GUIDE_START( dsk_create_optionguide )
38643864   OPTION_STRING(dsk_createopts_volname, "label",   "Volume name" )
38653865   OPTION_INT(dsk_createopts_sides, "sides", "Sides" )
38663866   OPTION_INT(dsk_createopts_tracks, "tracks", "Tracks" )
src/mess/tools/imgtool/modules/pc_hard.c
r1432r1433
5353
5454#define FAT_SECLEN   512
5555
56OPTION_GUIDE_START( pc_chd_create_optionguide )
56static OPTION_GUIDE_START( pc_chd_create_optionguide )
5757   OPTION_INT('T', "cylinders",   "Cylinders" )
5858   OPTION_INT('H', "heads",      "Heads" )
5959   OPTION_INT('S', "sectors",      "Sectors" )
src/mess/tools/imgtool/modules/cybiko.c
r1432r1433
539539   return IMGTOOLERR_SUCCESS;
540540}
541541
542OPTION_GUIDE_START( cybiko_image_createimage_optguide )
542static OPTION_GUIDE_START( cybiko_image_createimage_optguide )
543543   OPTION_ENUM_START( 'F', "flash", "Flash Type" )
544544      OPTION_ENUM( 0, "AT45DB041", "AT45DB041 (528 KByte)" )
545545      OPTION_ENUM( 1, "AT45DB081", "AT45DB081 (1056 KByte)" )
src/mess/tools/imgtool/modules/thomson.c
r1432r1433
15231523
15241524/************************* driver ***************************/
15251525
1526OPTION_GUIDE_START( thom_createimage_optguide )
1526static OPTION_GUIDE_START( thom_createimage_optguide )
15271527  OPTION_INT( 'H', "heads", "Heads" )
15281528  OPTION_INT( 'T', "tracks", "Tracks" )
15291529  OPTION_ENUM_START( 'D', "density", "Density" )
r1432r1433
15331533  OPTION_STRING( 'N', "name", "Floppy name" )
15341534OPTION_GUIDE_END
15351535
1536OPTION_GUIDE_START( thom_writefile_optguide )
1536static OPTION_GUIDE_START( thom_writefile_optguide )
15371537  OPTION_ENUM_START( 'T', "ftype", "File type" )
15381538    OPTION_ENUM( 0, "auto", "Automatic (by extension)" )
15391539    OPTION_ENUM( 1, "B", "Program" )
src/mess/tools/imgtool/modules/ti990hd.c
r1432r1433
409409   ti990_createopts_sectorsize = 'E'
410410};
411411
412OPTION_GUIDE_START( ti990_create_optionguide )
412static OPTION_GUIDE_START( ti990_create_optionguide )
413413   /*OPTION_STRING(ti990_createopts_volname, "label",   "Volume name" )*/
414414   OPTION_INT(ti990_createopts_cylinders, "cylinders", "Cylinders" )
415415   OPTION_INT(ti990_createopts_heads, "heads", "Heads" )
src/mess/tools/imgtool/modules/vzdos.c
r1432r1433
907907   Imgtool module declaration
908908*********************************************************************/
909909
910OPTION_GUIDE_START(vzdos_writefile_optionguide)
910static OPTION_GUIDE_START(vzdos_writefile_optionguide)
911911   OPTION_ENUM_START( 'T', "ftype",  "File type" )
912912      OPTION_ENUM(     0, "basic",  "Basic"  )
913913      OPTION_ENUM(     1, "binary", "Binary" )
src/mess/tools/imgtool/modules/fat.c
r1432r1433
449449
450450
451451
452imgtoolerr_t fat_partition_create(imgtool_image *image, UINT64 first_block, UINT64 block_count)
452static imgtoolerr_t fat_partition_create(imgtool_image *image, UINT64 first_block, UINT64 block_count)
453453{
454454   imgtoolerr_t err;
455455   UINT32 heads, tracks, sectors_per_track;
src/mess/tools/imgtool/modules/rsdos.c
r1432r1433
579579   Imgtool module declaration
580580*********************************************************************/
581581
582OPTION_GUIDE_START( coco_rsdos_writefile_optionguide )
582static OPTION_GUIDE_START( coco_rsdos_writefile_optionguide )
583583   OPTION_ENUM_START(   RSDOS_OPTIONS_FTYPE, "ftype", "File type" )
584584      OPTION_ENUM(   0,      "basic",      "Basic" )
585585      OPTION_ENUM(   1,      "data",         "Data" )
src/mess/tools/imgtool/imghd.c
r1432r1433
243243   mess_hd_createopts_seclen    = 'F'
244244};
245245
246OPTION_GUIDE_START( mess_hd_create_optionguide )
246static OPTION_GUIDE_START( mess_hd_create_optionguide )
247247   OPTION_INT(mess_hd_createopts_blocksize, "blocksize", "Sectors Per Block" )
248248   OPTION_INT(mess_hd_createopts_cylinders, "cylinders", "Cylinders" )
249249   OPTION_INT(mess_hd_createopts_heads, "heads",   "Heads" )
src/mess/audio/wswan.c
r1432r1433
4848   UINT8   master_volume;      /* Master volume */
4949};
5050
51struct SND snd;
51static struct SND snd;
5252
53void wswan_ch_set_freq( struct CHAN *ch, UINT16 freq ) {
53static void wswan_ch_set_freq( struct CHAN *ch, UINT16 freq ) {
5454   ch->freq = freq;
5555   ch->period = Machine->sample_rate / ( 3072000  / ( ( 2048 - freq ) << 5 ) );
5656}
src/mess/audio/vc4000.c
r1432r1433
6767/* Sound handler start              */
6868/************************************/
6969
70void *vc4000_custom_start(int clock, const struct CustomSound_interface *config)
70static void *vc4000_custom_start(int clock, const struct CustomSound_interface *config)
7171{
7272    vc4000_sound.channel = stream_create(0, 1, Machine->sample_rate, 0, vc4000_update);
7373    return (void *) ~0;
src/mess/audio/channelf.c
r1432r1433
1111static int envelope;
1212static UINT32 sample_counter = 0;
1313
14const int max_amplitude = 0x7fff;
14static const int max_amplitude = 0x7fff;
1515
1616void channelf_sound_w(int mode)
1717{
src/mess/audio/arcadia.c
r1432r1433
7171/* Sound handler start              */
7272/************************************/
7373
74void *arcadia_custom_start(int clock, const struct CustomSound_interface *config)
74static void *arcadia_custom_start(int clock, const struct CustomSound_interface *config)
7575{
7676    arcadia_sound.channel = stream_create(0, 1, Machine->sample_rate, 0, arcadia_update);
7777    return (void *) ~0;
src/mess/audio/gb.c
r1432r1433
182182   }
183183}
184184
185void gb_sound_w_internal(int offset, UINT8 data ) {
185static void gb_sound_w_internal(int offset, UINT8 data ) {
186186   /* Store the value */
187187   snd_regs[offset] = data;
188188
src/mess/audio/osi.c
r1432r1433
11#include "driver.h"
22#include "sound/discrete.h"
33
4const discrete_dac_r1_ladder sb2m600_dac =
4static const discrete_dac_r1_ladder sb2m600_dac =
55{
66   4,         // size of ladder
77   {180, 180, 180, 180, 0, 0, 0, 0},   // R68, R69, R70, R71
src/mess/includes/msx_slot.h
r1432r1433
1414} msx_slot_layout;
1515
1616#define MSX_LAYOUT_INIT(msx) \
17msx_slot_layout msx_slot_layout_##msx[] = {
17static const msx_slot_layout msx_slot_layout_##msx[] = {
1818
1919#define MSX_LAYOUT_SLOT(prim, sec, page, extend, type, size, option) \
2020   {                        \
r1432r1433
220220
221221typedef struct {
222222   char name[9];
223   msx_slot_layout *layout;
223   const msx_slot_layout *layout;
224224} msx_driver_struct;
225225
226226extern const msx_driver_struct msx_driver_list[];
src/mess/video/wswan.c
r1432r1433
4848   }
4949}
5050
51void wswan_setup_palettes(void) {
51static void wswan_setup_palettes(void) {
5252   int i,j;
5353
5454   if ( vdp.color_mode ) {
r1432r1433
6767   }
6868}
6969
70void wswan_draw_background(void) {
70static void wswan_draw_background(void) {
7171   UINT16   map_addr;
7272   UINT8   start_column;
7373   int   column;
r1432r1433
157157   }
158158}
159159
160void wswan_draw_foreground_0( void ) {
160static void wswan_draw_foreground_0( void ) {
161161   UINT16   map_addr;
162162   UINT8   start_column;
163163   int   column;
r1432r1433
244244   }
245245}
246246
247void wswan_draw_foreground_2( void ) {
247static void wswan_draw_foreground_2( void ) {
248248   UINT16   map_addr;
249249   UINT8   start_column;
250250   int   column;
r1432r1433
331331   }
332332}
333333
334void wswan_draw_foreground_3( void ) {
334static void wswan_draw_foreground_3( void ) {
335335   UINT16   map_addr;
336336   UINT8   start_column;
337337   int   column;
r1432r1433
418418   }
419419}
420420
421void wswan_handle_sprites( int mask ) {
421static void wswan_handle_sprites( int mask ) {
422422   int   i;
423423   if ( vdp.sprite_count == 0 )
424424      return;
src/mess/video/zx.c
r1432r1433
2323#include "sound/dac.h"
2424
2525emu_timer *ula_nmi = NULL;
26emu_timer *ula_irq = NULL;
26//emu_timer *ula_irq = NULL;
2727int ula_nmi_active, ula_irq_active;
2828int ula_frame_vsync = 0;
2929int ula_scancode_count = 0;
3030int ula_scanline_count = 0;
31int old_x = 0;
32int old_y = 0;
33int old_c = 0;
31static int old_x = 0;
32static int old_y = 0;
33static int old_c = 0;
3434
3535/*
3636 * Toggle the video output between black and white.
src/mess/video/dgn_beta.c
r1432r1433
363363/**************************/
364364
365365/* Plot a pixel on beta text screen, takes care of doubling height and width where needed */
366void plot_text_pixel(int x, int y,int Dot,int Colour, int CharsPerLine, mame_bitmap *bitmap)
366static void plot_text_pixel(int x, int y,int Dot,int Colour, int CharsPerLine, mame_bitmap *bitmap)
367367{
368368   int PlotX;
369369   int PlotY;
r1432r1433
500500
501501/* Plot a pixel on the graphics screen, similar to character plotter above */
502502/* May merge at some point in the future, if they turn out to be sufficiently similar ! */
503void plot_gfx_pixel(int x, int y, int Dot, int Colour, mame_bitmap *bitmap)
503static void plot_gfx_pixel(int x, int y, int Dot, int Colour, mame_bitmap *bitmap)
504504{
505505   int   DoubleX      = (~GCtrl & GCtrlHiLo) ? 1 : 0;
506506   int   DoubleY      = (~m6845_get_register(INTERLACE) & 0x03) ? 1 : 0;
src/mess/video/i82720.c
r1432r1433
333333   return (nbr >> 1) | (nbr << 15);
334334}
335335
336UINT32 gdc_get_base_addr(TYP_GDC* gdcp)
336static UINT32 gdc_get_base_addr(TYP_GDC* gdcp)
337337{ 
338338  int i;
339339  UINT32 ret_val = 0;
r1432r1433
349349}
350350
351351
352UINT32 gdc_partition_length(TYP_GDC* gdcp)
352static UINT32 gdc_partition_length(TYP_GDC* gdcp)
353353{ 
354354   /* Get a byte and put it into a temp */
355355   UINT32 pram_byte_low = gdcp->pram[2] >> 4;
r1432r1433
358358}
359359
360360/* Address here is from the top of the screen */
361void gdc_plot_word(UINT32 address, UINT16 writeWord)
361static void gdc_plot_word(UINT32 address, UINT16 writeWord)
362362{
363363   TYP_GDC_REGS_DISPLAY* dispregs = &gdc.registers.display;
364364   UINT32 x;
r1432r1433
389389}
390390
391391
392void gdc_write_data(UINT16 data,
392static void gdc_write_data(UINT16 data,
393393                    UINT16 mask,
394394                    UINT8 operation)
395395{
r1432r1433
421421      address, base_addr); */
422422}
423423
424void gdc_update_ead_and_mask(void)
424static void gdc_update_ead_and_mask(void)
425425{
426426   UINT32 maxAddr = gdc.registers.display.words_per_line *
427427                    gdc.registers.display.lines_per_field;
r1432r1433
451451}
452452
453453
454void gdc_auto_write_data(UINT16 data,
454static void gdc_auto_write_data(UINT16 data,
455455                         UINT8  operation)
456456{
457457   gdc_write_data(data, gdc.registers.display.mask, operation);
r1432r1433
460460   gdc_update_ead_and_mask();
461461}
462462
463UINT16 gdc_read_data(UINT16 mask)
463static UINT16 gdc_read_data(UINT16 mask)
464464{
465465   /* Save address */
466466   UINT32 address = gdc.registers.display.ead;
r1432r1433
468468   return gdc_mess.vram[address & gdc_mess.vramsize] & mask;
469469}
470470
471UINT16 gdc_auto_read_data(void)
471static UINT16 gdc_auto_read_data(void)
472472{
473473   UINT16 ret_val = gdc_read_data(gdc.registers.display.mask);   
474474   /* Update the ead and mask */
r1432r1433
515515/* Name: gdc_cmd_sync                                                      */
516516/* Desc: CMD - Sync                                                        */
517517/*-------------------------------------------------------------------------*/
518void gdc_cmd_sync(void)
518static void gdc_cmd_sync(void)
519519{
520520   UINT16 reg16;
521521   UINT8 reg;
r1432r1433
893893            temp_reg &= 0xff;
894894            break;
895895         case 0x18:
896            /* FIXME: Bör bara använda en byte i detta fallet */
896            /* FIXME: Bor bara anvanda en byte i detta fallet */
897897            /* FIXME: Save the mask */
898898            gdc.registers.display.mask &= 0xff00;
899899            temp_reg = ( (temp_reg  & 0xff ) << 8);
r1432r1433
10161016/*       The command bytes are decoded, and the succeeding parameters are  */
10171017/*       distributed to their proper destinations within the GDC.          */
10181018/*-------------------------------------------------------------------------*/
1019void gdc_command_processor(UINT8 command)
1019static void gdc_command_processor(UINT8 command)
10201020{
10211021   switch(command)
10221022   {
r1432r1433
11811181/* Param: command - the command                                            */
11821182/* Return: Number of expected parameter bytes for the command.             */
11831183/*-------------------------------------------------------------------------*/
1184int gdc_nbr_expected_params(UINT8 command)
1184static int gdc_nbr_expected_params(UINT8 command)
11851185{
11861186   switch(command)
11871187   {
r1432r1433
13671367/* Name: compis_gdc_reset                                                  */
13681368/* Desc: GDC - Reset                                                       */
13691369/*-------------------------------------------------------------------------*/
1370#ifdef UNUSED_FUNCTION
13701371void compis_gdc_reset(void)
13711372{
13721373   gdc_fifo_reset(&gdc);
13731374
13741375}
1376#endif
13751377
13761378/*
13771379*  MESS Stuff
src/mess/video/gb.c
r1432r1433
4242#define _NR_GB_VID_REGS      0x40
4343
4444static UINT8 bg_zbuf[160];
45UINT8 gb_vid_regs[_NR_GB_VID_REGS];
45static UINT8 gb_vid_regs[_NR_GB_VID_REGS];
4646static UINT16 cgb_bpal[32];   /* CGB current background palette table */
4747static UINT16 cgb_spal[32];   /* CGB current background palette table */
4848UINT16 sgb_pal[128];   /* SGB palette remapping */
r1432r1433
5252UINT8 *gb_oam = NULL;
5353UINT8 *gb_vram;
5454static UINT8 *gb_vram_ptr;
55int gbc_hdma_enabled;
55static int gbc_hdma_enabled;
5656static UINT8   *gb_chrgen;   /* Character generator           */
5757static UINT8   *gb_bgdtab;   /* Background character table    */
5858static UINT8   *gb_wndtab;   /* Window character table        */
r1432r1433
9595   emu_timer   *lcd_timer;
9696} gb_lcd;
9797
98void (*update_scanline)(void);
98static void (*update_scanline)(void);
9999
100100/* Prototypes */
101101static TIMER_CALLBACK(gb_lcd_timer_proc);
r1432r1433
14511451}
14521452
14531453/* Ignore write when LCD is on and STAT is 02 or 03 */
1454int gb_video_oam_locked( void ) {
1454static int gb_video_oam_locked( void ) {
14551455   gb_video_up_to_date();
14561456   if ( ( LCDCONT & 0x80 ) && ( LCDSTAT & 0x02 ) ) {
14571457      return 1;
r1432r1433
14791479   gb_vram_ptr[offset] = data;
14801480}
14811481
1482#ifdef UNUSED_FUNCTION
14821483READ8_HANDLER( gb_oam_r ) {
14831484   return gb_video_oam_locked() ? 0xFF : gb_oam[offset];
14841485}
1486#endif
14851487
14861488WRITE8_HANDLER( gb_oam_w ) {
14871489   if ( gb_video_oam_locked() || offset >= 0xa0 ) {
src/mess/video/newport.c
r1432r1433
208208   return 0;
209209}
210210
211UINT16 nCMAP0_PaletteIndex;
212UINT32 nCMAP0_Palette[0x10000];
211static UINT16 nCMAP0_PaletteIndex;
212static UINT32 nCMAP0_Palette[0x10000];
213213
214214static WRITE32_HANDLER( newport_cmap0_w )
215215{
src/mess/video/pcw16.c
r1432r1433
66int pcw16_video_control;
77
88/* 16 colours, + 1 for border */
9unsigned short pcw16_colour_table[PCW16_NUM_COLOURS] =
9static unsigned short pcw16_colour_table[PCW16_NUM_COLOURS] =
1010{
1111   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1212   16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
src/mess/video/gamecom.c
r1432r1433
44
55#define Y_PIXELS 200
66
7int scanline;
8unsigned int base_address;
7static int scanline;
8static unsigned int base_address;
99
10#ifdef UNUSED_FUNCTION
1011void gamecom_video_init( void ) {
1112   scanline = 0;
1213}
14#endif
1315
1416INTERRUPT_GEN( gamecom_scanline ) {
1517   // draw line
src/mess/video/aim65.c
r1432r1433
1616static int flag_a;
1717static int flag_b;
1818
19UINT16 *printerRAM;
19//UINT16 *printerRAM;
2020
2121static emu_timer *print_timer;
2222static int printer_level;
r1432r1433
4343 */
4444
4545
46void aim65_printer_inc(void)
46static void aim65_printer_inc(void)
4747{
4848   if (printer_dir)
4949   {
r1432r1433
7474   flag_b=0;
7575}
7676
77void aim65_printer_cr(void) {
77static void aim65_printer_cr(void) {
7878   printer_x=0;
7979   printer_y++;
8080   if (printer_y > 500) printer_y = 0;
r1432r1433
142142}
143143
144144
145#ifdef UNUSED_FUNCTION
145146VIDEO_UPDATE( aim65 )
146147{
147148   /* Display printer output */
r1432r1433
174175
175176   return 0;
176177}
178#endif
177179
src/mess/video/m6847.c
r1432r1433
20482048 *
20492049 *************************************/
20502050
2051#ifdef UNUSED_FUNCTION
20512052void m6847_set_dirty(void) { set_dirty(); }
20522053int m6847_get_scanline(void) { return get_scanline(); }
2054#endif
src/mess/video/thomson.c
r1432r1433
787787#define FUN(x) { x##_scandraw_8, x##_scandraw_16 }
788788
789789
790const thom_scandraw thom_scandraw_funcs[THOM_VMODE_NB][2] =
790static const thom_scandraw thom_scandraw_funcs[THOM_VMODE_NB][2] =
791791{
792792   FUN(to770),    FUN(mo5),    FUN(bitmap4), FUN(bitmap4alt),  FUN(mode80), 
793793   FUN(bitmap16), FUN(page1),  FUN(page2),   FUN(overlay),     FUN(overlay3),
r1432r1433
799799/* called at the start of each scanline in the active area, just after
800800   left border (-1<=y<199), and also after the last scanline (y=199)
801801*/
802TIMER_CALLBACK( thom_scanline_start )
802static TIMER_CALLBACK( thom_scanline_start )
803803{
804804   int y = param;
805805
src/mess/video/x68k.c
r1432r1433
4242UINT16* x68k_spriteram;  // sprite/background RAM
4343UINT16* x68k_spritereg;  // sprite/background registers
4444
45mame_bitmap* x68k_text_bitmap;  // 1024x1024 4x1bpp planes text
46mame_bitmap* x68k_gfx_0_bitmap_16;  // 16 colour, 512x512, 4 pages
47mame_bitmap* x68k_gfx_1_bitmap_16;
48mame_bitmap* x68k_gfx_2_bitmap_16;
49mame_bitmap* x68k_gfx_3_bitmap_16;
50mame_bitmap* x68k_gfx_0_bitmap_256;  // 256 colour, 512x512, 2 pages
51mame_bitmap* x68k_gfx_1_bitmap_256;
52mame_bitmap* x68k_gfx_0_bitmap_65536;  // 65536 colour, 512x512, 1 page
45static mame_bitmap* x68k_text_bitmap;  // 1024x1024 4x1bpp planes text
46static mame_bitmap* x68k_gfx_0_bitmap_16;  // 16 colour, 512x512, 4 pages
47static mame_bitmap* x68k_gfx_1_bitmap_16;
48static mame_bitmap* x68k_gfx_2_bitmap_16;
49static mame_bitmap* x68k_gfx_3_bitmap_16;
50static mame_bitmap* x68k_gfx_0_bitmap_256;  // 256 colour, 512x512, 2 pages
51static mame_bitmap* x68k_gfx_1_bitmap_256;
52static mame_bitmap* x68k_gfx_0_bitmap_65536;  // 65536 colour, 512x512, 1 page
5353
54tilemap* x68k_bg0_8;  // two 64x64 tilemaps, 8x8 characters
55tilemap* x68k_bg1_8;
56tilemap* x68k_bg0_16;  // two 64x64 tilemaps, 16x16 characters
57tilemap* x68k_bg1_16;
54static tilemap* x68k_bg0_8;  // two 64x64 tilemaps, 8x8 characters
55static tilemap* x68k_bg1_8;
56static tilemap* x68k_bg0_16;  // two 64x64 tilemaps, 16x16 characters
57static tilemap* x68k_bg1_16;
5858
5959extern unsigned int x68k_scanline;
60int sprite_shift;
60static int sprite_shift;
6161
62void x68k_render_video_word(int offset);
63void x68k_crtc_refresh_mode(void);
62static void x68k_render_video_word(int offset);
63static void x68k_crtc_refresh_mode(void);
6464void x68k_scanline_check(int);
6565
6666INLINE void x68k_plot_pixel(bitmap_t *bitmap, int x, int y, UINT32 color)
r1432r1433
6868   *BITMAP_ADDR16(bitmap, y, x) = (UINT16)color;
6969}
7070
71mame_bitmap* x68k_get_gfx_pri(int pri,int type)
71static mame_bitmap* x68k_get_gfx_pri(int pri,int type)
7272{
7373   if(type == GFX16)
7474   {
r1432r1433
106106   return NULL;  // should never reach here either.
107107}
108108
109void x68k_crtc_text_copy(int src, int dest)
109static void x68k_crtc_text_copy(int src, int dest)
110110{
111111   // copys one raster in T-VRAM to another raster
112112   int src_ram = src * 256;  // 128 bytes per scanline
r1432r1433
141141   sys.crtc.operation &= ~bit;
142142}
143143
144void x68k_crtc_refresh_mode()
144static void x68k_crtc_refresh_mode()
145145{
146146//   rectangle rect;
147147//   double scantime;
r1432r1433
260260   }
261261}
262262
263TIMER_CALLBACK(x68k_crtc_raster_end)
263static TIMER_CALLBACK(x68k_crtc_raster_end)
264264{
265265   sys.mfp.gpio |= 0x40;
266266}
r1432r1433
513513   return 0xffff;
514514}
515515
516int x68k_get_text_pixel(int offset, int bit)
516static int x68k_get_text_pixel(int offset, int bit)
517517{
518518   int ret = 0;
519519
r1432r1433
532532   return ret;
533533}
534534
535void x68k_render_video_word(int offset)
535static void x68k_render_video_word(int offset)
536536{
537537   int x,y;
538538   int l;
r1432r1433
700700{
701701   return x68k_spriteram[offset];
702702}
703void x68k_draw_gfx(mame_bitmap* bitmap,rectangle cliprect)
703static void x68k_draw_gfx(mame_bitmap* bitmap,rectangle cliprect)
704704{
705705   int priority;
706706   rectangle rect;
r1432r1433
801801}
802802
803803// Sprite controller "Cynthia" at 0xeb0000
804void x68k_draw_sprites(mame_bitmap* bitmap, int priority, rectangle cliprect)
804static void x68k_draw_sprites(mame_bitmap* bitmap, int priority, rectangle cliprect)
805805{
806806   /*
807807      0xeb0000 - 0xeb07ff - Sprite registers (up to 128)
src/mess/video/spectrum.c
r1432r1433
2121
2222unsigned char *spectrum_characterram;
2323unsigned char *spectrum_colorram;
24unsigned char *charsdirty;
24static unsigned char *charsdirty;
2525static int frame_number;    /* Used for handling FLASH 1 */
2626static int flash_invert;
2727
src/mess/video/astrocde.c
r1432r1433
1818#include <math.h> /* for sin() and cos() */
1919
2020unsigned char *astrocade_videoram;
21int magic_expand_color, magic_control, magic_expand_flipflop, collision;
21static int magic_expand_color, magic_control, magic_expand_flipflop, collision;
2222
2323static int ColourSplit=0;                        /* Colour System vars */
2424static int Colour[8] = {0,0,0,0,0,0,0,0};
src/mess/video/pc8801.c
r1432r1433
2525static UINT16 dmac_addr[3],dmac_size[3];
2626static UINT8 dmac_flag,dmac_status;
2727
28enum
28static enum
2929{
3030   noblink_underline,
3131   blink_underline,
r1432r1433
3333   blink_block
3434} cursor_mode;
3535
36enum
36static enum
3737{
3838   parameter0,
3939   parameter1,
src/mess/video/pc1403.c
r1432r1433
3939   UINT8 reg[0x100];
4040} pc1403_lcd;
4141
42const struct { int x, y; } pos[]={
42static const struct { int x, y; } pos[]={
4343    { 152,67 }, // pc1403
4444    { 155,69 } // pc1403h
4545};
src/mess/video/electron.c
r1432r1433
5656   *BITMAP_ADDR16(bitmap, y, x) = (UINT16)color;
5757}
5858
59void electron_drawline( void ) {
59static void electron_drawline( void ) {
6060   int i;
6161   int x = 0;
6262   int pal[16];
src/mess/video/a7800.c
r1432r1433
3939#define DPPL 0x30
4040#define CTRL 0x3c
4141
42int maria_palette[8][4];
43int maria_write_mode;
44int maria_scanline;
45unsigned int maria_dll;
46unsigned int maria_dl;
47int maria_holey;
48int maria_offset;
49int maria_vblank;
50int maria_dli;
51int maria_dmaon;            /* dma is enabled */
52int maria_dodma;            /* doing dma right now */
53int maria_wsync;
54int maria_backcolor;
42static int maria_palette[8][4];
43static int maria_write_mode;
44static int maria_scanline;
45static unsigned int maria_dll;
46static unsigned int maria_dl;
47static int maria_holey;
48static int maria_offset;
49static int maria_vblank;
50static int maria_dli;
51static int maria_dmaon;            /* dma is enabled */
52static int maria_dodma;            /* doing dma right now */
53static int maria_wsync;
54static int maria_backcolor;
5555
56int maria_color_kill;
57int maria_cwidth;
58int maria_bcntl;
59int maria_kangaroo;
60int maria_rm;
56static int maria_color_kill;
57static int maria_cwidth;
58static int maria_bcntl;
59static int maria_kangaroo;
60static int maria_rm;
6161
62unsigned int maria_charbase;
62static unsigned int maria_charbase;
6363
6464// 20030621 ericball define using logical operations
6565#define inc_hpos() { hpos = (hpos + 1) & 0x1FF; }
src/mess/video/pc_aga.c
r1432r1433
4444   8*16
4545};
4646
47gfx_layout pc200_mda_charlayout =
47static gfx_layout pc200_mda_charlayout =
4848{
4949   9,32,               /* 9 x 32 characters (9 x 15 is the default, but..) */
5050   256,               /* 256 characters */
r1432r1433
6060   8*16                /* every char takes 8 bytes (upper half) */
6161};
6262
63gfx_layout pc200_cga_charlayout =
63static gfx_layout pc200_cga_charlayout =
6464{
6565   8,16,               /* 8 x 16 characters */
6666   256,                    /* 256 characters */
src/mess/video/pc_cga.c
r1432r1433
13731373   }
13741374}
13751375
1376READ8_HANDLER ( pc1512_r )
1376static READ8_HANDLER ( pc1512_r )
13771377{
13781378   UINT8 data;
13791379
src/mess/video/vtech1.c
r1432r1433
3737 Palette Initialisation
3838******************************************************************************/
3939
40UINT32 vtech1_palette_mono[16];
40static UINT32 vtech1_palette_mono[16];
4141
4242/* note - Juergen's colors do not match the colors in the m6847 code */
4343static UINT8 vtech1_palette[] =
src/mess/video/amstrad.c
r1432r1433
3333extern int amstrad_plus_dma_2_addr;
3434extern int amstrad_plus_dma_prescaler[3];  // DMA channel prescaler
3535
36int amstrad_plus_dma_repeat[3];  // marks the location of the channels' last repeat
37int amstrad_plus_dma_pause[3];  // pause count
38int amstrad_plus_dma_loopcount[3]; // counts loops taken on this channel
36static int amstrad_plus_dma_repeat[3];  // marks the location of the channels' last repeat
37static int amstrad_plus_dma_pause[3];  // pause count
38static int amstrad_plus_dma_loopcount[3]; // counts loops taken on this channel
3939
4040extern unsigned char *amstrad_plus_asic_ram;
4141
42int amstrad_plus_split_scanline;  // ASIC split screen
43int amstrad_plus_split_address;
44int amstrad_screen_width;  // width in bytes
42static int amstrad_plus_split_scanline;  // ASIC split screen
43static int amstrad_plus_split_address;
44static int amstrad_screen_width;  // width in bytes
4545
46void amstrad_plus_handle_dma(void);
46static void amstrad_plus_handle_dma(void);
4747
4848#ifdef MAME_DEBUG
4949extern int amstrad_plus_lower_enabled;
r1432r1433
7272/* display origin - used to align hardware sprites */
7373static int display_x;
7474static int display_y;
75int display_update;  // flag to get location at first DE
75static int display_update;  // flag to get location at first DE
7676
7777/* this contains the colours in Machine->pens form.*/
7878/* this is updated from the eventlist and reflects the current state
r1432r1433
761761
762762  &6422 - &643f   Sprite palette, 12-bit, xxxxGGGGRRRRBBBB, sprite pens 1-15 (0 is always transparent)
763763*/
764void amstrad_plus_sprite_draw(mame_bitmap* scr_bitmap)
764static void amstrad_plus_sprite_draw(mame_bitmap* scr_bitmap)
765765{
766766   int spr;  // sprite number
767767   int xloc,yloc;
r1432r1433
8178174020h    STOP    Stop processing the sound list.
818818*/
819819
820void amstrad_plus_dma_parse(int channel, int *addr)
820static void amstrad_plus_dma_parse(int channel, int *addr)
821821{
822822   unsigned short command;
823823
r1432r1433
884884   (*addr)+=2;  // point to next DMA instruction
885885}
886886
887void amstrad_plus_handle_dma()
887static void amstrad_plus_handle_dma()
888888{
889889   if(amstrad_plus_dma_status & 0x01)  // DMA channel 0
890890      amstrad_plus_dma_parse(0,&amstrad_plus_dma_0_addr);
src/mess/video/avigo.c
r1432r1433
1616***************************************************************************/
1717
1818/* backdrop */
19struct artwork_info *avigo_backdrop;
19//struct artwork_info *avigo_backdrop;
2020
2121/* mem size = 0x017c0 */
2222
r1432r1433
191191   }
192192#endif
193193}
194unsigned int avigo_ad_x;
195unsigned int avigo_ad_y;
194static unsigned int avigo_ad_x;
195static unsigned int avigo_ad_y;
196196
197197
198198
src/mess/video/odyssey2.c
r1432r1433
5151   0xff,0xff,0xff    /* White */
5252};
5353
54UINT8 o2_shape[0x40][8]={
54static UINT8 o2_shape[0x40][8]={
5555    { 0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00 }, // 0
5656    { 0x18,0x38,0x18,0x18,0x18,0x18,0x3C,0x00 },
5757    { 0x3C,0x66,0x0C,0x18,0x30,0x60,0x7E,0x00 },
r1432r1433
120120static UINT8 *odyssey2_display;
121121int odyssey2_vh_hpos;
122122
123union {
123static union {
124124    UINT8 reg[0x100];
125125    struct {
126126   struct {
src/mess/video/saa5050.c
r1432r1433
2424#define SAA5050_BLACK   0
2525#define SAA5050_WHITE   7
2626
27struct   {
27static struct {
2828   UINT16   saa5050_flags;
2929   UINT8   saa5050_forecol;
3030   UINT8   saa5050_backcol;
src/mess/video/733_asr.c
r1432r1433
4646   asr_window_offset_y+asr_window_height-1               /* max_y */
4747};
4848
49struct
49static struct
5050{
5151   /*UINT8 OutQueue[ASROutQueueSize];
5252   int OutQueueHead;
src/mess/video/bbc.c
r1432r1433
1515//#include "video/bbctext.h"
1616
1717
18void BBC_draw_hi_res(void);
19void BBC_draw_teletext(void);
18static void BBC_draw_hi_res(void);
19static void BBC_draw_teletext(void);
2020
2121static void (*draw_function)(void);
2222
23void BBC_draw_RGB_in(int offset,int data);
23static void BBC_draw_RGB_in(int offset,int data);
2424
2525/************************************************************************
2626 * video_refresh flag is used in optimising the screen redrawing
r1432r1433
205205   BBC_draw_RGB_in,
206206};
207207
208void BBC_draw_teletext(void)
208static void BBC_draw_teletext(void)
209209{
210210
211211   //Teletext Latch bits 0 to 5 go to bits 0 to 5 on the Teletext chip
r1432r1433
380380
381381// the Video ULA hi-res shift registers, pallette lookup and display enabled circuits
382382
383void BBC_draw_hi_res(void)
383static void BBC_draw_hi_res(void)
384384{
385385   int meml;
386386   unsigned char i=0;
r1432r1433
422422
423423// RGB input to the Video ULA from the Teletext IC
424424// Just pass on the output at the correct pixel size.
425void BBC_draw_RGB_in(int offset,int data)
425static void BBC_draw_RGB_in(int offset,int data)
426426{
427427   BBC_ula_drawpixel(data,emulation_pixels_per_real_pixel);
428428}
src/mess/filemngr.c
r1432r1433
193193}
194194
195195
196char current_filespecification[32] = "*.*";
197const char fs_directory[] = "[DIR]";
198const char fs_device[] = "[DRIVE]";
199const char fs_file[] = "[FILE]";
196static char current_filespecification[32] = "*.*";
197static const char fs_directory[] = "[DIR]";
198static const char fs_device[] = "[DRIVE]";
199static const char fs_file[] = "[FILE]";
200200/*const char fs_archive[] = "[ARCHIVE]"; */
201201
202202static ui_menu_item *fs_item;
r1432r1433
213213   FILESELECT_DEVICE,
214214   FILESELECT_DIRECTORY,
215215   FILESELECT_FILE
216} FILESELECT_ENTRY_TYPE;
216};
217217
218218
219219static void fs_free(void)
src/mess/osd/windows/menu.c
r1432r1433
505505
506506
507507
508void state_load(HWND wnd, running_machine *machine)
508static void state_load(HWND wnd, running_machine *machine)
509509{
510510   state_dialog(wnd, WIN_FILE_DIALOG_OPEN, OFN_FILEMUSTEXIST, mame_schedule_load, machine);
511511}
512512
513void state_save_as(HWND wnd, running_machine *machine)
513static void state_save_as(HWND wnd, running_machine *machine)
514514{
515515   state_dialog(wnd, WIN_FILE_DIALOG_SAVE, OFN_OVERWRITEPROMPT, mame_schedule_save, machine);
516516}
517517
518void state_save(running_machine *machine)
518static void state_save(running_machine *machine)
519519{
520520   mame_schedule_save(machine, state_filename);
521521}
r1432r1433
18871887//   set_menu_text
18881888//============================================================
18891889
1890void set_menu_text(HMENU menu_bar, int command, const char *text)
1890static void set_menu_text(HMENU menu_bar, int command, const char *text)
18911891{
18921892   TCHAR *t_text;
18931893   MENUITEMINFO mii;
src/mess/osd/winui/layoutms.c
r1432r1433
160160
161161const TCHAR g_szPlayGameString[] = TEXT("&Run %s");
162162const char g_szGameCountString[] = "%d systems";
163const char g_szHistoryFileName[] = "sysinfo.dat";
164const char g_szMameInfoFileName[] = "messinfo.dat";
163static const char g_szHistoryFileName[] = "sysinfo.dat";
164static const char g_szMameInfoFileName[] = "messinfo.dat";
165165
166166static BOOL FilterAvailable(int driver_index)
167167{
src/mess/machine/wswan.c
r1432r1433
2323
2424enum enum_system { WSWAN=0, WSC };
2525enum enum_sram { SRAM_NONE=0, SRAM_64K, SRAM_256K, SRAM_512K, SRAM_1M, SRAM_2M, EEPROM_1K, EEPROM_16K, EEPROM_8K, SRAM_UNKNOWN };
26const char* wswan_sram_str[] = { "none", "64Kbit SRAM", "256Kbit SRAM", "512Kbit SRAM", "1Mbit SRAM", "2Mbit SRAM", "1Kbit EEPROM", "16Kbit EEPROM", "8Kbit EEPROM", "Unknown" };
27const int wswan_sram_size[] = { 0, 64*1024/8, 256*1024/8, 512*1024/8, 1024*1024/8, 2*1024*1024/8,  1024/8, 16*1024/8, 8*1024/8, 0 };
26static const char* wswan_sram_str[] = { "none", "64Kbit SRAM", "256Kbit SRAM", "512Kbit SRAM", "1Mbit SRAM", "2Mbit SRAM", "1Kbit EEPROM", "16Kbit EEPROM", "8Kbit EEPROM", "Unknown" };
27static const int wswan_sram_size[] = { 0, 64*1024/8, 256*1024/8, 512*1024/8, 1024*1024/8, 2*1024*1024/8,  1024/8, 16*1024/8, 8*1024/8, 0 };
2828
2929struct EEPROM {
3030   UINT8   mode;      /* eeprom mode */
r1432r1433
6464static struct EEPROM eeprom;
6565static struct RTC rtc;
6666static struct SoundDMA sound_dma;
67UINT8 *ws_ram;
68UINT8 *ws_bios_bank = NULL;
67static UINT8 *ws_ram;
68static UINT8 *ws_bios_bank = NULL;
6969static UINT8 wswan_bios_disabled;
7070UINT8 ws_portram[256];
7171static UINT8 ws_portram_init[256] =
r1432r1433
124124   0xea, 0xc0, 0xff, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
125125};
126126
127void wswan_handle_irqs( void ) {
127static void wswan_handle_irqs( void ) {
128128   if ( ws_portram[0xb2] & ws_portram[0xb6] & WSWAN_IFLAG_HBLTMR ) {
129129      cpunum_set_input_line_and_vector( 0, 0, HOLD_LINE, ws_portram[0xb0] + WSWAN_INT_HBLTMR );
130130   } else if ( ws_portram[0xb2] & ws_portram[0xb6] & WSWAN_IFLAG_VBL ) {
r1432r1433
146146   }
147147}
148148
149void wswan_set_irq_line(int irq) {
149static void wswan_set_irq_line(int irq) {
150150   if ( ws_portram[0xb2] & irq ) {
151151      ws_portram[0xb6] |= irq;
152152      wswan_handle_irqs();
153153   }
154154}
155155
156void wswan_clear_irq_line(int irq) {
156static void wswan_clear_irq_line(int irq) {
157157   ws_portram[0xb6] &= ~irq;
158158   wswan_handle_irqs();
159159}
r1432r1433
12451245
12461246#ifdef MAME_DEBUG
12471247enum enum_romsize { ROM_4M=0, ROM_8M, ROM_16M, ROM_32M, ROM_64M, ROM_128M, ROM_UNKNOWN };
1248const char* wswan_romsize_str[] = {
1248static const char* wswan_romsize_str[] = {
12491249   "4Mbit", "8Mbit", "16Mbit", "32Mbit", "64Mbit", "128Mbit", "Unknown"
12501250};
12511251
src/mess/machine/dgn_beta.c
r1432r1433
138138#define INVALID_KEYROW   -1         /* no ketrow selected */
139139#define NO_KEY_PRESSED   0x7F         /* retrurned by hardware if no key pressed */
140140
141int SelectedKeyrow(int   Rows);
141static int SelectedKeyrow(int   Rows);
142142
143143int dgnbeta_font=0;
144144
r1432r1433
209209static struct PageReg   PageRegs[MaxTasks+1][MaxPage+1];   /* 16 sets of 16 page regs, allowing for 16 seperate contexts */
210210                  /* Task 17 is power on default, when banking not enabled */
211211
212int IsIOPage(int   Page)
212static int IsIOPage(int   Page)
213213{
214214   if ((Page==IOPage) || (Page==IOPage+1))
215215      return 1;
r1432r1433
479479never moved past the first row, by scanning for the last active row
480480the beta_test rom works, and it does not break the OS-9 driver :)
481481*/
482int SelectedKeyrow(int   Rows)
482static int SelectedKeyrow(int   Rows)
483483{
484484   int   Idx;
485485   int   Row;   /* Row selected */
r1432r1433
507507
508508/* GetKeyRow, returns the value of a keyrow, checking for invalid rows */
509509/* and returning no key pressed if row is invalid */
510int GetKeyRow(int RowNo)
510static int GetKeyRow(int RowNo)
511511{
512512   if(RowNo==INVALID_KEYROW)
513513   {
r1432r1433
10231023/* Scan physical keyboard into Keyboard array */
10241024/* gonna try and sync this more closely with hardware as keyboard being scanned */
10251025/* on *EVERY* vblank ! */
1026void ScanInKeyboard(void)
1026static void ScanInKeyboard(void)
10271027{
10281028#if 0
10291029   int   Idx;
src/mess/machine/uart8250.c
r1432r1433
5454   } send;
5555} UART8250;
5656
57UART8250 uart[4]={ { { TYPE8250 } } };
57static UART8250 uart[4]={ { { TYPE8250 } } };
5858
5959/* int's pending */
6060#define COM_INT_PENDING_RECEIVED_DATA_AVAILABLE   0x0001
src/mess/machine/adam.c
r1432r1433
8080
8181}
8282
83unsigned char getKeyFromBuffer(void)
83static unsigned char getKeyFromBuffer(void)
8484{
8585   int i;
8686   UINT8 kbcode;
r1432r1433
9595   return kbcode;
9696}
9797
98void addToKeyboardBuffer(unsigned char kbcode)
98static void addToKeyboardBuffer(unsigned char kbcode)
9999{
100100    if (KbRepeatTable[kbcode]==0)
101101    {
r1432r1433
514514    /* 0xF0-0xFF - Reserved for internal use by keyboard software */
515515}
516516
517void master6801_behaviour(int offset, int data)
517static void master6801_behaviour(int offset, int data)
518518{
519519/*
520520The Master MC6801 controls all AdamNet operations, keyboard, tapes, disks...
src/mess/machine/cbmb.c
r1432r1433
188188   cbm_ieee_data_w(0, data);
189189}
190190
191const cia6526_interface cbmb_cia =
191static const cia6526_interface cbmb_cia =
192192{
193193   CIA6526,
194194   tpi6525_0_irq2_level,
src/mess/machine/mbee.c
r1432r1433
6464   return mbee_workram[offset];
6565}
6666
67offs_t mbee_opbase_handler(offs_t address)
67static offs_t mbee_opbase_handler(offs_t address)
6868{
6969   if (address > 0x7fff)
7070   {
r1432r1433
7474   return address;
7575}
7676
77offs_t mbee56_opbase_handler(offs_t address)
77static offs_t mbee56_opbase_handler(offs_t address)
7878{
7979   if (address > 0xdfff)
8080   {
src/mess/machine/msx_slot.c
r1432r1433
329329   state->cart.scc.active = 0;
330330}
331331
332 READ8_HANDLER (konami_scc_bank5)
332static READ8_HANDLER (konami_scc_bank5)
333333{
334334   if (offset & 0x80) {
335335#if 0
r1432r1433
19711971   state->cart.sccp.sccp_active = 0;
19721972}
19731973
1974 READ8_HANDLER (soundcartridge_scc)
1974static READ8_HANDLER (soundcartridge_scc)
19751975{
19761976   int reg;
19771977
r1432r1433
20022002   return 0xff;
20032003}
20042004
2005 READ8_HANDLER (soundcartridge_sccp)
2005static READ8_HANDLER (soundcartridge_sccp)
20062006{
20072007   int reg;
20082008
src/mess/machine/pokemini.c
r1432r1433
2929   emu_timer   *timer3_timer;      /* Timer 3 */
3030};
3131
32UINT8 pokemini_hwreg[0x100];
32static UINT8 pokemini_hwreg[0x100];
3333static struct VDP vdp;
3434static struct TIMERS timers;
3535
r1432r1433
677677   return INIT_PASS;
678678}
679679
680void pokemini_render( void ) {
680static void pokemini_render( void ) {
681681   if ( vdp.background_enabled ) {
682682      int x, y;
683683      for ( y = 0; y < 8; y++ ) {
src/mess/machine/rp5c15.c
r1432r1433
6969
7070#include "rp5c15.h"
7171
72struct rp5c15 rtc;
72static struct rp5c15 rtc;
7373
74emu_timer* rtc_timer;
74static emu_timer* rtc_timer;
7575
7676TIMER_CALLBACK(rtc_alarm_pulse)
7777{
r1432r1433
139139   timer_adjust(rtc_timer, attotime_zero, 0, ATTOTIME_IN_HZ(32));
140140}
141141
142int rp5c15_read(int offset, UINT16 mem_mask)
142static int rp5c15_read(int offset, UINT16 mem_mask)
143143{
144144   if((rtc.mode & 0x01) == 0x00)  // BANK 0 selected
145145   {
r1432r1433
210210   return 0;
211211}
212212
213void rp5c15_write(int offset, int data, UINT16 mem_mask)
213static void rp5c15_write(int offset, int data, UINT16 mem_mask)
214214{
215215   if(offset == 13)
216216   {
src/mess/machine/mc6850.c
r1432r1433
242242
243243/* ******* other input lines ******* */
244244
245#ifdef UNUSED_FUNCTION
245246void MC6850_DCD(int offset, int data)
246247{
247248   STR=(STR&0xfb)|((data&1)<<2);
r1432r1433
253254   STR=(STR&0xf7)|((data&1)<<3);
254255   // this also sets the Transmit Controller
255256}
257#endif
256258
257259void MC6850_Receive_Clock(int Receive_Data)
258260{
r1432r1433
317319   dcd_count=0;
318320}
319321
322#ifdef UNUSED_FUNCTION
320323int MC6850_Transmit_Clock(void)
321324{
322325   // clock out the data and return a Trasmit Data bit
r1432r1433
325328      if we get to outputing data too */
326329   return 0;
327330}
331#endif
328332
329333
330334/* ******* other output lines ******* */
331335
336#ifdef UNUSED_FUNCTION
332337int MC6850_transmit_data(int offset)
333338{
334339   // return the last transmitted bit
335340   return 0;
336341}
337342
338int MC6850_RTS(int offset)
343static int MC6850_RTS(int offset)
339344{
340345   // is this correct ????
341346   return RTS;
342347}
348#endif
343349
344350/*
345351interrupt Request is the only other output
src/mess/machine/coco.c
r1432r1433
13841384static void (*printer_out)(int data);
13851385
13861386/* Printer output for the CoCo, output to bitbanger port */
1387void printer_out_coco(int data)
1387static void printer_out_coco(int data)
13881388{
13891389   bitbanger_output(bitbanger_image(), (data & 2) >> 1);
13901390}
13911391
13921392/* Printer output for the Dragon, output to Paralel port */
1393void printer_out_dragon(int data)
1393static void printer_out_dragon(int data)
13941394{
13951395   /* If strobe bit is high send data from pia0 port b to dragon parallel printer */
13961396   if (data & 0x02)
r1432r1433
28772877   acia_6551_init();
28782878}
28792879
2880#ifdef UNUSED_FUNCTION
28802881MACHINE_START( d64plus )
28812882{
28822883   machine_init_interface init;
r1432r1433
28992900   dragon_plus_reg = 0;
29002901   plus_reg_w(0,0);
29012902}
2903#endif
29022904
29032905MACHINE_START( tanodr64 )
29042906{
src/mess/machine/nes.c
r1432r1433
4242    GLOBAL VARIABLES
4343***************************************************************************/
4444
45UINT8 battery_data[BATTERY_SIZE];
45static UINT8 battery_data[BATTERY_SIZE];
4646
4747struct nes_struct nes;
4848struct fds_struct nes_fds;
src/mess/machine/gb.c
r1432r1433
9292static UINT8 GBC_RAMBank;            /* (GBC) Number of RAM bank currently used     */
9393static UINT8 sgb_atf_data[4050];      /* (SGB) Attribute files                       */
9494UINT8 *sgb_tile_data;
95UINT8 *gb_cart = NULL;
96UINT8 *gb_cart_ram = NULL;
97UINT8 gb_io[0x10];
98UINT8 gb_ie;
99UINT8 *gb_dummy_rom_bank = NULL;
100UINT8 *gb_dummy_ram_bank = NULL;
95static UINT8 *gb_cart = NULL;
96static UINT8 *gb_cart_ram = NULL;
97static UINT8 gb_io[0x10];
98//UINT8 gb_ie;
99static UINT8 *gb_dummy_rom_bank = NULL;
100static UINT8 *gb_dummy_ram_bank = NULL;
101101/* TAMA5 related global variables */
102UINT8 gbTama5Memory[32];
103UINT8 gbTama5Byte;
104UINT8 gbTama5Address;
105UINT8 gbLastTama5Command;
102static UINT8 gbTama5Memory[32];
103static UINT8 gbTama5Byte;
104static UINT8 gbTama5Address;
105static UINT8 gbLastTama5Command;
106106/* Timer related globals */
107107static struct gb_timer_struct {
108108   UINT16   divcount;
r1432r1433
113113} gb_timer;
114114/* Serial I/O related */
115115static UINT32 SIOCount;         /* Serial I/O counter                          */
116emu_timer   *gb_serial_timer = NULL;
116static emu_timer   *gb_serial_timer = NULL;
117117
118118/*
119119  Prototypes
r1432r1433
121121
122122static TIMER_CALLBACK(gb_serial_timer_proc);
123123static void gb_machine_stop(running_machine *machine);
124WRITE8_HANDLER( gb_rom_bank_select_mbc1 );
125WRITE8_HANDLER( gb_ram_bank_select_mbc1 );
126WRITE8_HANDLER( gb_mem_mode_select_mbc1 );
127WRITE8_HANDLER( gb_rom_bank_select_mbc2 );
128WRITE8_HANDLER( gb_rom_bank_select_mbc3 );
129WRITE8_HANDLER( gb_ram_bank_select_mbc3 );
130WRITE8_HANDLER( gb_mem_mode_select_mbc3 );
131WRITE8_HANDLER( gb_rom_bank_select_mbc5 );
132WRITE8_HANDLER( gb_ram_bank_select_mbc5 );
133WRITE8_HANDLER( gb_rom_bank_select_mbc7 );
134WRITE8_HANDLER( gb_rom_bank_unknown_mbc7 );
135WRITE8_HANDLER( gb_ram_tama5 );
136WRITE8_HANDLER( gb_rom_bank_select_wisdom );
137WRITE8_HANDLER( gb_rom_bank_mmm01_0000_w );
138WRITE8_HANDLER( gb_rom_bank_mmm01_2000_w );
139WRITE8_HANDLER( gb_rom_bank_mmm01_4000_w );
140WRITE8_HANDLER( gb_rom_bank_mmm01_6000_w );
124static WRITE8_HANDLER( gb_rom_bank_select_mbc1 );
125static WRITE8_HANDLER( gb_ram_bank_select_mbc1 );
126static WRITE8_HANDLER( gb_mem_mode_select_mbc1 );
127static WRITE8_HANDLER( gb_rom_bank_select_mbc2 );
128static WRITE8_HANDLER( gb_rom_bank_select_mbc3 );
129static WRITE8_HANDLER( gb_ram_bank_select_mbc3 );
130static WRITE8_HANDLER( gb_mem_mode_select_mbc3 );
131static WRITE8_HANDLER( gb_rom_bank_select_mbc5 );
132static WRITE8_HANDLER( gb_ram_bank_select_mbc5 );
133static WRITE8_HANDLER( gb_rom_bank_select_mbc7 );
134static WRITE8_HANDLER( gb_rom_bank_unknown_mbc7 );
135static WRITE8_HANDLER( gb_ram_tama5 );
136static WRITE8_HANDLER( gb_rom_bank_select_wisdom );
137static WRITE8_HANDLER( gb_rom_bank_mmm01_0000_w );
138static WRITE8_HANDLER( gb_rom_bank_mmm01_2000_w );
139static WRITE8_HANDLER( gb_rom_bank_mmm01_4000_w );
140static WRITE8_HANDLER( gb_rom_bank_mmm01_6000_w );
141141static void gb_timer_increment( void );
142142
143143#ifdef MAME_DEBUG
r1432r1433
362362   image_battery_save(image_from_devtype_and_index(IO_CARTSLOT, 0), gb_cart_ram, RAMBanks * 0x2000 );
363363}
364364
365void gb_set_mbc1_banks( void ) {
365static void gb_set_mbc1_banks( void ) {
366366   memory_set_bankptr( 1, ROMMap[ ROMBank ] );
367367   memory_set_bankptr( 2, RAMMap[ MBC1Mode ? ( ROMBank >> 5 ) : 0 ] );
368368}
369369
370WRITE8_HANDLER( gb_rom_bank_select_mbc1 )
370static WRITE8_HANDLER( gb_rom_bank_select_mbc1 )
371371{
372372   data &= 0x1F; /* Only uses lower 5 bits */
373373   /* Selecting bank 0 == selecting bank 1 */
r1432r1433
379379   gb_set_mbc1_banks();
380380}
381381
382WRITE8_HANDLER( gb_rom_bank_select_mbc2 )
382static WRITE8_HANDLER( gb_rom_bank_select_mbc2 )
383383{
384384   data &= 0x0F; /* Only uses lower 4 bits */
385385   /* Selecting bank 0 == selecting bank 1 */
r1432r1433
393393   memory_set_bankptr (1, ROMMap[ROMBank] );
394394}
395395
396WRITE8_HANDLER( gb_rom_bank_select_mbc3 )
396static WRITE8_HANDLER( gb_rom_bank_select_mbc3 )
397397{
398398   logerror( "0x%04X: write to mbc3 rom bank select register 0x%04X <- 0x%02X\n", activecpu_get_pc(), offset, data );
399399   data &= 0x7F; /* Only uses lower 7 bits */
r1432r1433
406406   memory_set_bankptr (1, ROMMap[ROMBank] );
407407}
408408
409WRITE8_HANDLER( gb_rom_bank_select_mbc5 )
409static WRITE8_HANDLER( gb_rom_bank_select_mbc5 )
410410{
411411   /* MBC5 has a 9 bit bank select
412412     Writing into 2000-2FFF sets the lower 8 bits
r1432r1433
422422   memory_set_bankptr (1, ROMMap[ROMBank] );
423423}
424424
425WRITE8_HANDLER( gb_rom_bank_select_mbc7 ) {
425static WRITE8_HANDLER( gb_rom_bank_select_mbc7 ) {
426426   logerror( "0x%04X: write to mbc7 rom select register: 0x%04X <- 0x%02X\n", activecpu_get_pc(), 0x2000 + offset, data );
427427   /* Bit 12 must be set for writing to the mbc register */
428428   if ( offset & 0x0100 ) {
r1432r1433
431431   }
432432}
433433
434WRITE8_HANDLER( gb_rom_bank_unknown_mbc7 ) {
434static WRITE8_HANDLER( gb_rom_bank_unknown_mbc7 ) {
435435        logerror( "0x%04X: write to mbc7 rom area: 0x%04X <- 0x%02X\n", activecpu_get_pc(), 0x3000 + offset, data );
436436   /* Bit 12 must be set for writing to the mbc register */
437437   if ( offset & 0x0100 ) {
r1432r1433
446446   }
447447}
448448
449WRITE8_HANDLER( gb_rom_bank_select_wisdom ) {
449static WRITE8_HANDLER( gb_rom_bank_select_wisdom ) {
450450   logerror( "0x%04X: wisdom tree mapper write to address 0x%04X\n", activecpu_get_pc(), offset );
451451   /* The address determines the bank to select */
452452   ROMBank = ( offset << 1 ) & 0x1FF;
r1432r1433
455455   memory_set_bankptr( 1, ROMMap[ ROMBank + 1 ] );
456456}
457457
458WRITE8_HANDLER( gb_ram_bank_select_mbc1 )
458static WRITE8_HANDLER( gb_ram_bank_select_mbc1 )
459459{
460460   data &= 0x3; /* Only uses the lower 2 bits */
461461
r1432r1433
466466   gb_set_mbc1_banks();
467467}
468468
469WRITE8_HANDLER( gb_ram_bank_select_mbc3 )
469static WRITE8_HANDLER( gb_ram_bank_select_mbc3 )
470470{
471471   logerror( "0x%04X: write mbc3 ram bank select register 0x%04X <- 0x%02X\n", activecpu_get_pc(), offset, data );
472472   if( data & 0x8 ) {   /* RTC banks */
r1432r1433
485485   }
486486}
487487
488WRITE8_HANDLER( gb_ram_bank_select_mbc5 )
488static WRITE8_HANDLER( gb_ram_bank_select_mbc5 )
489489{
490490   logerror( "0x%04X: MBC5 RAM Bank select write 0x%04X <- 0x%02X\n", activecpu_get_pc(), offset, data );
491491   data &= 0x0F;
r1432r1433
504504   logerror( "0x%04X: Write to ram enable register 0x%04X <- 0x%02X\n", activecpu_get_pc(), offset, data );
505505}
506506
507WRITE8_HANDLER( gb_mem_mode_select_mbc1 )
507static WRITE8_HANDLER( gb_mem_mode_select_mbc1 )
508508{
509509   MBC1Mode = data & 0x1;
510510   gb_set_mbc1_banks();
511511}
512512
513WRITE8_HANDLER( gb_mem_mode_select_mbc3 )
513static WRITE8_HANDLER( gb_mem_mode_select_mbc3 )
514514{
515515        logerror( "0x%04X: Write to mbc3 mem mode select register 0x%04X <- 0x%02X\n", activecpu_get_pc(), offset, data );
516516   if( CartType & TIMER ) {
r1432r1433
523523   }
524524}
525525
526WRITE8_HANDLER( gb_ram_tama5 ) {
526static WRITE8_HANDLER( gb_ram_tama5 ) {
527527   logerror( "0x%04X: TAMA5 write 0x%04X <- 0x%02X\n", activecpu_get_pc(), 0xA000 + offset, data );
528528   switch( offset & 0x0001 ) {
529529   case 0x0000:    /* Write to data register */
r1432r1433
600600
601601/* This mmm01 implementation is mostly guess work, no clue how correct it all is */
602602
603UINT8 mmm01_bank_offset;
604UINT8 mmm01_reg1;
605UINT8 mmm01_bank;
606UINT8 mmm01_bank_mask;
603static UINT8 mmm01_bank_offset;
604static UINT8 mmm01_reg1;
605static UINT8 mmm01_bank;
606static UINT8 mmm01_bank_mask;
607607
608WRITE8_HANDLER( gb_rom_bank_mmm01_0000_w ) {
608static WRITE8_HANDLER( gb_rom_bank_mmm01_0000_w ) {
609609   logerror( "0x%04X: write 0x%02X to 0x%04X\n", activecpu_get_pc(), data, offset+0x000 );
610610   if ( data & 0x40 ) {
611611      mmm01_bank_offset = mmm01_reg1;
r1432r1433
615615   }
616616}
617617
618WRITE8_HANDLER( gb_rom_bank_mmm01_2000_w ) {
618static WRITE8_HANDLER( gb_rom_bank_mmm01_2000_w ) {
619619   logerror( "0x%04X: write 0x%02X to 0x%04X\n", activecpu_get_pc(), data, offset+0x2000 );
620620
621621   mmm01_reg1 = data & ROMMask;
r1432r1433
626626   memory_set_bankptr( 1, ROMMap[ mmm01_bank_offset + mmm01_bank ] );
627627}
628628
629WRITE8_HANDLER( gb_rom_bank_mmm01_4000_w ) {
629static WRITE8_HANDLER( gb_rom_bank_mmm01_4000_w ) {
630630   logerror( "0x%04X: write 0x%02X to 0x%04X\n", activecpu_get_pc(), data, offset+0x4000 );
631631}
632632
633WRITE8_HANDLER( gb_rom_bank_mmm01_6000_w ) {
633static WRITE8_HANDLER( gb_rom_bank_mmm01_6000_w ) {
634634   logerror( "0x%04X: write 0x%02X to 0x%04X\n", activecpu_get_pc(), data, offset+0x6000 );
635635   /* Not sure if this is correct, Taito Variety Pack sets these values */
636636   /* Momotarou Collection 2 writes 01 and 21 here */
src/mess/machine/concept.c
r1432r1433
7171
7272/* Expansion slots */
7373
74struct
74static struct
7575{
7676   read8_handler reg_read;
7777   write8_handler reg_write;
src/mess/machine/99_dsk.c
r1432r1433
354354/* on rising edge, sets DVENA for 4.23 seconds on rising edge */
355355static int motor_on;
356356/* count 4.23s from rising edge of motor_on */
357void *motor_on_timer;
357static void *motor_on_timer;
358358
359359static const ti99_peb_card_handlers_t fdc_handlers =
360360{
src/mess/machine/gamecom.c
r1432r1433
4444   int check_value;
4545} GAMECOM_TIMER;
4646
47UINT8 *internal_ram;
47static UINT8 *internal_ram;
4848UINT8 internal_registers[0x80];
4949UINT8 gamecom_vram[16*1024];
50UINT8 *cartridge1 = NULL;
51UINT8 *cartridge2 = NULL;
52UINT8 *cartridge = NULL;
53UINT8 *dummy_bank = NULL;
50static UINT8 *cartridge1 = NULL;
51static UINT8 *cartridge2 = NULL;
52static UINT8 *cartridge = NULL;
53static UINT8 *dummy_bank = NULL;
5454
5555static emu_timer *gamecom_clock_timer = NULL;
56GAMECOM_DMA gamecom_dma;
57GAMECOM_TIMER gamecom_timer[2];
56static GAMECOM_DMA gamecom_dma;
57static GAMECOM_TIMER gamecom_timer[2];
5858
5959//int gamecom_timer_limit[8] = { 2/2, 1024/2, 2048/2, 4096/2, 8192/2, 16384/2, 32768/2, 65536/2 };
60int gamecom_timer_limit[8] = { 2, 1024, 2048, 4096, 8192, 16384, 32768, 65536 };
60static int gamecom_timer_limit[8] = { 2, 1024, 2048, 4096, 8192, 16384, 32768, 65536 };
6161
62void gamecom_dma_init(void);
62static void gamecom_dma_init(void);
6363
6464static TIMER_CALLBACK(gamecom_clock_timer_callback)
6565{
r1432r1433
407407
408408/* The manual is not conclusive as to which bit of the DMVP register (offset 0x3D) determines
409409   which page for source or destination is used */
410void gamecom_dma_init(void) {
410static void gamecom_dma_init(void) {
411411   if ( gamecom_dma.decrement_x || gamecom_dma.decrement_y ) {
412412      logerror( "TODO: Decrement-x and decrement-y are not supported yet\n" );
413413   }
src/mess/machine/advision.c
r1432r1433
1515#include "sound/dac.h"
1616#include "cpuint.h"
1717
18unsigned char *advision_ram;
19int advision_rambank;
18static unsigned char *advision_ram;
19static int advision_rambank;
2020int advision_framestart;
21int advision_videoenable;
21static int advision_videoenable;
2222int advision_videobank;
2323static int Lvalue[3];
2424static int wLpointer;
src/mess/machine/mz700.c
r1432r1433
5555static void pit_clk_1(double clock);
5656static void pit_irq_2(int which);
5757
58struct pit8253_config pit8253 =
58static struct pit8253_config pit8253 =
5959{
6060   TYPE8253,
6161   {
src/mess/machine/aim65.c
r1432r1433
2525 Function Prototypes
2626******************************************************************************/
2727
28void aim65_update_ds1(int digit, int data);
29void aim65_update_ds2(int digit, int data);
30void aim65_update_ds3(int digit, int data);
31void aim65_update_ds4(int digit, int data);
32void aim65_update_ds5(int digit, int data);
28static void aim65_update_ds1(int digit, int data);
29static void aim65_update_ds2(int digit, int data);
30static void aim65_update_ds3(int digit, int data);
31static void aim65_update_ds4(int digit, int data);
32static void aim65_update_ds5(int digit, int data);
3333
3434
3535
r1432r1433
134134};
135135
136136
137void aim65_update_ds1(int digit, int data) { output_set_digit_value( 0 + (digit ^ 3), data); }
138void aim65_update_ds2(int digit, int data) { output_set_digit_value( 4 + (digit ^ 3), data); }
139void aim65_update_ds3(int digit, int data) { output_set_digit_value( 8 + (digit ^ 3), data); }
140void aim65_update_ds4(int digit, int data) { output_set_digit_value(12 + (digit ^ 3), data); }
141void aim65_update_ds5(int digit, int data) { output_set_digit_value(16 + (digit ^ 3), data); }
137static void aim65_update_ds1(int digit, int data) { output_set_digit_value( 0 + (digit ^ 3), data); }
138static void aim65_update_ds2(int digit, int data) { output_set_digit_value( 4 + (digit ^ 3), data); }
139static void aim65_update_ds3(int digit, int data) { output_set_digit_value( 8 + (digit ^ 3), data); }
140static void aim65_update_ds4(int digit, int data) { output_set_digit_value(12 + (digit ^ 3), data); }
141static void aim65_update_ds5(int digit, int data) { output_set_digit_value(16 + (digit ^ 3), data); }
142142
143143
144144
r1432r1433
169169}
170170
171171
172void aim65_riot_irq(int state)
172static void aim65_riot_irq(int state)
173173{
174174   cpunum_set_input_line(0, M6502_IRQ_LINE, state ? HOLD_LINE : CLEAR_LINE);
175175}
src/mess/machine/nes_mmc.c
r1432r1433
3131#define LOG_FDS   1
3232
3333/* Global variables */
34int prg_mask;
34static int prg_mask;
3535
36int IRQ_enable, IRQ_enable_latch;
37UINT16 IRQ_count, IRQ_count_latch, IRQ_reload;
38UINT8 IRQ_status;
39UINT8 IRQ_mode_jaleco;
36static int IRQ_enable, IRQ_enable_latch;
37static UINT16 IRQ_count, IRQ_count_latch, IRQ_reload;
38static UINT8 IRQ_status;
39static UINT8 IRQ_mode_jaleco;
4040
4141int MMC1_extended;   /* 0 = normal MMC1 cart, 1 = 512k MMC1, 2 = 1024k MMC1 */
4242
src/mess/machine/vc1541.c
r1432r1433
172172   } d64;
173173} CBM_Drive_Emu;
174174
175CBM_Drive_Emu vc1541_static= { 0 }, *vc1541 = &vc1541_static;
175static CBM_Drive_Emu vc1541_static= { 0 }, *vc1541 = &vc1541_static;
176176
177177/* four different frequencies for the 4 different zones on the disk */
178178static double vc1541_times[4]= {
r1432r1433
315315   gcr_double_2_gcr(0, 0, 0, 0, vc1541->head.data+i);i+=5;
316316}
317317
318ADDRESS_MAP_START( vc1541_readmem , ADDRESS_SPACE_PROGRAM, 8)
318static ADDRESS_MAP_START( vc1541_readmem , ADDRESS_SPACE_PROGRAM, 8)
319319   AM_RANGE(0x0000, 0x07ff) AM_READ( MRA8_RAM)
320320   AM_RANGE(0x1800, 0x180f) AM_READ( via_2_r)         /* 0 and 1 used in vc20 */
321321   AM_RANGE(0x1810, 0x189f) AM_READ( MRA8_NOP) /* for debugger */
r1432r1433
324324   AM_RANGE(0xc000, 0xffff) AM_READ( MRA8_ROM)
325325ADDRESS_MAP_END
326326
327ADDRESS_MAP_START( vc1541_writemem , ADDRESS_SPACE_PROGRAM, 8)
327static ADDRESS_MAP_START( vc1541_writemem , ADDRESS_SPACE_PROGRAM, 8)
328328   AM_RANGE(0x0000, 0x07ff) AM_WRITE( MWA8_RAM)
329329   AM_RANGE(0x1800, 0x180f) AM_WRITE( via_2_w)
330330   AM_RANGE(0x1c00, 0x1c0f) AM_WRITE( via_3_w)
331331   AM_RANGE(0xc000, 0xffff) AM_WRITE( MWA8_ROM)
332332ADDRESS_MAP_END
333333
334ADDRESS_MAP_START( dolphin_readmem , ADDRESS_SPACE_PROGRAM, 8)
334static ADDRESS_MAP_START( dolphin_readmem , ADDRESS_SPACE_PROGRAM, 8)
335335   AM_RANGE(0x0000, 0x07ff) AM_READ( MRA8_RAM)
336336   AM_RANGE(0x1800, 0x180f) AM_READ( via_2_r)         /* 0 and 1 used in vc20 */
337337   AM_RANGE(0x1c00, 0x1c0f) AM_READ( via_3_r)
r1432r1433
339339   AM_RANGE(0xa000, 0xffff) AM_READ( MRA8_ROM)
340340ADDRESS_MAP_END
341341
342ADDRESS_MAP_START( dolphin_writemem , ADDRESS_SPACE_PROGRAM, 8)
342static ADDRESS_MAP_START( dolphin_writemem , ADDRESS_SPACE_PROGRAM, 8)
343343   AM_RANGE(0x0000, 0x07ff) AM_WRITE( MWA8_RAM)
344344   AM_RANGE(0x1800, 0x180f) AM_WRITE( via_2_w)
345345   AM_RANGE(0x1c00, 0x1c0f) AM_WRITE( via_3_w)
r1432r1433
961961   return 0;
962962}
963963
964ADDRESS_MAP_START( c1551_readmem , ADDRESS_SPACE_PROGRAM, 8)
964static ADDRESS_MAP_START( c1551_readmem , ADDRESS_SPACE_PROGRAM, 8)
965965    AM_RANGE(0x0000, 0x0001) AM_READ( c1551_port_r)
966966   AM_RANGE(0x0002, 0x07ff) AM_READ( MRA8_RAM)
967967    AM_RANGE(0x4000, 0x4007) AM_READ( tpi6525_0_port_r)
968968   AM_RANGE(0xc000, 0xffff) AM_READ( MRA8_ROM)
969969ADDRESS_MAP_END
970970
971ADDRESS_MAP_START( c1551_writemem , ADDRESS_SPACE_PROGRAM, 8)
971static ADDRESS_MAP_START( c1551_writemem , ADDRESS_SPACE_PROGRAM, 8)
972972    AM_RANGE(0x0000, 0x0001) AM_WRITE( c1551_port_w)
973973   AM_RANGE(0x0002, 0x07ff) AM_WRITE( MWA8_RAM)
974974    AM_RANGE(0x4000, 0x4007) AM_WRITE( tpi6525_0_port_w)
src/mess/machine/74145.c
r1432r1433
110110
111111
112112/* Data Write */
113void ttl74145_write(int which, offs_t offset, UINT8 data)
113static void ttl74145_write(int which, offs_t offset, UINT8 data)
114114{
115115   /* Decode number */
116116   UINT16 new_number = bcd_2_dec(data & 0x0f);
src/mess/machine/lisa.c
r1432r1433
5050*/
5151
5252/* up to 2MB of 68k RAM (normally 1MB or 512kb), generally 16kb of ROM */
53UINT8 *lisa_ram_ptr;
54UINT8 *lisa_rom_ptr;
53static UINT8 *lisa_ram_ptr;
54static UINT8 *lisa_rom_ptr;
5555
5656/* offsets in REGION_CPU1 */
5757#define RAM_OFFSET 0x004000
r1432r1433
6464UINT8 *lisa_fdc_rom;
6565
6666/* special ROM (includes S/N) */
67UINT8 *videoROM_ptr;
67static UINT8 *videoROM_ptr;
6868
6969
7070/*
r1432r1433
170170/*
171171   lisa model identification
172172*/
173enum
173static enum
174174{
175175   /*lisa1,*/      /* twiggy floppy drive */
176176   lisa2,      /* 3.5'' Sony floppy drive */
r1432r1433
178178   mac_xl      /* same as above with modified video */
179179} lisa_model;
180180
181struct
181static struct
182182{
183183   unsigned int has_fast_timers : 1;   /* I/O board VIAs are clocked at 1.25 MHz (?) instead of .5 MHz (?) (Lisa 2/10, Mac XL) */
184184                              /* Note that the beep routine in boot ROMs implies that
src/mess/machine/8530scc.c
r1432r1433
1515static int scc_reg;
1616static int scc_status;
1717
18unsigned char scc_reg_val_a[16];
19unsigned char scc_reg_val_b[16];
18static unsigned char scc_reg_val_a[16];
19static unsigned char scc_reg_val_b[16];
2020
2121
2222void scc_init(const struct scc8530_interface *intf)
src/mess/machine/sym1.c
r1432r1433
3333******************************************************************************/
3434
3535
36void sym1_74145_output_0_w(int state)
36static void sym1_74145_output_0_w(int state)
3737{
3838   if (state) timer_adjust(led_update, LED_REFRESH_DELAY, 0, attotime_never);
3939}
4040
4141
42void sym1_74145_output_1_w(int state)
42static void sym1_74145_output_1_w(int state)
4343{
4444   if (state) timer_adjust(led_update, LED_REFRESH_DELAY, 1, attotime_never);
4545}
4646
4747
48void sym1_74145_output_2_w(int state)
48static void sym1_74145_output_2_w(int state)
4949{
5050   if (state) timer_adjust(led_update, LED_REFRESH_DELAY, 2, attotime_never);
5151}
5252
5353
54void sym1_74145_output_3_w(int state)
54static void sym1_74145_output_3_w(int state)
5555{
5656   if (state) timer_adjust(led_update, LED_REFRESH_DELAY, 3, attotime_never);
5757}
5858
5959
60void sym1_74145_output_4_w(int state)
60static void sym1_74145_output_4_w(int state)
6161{
6262   if (state) timer_adjust(led_update, LED_REFRESH_DELAY, 4, attotime_never);
6363}
6464
6565
66void sym1_74145_output_5_w(int state)
66static void sym1_74145_output_5_w(int state)
6767{
6868   if (state) timer_adjust(led_update, LED_REFRESH_DELAY, 5, attotime_never);
6969}
r1432r1433
7676
7777
7878/* The speaker is connected to output 6 of the 74145 */
79void sym1_74145_output_6_w(int state)
79static void sym1_74145_output_6_w(int state)
8080{
8181   speaker_level_w(0, state);   
8282}
src/mess/machine/cgenie.c
r1432r1433
3030
3131
3232int cgenie_tv_mode = -1;
33int cgenie_load_cas = 0;
33static int cgenie_load_cas = 0;
3434static int port_ff = 0xff;
3535
3636#define CGENIE_DRIVE_INFO
src/mess/machine/pmd85.c
r1432r1433
773773   return address;
774774}
775775
776void pmd85_common_driver_init (void)
776static void pmd85_common_driver_init (void)
777777{
778778   memory_set_opbase_handler(0, pmd85_opbaseoverride);
779779
src/mess/machine/c128.c
r1432r1433
246246   game=c64_game;
247247}
248248
249UINT8 c128_mmu[0x0b];
249static UINT8 c128_mmu[0x0b];
250250static int c128_mmu_helper[4] =
251251{0x400, 0x1000, 0x2000, 0x4000};
252252static int mmu_cpu=0;
src/mess/machine/lviv.c
r1432r1433
2323
2424unsigned char * lviv_video_ram;
2525
26UINT8 lviv_ppi_port_outputs[2][3];
26static UINT8 lviv_ppi_port_outputs[2][3];
2727
2828static UINT8 startup_mem_map;
2929
src/mess/machine/pc8801.c
r1432r1433
3737static UINT8 extmem_ctrl[2];
3838
3939static int use_5FD;
40void pc8801_init_5fd(void);
40static void pc8801_init_5fd(void);
4141
4242static void pc88sr_init_fmsound(void);
4343static int enable_FM_IRQ;
r1432r1433
776776static READ8_HANDLER( load_8255_chip1_C )   { return load_8255_C(1); }
777777
778778
779const ppi8255_interface pc8801_8255_config =
779static const ppi8255_interface pc8801_8255_config =
780780{
781781   2,
782782   { load_8255_chip0_A, load_8255_chip1_A },
r1432r1433
811811   pc8801_fdc_dma_drq
812812};
813813
814void pc8801_init_5fd(void)
814static void pc8801_init_5fd(void)
815815{
816816   use_5FD = (input_port_18_r(0)&0x80)!=0x00;
817817   ppi8255_init(&pc8801_8255_config);
src/mess/machine/osi.c
r1432r1433
99static int sb2m600_tape_size;
1010static int sb2m600_tape_index;
1111
12READ8_HANDLER( sb2m600_acia0_casin )
12static READ8_HANDLER( sb2m600_acia0_casin )
1313{
1414   if (sb2m600_tape_image && (sb2m600_tape_index < sb2m600_tape_size))
1515      return sb2m600_tape_image[sb2m600_tape_index++];
r1432r1433
1717   return 0;
1818}
1919
20READ8_HANDLER (sb2m600_acia0_statin )
20static READ8_HANDLER (sb2m600_acia0_statin )
2121{
2222   if (sb2m600_tape_image && (sb2m600_tape_index < sb2m600_tape_size))
2323      return ACIA_6850_RDRF;
src/mess/machine/oric.c
r1432r1433
452452
453453*/
454454
455struct via6522_interface oric_6522_interface=
455static struct via6522_interface oric_6522_interface=
456456{
457457   oric_via_in_a_func,
458458   oric_via_in_b_func,
r1432r1433
14331433
14341434    oric_refresh_ints();
14351435}
1436struct via6522_interface telestrat_via2_interface=
1436static struct via6522_interface telestrat_via2_interface=
14371437{
14381438   telestrat_via2_in_a_func,
14391439   telestrat_via2_in_b_func,
src/mess/machine/atom.c
r1432r1433
2727#include "sound/speaker.h"
2828
2929UINT8 atom_8255_porta;
30UINT8 atom_8255_portb;
30static UINT8 atom_8255_portb;
3131UINT8 atom_8255_portc;
3232
3333/* printer data written */
r1432r1433
104104   previous_ca2_data = data;
105105}
106106
107struct via6522_interface atom_6522_interface=
107static struct via6522_interface atom_6522_interface=
108108{
109109   atom_via_in_a_func,      /* printer status */
110110   NULL,
src/mess/machine/electron.c
r1432r1433
1313#include "devices/cassette.h"
1414
1515ULA ula;
16emu_timer *electron_tape_timer;
16static emu_timer *electron_tape_timer;
1717
1818static mess_image *cassette_device_image( void ) {
1919   return image_from_devtype_and_index( IO_CASSETTE, 0 );
r1432r1433
9494   }
9595}
9696
97READ8_HANDLER( electron_read_keyboard ) {
97static READ8_HANDLER( electron_read_keyboard ) {
9898   UINT8 data = 0;
9999   int i;
100100   //logerror( "PC=%04x: keyboard read from paged rom area, address: %04x", activecpu_get_pc(), offset );
src/mess/machine/pc_fdc.c
r1432r1433
4444   int int_state;
4545
4646   struct pc_fdc_interface fdc_interface;
47} pc_fdc;
47};
4848
4949static struct pc_fdc *fdc;
5050
src/mess/machine/99_ide.c
r1432r1433
6666
6767static int ide_irq, clk_irq;
6868
69struct ide_interface ti99_ide_interface =
69static struct ide_interface ti99_ide_interface =
7070{
7171   ide_interrupt_callback
7272};
src/mess/machine/intv.c
r1432r1433
408408   return intv_load_rom_file(image, 1);
409409}
410410
411#ifdef UNUSED_FUNCTION
411412DRIVER_INIT( intv )
412413{
413414}
415#endif
414416
415417/* Set Reset and INTR/INTRM Vector */
416418MACHINE_RESET( intv )
src/mess/machine/99_peb.c
r1432r1433
162162static int tmp_buffer;
163163
164164/* inta/intb handlers */
165void (*inta_callback)(int state);
166void (*intb_callback)(int state);
165static void (*inta_callback)(int state);
166static void (*intb_callback)(int state);
167167
168168
169169/*
src/mess/machine/cpm_bios.c
r1432r1433
5757   BDOS >> 8
5858};
5959
60cpm_dph dph[NDSK] = {
60static cpm_dph dph[NDSK] = {
6161   { 0, 0, 0, 0, DIRBUF, DPB0, 0, 0 },
6262   { 0, 0, 0, 0, DIRBUF, DPB1, 0, 0 },
6363   { 0, 0, 0, 0, DIRBUF, DPB2, 0, 0 },
src/mess/machine/sms.c
r1432r1433
1313
1414#define MAX_CARTRIDGES      16
1515
16UINT8 smsBiosPageCount;
17UINT8 smsFMDetect;
18UINT8 smsVersion;
19int smsPaused;
16static UINT8 smsBiosPageCount;
17static UINT8 smsFMDetect;
18static UINT8 smsVersion;
19static int smsPaused;
2020
21UINT8 biosPort;
21static UINT8 biosPort;
2222
23UINT8 *BIOS;
23static UINT8 *BIOS;
2424
25UINT8 *sms_mapper_ram;
26UINT8 sms_mapper[4];
27UINT8 *sms_banking_bios[5]; /* we are going to use 1-4, same as bank numbers */
28UINT8 *sms_banking_cart[5]; /* we are going to use 1-4, same as bank numbers */
29UINT8 *sms_banking_none[5]; /* we are going to use 1-4, same as bank numbers */
30UINT8 ggSIO[5] = { 0x7F, 0xFF, 0x00, 0xFF, 0x00 };
31UINT8 sms_store_control = 0;
25static UINT8 *sms_mapper_ram;
26static UINT8 sms_mapper[4];
27static UINT8 *sms_banking_bios[5]; /* we are going to use 1-4, same as bank numbers */
28static UINT8 *sms_banking_cart[5]; /* we are going to use 1-4, same as bank numbers */
29static UINT8 *sms_banking_none[5]; /* we are going to use 1-4, same as bank numbers */
30static UINT8 ggSIO[5] = { 0x7F, 0xFF, 0x00, 0xFF, 0x00 };
31static UINT8 sms_store_control = 0;
3232
33UINT8 sms_input_port0;
34UINT8 sms_input_port1;
33static UINT8 sms_input_port0;
34static UINT8 sms_input_port1;
3535
3636/* Data needed for Rapid Fire Unit support */
37emu_timer   *rapid_fire_timer;
38UINT8 rapid_fire_state_1;
39UINT8 rapid_fire_state_2;
37static emu_timer   *rapid_fire_timer;
38static UINT8 rapid_fire_state_1;
39static UINT8 rapid_fire_state_2;
4040
4141/* Data needed for Paddle Control controller */
42UINT32 last_paddle_read_time;
43UINT8 paddle_read_state;
42static UINT32 last_paddle_read_time;
43static UINT8 paddle_read_state;
4444
4545/* Data needed for Sports Pad controller */
46UINT32 last_sports_pad_time_1;
47UINT32 last_sports_pad_time_2;
48UINT8 sports_pad_state_1;
49UINT8 sports_pad_state_2;
50UINT8 sports_pad_last_data_1;
51UINT8 sports_pad_last_data_2;
52UINT8 sports_pad_1_x;
53UINT8 sports_pad_1_y;
54UINT8 sports_pad_2_x;
55UINT8 sports_pad_2_y;
46static UINT32 last_sports_pad_time_1;
47static UINT32 last_sports_pad_time_2;
48static UINT8 sports_pad_state_1;
49static UINT8 sports_pad_state_2;
50static UINT8 sports_pad_last_data_1;
51static UINT8 sports_pad_last_data_2;
52static UINT8 sports_pad_1_x;
53static UINT8 sports_pad_1_y;
54static UINT8 sports_pad_2_x;
55static UINT8 sports_pad_2_y;
5656
57struct {
57static struct {
5858   UINT8   *ROM;         /* Pointer to ROM image data */
5959   UINT32   size;         /* Size of the ROM image */
6060   UINT8   features;      /* on-cartridge special hardware */
r1432r1433
6464   UINT32   ram_size;      /* size of the on-cartridge RAM */
6565   UINT8   ram_page;      /* currently swapped in cartridge RAM */
6666} sms_cartridge[MAX_CARTRIDGES];
67UINT8   sms_current_cartridge;
67static UINT8   sms_current_cartridge;
6868
6969static TIMER_CALLBACK( rapid_fire_callback ) {
7070   rapid_fire_state_1 ^= 0xFF;
r1432r1433
447447   }
448448}
449449
450WRITE8_HANDLER(sms_codemasters_page0_w) {
450static WRITE8_HANDLER(sms_codemasters_page0_w) {
451451   if ( sms_cartridge[sms_current_cartridge].ROM && sms_cartridge[sms_current_cartridge].features & CF_CODEMASTERS_MAPPER ) {
452452      UINT8 rom_page_count = sms_cartridge[sms_current_cartridge].size / 0x4000;
453453      sms_banking_cart[1] = sms_cartridge[sms_current_cartridge].ROM + ( ( rom_page_count > 0) ? data % rom_page_count : 0 ) * 0x4000;
r1432r1433
457457   }
458458}
459459
460WRITE8_HANDLER(sms_codemasters_page1_w) {
460static WRITE8_HANDLER(sms_codemasters_page1_w) {
461461   if ( sms_cartridge[sms_current_cartridge].ROM && sms_cartridge[sms_current_cartridge].features & CF_CODEMASTERS_MAPPER ) {
462462      /* Check if we need to switch in some RAM */
463463      if ( data & 0x80 ) {
src/mess/machine/apple2.c
r1432r1433
10911091  apple2_c08x_r
10921092***************************************************************************/
10931093
1094READ8_HANDLER ( apple2_c08x_r )
1094static READ8_HANDLER ( apple2_c08x_r )
10951095{
10961096   UINT32 val, mask;
10971097
r1432r1433
11271127  apple2_c08x_w
11281128***************************************************************************/
11291129
1130WRITE8_HANDLER ( apple2_c08x_w )
1130static WRITE8_HANDLER ( apple2_c08x_w )
11311131{
11321132   apple2_c08x_r(offset);
11331133}
src/mess/machine/primo.c
r1432r1433
4141
4242*******************************************************************************/
4343
44void primo_update_memory (void)
44static void primo_update_memory (void)
4545{
4646   switch (primo_port_FD & 0x03)
4747   {
r1432r1433
204204
205205*******************************************************************************/
206206
207void primo_common_driver_init (void)
207static void primo_common_driver_init (void)
208208{
209209   primo_port_FD = 0x00;
210210}
r1432r1433
233233
234234*******************************************************************************/
235235
236void primo_common_machine_init (void)
236static void primo_common_machine_init (void)
237237{
238238   if (readinputport(6))
239239      primo_port_FD = 0x00;
src/mess/machine/c64.c
r1432r1433
6161UINT8 *c64_chargen;
6262UINT8 *c64_roml=0;
6363UINT8 *c64_romh=0;
64UINT8 *c64_io_mirror = NULL;
64static UINT8 *c64_io_mirror = NULL;
6565
6666static UINT8 c64_port_data;
6767
r1432r1433
362362 * flag restore key or rs232 received data input
363363 * irq to nmi connected ?
364364 */
365UINT8 c64_cia1_port_a_r (void)
365static UINT8 c64_cia1_port_a_r (void)
366366{
367367   UINT8 value = 0xff;
368368
r1432r1433
966966   vicirq = 0;
967967}
968968
969OPBASE_HANDLER( c64_opbase ) {
969static OPBASE_HANDLER( c64_opbase ) {
970970   if ( ( address & 0xf000 ) == 0xd000 ) {
971971      if ( c64_io_enabled ) {
972972         opcode_mask = 0x0fff;
src/mess/machine/hd63450.c
r1432r1433
88
99static struct hd63450 dmac;
1010
11TIMER_CALLBACK(dma_transfer_timer);
12void dma_transfer_abort(int channel);
13void dma_transfer_halt(int channel);
14void dma_transfer_continue(int channel);
11static TIMER_CALLBACK(dma_transfer_timer);
12static void dma_transfer_abort(int channel);
13static void dma_transfer_halt(int channel);
14static void dma_transfer_continue(int channel);
1515
1616void hd63450_init(struct hd63450_interface* intf)
1717{
r1432r1433
216216   logerror("DMA: Transfer begins: size=0x%08x\n",dmac.transfer_size[channel]);
217217}
218218
219TIMER_CALLBACK(dma_transfer_timer)
219static TIMER_CALLBACK(dma_transfer_timer)
220220{
221221   hd63450_single_transfer(param);
222222}
223223
224void dma_transfer_abort(int channel)
224static void dma_transfer_abort(int channel)
225225{
226226   logerror("DMA#%i: Transfer aborted\n",channel);
227227   timer_adjust(dmac.timer[channel],attotime_zero,0,attotime_zero);
r1432r1433
231231   dmac.reg[channel].csr &= ~0x08;  // channel no longer active
232232}
233233
234void dma_transfer_halt(int channel)
234static void dma_transfer_halt(int channel)
235235{
236236   dmac.halted[channel] = 1;
237237   timer_adjust(dmac.timer[channel],attotime_zero,0,attotime_zero);
238238}
239239
240void dma_transfer_continue(int channel)
240static void dma_transfer_continue(int channel)
241241{
242242   if(dmac.halted[channel] != 0)
243243   {
src/mess/machine/ti99_4x.c
r1432r1433
336336} GROM_port_t;
337337
338338/* descriptor for console GROMs */
339GROM_port_t console_GROMs;
339static GROM_port_t console_GROMs;
340340
341341/* true if hsgpl is enabled (i.e. has_hsgpl is true and hsgpl cru bit crdena is
342342set) */
r1432r1433
927927   mecmouse_y = 0;
928928}
929929
930#ifdef UNUSED_FUNCTION
930931void machine_stop_ti99(void)
931932{
932933   if (has_ide)
r1432r1433
940941
941942   tms9901_cleanup(0);
942943}
944#endif
943945
944946
945947/*
src/mess/machine/atarifdc.c
r1432r1433
602602      logerror("atari %d bytes to read\n", atari_fdc.serin_count);
603603}
604604
605void a800_serial_write(void)
605static void a800_serial_write(void)
606606{
607607   int i, drive, sector, offset;
608608
src/mess/machine/sgi.c
r1432r1433
2424   }
2525}
2626
27void *tMC_UpdateTimer;
27static void *tMC_UpdateTimer;
2828static UINT32 nMC_CPUControl0;
2929static UINT32 nMC_CPUControl1;
3030static UINT32 nMC_Watchdog;
src/mess/machine/vc20tape.c
r1432r1433
3838tape;
3939
4040/* these are the values for wav files */
41struct
41static struct
4242{
4343   int state;
4444   emu_timer *timer;
r1432r1433
4848} wav;
4949
5050/* these are the values for prg files */
51struct
51static struct
5252{
5353   int state;
5454   emu_timer *prg_timer;
src/mess/machine/bbc.c
r1432r1433
428428}
429429
430430
431WRITE8_HANDLER ( page_selectbm_w )
431static WRITE8_HANDLER ( page_selectbm_w )
432432{
433433   pagedRAM=(data&0x80)>>7;
434434   bbc_rombank=data&0x0f;
r1432r1433
859859
860860
861861/* This the BBC Masters Real Time Clock and NVRam IC */
862void MC146818_set(void)
862static void MC146818_set(void)
863863{
864864   logerror ("146181 WR=%d DS=%d AS=%d CE=%d \n",MC146818_WR,MC146818_DS,MC146818_AS,MC146818_CE);
865865
r1432r1433
12021202file. I now need to look at the new printer code and see how I should
12031203connect this code up to that */
12041204
1205int bbc_printer_porta;
1206int bbc_printer_ca1;
1207int bbc_printer_ca2;
1205static int bbc_printer_porta;
1206static int bbc_printer_ca1;
1207static int bbc_printer_ca2;
12081208
12091209/* USER VIA 6522 port A is buffered as an output through IC70 so
12101210reading from this port will always return 0xff */
r1432r1433
13571357
13581358
13591359
1360void Serial_interrupt(int level)
1360static void Serial_interrupt(int level)
13611361{
13621362  MC6850_irq=level;
13631363  bbc_setirq();
r1432r1433
13861386static int len2=0;
13871387static int len3=0;
13881388
1389emu_timer *bbc_tape_timer;
1389static emu_timer *bbc_tape_timer;
13901390
13911391static TIMER_CALLBACK(bbc_tape_timer_cb)
13921392{
r1432r1433
14481448
14491449}
14501450
1451void BBC_Cassette_motor(unsigned char status)
1451static void BBC_Cassette_motor(unsigned char status)
14521452{
14531453   if (status)
14541454   {
r1432r1433
15301530};
15311531
15321532
1533READ8_HANDLER( bbc_i8271_read )
1533static READ8_HANDLER( bbc_i8271_read )
15341534{
15351535int ret;
15361536   ret=0x0ff;
r1432r1433
15561556   return 0x0ff;
15571557}
15581558
1559WRITE8_HANDLER( bbc_i8271_write )
1559static WRITE8_HANDLER( bbc_i8271_write )
15601560{
15611561   logerror("i8271 write  %d  %d\n",offset,data);
15621562
r1432r1433
16881688
16891689}
16901690
1691WRITE8_HANDLER(bbc_wd177x_status_w)
1691static WRITE8_HANDLER(bbc_wd177x_status_w)
16921692{
16931693   drive_control = data;
16941694
r1432r1433
18051805static int opusbank;
18061806
18071807
1808WRITE8_HANDLER( bbc_opus_status_w )
1808static WRITE8_HANDLER( bbc_opus_status_w )
18091809{
18101810   drive_control = data;
18111811
src/mess/machine/compis.c
r1432r1433
9292} i186;
9393
9494/* Keyboard */
95const UINT8 compis_keyb_codes[6][16] = {
95static const UINT8 compis_keyb_codes[6][16] = {
9696{0x39, 0x32, 0x29, 0x20, 0x17, 0x0e, 0x05, 0x56, 0x4d, 0x44, 0x08, 0x57, 0x59, 0x4e, 0x43, 0x3a},
9797{0x31, 0x28, 0x1f, 0x16, 0x0d, 0x04, 0x55, 0x4c, 0x4f, 0x58, 0x00, 0x07, 0xff, 0x42, 0x3b, 0x30},
9898{0x27, 0x1e, 0x15, 0x0c, 0x03, 0x54, 0x06, 0x50, 0x01, 0xfe, 0x38, 0x2f, 0x26, 0x1d, 0x14, 0x0b},
r1432r1433
182182/* Name: compis_irq_set                                                    */
183183/* Desc: IRQ - Issue an interrupt request                                  */
184184/*-------------------------------------------------------------------------*/
185#ifdef UNUSED_FUNCTION
185186void compis_irq_set(UINT8 irq)
186187{
187188   cpunum_set_input_line_vector(0, 0, irq);
188189   cpunum_set_input_line(0, 0, HOLD_LINE);
189190}
191#endif
190192
191193/*-------------------------------------------------------------------------*/
192194/*  OSP PIC 8259                                                           */
193195/*-------------------------------------------------------------------------*/
194196
195void compis_osp_pic_irq(UINT8 irq)
197static void compis_osp_pic_irq(UINT8 irq)
196198{
197199   pic8259_set_irq_line(0, irq, 1);
198200   pic8259_set_irq_line(0, irq, 0);
r1432r1433
211213/*-------------------------------------------------------------------------*/
212214/*  Keyboard                                                               */
213215/*-------------------------------------------------------------------------*/
214void compis_keyb_update(void)
216static void compis_keyb_update(void)
215217{
216218   UINT8 key_code;
217219   UINT8 key_status;
r1432r1433
265267   }
266268}
267269
268void compis_keyb_init(void)
270static void compis_keyb_init(void)
269271{
270272   compis.keyboard.key_code = 0;
271273   compis.keyboard.key_status = 0x80;
r1432r1433
284286   nec765_set_reset_state(1);
285287}
286288
287void compis_fdc_tc(int state)
289static void compis_fdc_tc(int state)
288290{
289291   /* Terminal count if iSBX-218A has DMA enabled */
290292     if (readinputport(7))
r1432r1433
293295   }
294296}
295297
296void compis_fdc_int(int state)
298static void compis_fdc_int(int state)
297299{
298300   /* No interrupt requests if iSBX-218A has DMA enabled */
299301     if (!readinputport(7) && state)
r1432r1433
523525/*-------------------------------------------------------------------------*/
524526/*  USART 8251                                                             */
525527/*-------------------------------------------------------------------------*/
526void compis_usart_rxready(int state)
528static void compis_usart_rxready(int state)
527529{
528530/*
529531   if (state)
r1432r1433
15161518/* Name: compis                                                            */
15171519/* Desc: CPU - Initialize the 80186 CPU                                    */
15181520/*-------------------------------------------------------------------------*/
1519void compis_cpu_init(void)
1521static void compis_cpu_init(void)
15201522{
15211523   /* create timers here so they stick around */
15221524   i186.timer[0].int_timer = timer_alloc(internal_timer_int, NULL);
src/mess/formats/fmsx_cas.c
r1432r1433
176176
177177
178178
179struct CassetteFormat fmsx_cas_format =
179static struct CassetteFormat fmsx_cas_format =
180180{
181181   "tap",
182182   fmsx_cas_identify,
src/mess/formats/uef_cas.c
r1432r1433
7272   return p;
7373}
7474
75UINT8 *gz_ptr = NULL;
75static UINT8 *gz_ptr = NULL;
7676
7777static float get_uef_float( const UINT8 *Float)
7878{
src/mess/formats/apf_apt.c
r1432r1433
138138
139139
140140
141struct CassetteFormat apf_apt_format =
141static struct CassetteFormat apf_apt_format =
142142{
143143   "apt",
144144   apf_apt_identify,
src/mess/formats/tzx_cas.c
r1432r1433
477477   return cassette_legacy_construct( cassette, &tap_legacy_fill_wave );
478478}
479479
480struct CassetteFormat tzx_cassette_format = {
480static struct CassetteFormat tzx_cassette_format = {
481481   "tzx",
482482   tzx_cassette_identify,
483483   tzx_cassette_load,
484484   NULL
485485};
486486
487struct CassetteFormat tap_cassette_format = {
487static struct CassetteFormat tap_cassette_format = {
488488   "tap",
489489   tap_cassette_identify,
490490   tap_cassette_load,
src/mess/formats/vt_cas.c
r1432r1433
114114   return cassette_legacy_construct(cassette, &vtech1_legacy_fill_wave);
115115}
116116
117struct CassetteFormat vtech1_cas_format =
117static struct CassetteFormat vtech1_cas_format =
118118{
119119   "cas",
120120   vtech1_cas_identify,
r1432r1433
209209   return cassette_legacy_construct(cassette, &vtech2_legacy_fill_wave);
210210}
211211
212struct CassetteFormat vtech2_cas_format =
212static struct CassetteFormat vtech2_cas_format =
213213{
214214   "cas",
215215   vtech2_cas_identify,
src/mess/formats/csw_cas.c
r1432r1433
3636   return LITTLE_ENDIANIZE_INT32(value);
3737}
3838
39int mycaslen;
39static int mycaslen;
4040
4141static int csw_cas_to_wav_size( const UINT8 *casdata, int caslen ) {
4242UINT32 SampleRate;
r1432r1433
310310   return cassette_legacy_construct( cassette, &csw_legacy_fill_wave );
311311}
312312
313struct CassetteFormat csw_cassette_format = {
313static struct CassetteFormat csw_cassette_format = {
314314   "csw",
315315   csw_cassette_identify,
316316   csw_cassette_load,
src/mess/formats/wavfile.c
r1432r1433
248248   This code has already identified some rounding errors
249249*********************************************************************/
250250
251#ifdef UNUSED_FUNCTION
251252void wavfile_testload(const char *fname)
252253{
253254   cassette_image *cassette;
r1432r1433
279280
280281   cassette_close(cassette);
281282}
283#endif
282284
283285
284286
src/mess/formats/ap_dsk35.c
r1432r1433
543543
544544
545545
546UINT32 apple35_get_track_size(floppy_image *floppy, int head, int track)
546static UINT32 apple35_get_track_size(floppy_image *floppy, int head, int track)
547547{
548548   if ((track < 0) || (track >= 80))
549549      return 0;
src/mess/formats/mz_cas.c
r1432r1433
326326
327327
328328
329struct CassetteFormat mz700_cas_format =
329static struct CassetteFormat mz700_cas_format =
330330{
331331   "m12",
332332   mz700_cas_identify,
src/mess/formats/svi_cas.c
r1432r1433
191191
192192
193193
194struct CassetteFormat svi_cas_format =
194static struct CassetteFormat svi_cas_format =
195195{
196196   "cas",
197197   svi_cas_identify,
src/mess/formats/sord_cas.c
r1432r1433
1616
1717static const UINT8 SORDM5_CAS_HEADER[6] = { 'S', 'O', 'R', 'D', 'M', '5'};
1818
19const struct CassetteModulation sordm5_cas_modulation =
19static const struct CassetteModulation sordm5_cas_modulation =
2020{
2121   CASSETTE_MODULATION_SINEWAVE,
2222   1575.0 - 300, 1575.0, 1575.0 + 300,
2323   1575.5 + 300, 3150.0, 3150.0 + 600
2424};
2525
26UINT8 cassette_image_read_uint8( cassette_image *cassette, UINT64 offset)
26static UINT8 cassette_image_read_uint8( cassette_image *cassette, UINT64 offset)
2727{
2828   UINT8 data;
2929   cassette_image_read( cassette, &data, offset, 1);
r1432r1433
126126   return CASSETTE_ERROR_SUCCESS;
127127}
128128
129struct CassetteFormat sordm5_cas_format =
129static struct CassetteFormat sordm5_cas_format =
130130{
131131   "cas",
132132   sordm5_tap_identify,
src/mess/formats/lviv_lvt.c
r1432r1433
134134
135135
136136
137struct CassetteFormat lviv_lvt_image_format =
137static struct CassetteFormat lviv_lvt_image_format =
138138{
139139   "lvt",
140140   lviv_lvt_identify,
src/mess/formats/thom_dsk.c
r1432r1433
472472
473473
474474
475void thom_floppy_fd_save ( mess_image* image )
475static void thom_floppy_fd_save ( mess_image* image )
476476{
477477   thom_floppy_drive* d = thom_floppy_drives + image_index_in_device( image );
478478   unsigned size = d->sides * d->tracks * d->sectors * d->sector_size;
r1432r1433
552552
553553
554554
555void thom_floppy_qd_save ( mess_image* image )
555static void thom_floppy_qd_save ( mess_image* image )
556556{
557557   thom_floppy_drive* d = thom_floppy_drives + image_index_in_device( image );
558558   unsigned size = d->sides * d->tracks * d->sectors * d->sector_size;
src/mess/formats/primoptp.c
r1432r1433
235235   return cassette_legacy_construct(cassette, &primo_legacy_fill_wave);
236236}
237237
238struct CassetteFormat primo_ptp_image_format =
238static struct CassetteFormat primo_ptp_image_format =
239239{
240240   "ptp",
241241   primo_ptp_identify,
src/mess/formats/pmd_pmd.c
r1432r1433
106106   return cassette_legacy_construct(cassette, &pmd85_legacy_fill_wave);
107107}
108108
109struct CassetteFormat pmd85_pmd_image_format =
109static struct CassetteFormat pmd85_pmd_image_format =
110110{
111111   "pmd",
112112   pmd85_pmd_identify,
src/mess/formats/zx81_p.c
r1432r1433
128128
129129/* ZX-81 functions */
130130
131UINT8 zx81_chars[]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*00h-07h*/
131static UINT8 zx81_chars[]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*00h-07h*/
132132           0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*08h-0fh*/
133133           0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*10h-17h*/
134134           0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*18h-1fh*/
r1432r1433
211211   return cassette_legacy_construct(cassette, &zx81_legacy_fill_wave);
212212}
213213
214struct CassetteFormat zx81_p_image_format =
214static struct CassetteFormat zx81_p_image_format =
215215{
216216   "p,81",
217217   zx81_p_identify,
r1432r1433
274274   return cassette_legacy_construct(cassette, &zx80_legacy_fill_wave);
275275}
276276
277struct CassetteFormat zx80_o_image_format =
277static struct CassetteFormat zx80_o_image_format =
278278{
279279   "o,80",
280280   zx80_o_identify,
src/mess/formats/oric_tap.c
r1432r1433
516516
517517
518518
519struct CassetteFormat oric_tap_format =
519static struct CassetteFormat oric_tap_format =
520520{
521521   "tap",
522522   oric_tap_identify,
src/mess/formats/a26_cas.c
r1432r1433
153153   return cassette_legacy_construct( cassette, &a26_legacy_fill_wave );
154154}
155155
156struct CassetteFormat a26_cassette_format = {
156static struct CassetteFormat a26_cassette_format = {
157157   "a26",
158158   a26_cassette_identify,
159159   a26_cassette_load,
src/mess/formats/thom_cas.c
r1432r1433
942942
943943
944944
945casserr_t mo5_wav_identify ( cassette_image *cass,
945static casserr_t mo5_wav_identify ( cassette_image *cass,
946946              struct CassetteOptions *opts )
947947{
948948   casserr_t e = wavfile_format.identify( cass, opts );
r1432r1433
951951
952952
953953
954casserr_t mo5_wav_load ( cassette_image *cass )
954static casserr_t mo5_wav_load ( cassette_image *cass )
955955{
956956   casserr_t e = wavfile_format.load( cass );
957957   struct CassetteInfo info;
r1432r1433
967967
968968
969969
970casserr_t mo5_wav_save ( cassette_image *cass, const struct CassetteInfo *info )
970static casserr_t mo5_wav_save ( cassette_image *cass, const struct CassetteInfo *info )
971971{
972972   int len = info->sample_count / info->sample_frequency;
973973   PRINT (( "mo5_wav_save: saving cassette, length %imn %is, %i Hz, %i bps\n", len / 60, len % 60, info->sample_frequency, info->bits_per_sample ));
src/mess/drivers/vip.c
r1432r1433
215215
216216/* System Configuration */
217217
218QUICKLOAD_LOAD( vip )
218static QUICKLOAD_LOAD( vip )
219219{
220220   int size = image_length(image);
221221
src/mess/drivers/comquest.c
r1432r1433
224224//   memory_set_bankptr(1,mem+0x00000);
225225}
226226
227UINT32 amask= 0xffff;
227static UINT32 amask= 0xffff;
228228
229229
230230static MACHINE_DRIVER_START( comquest )
src/mess/drivers/zx.c
r1432r1433
3232
3333/* Memory Maps */
3434
35ADDRESS_MAP_START( zx80_map, ADDRESS_SPACE_PROGRAM, 8 )
35static ADDRESS_MAP_START( zx80_map, ADDRESS_SPACE_PROGRAM, 8 )
3636   AM_RANGE(0x0000, 0x0fff) AM_ROM
3737   AM_RANGE(0x8000, 0xffff) AM_NOP
3838ADDRESS_MAP_END
3939
40ADDRESS_MAP_START( zx81_map, ADDRESS_SPACE_PROGRAM, 8 )
40static ADDRESS_MAP_START( zx81_map, ADDRESS_SPACE_PROGRAM, 8 )
4141   AM_RANGE(0x0000, 0x1fff) AM_ROM
4242   AM_RANGE(0x8000, 0xffff) AM_NOP
4343ADDRESS_MAP_END
4444
45ADDRESS_MAP_START( pc8300_map, ADDRESS_SPACE_PROGRAM, 8 )
45static ADDRESS_MAP_START( pc8300_map, ADDRESS_SPACE_PROGRAM, 8 )
4646   AM_RANGE(0x0000, 0x1fff) AM_ROM
4747   AM_RANGE(0x4000, 0x7fff) AM_RAM   // PC8300 comes with 16K RAM
4848   AM_RANGE(0x8000, 0xffff) AM_NOP
src/mess/drivers/dgn_beta.c
r1432r1433
6464
6565*/
6666
67unsigned char dgnbeta_palette[] =
67static unsigned char dgnbeta_palette[] =
6868{
6969   /*normal brightness */
7070   0x00,0x00,0x00,    /* black */
src/mess/drivers/cpschngr.c
r1432r1433
2424
2525#include "drivers/cps1.c"
2626
27#ifdef UNUSED_FUNCTION
2728void wof_decode(void)      { }
2829void dino_decode(void)     { }
2930void punisher_decode(void) { }
3031void slammast_decode(void) { }
32#endif
3133
3234/***************************************************************************
3335
src/mess/drivers/jaguar.c
r1432r1433
440440   jaguar_dsp_cpu_int
441441};
442442
443MACHINE_DRIVER_START( jaguar )
443static MACHINE_DRIVER_START( jaguar )
444444
445445   /* basic machine hardware */
446446   MDRV_CPU_ADD(M68EC020, 13295000)
src/mess/drivers/3do.c
r1432r1433
106106#define X2_CLOCK_NTSC   49090000
107107#define X601_CLOCK      16934400
108108
109UINT32   *dram;
110UINT32   *vram;
109static UINT32   *dram;
110static UINT32   *vram;
111111
112112static ADDRESS_MAP_START( 3do_mem, ADDRESS_SPACE_PROGRAM, 32)
113113   AM_RANGE(0x00000000, 0x001FFFFF) AM_RAMBANK(1) AM_BASE(&dram)               /* DRAM */
r1432r1433
123123static INPUT_PORTS_START( 3do )
124124INPUT_PORTS_END
125125
126MACHINE_RESET( 3do )
126static MACHINE_RESET( 3do )
127127{
128128   memory_set_bankptr(2,memory_region(REGION_USER1));
129129   
src/mess/drivers/dai.c
r1432r1433
7070#include "mslegacy.h"
7171
7272/* I/O ports */
73ADDRESS_MAP_START( dai_io , ADDRESS_SPACE_IO, 8)
73static ADDRESS_MAP_START( dai_io , ADDRESS_SPACE_IO, 8)
7474ADDRESS_MAP_END
7575
7676/* memory w/r functions */
77ADDRESS_MAP_START( dai_mem , ADDRESS_SPACE_PROGRAM, 8)
77static ADDRESS_MAP_START( dai_mem , ADDRESS_SPACE_PROGRAM, 8)
7878   AM_RANGE( 0x0000, 0xbfff) AM_RAMBANK(1)
7979   AM_RANGE( 0xc000, 0xdfff) AM_ROM
8080   AM_RANGE( 0xe000, 0xefff) AM_ROMBANK(2)
src/mess/drivers/cbmb.c
r1432r1433
417417   /*C64_DIPS */
418418INPUT_PORTS_END
419419
420unsigned char cbm700_palette[] =
420static unsigned char cbm700_palette[] =
421421{
422422   0,0,0, /* black */
423423   0,0x80,0, /* green */
src/mess/drivers/sord.c
r1432r1433
5555
5656static unsigned char fd5_databus;
5757
58ADDRESS_MAP_START( sord_fd5_mem , ADDRESS_SPACE_PROGRAM, 8)
58static ADDRESS_MAP_START( sord_fd5_mem , ADDRESS_SPACE_PROGRAM, 8)
5959   AM_RANGE(0x0000, 0x03fff) AM_ROM   /* internal rom */
6060   AM_RANGE(0x4000, 0x0ffff) AM_RAM
6161ADDRESS_MAP_END
r1432r1433
150150/* 0x030 fd5 reads from this port to communicate with m5 */
151151/* 0x040 */
152152/* 0x050 */
153ADDRESS_MAP_START( readport_sord_fd5 , ADDRESS_SPACE_IO, 8)
153static ADDRESS_MAP_START( readport_sord_fd5 , ADDRESS_SPACE_IO, 8)
154154   AM_RANGE( 0x000, 0x000) AM_READ( nec765_status_r)
155155   AM_RANGE( 0x001, 0x001) AM_READ( nec765_data_r)
156156   AM_RANGE( 0x010, 0x010) AM_READ( fd5_data_r)
157157   AM_RANGE( 0x030, 0x030) AM_READ( fd5_communication_r)
158158ADDRESS_MAP_END
159159
160ADDRESS_MAP_START( writeport_sord_fd5 , ADDRESS_SPACE_IO, 8)
160static ADDRESS_MAP_START( writeport_sord_fd5 , ADDRESS_SPACE_IO, 8)
161161   AM_RANGE( 0x001, 0x001) AM_WRITE( nec765_data_w)
162162   AM_RANGE( 0x010, 0x010) AM_WRITE( fd5_data_w)   
163163   AM_RANGE( 0x020, 0x020) AM_WRITE( fd5_communication_w)
r1432r1433
337337   return readinputport(offset);
338338}
339339
340ADDRESS_MAP_START( sord_m5_mem , ADDRESS_SPACE_PROGRAM, 8)
340static ADDRESS_MAP_START( sord_m5_mem , ADDRESS_SPACE_PROGRAM, 8)
341341   AM_RANGE(0x0000, 0x01fff) AM_ROM   /* internal rom */
342342   AM_RANGE(0x2000, 0x06fff) AM_ROMBANK(1)
343343   AM_RANGE(0x7000, 0x0ffff) AM_RAM
r1432r1433
429429   centronics_write_data(0,data);
430430}
431431
432ADDRESS_MAP_START( sord_m5_io , ADDRESS_SPACE_IO, 8)
432static ADDRESS_MAP_START( sord_m5_io , ADDRESS_SPACE_IO, 8)
433433   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
434434   AM_RANGE(0x00, 0x0f)               AM_READWRITE(sord_ctc_r,         sord_ctc_w)
435435   AM_RANGE(0x10, 0x10) AM_MIRROR(0x0e)   AM_READWRITE(TMS9928A_vram_r,      TMS9928A_vram_w)
r1432r1433
440440   AM_RANGE(0x50, 0x50)               AM_READWRITE(sord_sys_r,         sord_sys_w)
441441ADDRESS_MAP_END
442442
443ADDRESS_MAP_START( srdm5fd5_io , ADDRESS_SPACE_IO, 8)
443static ADDRESS_MAP_START( srdm5fd5_io , ADDRESS_SPACE_IO, 8)
444444   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
445445   AM_RANGE(0x00, 0x0f)               AM_READWRITE(sord_ctc_r,         sord_ctc_w)
446446   AM_RANGE(0x10, 0x10) AM_MIRROR(0x0e)   AM_READWRITE(TMS9928A_vram_r,      TMS9928A_vram_w)
src/mess/drivers/nes.c
r1432r1433
222222   PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Change Disk Side")
223223INPUT_PORTS_END
224224
225#ifdef UNUSED_FUNCTION
225226/* This layout is not changed at runtime */
226227gfx_layout nes_vram_charlayout =
227228{
r1432r1433
233234    { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
234235    16*8    /* every char takes 16 consecutive bytes */
235236};
237#endif
236238
237239static struct NESinterface nes_interface =
238240{
src/mess/drivers/gb.c
r1432r1433
448448static UINT16 cgb_cpu_regs[6] = { 0x11B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };   /* GameBoy Color  / Gameboy Advance */
449449static UINT16 megaduck_cpu_regs[6] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFE, 0x0000 };   /* Megaduck */
450450
451Z80GB_CONFIG dmg_cpu_reset = { NULL, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
452Z80GB_CONFIG sgb_cpu_reset = { sgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
453Z80GB_CONFIG mgb_cpu_reset = { mgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
454Z80GB_CONFIG cgb_cpu_reset = { cgb_cpu_regs, 0, gb_timer_callback };
455Z80GB_CONFIG megaduck_cpu_reset = { megaduck_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
451static Z80GB_CONFIG dmg_cpu_reset = { NULL, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
452static Z80GB_CONFIG sgb_cpu_reset = { sgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
453static Z80GB_CONFIG mgb_cpu_reset = { mgb_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
454static Z80GB_CONFIG cgb_cpu_reset = { cgb_cpu_regs, 0, gb_timer_callback };
455static Z80GB_CONFIG megaduck_cpu_reset = { megaduck_cpu_regs, Z80GB_FEATURE_HALT_BUG, gb_timer_callback };
456456
457457static ADDRESS_MAP_START(gb_map, ADDRESS_SPACE_PROGRAM, 8)
458458   ADDRESS_MAP_FLAGS( AMEF_UNMAP(1) )
src/mess/drivers/pcw16.c
r1432r1433
109109#include "machine/intelfsh.h"
110110
111111// interrupt counter
112unsigned long pcw16_interrupt_counter;
112static unsigned long pcw16_interrupt_counter;
113113// video control
114114extern int pcw16_video_control;
115115/* controls which bank of 2mb address space is paged into memory */
r1432r1433
527527
528528/* PCW16 KEYBOARD */
529529
530unsigned char pcw16_keyboard_status;
531unsigned char pcw16_keyboard_data_shift;
530//unsigned char pcw16_keyboard_status;
531static unsigned char pcw16_keyboard_data_shift;
532532
533533
534534
src/mess/drivers/glasgow.c
r1432r1433
4040       irq_flag,
4141       lcd_invert,
4242       key_selector;
43      UINT8 board_value;
43static UINT8 board_value;
4444static UINT16 beeper;
4545
4646
r1432r1433
100100
101101
102102
103    BOARD_FIELD m_board[8][8];
103static     BOARD_FIELD m_board[8][8];
104104
105    BOARD_FIELD start_board[8][8] =
105static     BOARD_FIELD start_board[8][8] =
106106   {
107107      { { 7,44,434,"WR1"}, { 6,100,434,"WN1"}, { 5,156,434,"WB1"}, { 4,212,434,"WQ1"}, { 3,268,434,"WK"}, { 2,324,434,"WB2"}, { 1,380,434,"WN2"}, { 0,436,434,"WR2"} },
108108      { {15,44,378,"WP1"}, {14,100,378,"WP2"}, {13,156,378,"WP3"}, {12,212,378,"WP4"}, {11,268,378,"WP5"}, {10,324,378,"WP6"}, { 9,380,378,"WP7"}, { 8,436,378,"WP8"} },
src/mess/drivers/msx.c
r1432r1433
20472047   ROM_LOAD ("70fdkfn.rom", 0x30000, 0x20000, CRC(c9651b32) SHA1(84a645becec0a25d3ab7a909cde1b242699a8662))
20482048ROM_END
20492049
2050#ifdef UNUSED_FUNCTION
20502051MSX_LAYOUT_INIT (phc70fd)
20512052   MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000)
20522053   MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000)
r1432r1433
20602061   MSX_LAYOUT_KANJI (0x30000)
20612062   MSX_LAYOUT_RAMIO_SET_BITS (0x80)
20622063MSX_LAYOUT_END
2064#endif
20632065
20642066ROM_START (phc70fd2)
20652067   ROM_REGION (0x70000, REGION_CPU1,0)
src/mess/drivers/gamecom.c
r1432r1433
3636static GFXDECODE_START( gamecom_gfxdecodeinfo )
3737GFXDECODE_END
3838
39SM8500_CONFIG gamecom_cpu_config = {
39static SM8500_CONFIG gamecom_cpu_config = {
4040   gamecom_handle_dma,
4141   gamecom_update_timers
4242};
src/mess/drivers/tmc600.c
r1432r1433
396396
397397/* System Configuration */
398398
399QUICKLOAD_LOAD( tmc600 )
399static QUICKLOAD_LOAD( tmc600 )
400400{
401401   image_fread(image, memory_region(REGION_CPU1) + 0x6300, 0x9500);
402402
src/mess/drivers/mz700.c
r1432r1433
7979#define LOG(N,M,A)
8080#endif
8181
82ADDRESS_MAP_START( mz700_mem, ADDRESS_SPACE_PROGRAM, 8)
82static ADDRESS_MAP_START( mz700_mem, ADDRESS_SPACE_PROGRAM, 8)
8383   AM_RANGE( 0x00000, 0x00fff) AM_RAMBANK(1)
8484   AM_RANGE( 0x01000, 0x0cfff) AM_RAM
8585   AM_RANGE( 0x0d000, 0x0d7ff) AM_RAMBANK(6)
r1432r1433
9393#endif
9494ADDRESS_MAP_END
9595
96ADDRESS_MAP_START(mz700_io, ADDRESS_SPACE_IO, 8)
96static ADDRESS_MAP_START(mz700_io, ADDRESS_SPACE_IO, 8)
9797   AM_RANGE(0xe0, 0xe6) AM_WRITE( mz700_bank_w )
9898ADDRESS_MAP_END
9999
100ADDRESS_MAP_START(mz800_mem, ADDRESS_SPACE_PROGRAM, 8)
100static ADDRESS_MAP_START(mz800_mem, ADDRESS_SPACE_PROGRAM, 8)
101101   AM_RANGE( 0x00000, 0x00fff) AM_RAMBANK(1)
102102   AM_RANGE( 0x01000, 0x01fff) AM_RAMBANK(2)
103103   AM_RANGE( 0x02000, 0x07fff) AM_RAM
r1432r1433
115115#endif
116116   ADDRESS_MAP_END
117117
118ADDRESS_MAP_START(mz800_io, ADDRESS_SPACE_IO, 8)
118static ADDRESS_MAP_START(mz800_io, ADDRESS_SPACE_IO, 8)
119119   AM_RANGE( 0xcc, 0xcc) AM_WRITE( mz800_write_format_w )
120120   AM_RANGE( 0xcd, 0xcd) AM_WRITE( mz800_read_format_w )
121121   AM_RANGE( 0xce, 0xce) AM_READWRITE( mz800_crtc_r, mz800_display_mode_w )
src/mess/drivers/vectrex.c
r1432r1433
1616#include "devices/cartslot.h"
1717#include "sound/ay8910.h"
1818
19ADDRESS_MAP_START( vectrex_map , ADDRESS_SPACE_PROGRAM, 8)
19static ADDRESS_MAP_START( vectrex_map , ADDRESS_SPACE_PROGRAM, 8)
2020   AM_RANGE( 0x0000, 0x7fff) AM_ROM
2121   AM_RANGE( 0xc800, 0xcbff) AM_RAM AM_MIRROR( 0x0400 ) AM_BASE(&vectrex_ram_base) AM_SIZE(&vectrex_ram_size)
2222   AM_RANGE( 0xd000, 0xd7ff) AM_READWRITE( via_0_r, via_0_w )
r1432r1433
183183
184184*****************************************************************/
185185
186ADDRESS_MAP_START( raaspec_map , ADDRESS_SPACE_PROGRAM, 8)
186static ADDRESS_MAP_START( raaspec_map , ADDRESS_SPACE_PROGRAM, 8)
187187   AM_RANGE( 0x0000, 0x7fff) AM_ROM
188188   AM_RANGE( 0x8000, 0x87ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
189189   AM_RANGE( 0xa000, 0xa000) AM_WRITE( raaspec_led_w )
src/mess/drivers/tm990189.c
r1432r1433
6767{
6868   tm990_189_palette_size = 3
6969};
70unsigned char tm990_189_palette[tm990_189_palette_size*3] =
70static unsigned char tm990_189_palette[tm990_189_palette_size*3] =
7171{
7272   0x00,0x00,0x00,   /* black */
7373   0xFF,0x00,0x00   /* red for LEDs */
src/mess/drivers/sym1.c
r1432r1433
2222
2323/* pointers to memory locations */
2424UINT8 *sym1_monitor;
25UINT8 *sym1_ram_1k;
26UINT8 *sym1_ram_2k;
27UINT8 *sym1_ram_3k;
28UINT8 *sym1_riot_ram;
25static UINT8 *sym1_ram_1k;
26static UINT8 *sym1_ram_2k;
27static UINT8 *sym1_ram_3k;
28static UINT8 *sym1_riot_ram;
2929
3030
3131
src/mess/drivers/lynx.c
r1432r1433
202202   }
203203}
204204
205struct CustomSound_interface lynx_sound_interface =
205static struct CustomSound_interface lynx_sound_interface =
206206{
207207   lynx_custom_start
208208};
209209
210struct CustomSound_interface lynx2_sound_interface =
210static struct CustomSound_interface lynx2_sound_interface =
211211{
212212   lynx2_custom_start
213213};
src/mess/drivers/aquarius.c
r1432r1433
3434
3535/* port i/o functions */
3636
37ADDRESS_MAP_START( aquarius_io , ADDRESS_SPACE_IO, 8)
37static ADDRESS_MAP_START( aquarius_io , ADDRESS_SPACE_IO, 8)
3838   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
3939   AM_RANGE(0xfc, 0xfc) AM_WRITE( aquarius_port_fc_w)
4040   AM_RANGE(0xfe, 0xfe) AM_READWRITE( aquarius_port_fe_r, aquarius_port_fe_w)
r1432r1433
4343
4444/* Memory w/r functions */
4545
46ADDRESS_MAP_START( aquarius_mem , ADDRESS_SPACE_PROGRAM, 8)
46static ADDRESS_MAP_START( aquarius_mem , ADDRESS_SPACE_PROGRAM, 8)
4747   AM_RANGE(0x0000, 0x1fff) AM_ROM
4848   AM_RANGE(0x2000, 0x2fff) AM_NOP
4949   AM_RANGE(0x3000, 0x37ff) AM_READWRITE(videoram_r, aquarius_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
src/mess/drivers/cgenie.c
r1432r1433
243243   PORT_BIT(0x80, 0x00, IPT_UNKNOWN) PORT_NAME("Joy 2 [*]") PORT_CODE(JOYCODE_BUTTON1)
244244INPUT_PORTS_END
245245
246gfx_layout cgenie_charlayout =
246static gfx_layout cgenie_charlayout =
247247{
248248   8,8,         /* 8*8 characters */
249249   384,         /* 256 fixed + 128 defineable characters */
src/mess/drivers/pmd85.c
r1432r1433
179179
180180/* I/O ports */
181181
182ADDRESS_MAP_START( pmd85_readport , ADDRESS_SPACE_IO, 8)
182static ADDRESS_MAP_START( pmd85_readport , ADDRESS_SPACE_IO, 8)
183183   AM_RANGE( 0x00, 0xff) AM_READ( pmd85_io_r )
184184ADDRESS_MAP_END
185185
186ADDRESS_MAP_START( pmd85_writeport , ADDRESS_SPACE_IO, 8)
186static ADDRESS_MAP_START( pmd85_writeport , ADDRESS_SPACE_IO, 8)
187187   AM_RANGE( 0x00, 0xff) AM_WRITE( pmd85_io_w )
188188ADDRESS_MAP_END
189189
190ADDRESS_MAP_START( mato_readport , ADDRESS_SPACE_IO, 8)
190static ADDRESS_MAP_START( mato_readport , ADDRESS_SPACE_IO, 8)
191191   AM_RANGE( 0x00, 0xff) AM_READ( mato_io_r )
192192ADDRESS_MAP_END
193193
194ADDRESS_MAP_START( mato_writeport , ADDRESS_SPACE_IO, 8)
194static ADDRESS_MAP_START( mato_writeport , ADDRESS_SPACE_IO, 8)
195195   AM_RANGE( 0x00, 0xff) AM_WRITE( mato_io_w )
196196ADDRESS_MAP_END
197197
198198/* memory w/r functions */
199199
200ADDRESS_MAP_START( pmd85_mem , ADDRESS_SPACE_PROGRAM, 8)
200static ADDRESS_MAP_START( pmd85_mem , ADDRESS_SPACE_PROGRAM, 8)
201201   AM_RANGE(0x0000, 0x0fff) AM_READWRITE(MRA8_BANK1, MWA8_BANK1)
202202   AM_RANGE(0x1000, 0x1fff) AM_READWRITE(MRA8_BANK2, MWA8_BANK2)
203203   AM_RANGE(0x2000, 0x2fff) AM_READWRITE(MRA8_BANK3, MWA8_BANK3)
r1432r1433
210210   AM_RANGE(0xc000, 0xffff) AM_READWRITE(MRA8_BANK8, MWA8_BANK8)
211211ADDRESS_MAP_END
212212
213ADDRESS_MAP_START( pmd852a_mem , ADDRESS_SPACE_PROGRAM, 8)
213static ADDRESS_MAP_START( pmd852a_mem , ADDRESS_SPACE_PROGRAM, 8)
214214   AM_RANGE(0x0000, 0x0fff) AM_READWRITE(MRA8_BANK1, MWA8_BANK1)
215215   AM_RANGE(0x1000, 0x1fff) AM_READWRITE(MRA8_BANK2, MWA8_BANK2)
216216   AM_RANGE(0x2000, 0x2fff) AM_READWRITE(MRA8_BANK3, MWA8_BANK3)
r1432r1433
223223   AM_RANGE(0xc000, 0xffff) AM_READWRITE(MRA8_BANK10, MWA8_BANK10)
224224ADDRESS_MAP_END
225225
226ADDRESS_MAP_START( pmd853_mem , ADDRESS_SPACE_PROGRAM, 8)
226static ADDRESS_MAP_START( pmd853_mem , ADDRESS_SPACE_PROGRAM, 8)
227227   AM_RANGE(0x0000, 0x1fff) AM_READWRITE(MRA8_BANK1, MWA8_BANK9)
228228   AM_RANGE(0x2000, 0x3fff) AM_READWRITE(MRA8_BANK2, MWA8_BANK10)
229229   AM_RANGE(0x4000, 0x5fff) AM_READWRITE(MRA8_BANK3, MWA8_BANK11)
r1432r1433
234234   AM_RANGE(0xe000, 0xffff) AM_READWRITE(MRA8_BANK8, MWA8_BANK16)
235235ADDRESS_MAP_END
236236
237ADDRESS_MAP_START( alfa_mem , ADDRESS_SPACE_PROGRAM, 8)
237static ADDRESS_MAP_START( alfa_mem , ADDRESS_SPACE_PROGRAM, 8)
238238   AM_RANGE(0x0000, 0x0fff) AM_READWRITE(MRA8_BANK1, MWA8_BANK1)
239239   AM_RANGE(0x1000, 0x33ff) AM_READWRITE(MRA8_BANK2, MWA8_BANK2)
240240   AM_RANGE(0x3400, 0x3fff) AM_READWRITE(MRA8_BANK3, MWA8_BANK3)
r1432r1433
245245   AM_RANGE(0xc000, 0xffff) AM_READWRITE(MRA8_BANK7, MWA8_BANK7)
246246ADDRESS_MAP_END
247247
248ADDRESS_MAP_START( mato_mem , ADDRESS_SPACE_PROGRAM, 8)
248static ADDRESS_MAP_START( mato_mem , ADDRESS_SPACE_PROGRAM, 8)
249249   AM_RANGE(0x0000, 0x3fff) AM_READWRITE(MRA8_BANK1, MWA8_BANK1)
250250   AM_RANGE(0x4000, 0x7fff) AM_READWRITE(MRA8_BANK2, MWA8_BANK2)
251251   AM_RANGE(0x8000, 0xbfff) AM_READWRITE(MRA8_BANK3, MWA8_ROM)
src/mess/drivers/abc80.c
r1432r1433
395395
396396/* Interrupt Generators */
397397
398INTERRUPT_GEN( abc80_nmi_interrupt )
398static INTERRUPT_GEN( abc80_nmi_interrupt )
399399{
400400   cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
401401}
src/mess/drivers/apexc.c
r1432r1433
3838   int writable;
3939} cylinder;
4040
41cylinder apexc_cylinder;
41static cylinder apexc_cylinder;
4242
4343/*
4444   Open cylinder image and read RAM
r1432r1433
146146   mess_image *fd;
147147} tape;
148148
149tape apexc_tapes[2];
149static tape apexc_tapes[2];
150150
151151
152152
src/mess/drivers/x68k.c
r1432r1433
144144
145145extern UINT16* gvram;  // Graphic VRAM
146146extern UINT16* tvram;  // Text VRAM
147UINT16* sram;   // SRAM
147static UINT16* sram;   // SRAM
148148extern UINT16* x68k_spriteram;  // sprite/background RAM
149149extern UINT16* x68k_spritereg;  // sprite/background registers
150UINT8 ppi_port[3];
151int current_vector[8];
152UINT8 current_irq_line;
153unsigned int x68k_scanline;
150static UINT8 ppi_port[3];
151static int current_vector[8];
152static UINT8 current_irq_line;
153static unsigned int x68k_scanline;
154154
155UINT8 mfp_key;
155static UINT8 mfp_key;
156156
157157extern mame_bitmap* x68k_text_bitmap;  // 1024x1024 4x1bpp planes text
158158extern mame_bitmap* x68k_gfx_0_bitmap_16;  // 16 colour, 512x512, 4 pages
r1432r1433
168168extern tilemap* x68k_bg0_16;  // two 64x64 tilemaps, 16x16 characters
169169extern tilemap* x68k_bg1_16;
170170
171emu_timer* kb_timer;
171static emu_timer* kb_timer;
172172//emu_timer* mfp_timer[4];
173173//emu_timer* mfp_irq;
174174emu_timer* scanline_timer;
175175emu_timer* raster_irq;
176176emu_timer* vblank_irq;
177emu_timer* mouse_timer;  // to set off the mouse interrupts via the SCC
177static emu_timer* mouse_timer;  // to set off the mouse interrupts via the SCC
178178
179179// MFP is clocked at 4MHz, so at /4 prescaler the timer is triggered after 1us (4 cycles)
180180// No longer necessary with the new MFP core
r1432r1433
195195   }
196196}*/
197197
198void mfp_init(void);
198static void mfp_init(void);
199199//static TIMER_CALLBACK(mfp_update_irq);
200200
201void mfp_init()
201static void mfp_init()
202202{
203203   sys.mfp.tadr = sys.mfp.tbdr = sys.mfp.tcdr = sys.mfp.tddr = 0xff;
204204
r1432r1433
343343*/
344344
345345// 4 channel DMA controller (Hitachi HD63450)
346WRITE16_HANDLER( x68k_dmac_w )
346static WRITE16_HANDLER( x68k_dmac_w )
347347{
348348   hd63450_w(offset, data, mem_mask);
349349}
350350
351READ16_HANDLER( x68k_dmac_r )
351static READ16_HANDLER( x68k_dmac_r )
352352{
353353   return hd63450_r(offset, mem_mask);
354354}
355355
356void x68k_keyboard_ctrl_w(int data)
356static void x68k_keyboard_ctrl_w(int data)
357357{
358358   /* Keyboard control commands:
359359       00xxxxxx - TV Control
r1432r1433
418418
419419}
420420
421#ifdef UNUSED_FUNCTION
421422int x68k_keyboard_pop_scancode(void)
422423{
423424   int ret;
r1432r1433
432433   logerror("MFP: Keyboard buffer pop 0x%02x\n",ret);
433434   return ret;
434435}
436#endif
435437
436void x68k_keyboard_push_scancode(unsigned char code)
438static void x68k_keyboard_push_scancode(unsigned char code)
437439{
438440   sys.keyboard.keynum++;
439441   if(sys.keyboard.keynum >= 1)
r1432r1433
501503}
502504
503505
506#ifdef UNUSED_FUNCTION
504507void mfp_recv_data(int data)
505508{
506509   sys.mfp.rsr |= 0x80;  // Buffer full
r1432r1433
510513//   mfp_trigger_irq(MFP_IRQ_RX_FULL);
511514//   logerror("MFP: Receive buffer full IRQ sent\n");
512515}
516#endif
513517
514518// mouse input
515519// port B of the Z8530 SCC
516520// typically read from the SCC data port on receive buffer full interrupt per byte
517int x68k_read_mouse(void)
521static int x68k_read_mouse(void)
518522{
519523   char val = 0;
520524   char ipt = 0;
r1432r1433
554558   0xe98005 - Z8530 command port A
555559   0xe98007 - Z8530 data port A  (RS232)
556560*/
557READ16_HANDLER( x68k_scc_r )
561static READ16_HANDLER( x68k_scc_r )
558562{
559563   offset %= 4;
560564   switch(offset)
r1432r1433
572576   }
573577}
574578
575WRITE16_HANDLER( x68k_scc_w )
579static WRITE16_HANDLER( x68k_scc_w )
576580{
577581   static unsigned char prev;
578582   offset %= 4;
r1432r1433
630634}
631635
632636// Judging from the XM6 source code, PPI ports A and B are joystick inputs
633READ8_HANDLER( ppi_port_a_r )
637static READ8_HANDLER( ppi_port_a_r )
634638{
635639   // Joystick 1
636640   if(sys.joy.joy1_enable == 0)
r1432r1433
639643      return 0xff;
640644}
641645
642READ8_HANDLER( ppi_port_b_r )
646static READ8_HANDLER( ppi_port_b_r )
643647{
644648   // Joystick 2
645649   if(sys.joy.joy2_enable == 0)
r1432r1433
648652      return 0xff;
649653}
650654
651READ8_HANDLER( ppi_port_c_r )
655static READ8_HANDLER( ppi_port_c_r )
652656{
653657   return ppi_port[2];
654658}
655659
660#ifdef UNUSED_FUNCTION
656661WRITE8_HANDLER( ppi_port_a_w )
657662{
658663   ppi_port[0] = data;
r1432r1433
662667{
663668   ppi_port[1] = data;
664669}
670#endif
665671
666WRITE8_HANDLER( ppi_port_c_w )
672static WRITE8_HANDLER( ppi_port_c_w )
667673{
668674   // ADPCM / Joystick control
669675   ppi_port[2] = data;
r1432r1433
678684
679685
680686// NEC uPD72065 at 0xe94000
681WRITE16_HANDLER( x68k_fdc_w )
687static WRITE16_HANDLER( x68k_fdc_w )
682688{
683689   unsigned int drive, x;
684690   switch(offset)
r1432r1433
721727   }
722728}
723729
724READ16_HANDLER( x68k_fdc_r )
730static READ16_HANDLER( x68k_fdc_r )
725731{
726732   unsigned int ret;
727733   int x;
r1432r1433
757763   }
758764}
759765
760void fdc_irq(int state)
766static void fdc_irq(int state)
761767{
762768   if((sys.ioc.irqstatus & 0x04) && state == ASSERT_LINE)
763769   {
r1432r1433
769775   }
770776}
771777
772int x68k_fdc_read_byte(int addr)
778static int x68k_fdc_read_byte(int addr)
773779{
774780   int data = -1;
775781
r1432r1433
779785   return data;
780786}
781787
782void x68k_fdc_write_byte(int addr, int data)
788static void x68k_fdc_write_byte(int addr, int data)
783789{
784790   nec765_dack_w(0,data);
785791}
786792
787void fdc_drq(int state, int read_write)
793static void fdc_drq(int state, int read_write)
788794{
789795   sys.fdc.drq_state = state;
790796}
791797
792WRITE16_HANDLER( x68k_hdc_w )
798static WRITE16_HANDLER( x68k_hdc_w )
793799{
794800   // SASI HDC - HDDs are not a required system component, so this is something to be done later
795801   logerror("SASI: write to HDC, offset %04x, data %04x\n",offset,data);
796802}
797803
798READ16_HANDLER( x68k_hdc_r )
804static READ16_HANDLER( x68k_hdc_r )
799805{
800806   logerror("SASI: [%08x] read from HDC, offset %04x\n",activecpu_get_pc(),offset);
801807   switch(offset)
r1432r1433
807813   }
808814}
809815
810WRITE16_HANDLER( x68k_fm_w )
816static WRITE16_HANDLER( x68k_fm_w )
811817{
812818   switch(offset)
813819   {
r1432r1433
822828   }
823829}
824830
825READ16_HANDLER( x68k_fm_r )
831static READ16_HANDLER( x68k_fm_r )
826832{
827833   if(offset == 0x01)
828834      return YM2151_status_port_0_r(0);
r1432r1433
830836   return 0xff;
831837}
832838
833WRITE8_HANDLER( x68k_ct_w )
839static WRITE8_HANDLER( x68k_ct_w )
834840{
835841   // CT1 and CT2 bits from YM2151 port 0x1b
836842   // CT1 - ADPCM clock - 0 = 8MHz, 1 = 4MHz
r1432r1433
839845}
840846
841847
842WRITE16_HANDLER( x68k_ioc_w )
848static WRITE16_HANDLER( x68k_ioc_w )
843849{
844850   switch(offset)
845851   {
r1432r1433
871877   }
872878}
873879
874READ16_HANDLER( x68k_ioc_r )
880static READ16_HANDLER( x68k_ioc_r )
875881{
876882   switch(offset)
877883   {
r1432r1433
883889   }
884890}
885891
886WRITE16_HANDLER( x68k_sysport_w )
892static WRITE16_HANDLER( x68k_sysport_w )
887893{
888894   render_container* container;
889895   switch(offset)
r1432r1433
908914   }
909915}
910916
911READ16_HANDLER( x68k_sysport_r )
917static READ16_HANDLER( x68k_sysport_r )
912918{
913919   int ret = 0;
914920   switch(offset)
r1432r1433
991997   }
992998}
993999*/
994WRITE16_HANDLER( x68k_mfp_w )
1000static WRITE16_HANDLER( x68k_mfp_w )
9951001{
9961002   /* For the Interrupt registers, the bits are set out as such:
9971003      Reg A - bit 7: GPIP7 (HSync)
r1432r1433
11191125}
11201126
11211127
1122WRITE16_HANDLER( x68k_ppi_w )
1128static WRITE16_HANDLER( x68k_ppi_w )
11231129{
11241130   ppi8255_w(0,offset & 0x03,data);
11251131}
11261132
1127READ16_HANDLER( x68k_ppi_r )
1133static READ16_HANDLER( x68k_ppi_r )
11281134{
11291135   return ppi8255_r(0,offset & 0x03);
11301136}
11311137
1132READ16_HANDLER( x68k_rtc_r )
1138static READ16_HANDLER( x68k_rtc_r )
11331139{
11341140   return rp5c15_r(offset,mem_mask);
11351141}
11361142
1137WRITE16_HANDLER( x68k_rtc_w )
1143static WRITE16_HANDLER( x68k_rtc_w )
11381144{
11391145   rp5c15_w(offset,data,mem_mask);
11401146}
11411147
1142void x68k_rtc_alarm_irq(int state)
1148static void x68k_rtc_alarm_irq(int state)
11431149{
11441150   if(sys.mfp.aer & 0x01)
11451151   {
r1432r1433
11561162}
11571163
11581164
1159WRITE16_HANDLER( x68k_sram_w )
1165static WRITE16_HANDLER( x68k_sram_w )
11601166{
11611167   if(sys.sysport.sram_writeprotect == 0x31)
11621168   {
r1432r1433
11641170   }
11651171}
11661172
1167READ16_HANDLER( x68k_sram_r )
1173static READ16_HANDLER( x68k_sram_r )
11681174{ 
11691175   // HACKS!
11701176   if(offset == 0x5a/2)  // 0x5a should be 0 if no SASI HDs are present.
r1432r1433
11801186   return generic_nvram16[offset];
11811187}
11821188
1183WRITE16_HANDLER( x68k_vid_w )
1189static WRITE16_HANDLER( x68k_vid_w )
11841190{
11851191   int val;
11861192   if(offset < 0x100)
r1432r1433
12221228   }
12231229}
12241230
1225READ16_HANDLER( x68k_vid_r )
1231static READ16_HANDLER( x68k_vid_r )
12261232{
12271233   if(offset < 0x100)
12281234      return sys.video.gfx_pal[offset];
r1432r1433
12451251   return 0xff;
12461252}
12471253
1248READ16_HANDLER( x68k_adpcm_r )
1254static READ16_HANDLER( x68k_adpcm_r )
12491255{
12501256   return 0x0000;
12511257}
12521258
1253WRITE16_HANDLER( x68k_adpcm_w )
1259static WRITE16_HANDLER( x68k_adpcm_w )
12541260{
12551261}
12561262
1257READ16_HANDLER( x68k_areaset_r )
1263static READ16_HANDLER( x68k_areaset_r )
12581264{
12591265   // register is write-only
12601266   return 0xffff;
12611267}
12621268
1263WRITE16_HANDLER( x68k_areaset_w )
1269static WRITE16_HANDLER( x68k_areaset_w )
12641270{
12651271   // TODO
12661272   logerror("SYS: Supervisor area set: 0x%02x\n",data & 0xff);
12671273}
12681274
1269WRITE16_HANDLER( x68k_enh_areaset_w )
1275static WRITE16_HANDLER( x68k_enh_areaset_w )
12701276{
12711277   // TODO
12721278   logerror("SYS: Enhanced Supervisor area set (from %iMB): 0x%02x\n",(offset + 1) * 2,data & 0xff);
r1432r1433
13001306   }
13011307}
13021308
1303READ16_HANDLER( x68k_rom0_r )
1309static READ16_HANDLER( x68k_rom0_r )
13041310{
13051311   /* this location contains the address of some expansion device ROM, if no ROM exists,
13061312      then access causes a bus error */
r1432r1433
13101316   return 0xff;
13111317}
13121318
1313WRITE16_HANDLER( x68k_rom0_w )
1319static WRITE16_HANDLER( x68k_rom0_w )
13141320{
13151321   /* this location contains the address of some expansion device ROM, if no ROM exists,
13161322      then access causes a bus error */
r1432r1433
13191325   cpunum_set_input_line_and_vector(0,2,ASSERT_LINE,current_vector[2]);
13201326}
13211327
1322READ16_HANDLER( x68k_exp_r )
1328static READ16_HANDLER( x68k_exp_r )
13231329{
13241330   /* These are expansion devices, if not present, they cause a bus error */
13251331   if(readinputportbytag("options") & 0x02)
r1432r1433
13351341   return 0xffff;
13361342}
13371343
1338WRITE16_HANDLER( x68k_exp_w )
1344static WRITE16_HANDLER( x68k_exp_w )
13391345{
13401346   /* These are expansion devices, if not present, they cause a bus error */
13411347   if(readinputportbytag("options") & 0x02)
r1432r1433
13501356   }
13511357}
13521358
1353void x68k_dma_irq(int channel)
1359static void x68k_dma_irq(int channel)
13541360{
13551361   current_vector[3] = hd63450_get_vector(channel);
13561362   current_irq_line = 3;
r1432r1433
13581364   cpunum_set_input_line_and_vector(0,3,ASSERT_LINE,current_vector[3]);
13591365}
13601366
1361void x68k_dma_end(int channel,int irq)
1367static void x68k_dma_end(int channel,int irq)
13621368{
13631369   if(irq != 0)
13641370   {
r1432r1433
13661372   }
13671373}
13681374
1369void x68k_dma_error(int channel, int irq)
1375static void x68k_dma_error(int channel, int irq)
13701376{
13711377   if(irq != 0)
13721378   {
r1432r1433
13761382   }
13771383}
13781384
1379void x68k_fm_irq(int irq)
1385static void x68k_fm_irq(int irq)
13801386{
13811387   if(irq == CLEAR_LINE)
13821388   {
r1432r1433
13891395   
13901396}
13911397
1392READ8_HANDLER(mfp_gpio_r)
1398static READ8_HANDLER(mfp_gpio_r)
13931399{
13941400   UINT8 data = sys.mfp.gpio;
13951401   
r1432r1433
14011407   return data;
14021408}
14031409
1404void mfp_irq_callback(int which, int state)
1410static void mfp_irq_callback(int which, int state)
14051411{
14061412   static int prev;
14071413   if(prev == CLEAR_LINE && state == CLEAR_LINE)  // eliminate unnecessary calls to set the IRQ line for speed reasons
r1432r1433
17251731
17261732INPUT_PORTS_END
17271733
1728void dimdsk_set_geometry(mess_image* image)
1734static void dimdsk_set_geometry(mess_image* image)
17291735{ 
17301736   // DIM disk image header, most of this is guesswork
17311737   int tracks = 77;
r1432r1433
17851791   basicdsk_set_geometry(image, tracks+1, heads, sectors, sectorlen, firstsector, 0x100, FALSE);
17861792}
17871793
1788DEVICE_LOAD( x68k_floppy )
1794static DEVICE_LOAD( x68k_floppy )
17891795{
17901796   if (device_load_basicdsk_floppy(image)==INIT_PASS)
17911797   {
r1432r1433
18101816   return INIT_FAIL;
18111817}
18121818
1813DEVICE_UNLOAD( x68k_floppy )
1819static DEVICE_UNLOAD( x68k_floppy )
18141820{
18151821   if(sys.ioc.irqstatus & 0x02)
18161822   {
r1432r1433
18441850   }
18451851}
18461852
1847MACHINE_RESET( x68000 )
1853static MACHINE_RESET( x68000 )
18481854{
18491855   /* The last half of the IPLROM is mapped to 0x000000 on reset only
18501856      Just copying the inital stack pointer and program counter should
r1432r1433
18971903   sys.mfp.gpio = 0xfb;
18981904}
18991905
1900MACHINE_START( x68000 )
1906static MACHINE_START( x68000 )
19011907{
19021908   /*  Install RAM handlers  */
19031909   x68k_spriteram = (UINT16*)memory_region(REGION_USER1);
r1432r1433
19221928   sys.mouse.inputtype = 0;
19231929}
19241930
1925DRIVER_INIT( x68000 )
1931static DRIVER_INIT( x68000 )
19261932{
19271933   unsigned char* rom = memory_region(REGION_CPU1);
19281934   unsigned char* user2 = memory_region(REGION_USER2);
src/mess/drivers/mpf1.c
r1432r1433
140140
141141
142142
143VIDEO_UPDATE( mpf1 )
143static VIDEO_UPDATE( mpf1 )
144144{
145145   int x;
146146   static UINT8 xpositions[] = { 20, 59, 97, 135, 185, 223 };
src/mess/drivers/astrocde.c
r1432r1433
4949   astrocade_sound1_w(offset + 0x18, data);
5050}
5151
52ADDRESS_MAP_START( astrocade_mem, ADDRESS_SPACE_PROGRAM, 8 )
52static ADDRESS_MAP_START( astrocade_mem, ADDRESS_SPACE_PROGRAM, 8 )
5353   AM_RANGE(0x0000, 0x0fff) AM_READWRITE(MRA8_ROM, astrocade_magicram_w)
5454   AM_RANGE(0x1000, 0x3fff) AM_ROM /* Star Fortress writes in here?? */
5555   AM_RANGE(0x4000, 0x4fff) AM_READWRITE(MRA8_RAM, astrocade_videoram_w) AM_BASE(&astrocade_videoram) AM_SIZE(&videoram_size) /* ASG */
5656ADDRESS_MAP_END
5757
58ADDRESS_MAP_START( astrocade_io, ADDRESS_SPACE_IO, 8 )
58static ADDRESS_MAP_START( astrocade_io, ADDRESS_SPACE_IO, 8 )
5959   AM_RANGE(0x00, 0x07) AM_MIRROR(0xff00) AM_WRITE(astrocade_colour_register_w)
6060   AM_RANGE(0x08, 0x08) AM_MIRROR(0xff00) AM_READWRITE(astrocade_intercept_r, astrocade_mode_w)
6161   AM_RANGE(0x09, 0x09) AM_MIRROR(0xff00) AM_WRITE(astrocade_colour_split_w)
src/mess/drivers/kaypro.c
r1432r1433
1818   AM_RANGE( 0x0000, 0xffff) AM_RAM
1919ADDRESS_MAP_END
2020
21ADDRESS_MAP_START( kaypro_io , ADDRESS_SPACE_IO, 8)
21static ADDRESS_MAP_START( kaypro_io , ADDRESS_SPACE_IO, 8)
2222   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
2323   AM_RANGE( BIOS_CONST,  BIOS_CONST)  AM_READWRITE( kaypro_const_r, kaypro_const_w )
2424   AM_RANGE( BIOS_CONIN,  BIOS_CONIN)  AM_READWRITE( kaypro_conin_r, kaypro_conin_w )
src/mess/drivers/n64.c
r1432r1433
7474   signal_rcp_interrupt(VI_INTERRUPT);
7575}
7676
77MACHINE_RESET( n64 )
77static MACHINE_RESET( n64 )
7878{
7979   n64_machine_reset();
8080}
8181
82MACHINE_DRIVER_START( n64 )
82static MACHINE_DRIVER_START( n64 )
8383   /* basic machine hardware */
8484   MDRV_CPU_ADD(R4600BE, 93750000)
8585   MDRV_CPU_CONFIG(config)
r1432r1433
112112   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 1.0)
113113MACHINE_DRIVER_END
114114
115#ifdef UNUSED_FUNCTION
115116DRIVER_INIT( n64 )
116117{
117118}
119#endif
118120
119121ROM_START( n64)
120122    ROM_REGION( 0x800000, REGION_CPU1, 0 )      /* dummy region for R4300 */
src/mess/drivers/sg1000.c
r1432r1433
790790   }
791791}
792792
793DEVICE_LOAD( sf7000_floppy )
793static DEVICE_LOAD( sf7000_floppy )
794794{
795795   if (image_has_been_created(image))
796796      return INIT_FAIL;
r1432r1433
821821   }
822822}
823823
824DEVICE_LOAD( sf7000_serial )
824static DEVICE_LOAD( sf7000_serial )
825825{
826826   /* filename specified */
827827   if (serial_device_load(image)==INIT_PASS)
src/mess/drivers/tx0.c
r1432r1433
308308}
309309
310310
311tx0_reset_param_t tx0_reset_param =
311static tx0_reset_param_t tx0_reset_param =
312312{
313313   {
314314      tx0_io_cpy,
src/mess/drivers/ip22.c
r1432r1433
7575   }
7676}
7777
78UINT8 nRTC_Regs[0x80];
79UINT8 nRTC_UserRAM[0x200];
80UINT8 nRTC_RAM[0x800];
78static UINT8 nRTC_Regs[0x80];
79static UINT8 nRTC_UserRAM[0x200];
80static UINT8 nRTC_RAM[0x800];
8181
8282static UINT32 nHPC_SCSI0Descriptor, nHPC_SCSI0DMACtrl;
8383
r1432r1433
385385   }
386386}
387387
388UINT32 nHPC3_enetr_nbdp;
389UINT32 nHPC3_enetr_cbp;
390UINT32 nHPC3_hd0_register;
391UINT32 nHPC3_hd0_regs[0x20];
392UINT32 nHPC3_hd1_regs[0x20];
388static UINT32 nHPC3_enetr_nbdp;
389static UINT32 nHPC3_enetr_cbp;
390//UINT32 nHPC3_hd0_register;
391//UINT32 nHPC3_hd0_regs[0x20];
392//UINT32 nHPC3_hd1_regs[0x20];
393393
394394static READ32_HANDLER( hpc3_hd_enet_r )
395395{
r1432r1433
507507   }
508508}
509509
510UINT32 nHPC3_unk0;
511UINT32 nHPC3_unk1;
512UINT32 nHPC3_IC_Unk0;
510static UINT32 nHPC3_unk0;
511static UINT32 nHPC3_unk1;
512static UINT32 nHPC3_IC_Unk0;
513513
514514static READ32_HANDLER( hpc3_pbus4_r )
515515{
r1432r1433
933933   COMBINE_DATA(&ip22_mainram[offset]);
934934}
935935
936UINT32 nHAL2_IAR;
937UINT32 nHAL2_IDR[4];
936static UINT32 nHAL2_IAR;
937static UINT32 nHAL2_IDR[4];
938938
939939#define H2_IAR_TYPE         0xf000
940940#define H2_IAR_NUM         0x0f00
r1432r1433
10971097#define PBUS_DMADESC_TXD      0x00008000
10981098#define PBUS_DMADESC_BC         0x00003fff
10991099
1100UINT8 nPBUS_DMA_Active;
1101UINT32 nPBUS_DMA_CurPtr;
1102UINT32 nPBUS_DMA_DescPtr;
1103UINT32 nPBUS_DMA_NextPtr;
1104UINT32 nPBUS_DMA_WordsLeft;
1100static UINT8 nPBUS_DMA_Active;
1101static UINT32 nPBUS_DMA_CurPtr;
1102static UINT32 nPBUS_DMA_DescPtr;
1103static UINT32 nPBUS_DMA_NextPtr;
1104static UINT32 nPBUS_DMA_WordsLeft;
11051105
11061106static TIMER_CALLBACK(ip22_dma)
11071107{
r1432r1433
12271227   AM_RANGE( 0x20000000, 0x27ffffff ) AM_RAM AM_SHARE(1) AM_WRITE(ip22_write_ram)
12281228ADDRESS_MAP_END
12291229
1230UINT32 nIntCounter;
1230static UINT32 nIntCounter;
12311231
12321232// mc_update wants once every millisecond (1/1000th of a second)
12331233static TIMER_CALLBACK(ip22_timer)
r1432r1433
15701570}
15711571#endif
15721572
1573MACHINE_DRIVER_START( ip225015 )
1573static MACHINE_DRIVER_START( ip225015 )
15741574   MDRV_CPU_ADD_TAG( "main", R5000BE, 50000000*3 )
15751575   MDRV_CPU_CONFIG( config )
15761576   MDRV_CPU_PROGRAM_MAP( ip225015_map, 0 )
r1432r1433
15991599   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
16001600MACHINE_DRIVER_END
16011601
1602MACHINE_DRIVER_START( ip224613 )
1602static MACHINE_DRIVER_START( ip224613 )
16031603   MDRV_IMPORT_FROM( ip225015 )
16041604   MDRV_CPU_REPLACE( "main", R4600BE, 133333333 )
16051605MACHINE_DRIVER_END
16061606
1607MACHINE_DRIVER_START( ip244415 )
1607static MACHINE_DRIVER_START( ip244415 )
16081608   MDRV_IMPORT_FROM( ip225015 )
16091609   MDRV_CPU_REPLACE( "main", R4600BE, 150000000 )
16101610MACHINE_DRIVER_END
src/mess/drivers/lviv.c
r1432r1433
292292
293293/* I/O ports */
294294
295ADDRESS_MAP_START( lviv_readport , ADDRESS_SPACE_IO, 8)
295static ADDRESS_MAP_START( lviv_readport , ADDRESS_SPACE_IO, 8)
296296   AM_RANGE( 0x00, 0xff) AM_READ( lviv_io_r )
297297ADDRESS_MAP_END
298298
299ADDRESS_MAP_START( lviv_writeport , ADDRESS_SPACE_IO, 8)
299static ADDRESS_MAP_START( lviv_writeport , ADDRESS_SPACE_IO, 8)
300300   AM_RANGE( 0x00, 0xff) AM_WRITE( lviv_io_w )
301301ADDRESS_MAP_END
302302
303303/* memory w/r functions */
304304
305ADDRESS_MAP_START( lviv_mem , ADDRESS_SPACE_PROGRAM, 8)
305static ADDRESS_MAP_START( lviv_mem , ADDRESS_SPACE_PROGRAM, 8)
306306   AM_RANGE(0x0000, 0x3fff) AM_READWRITE(MRA8_BANK1, MWA8_BANK1)
307307   AM_RANGE(0x4000, 0x7fff) AM_READWRITE(MRA8_BANK2, MWA8_BANK2)
308308   AM_RANGE(0x8000, 0xbfff) AM_READWRITE(MRA8_BANK3, MWA8_BANK3)
src/mess/drivers/exidy.c
r1432r1433
353353}
354354
355355
356ADDRESS_MAP_START( exidy_mem , ADDRESS_SPACE_PROGRAM, 8)
356static ADDRESS_MAP_START( exidy_mem , ADDRESS_SPACE_PROGRAM, 8)
357357   ADDRESS_MAP_FLAGS( AMEF_UNMAP(1) )
358358   AM_RANGE(0x0000, 0x7fff) AM_RAM      /* ram 32k machine */
359359   AM_RANGE(0xbc00, 0xbcff) AM_ROM
r1432r1433
365365   AM_RANGE(0xfc00, 0xffff) AM_RAM      /* programmable chars */
366366ADDRESS_MAP_END
367367
368ADDRESS_MAP_START( exidyd_mem , ADDRESS_SPACE_PROGRAM, 8)
368static ADDRESS_MAP_START( exidyd_mem , ADDRESS_SPACE_PROGRAM, 8)
369369   ADDRESS_MAP_FLAGS( AMEF_UNMAP(1) )
370370   AM_RANGE(0x0000, 0xbfff) AM_RAM      /* ram 48k diskless machine */
371371   AM_RANGE(0xc000, 0xefff) AM_ROM      /* rom pac */
r1432r1433
651651}
652652
653653
654ADDRESS_MAP_START( exidy_io , ADDRESS_SPACE_IO, 8)
654static ADDRESS_MAP_START( exidy_io , ADDRESS_SPACE_IO, 8)
655655   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
656656   ADDRESS_MAP_FLAGS( AMEF_UNMAP(1) )
657657   AM_RANGE(0xfc, 0xfc) AM_READWRITE( exidy_fc_port_r, exidy_fc_port_w )
src/mess/drivers/pc8801.c
r1432r1433
373373INPUT_PORTS_END
374374
375375
376ADDRESS_MAP_START( pc8801_mem , ADDRESS_SPACE_PROGRAM, 8)
376static ADDRESS_MAP_START( pc8801_mem , ADDRESS_SPACE_PROGRAM, 8)
377377    AM_RANGE(0x0000, 0x5fff) AM_RAMBANK(1)
378378    AM_RANGE(0x6000, 0x7fff) AM_RAMBANK(2)
379379    AM_RANGE(0x8000, 0x83ff) AM_RAMBANK(3)
r1432r1433
382382    AM_RANGE(0xf000, 0xffff) AM_RAMBANK(6)
383383ADDRESS_MAP_END
384384
385ADDRESS_MAP_START( pc88sr_io, ADDRESS_SPACE_IO, 8)
385static ADDRESS_MAP_START( pc88sr_io, ADDRESS_SPACE_IO, 8)
386386   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
387387   ADDRESS_MAP_FLAGS( AMEF_UNMAP(1) )
388388   AM_RANGE(0x00, 0x00) AM_READ( input_port_0_r )  /* keyboard */
r1432r1433
447447{
448448}
449449
450ADDRESS_MAP_START( pc8801fd_mem , ADDRESS_SPACE_PROGRAM, 8)
450static ADDRESS_MAP_START( pc8801fd_mem , ADDRESS_SPACE_PROGRAM, 8)
451451   AM_RANGE( 0x0000, 0x07ff) AM_ROM
452452   AM_RANGE( 0x4000, 0x7fff) AM_RAM
453453ADDRESS_MAP_END
454454
455ADDRESS_MAP_START( pc8801fd_io , ADDRESS_SPACE_IO, 8)
455static ADDRESS_MAP_START( pc8801fd_io , ADDRESS_SPACE_IO, 8)
456456   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
457457   AM_RANGE(0xf8, 0xf8) AM_READ( pc8801fd_nec765_tc )
458458   AM_RANGE(0xfa, 0xfa) AM_READ( nec765_status_r )
src/mess/drivers/pet.c
r1432r1433
471471   PORT_DIPSETTING(  1, DEF_STR( Yes ) )
472472INPUT_PORTS_END
473473
474unsigned char pet_palette[] =
474static unsigned char pet_palette[] =
475475{
476476   0,0,0, /* black */
477477   0,0x80,0, /* green */
src/mess/drivers/a2600.c
r1432r1433
585585}
586586
587587
588void modeF8_switch(UINT16 offset, UINT8 data)
588static void modeF8_switch(UINT16 offset, UINT8 data)
589589{
590590   bank_base[1] = CART + 0x1000 * offset;
591591   memory_set_bankptr(1, bank_base[1]);
592592}
593void modeFA_switch(UINT16 offset, UINT8 data)
593static void modeFA_switch(UINT16 offset, UINT8 data)
594594{
595595   bank_base[1] = CART + 0x1000 * offset;
596596   memory_set_bankptr(1, bank_base[1]);
597597}
598void modeF6_switch(UINT16 offset, UINT8 data)
598static void modeF6_switch(UINT16 offset, UINT8 data)
599599{
600600   bank_base[1] = CART + 0x1000 * offset;
601601   memory_set_bankptr(1, bank_base[1]);
602602}
603void modeF4_switch(UINT16 offset, UINT8 data)
603static void modeF4_switch(UINT16 offset, UINT8 data)
604604{
605605   bank_base[1] = CART + 0x1000 * offset;
606606   memory_set_bankptr(1, bank_base[1]);
607607}
608void mode3F_switch(UINT16 offset, UINT8 data)
608static void mode3F_switch(UINT16 offset, UINT8 data)
609609{
610610   bank_base[1] = CART + 0x800 * (data & (number_banks - 1));
611611   memory_set_bankptr(1, bank_base[1]);
612612}
613void modeUA_switch(UINT16 offset, UINT8 data)
613static void modeUA_switch(UINT16 offset, UINT8 data)
614614{
615615   bank_base[1] = CART + (offset >> 6) * 0x1000;
616616   memory_set_bankptr(1, bank_base[1]);
617617}
618void modeE0_switch(UINT16 offset, UINT8 data)
618static void modeE0_switch(UINT16 offset, UINT8 data)
619619{
620620   int bank = 1 + (offset >> 3);
621621   bank_base[bank] = CART + 0x400 * (offset & 7);
622622   memory_set_bankptr(bank, bank_base[bank]);
623623}
624void modeE7_switch(UINT16 offset, UINT8 data)
624static void modeE7_switch(UINT16 offset, UINT8 data)
625625{
626626   bank_base[1] = CART + 0x800 * offset;
627627   memory_set_bankptr(1, bank_base[1]);
628628}
629void modeE7_RAM_switch(UINT16 offset, UINT8 data)
629static void modeE7_RAM_switch(UINT16 offset, UINT8 data)
630630{
631631   memory_set_bankptr(9, extra_RAM + (4 + offset) * 256 );
632632}
633void modeDC_switch(UINT16 offset, UINT8 data)
633static void modeDC_switch(UINT16 offset, UINT8 data)
634634{
635635   bank_base[1] = CART + 0x1000 * next_bank();
636636   memory_set_bankptr(1, bank_base[1]);
637637}
638void mode3E_switch(UINT16 offset, UINT8 data)
638static void mode3E_switch(UINT16 offset, UINT8 data)
639639{
640640   bank_base[1] = CART + 0x800 * (data & (number_banks - 1));
641641   memory_set_bankptr(1, bank_base[1]);
642642   mode3E_ram_enabled = 0;
643643}
644void mode3E_RAM_switch(UINT16 offset, UINT8 data)
644static void mode3E_RAM_switch(UINT16 offset, UINT8 data)
645645{
646646   ram_base = extra_RAM + 0x200 * ( data & 0x3F );
647647   memory_set_bankptr(1, ram_base );
648648   mode3E_ram_enabled = 1;
649649}
650void modeFV_switch(UINT16 offset, UINT8 data)
650static void modeFV_switch(UINT16 offset, UINT8 data)
651651{
652652   //printf("ModeFV %04x\n",offset);
653653   if (!FVlocked && ( activecpu_get_pc() & 0x1F00 ) == 0x1F00 ) {
r1432r1433
657657      memory_set_bankptr(1, bank_base[1]);
658658   }
659659}
660void modeJVP_switch(UINT16 offset, UINT8 data)
660static void modeJVP_switch(UINT16 offset, UINT8 data)
661661{
662662   switch( offset ) {
663663   case 0x00:
r1432r1433
708708static WRITE8_HANDLER(modeJVP_switch_w) { modeJVP_switch(offset, data); riot_ram[ 0x20 + offset ] = data; }
709709
710710
711OPBASE_HANDLER( modeF6_opbase )
711static OPBASE_HANDLER( modeF6_opbase )
712712{
713713   if ( ( address & 0x1FFF ) >= 0x1FF6 && ( address & 0x1FFF ) <= 0x1FF9 ) {
714714      modeF6_switch_w( ( address & 0x1FFF ) - 0x1FF6, 0 );
r1432r1433
716716   return address;
717717}
718718
719OPBASE_HANDLER( modeSS_opbase )
719static OPBASE_HANDLER( modeSS_opbase )
720720{
721721   if ( address & 0x1000 ) {
722722      opcode_mask = 0x7ff;
r1432r1433
10131013static opbase_handler FE_old_opbase_handler;
10141014static int FETimer;
10151015
1016OPBASE_HANDLER(modeFE_opbase_handler)
1016static OPBASE_HANDLER(modeFE_opbase_handler)
10171017{
10181018   if ( ! FETimer )
10191019   {
r1432r1433
10331033   return address;
10341034}
10351035
1036void modeFE_switch(UINT16 offset, UINT8 data)
1036static void modeFE_switch(UINT16 offset, UINT8 data)
10371037{
10381038   /* Retrieve last byte read by the cpu (for this mapping scheme this
10391039      should be the last byte that was on the data bus
src/mess/drivers/studio2.c
r1432r1433
334334
335335#define ST2_HEADER_SIZE      256
336336
337DEVICE_LOAD( studio2_cart )
337static DEVICE_LOAD( studio2_cart )
338338{
339339   UINT8   *ptr = NULL;
340340   UINT8   header[ST2_HEADER_SIZE];
src/mess/drivers/pcw.c
r1432r1433
105105// uncomment for debug log output
106106//#define VERBOSE
107107
108void pcw_fdc_interrupt(int);
108static void pcw_fdc_interrupt(int);
109109
110110// pointer to pcw ram
111111unsigned int roller_ram_addr;
112112// flag to indicate if boot-program is enabled/disabled
113113static int    pcw_boot;
114int   pcw_system_status;
114static int   pcw_system_status;
115115unsigned short roller_ram_offset;
116116// code for CPU int type generated when FDC int is triggered
117117static int fdc_interrupt_code;
r1432r1433
215215}
216216
217217/* fdc interrupt callback. set/clear fdc int */
218void pcw_fdc_interrupt(int state)
218static void pcw_fdc_interrupt(int state)
219219{
220220   pcw_system_status &= ~(1<<5);
221221
src/mess/drivers/c16.c
r1432r1433
781781   MDRV_CPU_PROGRAM_MAP(c364_readmem, c364_writemem)
782782MACHINE_DRIVER_END
783783
784DRIVER_INIT( c16 )      { c16_driver_init(); }
784static DRIVER_INIT( c16 )      { c16_driver_init(); }
785#ifdef UNUSED_FUNCTION
785786DRIVER_INIT( c16hun )   { c16_driver_init(); }
786787DRIVER_INIT( c16c )      { c16_driver_init(); }
787788DRIVER_INIT( c16v )      { c16_driver_init(); }
788DRIVER_INIT( plus4 )   { c16_driver_init(); }
789#endif
790static DRIVER_INIT( plus4 )   { c16_driver_init(); }
791#ifdef UNUSED_FUNCTION
789792DRIVER_INIT( plus4c )   { c16_driver_init(); }
790793DRIVER_INIT( plus4v )   { c16_driver_init(); }
791794DRIVER_INIT( c364 )      { c16_driver_init(); }
795#endif
792796
793797static void c16cart_device_getinfo(const device_class *devclass, UINT32 state, union devinfo *info)
794798{
src/mess/drivers/osi.c
r1432r1433
2020
2121/* Memory Maps */
2222
23ADDRESS_MAP_START( sb2m600_mem, ADDRESS_SPACE_PROGRAM, 8 )
23static ADDRESS_MAP_START( sb2m600_mem, ADDRESS_SPACE_PROGRAM, 8 )
2424   AM_RANGE(0x0000, 0x0fff) AM_RAM
2525   AM_RANGE(0x1000, 0x1fff) AM_RAM
2626   AM_RANGE(0xa000, 0xbfff) AM_ROM
r1432r1433
3333   AM_RANGE(0xf800, 0xffff) AM_ROM
3434ADDRESS_MAP_END
3535
36ADDRESS_MAP_START( uk101_mem, ADDRESS_SPACE_PROGRAM, 8 )
36static ADDRESS_MAP_START( uk101_mem, ADDRESS_SPACE_PROGRAM, 8 )
3737   AM_RANGE(0x0000, 0x0fff) AM_RAM
3838   AM_RANGE(0x1000, 0x1fff) AM_RAM
3939   AM_RANGE(0xa000, 0xbfff) AM_ROM
src/mess/drivers/enterp.c
r1432r1433
166166/* enterprise interface to dave - ok, so Dave chip is unique
167167to Enterprise. But these functions make it nice and easy to see
168168whats going on. */
169DAVE_INTERFACE   enterprise_dave_interface=
169static DAVE_INTERFACE   enterprise_dave_interface=
170170{
171171   enterprise_dave_reg_read,
172172      enterprise_dave_reg_write,
r1432r1433
284284
285285/* I've done this because the ram is banked in 16k blocks, and
286286the rom can be paged into bank 0 and bank 3. */
287ADDRESS_MAP_START( enterprise_mem , ADDRESS_SPACE_PROGRAM, 8)
287static ADDRESS_MAP_START( enterprise_mem , ADDRESS_SPACE_PROGRAM, 8)
288288   AM_RANGE( 0x00000, 0x03fff) AM_READWRITE( MRA8_BANK1, MWA8_BANK5 )
289289   AM_RANGE( 0x04000, 0x07fff) AM_READWRITE( MRA8_BANK2, MWA8_BANK6 )
290290   AM_RANGE( 0x08000, 0x0bfff) AM_READWRITE( MRA8_BANK3, MWA8_BANK7 )
r1432r1433
370370   return EXDOS_CARD_R;
371371}
372372
373ADDRESS_MAP_START( enterprise_io , ADDRESS_SPACE_IO, 8)
373static ADDRESS_MAP_START( enterprise_io , ADDRESS_SPACE_IO, 8)
374374   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
375375   AM_RANGE( 0x010, 0x017) AM_READWRITE( enterprise_wd177x_read, enterprise_wd177x_write )
376376   AM_RANGE( 0x018, 0x018) AM_READWRITE( exdos_card_r, exdos_card_w )
src/mess/drivers/mekd2.c
r1432r1433
4747static  READ8_HANDLER(mekd2_kbd_r) { return 0xff; }
4848#endif
4949
50UINT8 pia[8];
50static UINT8 pia[8];
5151
5252#ifdef UNUSED_FUNCTION
5353static WRITE8_HANDLER(mekd2_pia_w) { }
src/mess/drivers/apf.c
r1432r1433
7171{
7272}
7373
74unsigned char previous_mode;
74static unsigned char previous_mode;
7575
7676static WRITE8_HANDLER(apf_m1000_pia_out_b_func)
7777{
src/mess/drivers/saturn.c
r1432r1433
197197static UINT8 *smpc_ram;
198198//static void stv_dump_ram(void);
199199
200UINT32* stv_workram_l;
201UINT32* stv_workram_h;
202UINT32* stv_backupram;
200static UINT32* stv_workram_l;
201static UINT32* stv_workram_h;
202//UINT32* stv_backupram;
203203extern UINT32* stv_scu;
204204static UINT16* scsp_regs;
205205static UINT16* sound_ram;
r1432r1433
207207static int saturn_region;
208208
209209int stv_vblank,stv_hblank;
210int stv_enable_slave_sh2;
210static int stv_enable_slave_sh2;
211211/*SMPC stuff*/
212212static UINT8 NMI_reset;
213213static void system_reset(void);
r1432r1433
240240static void dma_indirect_lv2(void); /*DMA level 2 indirect transfer function*/
241241
242242
243int minit_boost,sinit_boost;
244double minit_boost_timeslice, sinit_boost_timeslice;
243static int minit_boost,sinit_boost;
244static double minit_boost_timeslice, sinit_boost_timeslice;
245245
246246static int scanline;
247247
r1432r1433
428428#define SMPC_CONTROL_MODE_PORT_1 IOSEL1 = 0
429429#define SMPC_CONTROL_MODE_PORT_2 IOSEL2 = 0
430430
431int DectoBCD(int num)
431static int DectoBCD(int num)
432432{
433433   int i, cnt = 0, tmp, res = 0;
434434
r1432r1433
999999#define D1MV_0   if(DMA_STATUS & 0x100)        DMA_STATUS^=0x100
10001000#define D2MV_0   if(DMA_STATUS & 0x1000)     DMA_STATUS^=0x1000
10011001
1002UINT32 scu_index_0,scu_index_1,scu_index_2;
1002static UINT32 scu_index_0,scu_index_1,scu_index_2;
10031003static UINT8 scsp_to_main_irq;
10041004
10051005static UINT32 scu_add_tmp;
r1432r1433
10131013#define WORK_RAM_H(_lv_) ((scu_##_lv_ & 0x07ffffff) >= 0x06000000) && ((scu_##_lv_ & 0x07ffffff) <= 0x060fffff)
10141014#define SOUND_RAM(_lv_)  ((scu_##_lv_ & 0x07ffffff) >= 0x05a00000) && ((scu_##_lv_ & 0x07ffffff) <= 0x05afffff)
10151015
1016READ32_HANDLER( stv_scu_r32 )
1016static READ32_HANDLER( stv_scu_r32 )
10171017{
10181018   /*TODO: write only registers must return 0...*/
10191019   //popmessage("%02x",DMA_STATUS);
r1432r1433
10561056      }
10571057}
10581058
1059WRITE32_HANDLER( stv_scu_w32 )
1059static WRITE32_HANDLER( stv_scu_w32 )
10601060{
10611061   COMBINE_DATA(&stv_scu[offset]);
10621062
r1432r1433
18311831
18321832/**************************************************************************************/
18331833
1834WRITE32_HANDLER( stv_sh2_soundram_w )
1834static WRITE32_HANDLER( stv_sh2_soundram_w )
18351835{
18361836   COMBINE_DATA(sound_ram+offset*2+1);
18371837   data >>= 16;
r1432r1433
18391839   COMBINE_DATA(sound_ram+offset*2);
18401840}
18411841
1842READ32_HANDLER( stv_sh2_soundram_r )
1842static READ32_HANDLER( stv_sh2_soundram_r )
18431843{
18441844   return (sound_ram[offset*2]<<16)|sound_ram[offset*2+1];
18451845}
r1432r1433
20872087    smpc_ram[0x5f] = 0x10;
20882088}
20892089
2090#ifdef UNUSED_FUNCTION
20902091DRIVER_INIT( saturn )
20912092{
20922093   saturn_init_driver(0);
20932094}
2095#endif
20942096
2095DRIVER_INIT( saturnus )
2097static DRIVER_INIT( saturnus )
20962098{
20972099   saturn_init_driver(4);
20982100}
20992101
2100DRIVER_INIT( saturneu )
2102static DRIVER_INIT( saturneu )
21012103{
21022104   saturn_init_driver(12);
21032105}
21042106
2105DRIVER_INIT( saturnjp )
2107static DRIVER_INIT( saturnjp )
21062108{
21072109   saturn_init_driver(1);
21082110}
r1432r1433
21102112
21112113static int scsp_last_line = 0;
21122114
2113MACHINE_START( saturn )
2115static MACHINE_START( saturn )
21142116{
21152117   SCSP_set_ram_base(0, sound_ram);
21162118
r1432r1433
21432145   add_exit_callback(machine, stvcd_exit);
21442146}
21452147
2146MACHINE_RESET( saturn )
2148static MACHINE_RESET( saturn )
21472149{
21482150   // don't let the slave cpu and the 68k go anywhere
21492151   cpunum_set_input_line(1, INPUT_LINE_RESET, ASSERT_LINE);
r1432r1433
22412243   GFXDECODE_ENTRY( REGION_GFX2, 0, tiles16x16x8_layout, 0x00, 0x20 )
22422244GFXDECODE_END
22432245
2244struct sh2_config sh2_conf_master = { 0 };
2245struct sh2_config sh2_conf_slave  = { 1 };
2246static struct sh2_config sh2_conf_master = { 0 };
2247static struct sh2_config sh2_conf_slave  = { 1 };
22462248
22472249static void scsp_irq(int irq)
22482250{
src/mess/drivers/channelf.c
r1432r1433
9191   return port_read_with_latch(0xff,latch[3]);
9292}
9393
94struct {   /* SKR - 2102 RAM chip on carts 10 and 18 I/O ports */
94static struct {   /* SKR - 2102 RAM chip on carts 10 and 18 I/O ports */
9595   UINT8 d;          /* data bit:inverted logic, but reading/writing cancel out */
9696   UINT8 r_w;          /* inverted logic: 0 means read, 1 means write */
9797   UINT8 a[10];       /* addr bits: inverted logic, but reading/writing cancel out */
src/mess/drivers/abc80x.c
r1432r1433
659659   z80dart_init(0, &abc800_dart_intf);
660660}
661661
662INTERRUPT_GEN( abc802_vblank_interrupt )
662static INTERRUPT_GEN( abc802_vblank_interrupt )
663663{
664664   z80dart_set_ri(0, 0);
665665   z80dart_set_ri(0, 1);
r1432r1433
942942   }
943943}
944944
945DEVICE_LOAD( abc800_serial )
945static DEVICE_LOAD( abc800_serial )
946946{
947947   /* filename specified */
948948   if (serial_device_load(image)==INIT_PASS)
src/mess/drivers/nascom1.c
r1432r1433
5656#include "mslegacy.h"
5757
5858/* Memory w/r functions */
59ADDRESS_MAP_START( nascom1_mem , ADDRESS_SPACE_PROGRAM, 8)
59static ADDRESS_MAP_START( nascom1_mem , ADDRESS_SPACE_PROGRAM, 8)
6060   AM_RANGE(0x0000, 0x07ff) AM_ROM
6161   AM_RANGE(0x0800, 0x0bff) AM_READWRITE( videoram_r, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
6262   AM_RANGE(0x0c00, 0x0fff) AM_RAM
r1432r1433
6868ADDRESS_MAP_END
6969
7070/* port i/o functions */
71ADDRESS_MAP_START( nascom1_io , ADDRESS_SPACE_IO, 8)
71static ADDRESS_MAP_START( nascom1_io , ADDRESS_SPACE_IO, 8)
7272   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
7373   AM_RANGE(0x00, 0x00) AM_READWRITE( nascom1_port_00_r, nascom1_port_00_w )
7474   AM_RANGE(0x01, 0x01) AM_READWRITE( nascom1_port_01_r, nascom1_port_01_w )
src/mess/drivers/mtx.c
r1432r1433
600600   TMS9928A_interrupt();
601601}
602602
603ADDRESS_MAP_START( mtx_mem, ADDRESS_SPACE_PROGRAM, 8)
603static ADDRESS_MAP_START( mtx_mem, ADDRESS_SPACE_PROGRAM, 8)
604604   AM_RANGE( 0x0000, 0x1fff) AM_READWRITE( MRA8_BANK1, mtx_trap_write )
605605   AM_RANGE( 0x2000, 0x3fff) AM_READWRITE( MRA8_BANK2, MWA8_BANK10 )
606606   AM_RANGE( 0x4000, 0x5fff) AM_READWRITE( MRA8_BANK3, MWA8_BANK11 )
r1432r1433
611611   AM_RANGE( 0xe000, 0xffff) AM_READWRITE( MRA8_BANK8, MWA8_BANK16 )
612612ADDRESS_MAP_END
613613
614ADDRESS_MAP_START( mtx_io, ADDRESS_SPACE_IO, 8)
614static ADDRESS_MAP_START( mtx_io, ADDRESS_SPACE_IO, 8)
615615   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
616616   AM_RANGE( 0x00, 0x00) AM_READWRITE( mtx_strobe_r, mtx_bankswitch_w )
617617   AM_RANGE( 0x01, 0x02) AM_READWRITE( mtx_vdp_r, mtx_vdp_w )
src/mess/drivers/einstein.c
r1432r1433
784784/* keyboard int->ctc/adc->pio */
785785
786786
787ADDRESS_MAP_START( einstein_mem , ADDRESS_SPACE_PROGRAM, 8)
787static ADDRESS_MAP_START( einstein_mem , ADDRESS_SPACE_PROGRAM, 8)
788788   AM_RANGE(0x0000, 0x01fff) AM_READWRITE(MRA8_BANK1, MWA8_BANK3)
789789   AM_RANGE(0x2000, 0x0ffff) AM_READWRITE(MRA8_BANK2, MWA8_BANK4)
790790ADDRESS_MAP_END
r1432r1433
13111311}
13121312
13131313
1314ADDRESS_MAP_START( einstein2_io , ADDRESS_SPACE_IO, 8)
1314static ADDRESS_MAP_START( einstein2_io , ADDRESS_SPACE_IO, 8)
13151315   AM_RANGE(0x0000,0x0ffff) AM_READWRITE(einstein2_port_r, einstein2_port_w)
13161316ADDRESS_MAP_END
13171317
1318ADDRESS_MAP_START( einstein_io , ADDRESS_SPACE_IO, 8)
1318static ADDRESS_MAP_START( einstein_io , ADDRESS_SPACE_IO, 8)
13191319   AM_RANGE(0x0000,0x0ffff) AM_READWRITE(einstein_port_r, einstein_port_w)
13201320ADDRESS_MAP_END
13211321
r1432r1433
13481348
13491349
13501350
1351struct msm8251_interface einstein_msm8251_intf=
1351static struct msm8251_interface einstein_msm8251_intf=
13521352{
13531353   NULL,
13541354   NULL,
src/mess/drivers/intv.c
r1432r1433
9292
9393/* graphics output */
9494
95gfx_layout intv_gromlayout =
95static gfx_layout intv_gromlayout =
9696{
9797   16, 16,
9898   256,
r1432r1433
104104   8 * 16
105105};
106106
107gfx_layout intv_gramlayout =
107static gfx_layout intv_gramlayout =
108108{
109109   16, 16,
110110   64,
r1432r1433
116116   8 * 8
117117};
118118
119gfx_layout intvkbd_charlayout =
119static gfx_layout intvkbd_charlayout =
120120{
121121   8, 8,
122122   256,
src/mess/drivers/jupiter.c
r1432r1433
3737#include "mslegacy.h"
3838
3939/* memory w/r functions */
40ADDRESS_MAP_START( jupiter_mem , ADDRESS_SPACE_PROGRAM, 8)
40static ADDRESS_MAP_START( jupiter_mem , ADDRESS_SPACE_PROGRAM, 8)
4141   AM_RANGE(0x0000, 0x1fff) AM_ROM
4242   AM_RANGE(0x2000, 0x22ff) AM_NOP
4343   AM_RANGE(0x2300, 0x23ff) AM_RAM
r1432r1433
5252ADDRESS_MAP_END
5353
5454/* port i/o functions */
55ADDRESS_MAP_START( jupiter_io , ADDRESS_SPACE_IO, 8)
55static ADDRESS_MAP_START( jupiter_io , ADDRESS_SPACE_IO, 8)
5656   AM_RANGE( 0x00fe, 0xfffe) AM_WRITE( jupiter_port_fe_w )
5757   AM_RANGE( 0xfefe, 0xfefe) AM_READ( jupiter_port_fefe_r )
5858   AM_RANGE( 0xfdfe, 0xfdfe) AM_READ( jupiter_port_fdfe_r )
src/mess/drivers/ssystem3.c
r1432r1433
4141
4242 */
4343
44struct via6522_interface config=
44static struct via6522_interface config=
4545{
4646   0,//read8_handler in_a_func;
4747   0,//read8_handler in_b_func;
src/mess/drivers/amstrad.c
r1432r1433
9696// This is the sequence for unlocking the ASIC in the CPC+/GX4000
9797// These are outed to port &bc00, after syncing the lock by outing a non-zero value then a zero to &bc00
9898// To lock the ASIC again, repeat the sequence without the last &ee
99unsigned char asic_unlock_seq[15] =
99static unsigned char asic_unlock_seq[15] =
100100{
101101   0xff, 0x77, 0xb3, 0x51, 0xa8, 0xd4, 0x62, 0x39, 0x9c, 0x46, 0x2b, 0x15, 0x8a, 0xcd, 0xee
102102};
103103
104104int amstrad_system_type;
105int amstrad_plus_lower;  // CPC+/GX4000 cartridge bank loaded in lower ROM area
106int amstrad_plus_lower_addr;  // CPC+/GX4000 lower ROM area address / ASIC register page enable
107int amstrad_plus_lower_enabled;  // secondary lower ROM select in use?
105static int amstrad_plus_lower;  // CPC+/GX4000 cartridge bank loaded in lower ROM area
106static int amstrad_plus_lower_addr;  // CPC+/GX4000 lower ROM area address / ASIC register page enable
107static int amstrad_plus_lower_enabled;  // secondary lower ROM select in use?
108108int amstrad_plus_asic_enabled;  // ASIC enabled
109int amstrad_plus_asic_regpage;  // ASIC register page enabled
110int amstrad_plus_asic_seqptr;   // current position in the ASIC unlocking sequence
109static int amstrad_plus_asic_regpage;  // ASIC register page enabled
110static int amstrad_plus_asic_seqptr;   // current position in the ASIC unlocking sequence
111111int amstrad_plus_pri;  // Programmable raster interrupt, 0=disabled.
112112int amstrad_plus_irq_cause;  // part of the interrupt vector for IM 2.  6 = raster IRQ, 4 = DMA channel 2, 2 = DMA channel 1, 0 = DMA channel 0
113113int amstrad_plus_scroll_x;  // soft scroll - horizontal (0-15), in mode 2 pixels
r1432r1433
118118int amstrad_plus_dma_1_addr;
119119int amstrad_plus_dma_2_addr;
120120int amstrad_plus_dma_prescaler[3];  // DMA channel prescaler
121int amstrad_plus_dma_clear;  // set if DMA interrupts are to be cleared automatically
121static int amstrad_plus_dma_clear;  // set if DMA interrupts are to be cleared automatically
122122
123123extern int amstrad_scanline;
124124extern int prev_reg;
125125
126void amstrad_plus_seqcheck(int data);
126static void amstrad_plus_seqcheck(int data);
127127static WRITE8_HANDLER( amstrad_plus_asic_4000_w );
128128static WRITE8_HANDLER( amstrad_plus_asic_6000_w );
129129static READ8_HANDLER( amstrad_plus_asic_4000_r );
r1432r1433
458458   }
459459}
460460
461void AmstradCPC_SetLowerRom(int Data)
461static void AmstradCPC_SetLowerRom(int Data)
462462{
463463   if(amstrad_plus_asic_enabled != 0)
464464   {
r1432r1433
12451245}
12461246
12471247// Handler for checking the ASIC unlocking sequence
1248void amstrad_plus_seqcheck(int data)
1248static void amstrad_plus_seqcheck(int data)
12491249{
12501250   static int prev_data;
12511251
r1432r1433
16041604   multiface_reset();
16051605}
16061606
1607void kccomp_reset_machine(void)
1607static void kccomp_reset_machine(void)
16081608{
16091609   /* enable lower rom (OS rom) */
16101610   amstrad_GateArray_write(0x089);
src/mess/drivers/sms.c
r1432r1433
272272   }
273273}
274274
275const smsvdp_configuration config_315_5124 = { MODEL_315_5124, sms_int_callback };
276const smsvdp_configuration config_315_5246 = { MODEL_315_5246, sms_int_callback };
277const smsvdp_configuration config_315_5378 = { MODEL_315_5378, sms_int_callback };
278const smsvdp_configuration config_store = { MODEL_315_5124, sms_store_int_callback };
275static const smsvdp_configuration config_315_5124 = { MODEL_315_5124, sms_int_callback };
276static const smsvdp_configuration config_315_5246 = { MODEL_315_5246, sms_int_callback };
277static const smsvdp_configuration config_315_5378 = { MODEL_315_5378, sms_int_callback };
278static const smsvdp_configuration config_store = { MODEL_315_5124, sms_store_int_callback };
279279
280VIDEO_START(sega_315_5124) {
280static VIDEO_START(sega_315_5124) {
281281   smsvdp_video_init( &config_315_5124 );
282282}
283283
284VIDEO_START(sega_315_5246) {
284static VIDEO_START(sega_315_5246) {
285285   smsvdp_video_init( &config_315_5246 );
286286}
287287
288VIDEO_START(sega_315_5378) {
288static VIDEO_START(sega_315_5378) {
289289   smsvdp_video_init( &config_315_5378 );
290290}
291291
292VIDEO_START(sega_store_315_5124) {
292static VIDEO_START(sega_store_315_5124) {
293293   smsvdp_video_init( &config_store );
294294}
295295
src/mess/drivers/a310.c
r1432r1433
8585
8686static emu_timer *vbl_timer, *timer[4], *snd_timer;
8787
88VIDEO_START( a310 )
88static VIDEO_START( a310 )
8989{
9090}
9191
92VIDEO_UPDATE( a310 )
92static VIDEO_UPDATE( a310 )
9393{
9494   return 0;
9595}
src/mess/drivers/avigo.c
r1432r1433
459459}
460460
461461
462ADDRESS_MAP_START( avigo_mem , ADDRESS_SPACE_PROGRAM, 8)
462static ADDRESS_MAP_START( avigo_mem , ADDRESS_SPACE_PROGRAM, 8)
463463   AM_RANGE(0x0000, 0x3fff) AM_READWRITE( MRA8_BANK1, MWA8_BANK5 )
464464   AM_RANGE(0x4000, 0x7fff) AM_READWRITE( MRA8_BANK2, MWA8_BANK6 )
465465   AM_RANGE(0x8000, 0xbfff) AM_READWRITE( MRA8_BANK3, MWA8_BANK7 )
r1432r1433
802802
803803
804804
805ADDRESS_MAP_START( avigo_io, ADDRESS_SPACE_IO, 8)
805static ADDRESS_MAP_START( avigo_io, ADDRESS_SPACE_IO, 8)
806806   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
807807
808808   AM_RANGE(0x000, 0x000) AM_READ( avigo_unmapped_r)
src/mess/drivers/psx.c
r1432r1433
1919#include "sound/psx.h"
2020#include "debugger.h"
2121
22struct
22static struct
2323{
2424   UINT8 id[ 8 ];
2525   UINT32 text;   /* SCE only */
r1432r1433
544544
545545/* ----------------------------------------------------------------------- */
546546
547READ32_HANDLER( psx_cd_r )
547static READ32_HANDLER( psx_cd_r )
548548{
549549   UINT32 result = 0;
550550
r1432r1433
596596   return result;
597597}
598598
599WRITE32_HANDLER( psx_cd_w )
599static WRITE32_HANDLER( psx_cd_w )
600600{
601601   void (*psx_cdcmd)(void);
602602
src/mess/drivers/coupe.c
r1432r1433
3434#include "sound/saa1099.h"
3535#include "sound/speaker.h"
3636
37ADDRESS_MAP_START( coupe_mem , ADDRESS_SPACE_PROGRAM, 8)
37static ADDRESS_MAP_START( coupe_mem , ADDRESS_SPACE_PROGRAM, 8)
3838   AM_RANGE( 0x0000, 0x3FFF) AM_RAMBANK(1)
3939   AM_RANGE( 0x4000, 0x7FFF) AM_RAMBANK(2)
4040   AM_RANGE( 0x8000, 0xBFFF) AM_RAMBANK(3)
r1432r1433
262262   }
263263}
264264
265ADDRESS_MAP_START( coupe_io , ADDRESS_SPACE_IO, 8)   
265static ADDRESS_MAP_START( coupe_io , ADDRESS_SPACE_IO, 8)   
266266   AM_RANGE( 0x0000, 0x0ffff) AM_READWRITE( coupe_port_r, coupe_port_w )
267267ADDRESS_MAP_END
268268
src/mess/drivers/trs80.c
r1432r1433
8585#define FW   TRS80_FONT_W
8686#define FH   TRS80_FONT_H
8787
88READ8_HANDLER (trs80_wd179x_r)
88static READ8_HANDLER (trs80_wd179x_r)
8989{
9090   if (readinputport(0) & 0x80)
9191   {
src/mess/drivers/odyssey2.c
r1432r1433
1313#include "devices/cartslot.h"
1414#include "inputx.h"
1515
16ADDRESS_MAP_START( odyssey2_mem , ADDRESS_SPACE_PROGRAM, 8)
16static ADDRESS_MAP_START( odyssey2_mem , ADDRESS_SPACE_PROGRAM, 8)
1717   AM_RANGE( 0x0000, 0x03FF) AM_ROM
1818   AM_RANGE( 0x0400, 0x0BFF) AM_RAMBANK(1)
1919   AM_RANGE( 0x0C00, 0x0FFF) AM_RAMBANK(2)
2020ADDRESS_MAP_END
2121
22ADDRESS_MAP_START( odyssey2_io , ADDRESS_SPACE_IO, 8)
22static ADDRESS_MAP_START( odyssey2_io , ADDRESS_SPACE_IO, 8)
2323   AM_RANGE( 0x00,       0xff)      AM_READWRITE( odyssey2_bus_r, odyssey2_bus_w)
2424   AM_RANGE( I8039_p1,    I8039_p1)   AM_READWRITE( odyssey2_getp1, odyssey2_putp1 )
2525   AM_RANGE( I8039_p2,    I8039_p2)   AM_READWRITE( odyssey2_getp2, odyssey2_putp2 )
src/mess/drivers/primo.c
r1432r1433
112112#include "mslegacy.h"
113113
114114
115ADDRESS_MAP_START( primoa_port, ADDRESS_SPACE_IO, 8 )
115static ADDRESS_MAP_START( primoa_port, ADDRESS_SPACE_IO, 8 )
116116   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
117117   AM_RANGE( 0x00, 0x3f ) AM_READWRITE( primo_be_1_r, primo_ki_1_w )
118118   AM_RANGE( 0xfd, 0xfd ) AM_WRITE( primo_FD_w )
119119ADDRESS_MAP_END
120120
121ADDRESS_MAP_START( primob_port, ADDRESS_SPACE_IO, 8 )
121static ADDRESS_MAP_START( primob_port, ADDRESS_SPACE_IO, 8 )
122122   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
123123   AM_RANGE( 0x00, 0x3f ) AM_READWRITE( primo_be_1_r, primo_ki_1_w )
124124   AM_RANGE( 0x40, 0x7f ) AM_READWRITE( primo_be_2_r, primo_ki_2_w )
125125   AM_RANGE( 0xfd, 0xfd ) AM_WRITE( primo_FD_w )
126126ADDRESS_MAP_END
127127
128ADDRESS_MAP_START( primo32_mem, ADDRESS_SPACE_PROGRAM, 8 )
128static ADDRESS_MAP_START( primo32_mem, ADDRESS_SPACE_PROGRAM, 8 )
129129   AM_RANGE( 0x0000, 0x3fff ) AM_RAMBANK(1)
130130   AM_RANGE( 0x4000, 0x7fff ) AM_RAM
131131ADDRESS_MAP_END
132132
133ADDRESS_MAP_START( primo48_mem, ADDRESS_SPACE_PROGRAM, 8 )
133static ADDRESS_MAP_START( primo48_mem, ADDRESS_SPACE_PROGRAM, 8 )
134134   AM_RANGE( 0x0000, 0x3fff ) AM_RAMBANK(1)
135135   AM_RANGE( 0x4000, 0x7fff ) AM_RAM
136136   AM_RANGE( 0x8000, 0xbfff ) AM_RAM AM_MIRROR ( 0x4000 )
137137ADDRESS_MAP_END
138138
139ADDRESS_MAP_START( primo64_mem, ADDRESS_SPACE_PROGRAM, 8 )
139static ADDRESS_MAP_START( primo64_mem, ADDRESS_SPACE_PROGRAM, 8 )
140140   AM_RANGE( 0x0000, 0x3fff ) AM_RAMBANK(1)
141141   AM_RANGE( 0x4000, 0xffff ) AM_RAM
142142ADDRESS_MAP_END
src/mess/drivers/ti85.c
r1432r1433
140140
141141/* port i/o functions */
142142
143ADDRESS_MAP_START( ti81_io, ADDRESS_SPACE_IO, 8)
143static ADDRESS_MAP_START( ti81_io, ADDRESS_SPACE_IO, 8)
144144   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
145145   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti85_port_0000_r, ti85_port_0000_w )
146146   AM_RANGE(0x0001, 0x0001) AM_READWRITE( ti85_port_0001_r, ti85_port_0001_w )
r1432r1433
151151   AM_RANGE(0x0007, 0x0007) AM_WRITE( ti81_port_0007_w)
152152ADDRESS_MAP_END
153153
154ADDRESS_MAP_START( ti85_io, ADDRESS_SPACE_IO, 8)
154static ADDRESS_MAP_START( ti85_io, ADDRESS_SPACE_IO, 8)
155155   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
156156   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti85_port_0000_r, ti85_port_0000_w )
157157   AM_RANGE(0x0001, 0x0001) AM_READWRITE( ti85_port_0001_r, ti85_port_0001_w )
r1432r1433
163163   AM_RANGE(0x0007, 0x0007) AM_READWRITE( ti85_port_0007_r, ti85_port_0007_w )
164164ADDRESS_MAP_END
165165
166ADDRESS_MAP_START( ti86_io, ADDRESS_SPACE_IO, 8)
166static ADDRESS_MAP_START( ti86_io, ADDRESS_SPACE_IO, 8)
167167   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
168168   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti85_port_0000_r, ti85_port_0000_w )
169169   AM_RANGE(0x0001, 0x0001) AM_READWRITE( ti85_port_0001_r, ti85_port_0001_w )
r1432r1433
177177
178178/* memory w/r functions */
179179
180ADDRESS_MAP_START( ti81_mem , ADDRESS_SPACE_PROGRAM, 8)
180static ADDRESS_MAP_START( ti81_mem , ADDRESS_SPACE_PROGRAM, 8)
181181   AM_RANGE(0x0000, 0x3fff) AM_READWRITE( MRA8_BANK1, MWA8_BANK3 )
182182   AM_RANGE(0x4000, 0x7fff) AM_READWRITE( MRA8_BANK2, MWA8_BANK4 )
183183   AM_RANGE(0x8000, 0xffff) AM_RAM
184184ADDRESS_MAP_END
185185
186ADDRESS_MAP_START( ti85_mem , ADDRESS_SPACE_PROGRAM, 8)
186static ADDRESS_MAP_START( ti85_mem , ADDRESS_SPACE_PROGRAM, 8)
187187   AM_RANGE(0x0000, 0x3fff) AM_READWRITE( MRA8_BANK1, MWA8_BANK3 )
188188   AM_RANGE(0x4000, 0x7fff) AM_READWRITE( MRA8_BANK2, MWA8_BANK4 )
189189   AM_RANGE(0x8000, 0xffff) AM_RAM
190190ADDRESS_MAP_END
191191
192ADDRESS_MAP_START( ti86_mem , ADDRESS_SPACE_PROGRAM, 8)
192static ADDRESS_MAP_START( ti86_mem , ADDRESS_SPACE_PROGRAM, 8)
193193   AM_RANGE(0x0000, 0x3fff) AM_READWRITE( MRA8_BANK1, MWA8_BANK5 )
194194   AM_RANGE(0x4000, 0x7fff) AM_READWRITE( MRA8_BANK2, MWA8_BANK6 )
195195   AM_RANGE(0x8000, 0xbfff) AM_READWRITE( MRA8_BANK3, MWA8_BANK7 )
src/mess/drivers/svision.c
r1432r1433
2929
3030static UINT8 *svision_reg;
3131
32struct
32static struct
3333{
3434   emu_timer *timer1;
3535   int timer_shot;
3636} svision;
3737
38struct
38static struct
3939{
4040   int state;
4141   int on, clock, data;
r1432r1433
4343   emu_timer *timer;
4444} svision_pet;
4545
46struct
46static struct
4747{
4848   UINT16 palette[4/*0x40?*/]; /* rgb8 */
4949   int palette_on;
r1432r1433
471471   tvlink.palette[3] = MAKE24_RGB15(svisionp_palette[(PALETTE_START+3)*3+0], svisionp_palette[(PALETTE_START+3)*3+1], svisionp_palette[(PALETTE_START+3)*3+2]);
472472}
473473
474struct CustomSound_interface svision_sound_interface =
474static struct CustomSound_interface svision_sound_interface =
475475{
476476   svision_custom_start
477477};
src/mess/drivers/genesis.c
r1432r1433
129129}
130130
131131
132int device_load_genesis_cart(mess_image *image)
132static int device_load_genesis_cart(mess_image *image)
133133{
134134   unsigned char *tmpROMnew, *tmpROM;
135135   unsigned char *secondhalf;
r1432r1433
272272   CONFIG_DEVICE(genesis_cartslot_getinfo)
273273SYSTEM_CONFIG_END
274274
275WRITE16_HANDLER( genesis_ssf2_bank_w )
275static WRITE16_HANDLER( genesis_ssf2_bank_w )
276276{
277277   UINT8 *ROM = memory_region(REGION_CPU1);
278278
src/mess/drivers/pce.c
r1432r1433
6565#define PCE_CD_CLOCK   9216000
6666
6767
68ADDRESS_MAP_START( pce_mem , ADDRESS_SPACE_PROGRAM, 8)
68static ADDRESS_MAP_START( pce_mem , ADDRESS_SPACE_PROGRAM, 8)
6969   AM_RANGE( 0x000000, 0x07FFFF) AM_ROMBANK(1)
7070   AM_RANGE( 0x080000, 0x087FFF) AM_ROMBANK(2)
7171   AM_RANGE( 0x088000, 0x0CFFFF) AM_ROMBANK(3)
r1432r1433
8484   AM_RANGE( 0x1FF800, 0x1FFBFF) AM_READWRITE( pce_cd_intf_r, pce_cd_intf_w )
8585ADDRESS_MAP_END
8686
87ADDRESS_MAP_START( pce_io , ADDRESS_SPACE_IO, 8)
87static ADDRESS_MAP_START( pce_io , ADDRESS_SPACE_IO, 8)
8888   AM_RANGE( 0x00, 0x03) AM_READWRITE( vdc_0_r, vdc_0_w )
8989ADDRESS_MAP_END
9090
91ADDRESS_MAP_START( sgx_mem , ADDRESS_SPACE_PROGRAM, 8)
91static ADDRESS_MAP_START( sgx_mem , ADDRESS_SPACE_PROGRAM, 8)
9292   AM_RANGE( 0x000000, 0x07FFFF) AM_ROMBANK(1)
9393   AM_RANGE( 0x080000, 0x087FFF) AM_ROMBANK(2)
9494   AM_RANGE( 0x088000, 0x0CFFFF) AM_ROMBANK(3)
r1432r1433
109109   AM_RANGE( 0x1FF800, 0x1FFBFF) AM_READWRITE( pce_cd_intf_r, pce_cd_intf_w )
110110ADDRESS_MAP_END
111111
112ADDRESS_MAP_START( sgx_io , ADDRESS_SPACE_IO, 8)
112static ADDRESS_MAP_START( sgx_io , ADDRESS_SPACE_IO, 8)
113113   AM_RANGE( 0x00, 0x03) AM_READWRITE( sgx_vdc_r, sgx_vdc_w )
114114ADDRESS_MAP_END
115115
src/mess/drivers/ip20.c
r1432r1433
603603   32768   /* data cache size */
604604};
605605
606MACHINE_DRIVER_START( ip204415 )
606static MACHINE_DRIVER_START( ip204415 )
607607   MDRV_CPU_ADD_TAG( "main", R4600BE, 50000000*3 )
608608   MDRV_CPU_CONFIG( config )
609609   MDRV_CPU_PROGRAM_MAP( ip204415_map, 0 )
src/mess/drivers/galaxy.c
r1432r1433
3030#include "includes/galaxy.h"
3131#include "devices/snapquik.h"
3232
33ADDRESS_MAP_START (galaxy_readport, ADDRESS_SPACE_IO, 8)
33static ADDRESS_MAP_START (galaxy_readport, ADDRESS_SPACE_IO, 8)
3434ADDRESS_MAP_END
3535
36ADDRESS_MAP_START (galaxy_writeport, ADDRESS_SPACE_IO, 8)
36static ADDRESS_MAP_START (galaxy_writeport, ADDRESS_SPACE_IO, 8)
3737ADDRESS_MAP_END
3838
3939
40ADDRESS_MAP_START (galaxy_mem, ADDRESS_SPACE_PROGRAM, 8)
40static ADDRESS_MAP_START (galaxy_mem, ADDRESS_SPACE_PROGRAM, 8)
4141   AM_RANGE(0x0000, 0x0fff) AM_READWRITE(MRA8_ROM, MWA8_ROM)
4242   AM_RANGE(0x2000, 0x2037) AM_MIRROR(0x07c0) AM_READ( galaxy_keyboard_r )
4343   AM_RANGE(0x2038, 0x203f) AM_MIRROR(0x07c0) AM_READWRITE( galaxy_latch_r, galaxy_latch_w )
src/mess/drivers/bbcbc.c
r1432r1433
3737    TMS9928A_interrupt();
3838}
3939
40INPUT_PORTS_START( bbcbc )
40static INPUT_PORTS_START( bbcbc )
4141INPUT_PORTS_END
4242
4343static const TMS9928a_interface tms9129_interface =
src/mess/drivers/kc.c
r1432r1433
112112}
113113
114114
115ADDRESS_MAP_START(kc85_4_io, ADDRESS_SPACE_IO, 8)
115static ADDRESS_MAP_START(kc85_4_io, ADDRESS_SPACE_IO, 8)
116116   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
117117   AM_RANGE(0x0000, 0x0ffff) AM_READWRITE( kc85_4_port_r, kc85_4_port_w )
118118ADDRESS_MAP_END
119119
120120
121#ifdef UNUSED_FUNCTION
121122static  READ8_HANDLER(kc85_4d_port_r)
122123{
123124   int port;
r1432r1433
214215ADDRESS_MAP_START(kc85_4d_io, ADDRESS_SPACE_IO, 8)
215216   AM_RANGE(0x0000, 0x0ffff) AM_READWRITE(kc85_4d_port_r, kc85_4d_port_w)
216217ADDRESS_MAP_END
218#endif
217219
218ADDRESS_MAP_START(kc85_4_mem, ADDRESS_SPACE_PROGRAM, 8)
220static ADDRESS_MAP_START(kc85_4_mem, ADDRESS_SPACE_PROGRAM, 8)
219221   AM_RANGE(0x0000, 0x3fff) AM_READWRITE(MRA8_BANK1, MWA8_BANK7)
220222   AM_RANGE(0x4000, 0x7fff) AM_READWRITE(MRA8_BANK2, MWA8_BANK8)
221223   AM_RANGE(0x8000, 0xa7ff) AM_READWRITE(MRA8_BANK3, MWA8_BANK9)
r1432r1433
225227   AM_RANGE(0xe000, 0xffff) AM_READ(MRA8_BANK6)
226228ADDRESS_MAP_END
227229
228ADDRESS_MAP_START(kc85_3_mem, ADDRESS_SPACE_PROGRAM, 8)
230static ADDRESS_MAP_START(kc85_3_mem, ADDRESS_SPACE_PROGRAM, 8)
229231   AM_RANGE(0x0000, 0x3fff) AM_READWRITE(MRA8_BANK1, MWA8_BANK6)
230232   AM_RANGE(0x4000, 0x7fff) AM_READWRITE(MRA8_BANK2, MWA8_BANK7)
231233   AM_RANGE(0x8000, 0xbfff) AM_READWRITE(MRA8_BANK3, MWA8_BANK8)
r1432r1433
295297}
296298
297299
298ADDRESS_MAP_START(kc85_3_io, ADDRESS_SPACE_IO, 8)
300static ADDRESS_MAP_START(kc85_3_io, ADDRESS_SPACE_IO, 8)
299301   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
300302   AM_RANGE(0x0000, 0x0ffff) AM_READWRITE(kc85_3_port_r, kc85_3_port_w)
301303ADDRESS_MAP_END
r1432r1433
310312/********************/
311313/** DISC INTERFACE **/
312314
313ADDRESS_MAP_START(kc85_disc_hw_mem, ADDRESS_SPACE_PROGRAM, 8)
315static ADDRESS_MAP_START(kc85_disc_hw_mem, ADDRESS_SPACE_PROGRAM, 8)
314316   AM_RANGE(0x0000, 0x0ffff) AM_RAM
315317ADDRESS_MAP_END
316318
317ADDRESS_MAP_START(kc85_disc_hw_io, ADDRESS_SPACE_IO, 8)
319static ADDRESS_MAP_START(kc85_disc_hw_io, ADDRESS_SPACE_IO, 8)
318320   AM_RANGE(0x0f0, 0x0f0) AM_READ(nec765_status_r)
319321   AM_RANGE(0x0f1, 0x0f1) AM_READWRITE(nec765_data_r, nec765_data_w)
320322   AM_RANGE(0x0f2, 0x0f3) AM_READWRITE(nec765_dack_r, nec765_dack_w)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team