リビジョン | 39b984ed02a589c6deb341138646adbbb08dcf84 (tree) |
---|---|
日時 | 2013-07-10 08:41:04 |
作者 | naruko <naruko@24ea...> |
コミッター | naruko |
IREM G-101 (#32) を追加、スクリプトのファイル名にメーカー名をつけるように変更
git-svn-id: svn+ssh://svn.osdn.net/svnroot/unagi@412 24ea1065-a21e-4ca1-99c9-f5125deb0858
@@ -0,0 +1,59 @@ | ||
1 | +/* | |
2 | +IREM G-101 based cartridge | |
3 | + | |
4 | +$8000-$9fff bank#0, switchable or last - 2 | |
5 | +$a000-$bfff bank#1, switchable | |
6 | +$c000-$dfff bank#2, last - 2 or switchable | |
7 | +$e000-$ffff | |
8 | +note: | |
9 | +Major League PCB maybe ignore write operation to $9000-$9fff | |
10 | +$9000-$9fff write register are fixed to bank #2 = last -2 and VRAM A10 = high | |
11 | +*/ | |
12 | + | |
13 | +board <- { | |
14 | + mappernum = 32, | |
15 | + cpu_rom = { | |
16 | + size_base = 1 * mega, size_max = 2 * mega, | |
17 | + banksize = 0x2000 | |
18 | + }, | |
19 | + ppu_rom = { | |
20 | + size_base = 1 * mega, size_max = 1 * mega, | |
21 | + banksize = 0x0400 | |
22 | + }, | |
23 | + ppu_ramfind = false, | |
24 | + vram_mirrorfind = false | |
25 | +}; | |
26 | + | |
27 | +function cpu_dump(d, pagesize, banksize) | |
28 | +{ | |
29 | + if(1){ | |
30 | + cpu_write(d, 0x9000, 0); | |
31 | + for(local i = 0; i < pagesize - 2; i += 2){ | |
32 | + cpu_write(d, 0x8000, i); | |
33 | + cpu_write(d, 0xa000, i | 1); | |
34 | + cpu_read(d, 0x8000, banksize * 2); | |
35 | + } | |
36 | + cpu_read(d, 0xc000, banksize); | |
37 | + cpu_read(d, 0xe000, banksize); | |
38 | + }else{ | |
39 | + cpu_write(d, 0x9000, 2); | |
40 | + for(local i = 0; i < pagesize - 2; i += 2){ | |
41 | + cpu_write(d, 0x8000, i); | |
42 | + cpu_write(d, 0xa000, i | 1); | |
43 | + cpu_read(d, 0xc000, banksize); | |
44 | + cpu_read(d, 0xa000, banksize); | |
45 | + } | |
46 | + cpu_read(d, 0x8000, banksize); | |
47 | + cpu_read(d, 0xe000, banksize); | |
48 | + } | |
49 | +} | |
50 | +function ppu_dump(d, pagesize, banksize) | |
51 | +{ | |
52 | + for(local i = 0; i < pagesize ; i += 8){ | |
53 | + for(local j = 0; j < 8; j += 1){ | |
54 | + cpu_write(d, 0xb000 + j, i + j); | |
55 | + } | |
56 | + ppu_read(d, 0, banksize * 8); | |
57 | + } | |
58 | +} | |
59 | + |
@@ -1,8 +1,10 @@ | ||
1 | 1 | /* |
2 | -HVC-2I Fireemblem Gaiden | |
2 | +HVC-2I Fire Emblem Gaiden | |
3 | +command line option | |
4 | +./anago d22 mmc4_fkrom.ae hvc_2i.nes b | |
3 | 5 | */ |
4 | 6 | board <- { |
5 | - mappernum = 10, vram_mirrorfind = false, ppu_ramfind = true, | |
7 | + mappernum = 10, vram_mirrorfind = false, ppu_ramfind = false, | |
6 | 8 | cpu_rom = { |
7 | 9 | size_base = 1 * mega, size_max = 2 * mega, |
8 | 10 | banksize = 0x4000, |
@@ -19,12 +21,12 @@ board <- { | ||
19 | 21 | |
20 | 22 | /* |
21 | 23 | [cpu memmorymap - read] |
22 | -$6000-$7fff SRAM (battery backup, optional) | |
23 | -$8000-$bfff program ROM bank #1 | |
24 | -$c000-$ffff program ROM bank #2 (fixed) | |
24 | +$6000-$7fff SRAM (battery backuped, optional) | |
25 | +$8000-$bfff program ROM bank #0 | |
26 | +$c000-$ffff program ROM bank #1 (fixed) | |
25 | 27 | |
26 | 28 | [cpu memmorymap - write] |
27 | -$a000-$afff program ROM bank register #1 | |
29 | +$a000-$afff program ROM bank register #0 | |
28 | 30 | $b000-$bfff charcter ROM bank register #0 |
29 | 31 | $c000-$cfff charcter ROM bank register #1 |
30 | 32 | $d000-$dfff charcter ROM bank register #2 |
@@ -10,7 +10,7 @@ board <- { | ||
10 | 10 | size_base = 2 * mega, size_max = 4 * mega, |
11 | 11 | banksize = 0x2000 |
12 | 12 | }, |
13 | - cpu_rom = { | |
13 | + cpu_ram = { | |
14 | 14 | size_base = 0x0800, size_max = 0x0800, |
15 | 15 | banksize = 0x2000 |
16 | 16 | }, |
@@ -17,8 +17,10 @@ function cpu_dump(d, pagesize, banksize) | ||
17 | 17 | } |
18 | 18 | function ppu_dump(d, pagesize, banksize) |
19 | 19 | { |
20 | + local security = 0; //0,1,2,3 or don't care | |
21 | + security = security << 4; | |
20 | 22 | for(local i = 0; i < pagesize; i++){ |
21 | - cpu_write(d, 0x8000, 0xf0 | i); | |
23 | + cpu_write(d, 0x8000, security | i); | |
22 | 24 | ppu_read(d, 0, banksize); |
23 | 25 | } |
24 | 26 | } |
@@ -0,0 +1,15 @@ | ||
1 | +#ifndef _SCRIPT_WORKRAM_H_ | |
2 | +#define _SCRIPT_WORKRAM_H_ | |
3 | +struct workram_config{ | |
4 | + const wgChar *script, *target; | |
5 | + const struct reader_handle *handle; | |
6 | + const struct reader_control *control; | |
7 | + struct textcontrol log; | |
8 | + void (*except)(const wgChar *str); | |
9 | + | |
10 | + const struct reader_memory_access *access; | |
11 | + struct memory memory; | |
12 | + long read_count, increase; | |
13 | + struct gauge gauge; | |
14 | +}; | |
15 | +#endif |
@@ -263,6 +263,15 @@ static SQInteger read_count(HSQUIRRELVM v, const struct textcontrol *l, struct d | ||
263 | 263 | l->append(l->object, wgT("address range must be 0x%06x to 0x%06x"), (int) range_address->start, (int) range_address->end); |
264 | 264 | return sq_throwerror(v, wgT("script logical error"));; |
265 | 265 | } |
266 | +#ifdef DEBUG | |
267 | + if(address >= 0x6000 && (address + length) < 0x8000){ | |
268 | + static int e = 0; | |
269 | + if(e == 0){ | |
270 | + l->append(l->object, wgT("warning: 0x6000-0x7fff dump as ROM")); | |
271 | + } | |
272 | + e++; | |
273 | + } | |
274 | +#endif | |
266 | 275 | t->read_count_byte += length; |
267 | 276 | return 0; |
268 | 277 | } |