2021-01-18 9:00 JST 〜 メンテナンスによるサービス全停止予定

コミットメタ情報

リビジョン3621e2e4e3161c5f2e5c448d590f2e666df18270 (tree)
日時2013-05-30 15:19:50
作者naruko <naruko@24ea...>
コミッターnaruko

ログメッセージ

ram dump 対応

git-svn-id: svn+ssh://svn.osdn.net/svnroot/unagi@411 24ea1065-a21e-4ca1-99c9-f5125deb0858

変更サマリ

差分

--- a/client/trunk/anago/mmc4_fkrom.ad
+++ /dev/null
@@ -1,41 +0,0 @@
1-board <- {
2- mappernum = 10, vram_mirrorfind = false, ppu_ramfind = true,
3- cpu_rom = {
4- size_base = 1 * mega, size_max = 2 * mega,
5- banksize = 0x4000,
6- },
7- cpu_ram = {
8- size_base = 0x2000, size_max = 0x2000,
9- banksize = 0x2000,
10- },
11- ppu_rom = {
12- size_base = 0x10000, size_max = 1 * mega,
13- banksize = 0x1000
14- }
15-};
16-
17-function cpu_dump(d, pagesize, banksize)
18-{
19- for(local i = 0; i < pagesize - 1; i += 1){
20- cpu_write(d, 0xa000, i);
21- cpu_read(d, 0x8000, banksize);
22- }
23- cpu_read(d, 0xc000, banksize);
24-}
25-
26-function ppu_dump(d, pagesize, banksize)
27-{
28- for(local i = 0; i < pagesize; i += 2){
29- ppu_read(d, 0x0fd0, 0);
30- cpu_write(d, 0xb000, i);
31- ppu_read(d, 0x0fe0, 0);
32- cpu_write(d, 0xc000, i);
33-
34- ppu_read(d, 0x1fd0, 0);
35- cpu_write(d, 0xd000, i + 1);
36- ppu_read(d, 0x1fe0, 0);
37- cpu_write(d, 0xe000, i + 1);
38-
39- ppu_read(d, 0, banksize * 2);
40- }
41-}
--- /dev/null
+++ b/client/trunk/anago/mmc4_fkrom.ae
@@ -0,0 +1,81 @@
1+/*
2+HVC-2I Fireemblem Gaiden
3+*/
4+board <- {
5+ mappernum = 10, vram_mirrorfind = false, ppu_ramfind = true,
6+ cpu_rom = {
7+ size_base = 1 * mega, size_max = 2 * mega,
8+ banksize = 0x4000,
9+ },
10+ cpu_ram = {
11+ size_base = 0x2000, size_max = 0x2000,
12+ banksize = 0x2000,
13+ },
14+ ppu_rom = {
15+ size_base = 0x10000, size_max = 1 * mega,
16+ banksize = 0x1000
17+ }
18+};
19+
20+/*
21+[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)
25+
26+[cpu memmorymap - write]
27+$a000-$afff program ROM bank register #1
28+$b000-$bfff charcter ROM bank register #0
29+$c000-$cfff charcter ROM bank register #1
30+$d000-$dfff charcter ROM bank register #2
31+$d000-$dfff charcter ROM bank register #3
32+
33+[ppu memorymap - read]
34+0x0000-0x0fff charcter ROM bank #A (#0 or #1)
35+0x0fd0-0x0fdf charcter ROM bank register switch to #0
36+0x0fe0-0x0fef charcter ROM bank register switch to #1
37+0x1000-0x1fff charcter ROM bank #B (#2 or #3)
38+0x1fd0-0x1fdf charcter ROM bank register switch to #2
39+0x1fe0-0x1fef charcter ROM bank register switch to #3
40+*/
41+function cpu_dump(d, pagesize, banksize)
42+{
43+ for(local i = 0; i < pagesize - 1; i += 1){
44+ cpu_write(d, 0xa000, i);
45+ cpu_read(d, 0x8000, banksize);
46+ }
47+ cpu_read(d, 0xc000, banksize);
48+}
49+
50+/*
51+PPU の read 途中にバンクレジスタが切り替わるらしいので下記の処理で
52+同じデータを得るようにする。
53+PPU address register
54+0x0000-0x0fdf -> #0
55+0x0fe0-0x0fff -> #1
56+0x1000-0x1fdf -> #2
57+0x1fe0-0x1fff -> #3
58+
59+ppu_read 前に #0 + #1 , #2 + #3 の内容は同じにしておく。
60+*/
61+function ppu_dump(d, pagesize, banksize)
62+{
63+ for(local i = 0; i < pagesize; i += 2){
64+ ppu_read(d, 0x0fd0, 0);
65+ cpu_write(d, 0xb000, i);
66+ ppu_read(d, 0x0fe0, 0);
67+ cpu_write(d, 0xc000, i);
68+
69+ ppu_read(d, 0x1fd0, 0);
70+ cpu_write(d, 0xd000, i + 1);
71+ ppu_read(d, 0x1fe0, 0);
72+ cpu_write(d, 0xe000, i + 1);
73+
74+ ppu_read(d, 0, banksize * 2);
75+ }
76+}
77+
78+function cpu_ram_access(d, pagesize, banksize)
79+{
80+ cpu_ramrw(d, 0x6000, banksize);
81+}
旧リポジトリブラウザで表示