src/mess/drivers/genesis.c
| r2855 | r2856 | |
| 55 | 55 | #include "../../mame/drivers/megadriv.h" |
| 56 | 56 | #include "cpu/m68000/m68000.h" |
| 57 | 57 | |
| 58 | | #if 0 |
| 59 | 58 | static UINT16 squirrel_king_extra = 0; |
| 60 | 59 | static UINT16 lion2_prot1_data, lion2_prot2_data; |
| 61 | 60 | static UINT16 realtek_bank_addr=0, realtek_bank_size=0, realtek_old_bank_addr; |
| 62 | | #endif |
| 63 | 61 | |
| 64 | 62 | static int genesis_last_loaded_image_length = -1; |
| 65 | 63 | |
| r2855 | r2856 | |
| 73 | 71 | static int genesis_sram_readonly; |
| 74 | 72 | |
| 75 | 73 | |
| 76 | | #ifdef UNUSED_FUNCTION |
| 74 | //#ifdef UNUSED_FUNCTION |
| 77 | 75 | static READ16_HANDLER( genesis_sram_read ) |
| 78 | 76 | { |
| 79 | 77 | UINT16 retval = 0; |
| r2855 | r2856 | |
| 110 | 108 | genesis_sram_active = (data & 1) ? 1 : 0; |
| 111 | 109 | genesis_sram_readonly = (data & 2) ? 1 : 0; |
| 112 | 110 | } |
| 113 | | #endif |
| 111 | //#endif |
| 114 | 112 | |
| 115 | 113 | /* code taken directly from GoodGEN by Cowering */ |
| 116 | 114 | static int genesis_isfunkySMD(unsigned char *buf,unsigned int len) |
| r2855 | r2856 | |
| 329 | 327 | CONFIG_DEVICE(genesis_cartslot_getinfo) |
| 330 | 328 | SYSTEM_CONFIG_END |
| 331 | 329 | |
| 332 | | #ifdef UNUSED_FUNCTION |
| 330 | //#ifdef UNUSED_FUNCTION |
| 333 | 331 | static WRITE16_HANDLER( genesis_ssf2_bank_w ) |
| 334 | 332 | { |
| 335 | 333 | static int lastoffset = -1,lastdata = -1; |
| r2855 | r2856 | |
| 708 | 706 | { |
| 709 | 707 | /* this probably should do more, like make Genesis V2 'die' if the SEGA string is not written promptly */ |
| 710 | 708 | } |
| 711 | | #endif |
| 709 | //#endif |
| 712 | 710 | |
| 713 | 711 | static void genesis_machine_stop(running_machine *machine) |
| 714 | 712 | { |
| r2855 | r2856 | |
| 742 | 740 | DRIVER_INIT_CALL(megadrij); |
| 743 | 741 | } |
| 744 | 742 | |
| 745 | | #ifdef UNUSED_FUNCTION |
| 743 | //#ifdef UNUSED_FUNCTION |
| 746 | 744 | // only looks for == in the compare for LSB systems |
| 747 | 745 | static int allendianmemcmp(const void *s1, const void *s2, size_t n) |
| 748 | 746 | { |
| r2855 | r2856 | |
| 751 | 749 | #ifdef LSB_FIRST |
| 752 | 750 | unsigned char flippedbuf[64]; |
| 753 | 751 | unsigned int i; |
| 754 | | |
| 752 | |
| 755 | 753 | if ((n & 1) || (n > 63)) return -1 ; // don't want odd sized buffers or too large a compare |
| 756 | 754 | for (i = 0; i < n; i++) flippedbuf[i] = *((char *)s2 + (i ^ 1)); |
| 757 | 755 | realbuf = flippedbuf; |
| 758 | 756 | |
| 759 | 757 | #else |
| 760 | | |
| 758 | |
| 761 | 759 | realbuf = s2; |
| 762 | | |
| 760 | |
| 763 | 761 | #endif |
| 764 | 762 | return memcmp(s1,realbuf,n); |
| 765 | 763 | } |
| r2855 | r2856 | |
| 1050 | 1048 | /* install NOP handler for TMSS */ |
| 1051 | 1049 | memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xA14000, 0xA14003, 0, 0, genesis_TMSS_bank_w); |
| 1052 | 1050 | } |
| 1053 | | #endif |
| 1051 | //#endif |
| 1054 | 1052 | |
| 1055 | 1053 | /*************************************************************************** |
| 1056 | 1054 | |