src/mess/drivers/ng_aes.c
| r8767 | r8768 | |
| 45 | 45 | #define LOG_MAIN_CPU_BANKING (1) |
| 46 | 46 | #define LOG_AUDIO_CPU_BANKING (1) |
| 47 | 47 | |
| 48 | #define NEOCD_AREA_SPR 0 |
| 49 | #define NEOCD_AREA_PCM 1 |
| 50 | #define NEOCD_AREA_AUDIO 4 |
| 51 | #define NEOCD_AREA_FIX 5 |
| 48 | 52 | |
| 49 | | |
| 50 | 53 | /************************************* |
| 51 | 54 | * |
| 52 | 55 | * Global variables |
| r8767 | r8768 | |
| 56 | 59 | static UINT8 *memcard_data; |
| 57 | 60 | //static UINT16 *save_ram; |
| 58 | 61 | |
| 62 | // CD-ROM / DMA control registers |
| 63 | struct _neocd_ctrl |
| 64 | { |
| 65 | UINT8 area_sel; |
| 66 | UINT8 pcm_bank_sel; |
| 67 | UINT8 spr_bank_sel; |
| 68 | UINT32 addr_source; // target if in fill mode |
| 69 | UINT32 addr_target; |
| 70 | UINT16 fill_word; |
| 71 | UINT32 word_count; |
| 72 | UINT16 dma_mode[10]; |
| 73 | } neocd_ctrl; |
| 59 | 74 | |
| 60 | 75 | /************************************* |
| 61 | 76 | * |
| r8767 | r8768 | |
| 130 | 145 | { |
| 131 | 146 | neogeo_state *state = machine->driver_data<neogeo_state>(); |
| 132 | 147 | |
| 133 | | cputag_set_input_line(machine, "maincpu", 1, state->vblank_interrupt_pending ? ASSERT_LINE : CLEAR_LINE); |
| 134 | | cputag_set_input_line(machine, "maincpu", 2, state->display_position_interrupt_pending ? ASSERT_LINE : CLEAR_LINE); |
| 135 | | cputag_set_input_line(machine, "maincpu", 3, state->irq3_pending ? ASSERT_LINE : CLEAR_LINE); |
| 148 | if(strcmp((char*)machine->gamedrv->name,"aes") != 0) |
| 149 | { // raster and vblank IRQs are swapped on the NeoCD. |
| 150 | cputag_set_input_line(machine, "maincpu", 2, state->vblank_interrupt_pending ? ASSERT_LINE : CLEAR_LINE); |
| 151 | cputag_set_input_line(machine, "maincpu", 1, state->display_position_interrupt_pending ? ASSERT_LINE : CLEAR_LINE); |
| 152 | cputag_set_input_line(machine, "maincpu", 3, state->irq3_pending ? ASSERT_LINE : CLEAR_LINE); |
| 153 | } |
| 154 | else |
| 155 | { |
| 156 | cputag_set_input_line(machine, "maincpu", 1, state->vblank_interrupt_pending ? ASSERT_LINE : CLEAR_LINE); |
| 157 | cputag_set_input_line(machine, "maincpu", 2, state->display_position_interrupt_pending ? ASSERT_LINE : CLEAR_LINE); |
| 158 | cputag_set_input_line(machine, "maincpu", 3, state->irq3_pending ? ASSERT_LINE : CLEAR_LINE); |
| 159 | } |
| 136 | 160 | } |
| 137 | 161 | |
| 138 | 162 | |
| r8767 | r8768 | |
| 447 | 471 | { |
| 448 | 472 | /* D0 and D1 are memcard presence indicators, D2 indicates memcard |
| 449 | 473 | write protect status (we are always write enabled) */ |
| 450 | | // AES doesn't have memcard slots? |
| 451 | 474 | return (memcard_present(field->port->machine) == -1) ? 0x07 : 0x00; |
| 452 | 475 | } |
| 453 | 476 | |
| r8767 | r8768 | |
| 473 | 496 | } |
| 474 | 497 | } |
| 475 | 498 | |
| 499 | /* The NeoCD has an 8kB internal memory card, instead of memcard slots like the MVS and AES */ |
| 500 | static READ16_HANDLER( neocd_memcard_r ) |
| 501 | { |
| 502 | return memcard_data[offset] | 0xff00; |
| 503 | } |
| 476 | 504 | |
| 505 | |
| 506 | static WRITE16_HANDLER( neocd_memcard_w ) |
| 507 | { |
| 508 | if (ACCESSING_BITS_0_7) |
| 509 | { |
| 510 | memcard_data[offset] = data; |
| 511 | } |
| 512 | } |
| 513 | |
| 477 | 514 | static MEMCARD_HANDLER( neogeo ) |
| 478 | 515 | { |
| 479 | 516 | switch (action) |
| r8767 | r8768 | |
| 799 | 836 | } |
| 800 | 837 | |
| 801 | 838 | /* |
| 839 | * CD-ROM / DMA control |
| 840 | * |
| 841 | * DMA |
| 842 | |
| 843 | FF0061 Write 0x40 means start DMA transfer |
| 844 | FF0064 Source address (in copy mode), Target address (in filll mode) |
| 845 | FF0068 Target address (in copy mode) |
| 846 | FF006C Fill word |
| 847 | FF0070 Words count |
| 848 | FF007E \ |
| 849 | ...... | DMA programming words? NeoGeoCD uses Sanyo Puppet LC8359 chip to |
| 850 | FF008E / interface with CD, and do DMA transfers |
| 851 | |
| 852 | Memory access control |
| 853 | |
| 854 | FF011C DIP SWITCH (Region code) |
| 855 | FF0105 Area Selector (5 = FIX, 0 = SPR, 4 = Z80, 1 = PCM) |
| 856 | FF01A1 Sprite bank selector |
| 857 | FF01A3 PCM bank selector |
| 858 | FF0120 Prepare sprite area for transfer |
| 859 | FF0122 Prepare PCM area for transfer |
| 860 | FF0126 Prepare Z80 area for transfer |
| 861 | FF0128 Prepare Fix area for transfer |
| 862 | FF0140 Terminate work on Spr Area (Sprites must be decoded here) |
| 863 | FF0142 Terminate work on Pcm Area |
| 864 | FF0146 Terminate work on Z80 Area (Z80 needs to be reset) |
| 865 | FF0148 Terminate work on Fix Area |
| 866 | |
| 867 | CD-ROM: |
| 868 | 0xff0102 == 0xF0 start cd transfer |
| 869 | int m=bcd(fast_r8(0x10f6c8)); |
| 870 | int s=bcd(fast_r8(0x10f6c9)); |
| 871 | int f=bcd(fast_r8(0x10f6ca)); |
| 872 | int seccount=fast_r16(0x10f688); |
| 873 | |
| 874 | inisec=((m*60)+s)*75+f; |
| 875 | inisec-=150; |
| 876 | dstaddr=0x111204; // this must come from somewhere |
| 877 | |
| 878 | the value @ 0x10f688 is decremented each time a sector is read until it's 0. |
| 879 | |
| 880 | * |
| 881 | */ |
| 882 | |
| 883 | static void neocd_do_dma(const address_space* space) |
| 884 | { |
| 885 | // TODO: Proper DMA timing and control |
| 886 | int count; |
| 887 | // UINT16 word; |
| 888 | |
| 889 | switch(neocd_ctrl.dma_mode[0]) |
| 890 | { |
| 891 | case 0xffdd: |
| 892 | for(count=0;count<neocd_ctrl.word_count;count++) |
| 893 | { |
| 894 | //word = memory_read_word(space,neocd_ctrl.addr_source); |
| 895 | memory_write_word(space,neocd_ctrl.addr_source+(count*2),neocd_ctrl.fill_word); |
| 896 | } |
| 897 | logerror("CTRL: DMA word-fill transfer of %i bytes\n",count*2); |
| 898 | break; |
| 899 | case 0xfef5: |
| 900 | for(count=0;count<neocd_ctrl.word_count;count++) |
| 901 | { |
| 902 | //word = memory_read_word(space,neocd_ctrl.addr_source); |
| 903 | memory_write_word(space,neocd_ctrl.addr_source+(count*4),(neocd_ctrl.addr_source+(count*4)) >> 16); |
| 904 | memory_write_word(space,neocd_ctrl.addr_source+(count*4)+2,(neocd_ctrl.addr_source+(count*4)) & 0xffff); |
| 905 | } |
| 906 | logerror("CTRL: DMA mode 2 transfer of %i bytes\n",count*4); |
| 907 | break; |
| 908 | case 0xcffd: |
| 909 | for(count=0;count<neocd_ctrl.word_count;count++) |
| 910 | { |
| 911 | //word = memory_read_word(space,neocd_ctrl.addr_source); |
| 912 | memory_write_word(space,neocd_ctrl.addr_source+(count*8),((neocd_ctrl.addr_source+(count*8)) >> 24) | 0xff00); |
| 913 | memory_write_word(space,neocd_ctrl.addr_source+(count*8)+2,((neocd_ctrl.addr_source+(count*8)) >> 16) | 0xff00); |
| 914 | memory_write_word(space,neocd_ctrl.addr_source+(count*8)+4,((neocd_ctrl.addr_source+(count*8)) >> 8) | 0xff00); |
| 915 | memory_write_word(space,neocd_ctrl.addr_source+(count*8)+6,(neocd_ctrl.addr_source+(count*8)) | 0xff00); |
| 916 | } |
| 917 | logerror("CTRL: DMA mode 3 transfer of %i bytes\n",count*8); |
| 918 | break; |
| 919 | default: |
| 920 | logerror("CTRL: Unknown DMA transfer mode %04x\n",neocd_ctrl.dma_mode[0]); |
| 921 | } |
| 922 | } |
| 923 | |
| 924 | static READ16_HANDLER( neocd_control_r ) |
| 925 | { |
| 926 | |
| 927 | switch(offset) |
| 928 | { |
| 929 | case 0x64/2: // source address, high word |
| 930 | return (neocd_ctrl.addr_source >> 16) & 0xffff; |
| 931 | case 0x66/2: // source address, low word |
| 932 | return neocd_ctrl.addr_source & 0xffff; |
| 933 | case 0x68/2: // target address, high word |
| 934 | return (neocd_ctrl.addr_target >> 16) & 0xffff; |
| 935 | case 0x6a/2: // target address, low word |
| 936 | return neocd_ctrl.addr_target & 0xffff; |
| 937 | case 0x6c/2: // fill word |
| 938 | return neocd_ctrl.fill_word; |
| 939 | case 0x70/2: // word count |
| 940 | return (neocd_ctrl.word_count >> 16) & 0xffff; |
| 941 | case 0x72/2: |
| 942 | return neocd_ctrl.word_count & 0xffff; |
| 943 | case 0x7e/2: // DMA parameters |
| 944 | case 0x80/2: |
| 945 | case 0x82/2: |
| 946 | case 0x84/2: |
| 947 | case 0x86/2: |
| 948 | case 0x88/2: |
| 949 | case 0x8a/2: |
| 950 | case 0x8c/2: |
| 951 | case 0x8e/2: |
| 952 | return neocd_ctrl.dma_mode[offset-(0x7e/2)]; |
| 953 | break; |
| 954 | case 0x105/2: |
| 955 | return neocd_ctrl.area_sel; |
| 956 | case 0x11c/2: |
| 957 | logerror("CTRL: Read region code.\n"); |
| 958 | return 0x0600; // we'll just force USA region for now |
| 959 | case 0x1a0/2: |
| 960 | return neocd_ctrl.spr_bank_sel; |
| 961 | break; |
| 962 | case 0x1a2/2: |
| 963 | return neocd_ctrl.pcm_bank_sel; |
| 964 | break; |
| 965 | default: |
| 966 | logerror("CTRL: Read offset %04x\n",offset); |
| 967 | } |
| 968 | |
| 969 | return 0; |
| 970 | } |
| 971 | |
| 972 | static WRITE16_HANDLER( neocd_control_w ) |
| 973 | { |
| 974 | switch(offset) |
| 975 | { |
| 976 | case 0x60/2: // Start DMA transfer |
| 977 | if((data & 0xff) == 0x40) |
| 978 | neocd_do_dma(space); |
| 979 | break; |
| 980 | case 0x64/2: // source address, high word |
| 981 | neocd_ctrl.addr_source = (neocd_ctrl.addr_source & 0x0000ffff) | (data << 16); |
| 982 | logerror("CTRL: Set source address to %08x\n",neocd_ctrl.addr_source); |
| 983 | break; |
| 984 | case 0x66/2: // source address, low word |
| 985 | neocd_ctrl.addr_source = (neocd_ctrl.addr_source & 0xffff0000) | data; |
| 986 | logerror("CTRL: Set source address to %08x\n",neocd_ctrl.addr_source); |
| 987 | break; |
| 988 | case 0x68/2: // target address, high word |
| 989 | neocd_ctrl.addr_target = (neocd_ctrl.addr_target & 0x0000ffff) | (data << 16); |
| 990 | logerror("CTRL: Set target address to %08x\n",neocd_ctrl.addr_target); |
| 991 | break; |
| 992 | case 0x6a/2: // target address, low word |
| 993 | neocd_ctrl.addr_target = (neocd_ctrl.addr_target & 0xffff0000) | data; |
| 994 | logerror("CTRL: Set target address to %08x\n",neocd_ctrl.addr_target); |
| 995 | break; |
| 996 | case 0x6c/2: // fill word |
| 997 | neocd_ctrl.fill_word = data; |
| 998 | logerror("CTRL: Set fill word to %04x\n",data); |
| 999 | break; |
| 1000 | case 0x70/2: // word count |
| 1001 | neocd_ctrl.word_count = (neocd_ctrl.word_count & 0x0000ffff) | (data << 16); |
| 1002 | logerror("CTRL: Set word count to %i\n",neocd_ctrl.word_count); |
| 1003 | break; |
| 1004 | case 0x72/2: // word count (low word) |
| 1005 | neocd_ctrl.word_count = (neocd_ctrl.word_count & 0xffff0000) | data; |
| 1006 | logerror("CTRL: Set word count to %i\n",neocd_ctrl.word_count); |
| 1007 | break; |
| 1008 | case 0x7e/2: // DMA parameters |
| 1009 | case 0x80/2: |
| 1010 | case 0x82/2: |
| 1011 | case 0x84/2: |
| 1012 | case 0x86/2: |
| 1013 | case 0x88/2: |
| 1014 | case 0x8a/2: |
| 1015 | case 0x8c/2: |
| 1016 | case 0x8e/2: |
| 1017 | neocd_ctrl.dma_mode[offset-(0x7e/2)] = data; |
| 1018 | logerror("CTRL: DMA parameter %i set to %04x\n",offset-(0x7e/2),data); |
| 1019 | break; |
| 1020 | case 0x104/2: |
| 1021 | neocd_ctrl.area_sel = data & 0x00ff; |
| 1022 | logerror("CTRL: 0xExxxxx set to area %i\n",data & 0xff); |
| 1023 | break; |
| 1024 | case 0x140/2: // end sprite transfer |
| 1025 | video_reset_neogeo(space->machine); |
| 1026 | break; |
| 1027 | case 0x142/2: // end PCM transfer |
| 1028 | break; |
| 1029 | case 0x146/2: // end Z80 transfer |
| 1030 | cputag_set_input_line(space->machine,"audiocpu",INPUT_LINE_RESET,PULSE_LINE); |
| 1031 | break; |
| 1032 | case 0x148/2: // end FIX transfer |
| 1033 | video_reset_neogeo(space->machine); |
| 1034 | break; |
| 1035 | case 0x1a0/2: |
| 1036 | neocd_ctrl.spr_bank_sel = data & 0xff; |
| 1037 | logerror("CTRL: Sprite area set to bank %i\n",data & 0xff); |
| 1038 | break; |
| 1039 | case 0x1a2/2: |
| 1040 | neocd_ctrl.pcm_bank_sel = data & 0xff; |
| 1041 | logerror("CTRL: PCM area set to bank %i\n",data & 0xff); |
| 1042 | break; |
| 1043 | default: |
| 1044 | logerror("CTRL: Write offset %04x, data %04x\n",offset*2,data); |
| 1045 | } |
| 1046 | } |
| 1047 | |
| 1048 | /* |
| 1049 | * Handling NeoCD banked RAM |
| 1050 | * When the Z80 space is banked in to 0xe00000, only the low byte of each word is used |
| 1051 | */ |
| 1052 | |
| 1053 | static READ16_HANDLER(neocd_transfer_r) |
| 1054 | { |
| 1055 | UINT16 ret = 0x0000; |
| 1056 | UINT8* Z80 = memory_region(space->machine,"audiocpu"); |
| 1057 | UINT8* PCM = memory_region(space->machine,"ymsnd"); |
| 1058 | UINT8* FIX = memory_region(space->machine,"fixed"); |
| 1059 | UINT16* SPR = (UINT16*)memory_region(space->machine,"sprites"); |
| 1060 | |
| 1061 | switch(neocd_ctrl.area_sel) |
| 1062 | { |
| 1063 | case NEOCD_AREA_AUDIO: |
| 1064 | ret = Z80[offset & 0xffff]; |
| 1065 | break; |
| 1066 | case NEOCD_AREA_PCM: |
| 1067 | ret = PCM[offset + (0x100000*neocd_ctrl.pcm_bank_sel)]; |
| 1068 | break; |
| 1069 | case NEOCD_AREA_SPR: |
| 1070 | ret = SPR[offset + (0x80000*neocd_ctrl.spr_bank_sel)]; |
| 1071 | break; |
| 1072 | case NEOCD_AREA_FIX: |
| 1073 | ret = FIX[offset & 0x1ffff] | 0xff00; |
| 1074 | break; |
| 1075 | } |
| 1076 | |
| 1077 | return ret; |
| 1078 | } |
| 1079 | |
| 1080 | static WRITE16_HANDLER(neocd_transfer_w) |
| 1081 | { |
| 1082 | UINT8* Z80 = memory_region(space->machine,"audiocpu"); |
| 1083 | UINT8* PCM = memory_region(space->machine,"ymsnd"); |
| 1084 | UINT8* FIX = memory_region(space->machine,"fixed"); |
| 1085 | UINT16* SPR = (UINT16*)memory_region(space->machine,"sprites"); |
| 1086 | |
| 1087 | switch(neocd_ctrl.area_sel) |
| 1088 | { |
| 1089 | case NEOCD_AREA_AUDIO: |
| 1090 | Z80[offset & 0xffff] = data & 0xff; |
| 1091 | break; |
| 1092 | case NEOCD_AREA_PCM: |
| 1093 | PCM[offset + (0x100000*neocd_ctrl.pcm_bank_sel)] = data & 0xff; |
| 1094 | break; |
| 1095 | case NEOCD_AREA_SPR: |
| 1096 | COMBINE_DATA(SPR+(offset + (0x80000*neocd_ctrl.spr_bank_sel))); |
| 1097 | break; |
| 1098 | case NEOCD_AREA_FIX: |
| 1099 | FIX[offset & 0x1ffff] = data & 0xff; |
| 1100 | break; |
| 1101 | } |
| 1102 | |
| 1103 | } |
| 1104 | |
| 1105 | /* |
| 802 | 1106 | * Handling selectable controller types |
| 803 | 1107 | */ |
| 804 | 1108 | |
| r8767 | r8768 | |
| 896 | 1200 | _set_audio_cpu_rom_source(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)); |
| 897 | 1201 | } |
| 898 | 1202 | |
| 899 | | static MACHINE_START( neogeo ) |
| 1203 | static void common_machine_start(running_machine* machine) |
| 900 | 1204 | { |
| 901 | 1205 | neogeo_state *state = machine->driver_data<neogeo_state>(); |
| 902 | 1206 | |
| r8767 | r8768 | |
| 911 | 1215 | |
| 912 | 1216 | create_interrupt_timers(machine); |
| 913 | 1217 | |
| 914 | | /* initialize the memcard data structure */ |
| 915 | | memcard_data = auto_alloc_array_clear(machine, UINT8, MEMCARD_SIZE); |
| 916 | | |
| 917 | 1218 | /* start with an IRQ3 - but NOT on a reset */ |
| 918 | 1219 | state->irq3_pending = 1; |
| 919 | 1220 | |
| r8767 | r8768 | |
| 936 | 1237 | state_save_register_global(machine, state->audio_cpu_rom_source); |
| 937 | 1238 | state_save_register_global(machine, state->audio_cpu_rom_source_last); |
| 938 | 1239 | state_save_register_global(machine, state->save_ram_unlocked); |
| 939 | | state_save_register_global_pointer(machine, memcard_data, 0x800); |
| 940 | 1240 | state_save_register_global(machine, state->output_data); |
| 941 | 1241 | state_save_register_global(machine, state->output_latch); |
| 942 | 1242 | state_save_register_global(machine, state->el_value); |
| r8767 | r8768 | |
| 947 | 1247 | state_save_register_postload(machine, aes_postload, NULL); |
| 948 | 1248 | } |
| 949 | 1249 | |
| 1250 | static MACHINE_START( neogeo ) |
| 1251 | { |
| 1252 | common_machine_start(machine); |
| 1253 | |
| 1254 | /* initialize the memcard data structure */ |
| 1255 | memcard_data = auto_alloc_array_clear(machine, UINT8, MEMCARD_SIZE); |
| 1256 | state_save_register_global_pointer(machine, memcard_data, 0x0800); |
| 1257 | } |
| 1258 | |
| 1259 | static MACHINE_START(neocd) |
| 1260 | { |
| 1261 | UINT8* ROM = memory_region(machine,"mainbios"); |
| 1262 | UINT8* RAM = memory_region(machine,"maincpu"); |
| 1263 | UINT8* Z80bios = memory_region(machine,"audiobios"); |
| 1264 | UINT8* FIXbios = memory_region(machine,"fixedbios"); |
| 1265 | int x; |
| 1266 | |
| 1267 | common_machine_start(machine); |
| 1268 | |
| 1269 | /* initialize the memcard data structure */ |
| 1270 | /* NeoCD doesn't have memcard slots, rather, it has a larger internal memory which works the same */ |
| 1271 | memcard_data = auto_alloc_array_clear(machine, UINT8, 0x2000); |
| 1272 | state_save_register_global_pointer(machine, memcard_data, 0x2000); |
| 1273 | |
| 1274 | // copy initial 68k vectors into RAM |
| 1275 | memcpy(RAM,ROM,0x80); |
| 1276 | |
| 1277 | // copy Z80 code into Z80 space (from 0x20000) |
| 1278 | for(x=0;x<0x10000;x+=2) |
| 1279 | { |
| 1280 | Z80bios[x] = ROM[x+0x20001]; |
| 1281 | Z80bios[x+1] = ROM[x+0x20000]; |
| 1282 | } |
| 1283 | |
| 1284 | // copy fixed tiles into FIX space (from 0x70000) |
| 1285 | memcpy(FIXbios,ROM+0x70000,0x10000); |
| 1286 | } |
| 1287 | |
| 950 | 1288 | //static DEVICE_IMAGE_LOAD(aes_cart) |
| 951 | 1289 | //{ |
| 952 | 1290 | // else |
| r8767 | r8768 | |
| 1020 | 1358 | AM_RANGE(0xe00000, 0xffffff) AM_READ(neogeo_unmapped_r) |
| 1021 | 1359 | ADDRESS_MAP_END |
| 1022 | 1360 | |
| 1361 | static ADDRESS_MAP_START( neocd_main_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1362 | AM_RANGE(0x000000, 0x00007f) AM_RAMBANK(NEOGEO_BANK_VECTORS) |
| 1363 | AM_RANGE(0x000080, 0x0fffff) AM_RAM |
| 1364 | AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x0f0000) AM_RAM |
| 1365 | /* some games have protection devices in the 0x200000 region, it appears to map to cart space, not surprising, the ROM is read here too */ |
| 1366 | AM_RANGE(0x200000, 0x2fffff) AM_ROMBANK(NEOGEO_BANK_CARTRIDGE) |
| 1367 | AM_RANGE(0x2ffff0, 0x2fffff) AM_WRITE(main_cpu_bank_select_w) |
| 1368 | AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ff7e) AM_READ(aes_in0_r) |
| 1369 | AM_RANGE(0x300080, 0x300081) AM_MIRROR(0x01ff7e) AM_READ_PORT("IN4") |
| 1370 | AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITENOP // AES has no watchdog |
| 1371 | AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("IN3") AM_WRITE(audio_command_w) |
| 1372 | AM_RANGE(0x340000, 0x340001) AM_MIRROR(0x01fffe) AM_READ(aes_in1_r) |
| 1373 | AM_RANGE(0x360000, 0x37ffff) AM_READ(neogeo_unmapped_r) |
| 1374 | AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ(aes_in2_r) |
| 1375 | AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE(io_control_w) |
| 1376 | AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READWRITE(neogeo_unmapped_r, system_control_w) |
| 1377 | AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ(neogeo_video_register_r) |
| 1378 | AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE(neogeo_video_register_w) |
| 1379 | AM_RANGE(0x3e0000, 0x3fffff) AM_READ(neogeo_unmapped_r) |
| 1380 | AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE(neogeo_paletteram_r, neogeo_paletteram_w) |
| 1381 | AM_RANGE(0x800000, 0x803fff) AM_READWRITE(neocd_memcard_r, neocd_memcard_w) |
| 1382 | AM_RANGE(0xc00000, 0xcfffff) AM_ROMBANK(NEOGEO_BANK_BIOS) |
| 1383 | AM_RANGE(0xd00000, 0xd0ffff) AM_MIRROR(0x0f0000) AM_READ(neogeo_unmapped_r) //AM_RAM_WRITE(save_ram_w) AM_BASE(&save_ram) |
| 1384 | AM_RANGE(0xe00000, 0xefffff) AM_READWRITE(neocd_transfer_r,neocd_transfer_w) |
| 1385 | AM_RANGE(0xf00000, 0xfeffff) AM_READ(neogeo_unmapped_r) |
| 1386 | AM_RANGE(0xff0000, 0xff01ff) AM_READWRITE(neocd_control_r, neocd_control_w) // CDROM / DMA |
| 1387 | AM_RANGE(0xff0200, 0xffffff) AM_READ(neogeo_unmapped_r) |
| 1388 | ADDRESS_MAP_END |
| 1023 | 1389 | |
| 1024 | 1390 | |
| 1025 | 1391 | /************************************* |
| r8767 | r8768 | |
| 1329 | 1695 | |
| 1330 | 1696 | MDRV_MACHINE_START(neogeo) |
| 1331 | 1697 | MDRV_MACHINE_RESET(neogeo) |
| 1332 | | // MDRV_NVRAM_HANDLER(neogeo) |
| 1333 | | MDRV_MEMCARD_HANDLER(neogeo) |
| 1334 | 1698 | |
| 1335 | 1699 | /* video hardware */ |
| 1336 | 1700 | MDRV_VIDEO_START(neogeo) |
| r8767 | r8768 | |
| 1358 | 1722 | |
| 1359 | 1723 | static MACHINE_DRIVER_START( aes ) |
| 1360 | 1724 | MDRV_IMPORT_FROM(neogeo) |
| 1725 | |
| 1726 | MDRV_MEMCARD_HANDLER(neogeo) |
| 1727 | |
| 1361 | 1728 | MDRV_AES_CARTRIDGE_ADD("aes_multicart") |
| 1362 | 1729 | // MDRV_CARTSLOT_ADD("cart") |
| 1363 | 1730 | // MDRV_CARTSLOT_MANDATORY |
| r8767 | r8768 | |
| 1367 | 1734 | MDRV_SOFTWARE_LIST_ADD("cart_list","aes") |
| 1368 | 1735 | MACHINE_DRIVER_END |
| 1369 | 1736 | |
| 1737 | static MACHINE_DRIVER_START( neocd ) |
| 1738 | MDRV_IMPORT_FROM(neogeo) |
| 1739 | |
| 1740 | MDRV_CPU_MODIFY("maincpu") |
| 1741 | MDRV_CPU_PROGRAM_MAP(neocd_main_map) |
| 1742 | |
| 1743 | MDRV_MACHINE_START(neocd) |
| 1744 | MACHINE_DRIVER_END |
| 1745 | |
| 1370 | 1746 | /************************************* |
| 1371 | 1747 | * |
| 1372 | 1748 | * Driver initalization |
| r8767 | r8768 | |
| 1411 | 1787 | |
| 1412 | 1788 | ROM_START( neocd ) |
| 1413 | 1789 | ROM_REGION16_BE( 0x80000, "mainbios", 0 ) |
| 1414 | | ROM_LOAD16_WORD( "neocd.rom", 0x00000, 0x80000, CRC(33697892) SHA1(b0f1c4fa8d4492a04431805f6537138b842b549f) ) |
| 1790 | ROM_LOAD16_WORD( "neocd.rom", 0x00000, 0x80000, CRC(33697892) SHA1(b0f1c4fa8d4492a04431805f6537138b842b549f) ) // not byteswapped |
| 1415 | 1791 | |
| 1416 | 1792 | ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF ) |
| 1417 | 1793 | |
| 1418 | | ROM_REGION( 0x20000, "audiobios", ROMREGION_ERASEFF ) |
| 1794 | ROM_REGION( 0x100000, "audiobios", ROMREGION_ERASEFF ) |
| 1419 | 1795 | |
| 1420 | 1796 | ROM_REGION( 0x10000, "audiocpu", ROMREGION_ERASEFF ) |
| 1421 | 1797 | |
| r8767 | r8768 | |
| 1426 | 1802 | |
| 1427 | 1803 | ROM_REGION( 0x20000, "fixed", ROMREGION_ERASEFF ) |
| 1428 | 1804 | |
| 1429 | | ROM_REGION( 0x100000, "ym", ROMREGION_ERASEFF ) |
| 1805 | ROM_REGION( 0x400000, "ymsnd", ROMREGION_ERASEFF ) |
| 1430 | 1806 | |
| 1431 | | // NO_DELTAT_REGION |
| 1807 | // NO_DELTAT_REGION |
| 1432 | 1808 | |
| 1433 | 1809 | ROM_REGION( 0x400000, "sprites", ROMREGION_ERASEFF ) |
| 1434 | 1810 | ROM_END |
| r8767 | r8768 | |
| 1450 | 1826 | |
| 1451 | 1827 | ROM_REGION( 0x20000, "fixed", ROMREGION_ERASEFF ) |
| 1452 | 1828 | |
| 1453 | | ROM_REGION( 0x100000, "ym", ROMREGION_ERASEFF ) |
| 1829 | ROM_REGION( 0x400000, "ymsnd", ROMREGION_ERASEFF ) |
| 1454 | 1830 | |
| 1455 | | // NO_DELTAT_REGION |
| 1831 | // NO_DELTAT_REGION |
| 1456 | 1832 | |
| 1457 | 1833 | ROM_REGION( 0x400000, "sprites", ROMREGION_ERASEFF ) |
| 1458 | 1834 | ROM_END |
| 1459 | 1835 | |
| 1460 | 1836 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 1461 | 1837 | CONS( 1990, aes, 0, 0, aes, aes, neogeo, "SNK", "Neo-Geo AES", 0) |
| 1462 | | CONS( 1994, neocd, aes, 0, neogeo, aes, neogeo, "SNK", "Neo-Geo CD", GAME_NOT_WORKING ) |
| 1463 | | CONS( 1996, neocdz, aes, 0, neogeo, aes, neogeo, "SNK", "Neo-Geo CDZ", GAME_NOT_WORKING ) |
| 1838 | CONS( 1994, neocd, aes, 0, neocd, aes, neogeo, "SNK", "Neo-Geo CD", GAME_NOT_WORKING ) |
| 1839 | CONS( 1996, neocdz, aes, 0, neocd, aes, neogeo, "SNK", "Neo-Geo CDZ", GAME_NOT_WORKING ) |