Previous 15994 Revisions Next

r2856 Monday 16th June, 2008 at 15:42:18 UTC by Cowering
[GENESIS] Please don't fucking 'clean up' working code just because some script tells you to
[src/mess/drivers]genesis.c

src/mess/drivers/genesis.c
r2855r2856
5555#include "../../mame/drivers/megadriv.h"
5656#include "cpu/m68000/m68000.h"
5757
58#if 0
5958static UINT16 squirrel_king_extra = 0;
6059static UINT16 lion2_prot1_data, lion2_prot2_data;
6160static UINT16 realtek_bank_addr=0, realtek_bank_size=0, realtek_old_bank_addr;
62#endif
6361
6462static int genesis_last_loaded_image_length = -1;
6563
r2855r2856
7371static int genesis_sram_readonly;
7472
7573
76#ifdef UNUSED_FUNCTION
74//#ifdef UNUSED_FUNCTION
7775static READ16_HANDLER( genesis_sram_read )
7876{
7977   UINT16 retval = 0;
r2855r2856
110108        genesis_sram_active = (data & 1) ? 1 : 0;
111109        genesis_sram_readonly = (data & 2) ? 1 : 0;
112110}
113#endif
111//#endif
114112
115113/* code taken directly from GoodGEN by Cowering */
116114static int genesis_isfunkySMD(unsigned char *buf,unsigned int len)
r2855r2856
329327   CONFIG_DEVICE(genesis_cartslot_getinfo)
330328SYSTEM_CONFIG_END
331329
332#ifdef UNUSED_FUNCTION
330//#ifdef UNUSED_FUNCTION
333331static WRITE16_HANDLER( genesis_ssf2_bank_w )
334332{
335333   static int lastoffset = -1,lastdata = -1;
r2855r2856
708706{
709707   /* this probably should do more, like make Genesis V2 'die' if the SEGA string is not written promptly */
710708}
711#endif
709//#endif
712710
713711static void genesis_machine_stop(running_machine *machine)
714712{
r2855r2856
742740   DRIVER_INIT_CALL(megadrij);
743741}
744742
745#ifdef UNUSED_FUNCTION
743//#ifdef UNUSED_FUNCTION
746744// only looks for == in the compare for LSB systems
747745static int allendianmemcmp(const void *s1, const void *s2, size_t n)
748746{
r2855r2856
751749#ifdef LSB_FIRST
752750   unsigned char flippedbuf[64];
753751   unsigned int i;
754   
752
755753   if ((n & 1) || (n > 63)) return -1 ; // don't want odd sized buffers or too large a compare
756754   for (i = 0; i < n; i++) flippedbuf[i] = *((char *)s2 + (i ^ 1));
757755   realbuf = flippedbuf;
758756
759757#else
760   
758
761759   realbuf = s2;
762   
760
763761#endif
764762   return memcmp(s1,realbuf,n);
765763}
r2855r2856
10501048   /* install NOP handler for TMSS */
10511049   memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xA14000, 0xA14003, 0, 0, genesis_TMSS_bank_w);
10521050}
1053#endif
1051//#endif
10541052
10551053/***************************************************************************
10561054

Previous 15994 Revisions Next


© 1998-2018 The MESS Team