• R/O
  • SSH
  • HTTPS

oswan: Commit


Commit MetaInfo

Revision96 (tree)
Zeit2010-05-18 15:10:10
Autorbird_may_nike

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- oswanj/trunk/src/WSMain.cpp (revision 95)
+++ oswanj/trunk/src/WSMain.cpp (revision 96)
@@ -61,14 +61,15 @@
6161 WsInputInit(hWnd);
6262 WsInputSetKeyMap(0);
6363 WsSplash();
64- if (lpsCmdLine[0] != 0)
64+ if (__argc > 1)
6565 {
66- apuWaveClear();
67- WsRelease();
68- Run = 1;
69- WsCreate(lpsCmdLine);
70- SetRecentRoms(lpsCmdLine);
71- SetStateInfo();
66+ if (WsCreate(__wargv[1]) != -1)
67+ {
68+ Sleep(500);
69+ Run = 1;
70+ SetRecentRoms(__wargv[1]);
71+ SetStateInfo();
72+ }
7273 }
7374 while (1) {
7475 if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
--- oswanj/trunk/src/WSApu.cpp (revision 95)
+++ oswanj/trunk/src/WSApu.cpp (revision 96)
@@ -249,8 +249,8 @@
249249 unsigned char v;
250250
251251 if ((IO[SDMACTL] & 0x98) == 0x98) { // Hyper voice
252- v = Page[IO[SDMASB] + b][*(WORD*)(IO+SDMASA) + index++];
253- if ((*(WORD*)(IO+SDMASA) + index) == 0)
252+ v = Page[IO[SDMASH] + b][*(WORD*)(IO + SDMASL) + index++];
253+ if ((*(WORD*)(IO + SDMASL) + index) == 0)
254254 {
255255 b++;
256256 }
@@ -270,20 +270,20 @@
270270 return v;
271271 }
272272 else if ((IO[SDMACTL] & 0x88) == 0x80) { // DMA start
273- IO[0x89] = Page[IO[SDMASB] + b][*(WORD*)(IO+SDMASA) + index++];
274- if ((*(WORD*)(IO+SDMASA) + index) == 0)
273+ IO[SND2VOL] = Page[IO[SDMASH] + b][*(WORD*)(IO + SDMASL) + index++];
274+ if ((*(WORD*)(IO + SDMASL) + index) == 0)
275275 {
276276 b++;
277277 }
278- if (*(WORD*)(IO+SDMACNT) <= index)
278+ if (*(WORD*)(IO + SDMACNT) <= index)
279279 {
280280 IO[SDMACTL] &= 0x7F; // DMA end
281- *(WORD*)(IO+SDMACNT) = 0;
281+ *(WORD*)(IO + SDMACNT) = 0;
282282 index = 0;
283283 b = 0;
284284 }
285285 }
286- return ((VoiceOn && Sound[4]) ? IO[0x89] : 0x80);
286+ return ((VoiceOn && Sound[4]) ? IO[SND2VOL] : 0x80);
287287 }
288288
289289 void apuSweep(void)
--- oswanj/trunk/src/WSFileio.cpp (revision 95)
+++ oswanj/trunk/src/WSFileio.cpp (revision 96)
@@ -76,8 +76,8 @@
7676 }
7777 if ((fp = _wfopen(CartName, L"rb")) == NULL)
7878 {
79+ ErrorMsg(ERR_FOPEN);
7980 MessageBox(NULL, CartName, NULL, MB_OK);
80- ErrorMsg(ERR_FOPEN);
8181 return -1;
8282 }
8383 fseek(fp, -10, 2);
--- oswanj/trunk/src/WS.cpp (revision 95)
+++ oswanj/trunk/src/WS.cpp (revision 96)
@@ -237,17 +237,17 @@
237237 {
238238 flashCommand1 = 1;
239239 }
240- if (RAMSize != 0x40000 || IO[BNK1SEL] < 8)
240+ if (RAMSize != 0x40000 || IO[BNK1SLCT] < 8)
241241 {
242242 // normal sram
243243 Page[1][offset] = V;
244244 }
245- else if (IO[BNK1SEL] >= 8 && IO[BNK1SEL] < 15)
245+ else if (IO[BNK1SLCT] >= 8 && IO[BNK1SLCT] < 15)
246246 {
247247 // FLASH ROM use SRAM bank(port 0xC1:8-14)(0xC1:15 0xF0000-0xFFFFF are write protected)
248248 if (flashWriteEnable || flashWriteOne)
249249 {
250- Page[IO[BNK1SEL]][offset] = V;
250+ Page[IO[BNK1SLCT]][offset] = V;
251251 flashWriteEnable = 0;
252252 flashWriteOne = 0;
253253 }
@@ -757,7 +757,7 @@
757757 WriteIO(0xBC, 0x30); // 内蔵EEPROM
758758 WriteIO(0xBD, 0x01); // 書き込み可能
759759 WriteIO(0xBE, 0x83);
760- IO[0xC0] = 0x0F;
760+ IO[BNKSLCT] = 0x0F;
761761 j = 0xF0;
762762 Page[0x4] = ROMMap[0x4 | j];
763763 Page[0x5] = ROMMap[0x5 | j];
--- oswanj/trunk/src/WSHard.h (revision 95)
+++ oswanj/trunk/src/WSHard.h (revision 96)
@@ -59,8 +59,8 @@
5959 #define DMADST 0x44 //
6060 #define DMACNT 0x46 //
6161
62-#define SDMASA 0x4A //
63-#define SDMASB 0x4C //
62+#define SDMASL 0x4A //
63+#define SDMASH 0x4C //
6464 #define SDMACNT 0x4E //
6565 #define SDMACTL 0x52 //
6666
@@ -70,7 +70,10 @@
7070 #define SND2FRQ 0x82 //
7171 #define SND3FRQ 0x84 //
7272 #define SND4FRQ 0x86 //
73-#define SNDV 0x88 //
73+#define SND1VOL 0x88 //
74+#define SND2VOL 0x89 //
75+#define SND3VOL 0x8A //
76+#define SND4VOL 0x8B //
7477 #define SNDSWP 0x8C //
7578 #define SWPSTP 0x8D //
7679 #define NSCTL 0x8E //
@@ -99,9 +102,10 @@
99102 #define EEPCMD 0xBC //
100103 #define EEPCTL 0xBE //
101104
102-#define BNK1SEL 0xC1 //
103-#define BNK2SEL 0xC2 //
104-#define BNK3SEL 0xC3 //
105+#define BNKSLCT 0xC0 //
106+#define BNK1SLCT 0xC1 //
107+#define BNK2SLCT 0xC2 //
108+#define BNK3SLCT 0xC3 //
105109 #define CEEPDATA 0xC4 //
106110 #define CEEPCMD 0xC6 //
107111
--- oswanj/trunk/wstech24j.txt (revision 95)
+++ oswanj/trunk/wstech24j.txt (revision 96)
@@ -209,7 +209,7 @@
209209 00 - WSモノクロ
210210 01 - WSカラー
211211 2 - バイト 0において定義した開発者に対応したカートリッジID
212- 3 - 不明
212+ 3 - ROMバージョン
213213 4 - ROMサイズ
214214 01 - 2Mビット
215215 02 - 4Mビット
@@ -219,7 +219,7 @@
219219 06 - 32Mビット
220220 07 - 48Mビット
221221 08 - 64Mビット
222- 09 - 128Mビット
222+ 09 - 128Mビット
223223 5 - SRAM/EEPROMサイズ
224224 00 - なし
225225 01 - 64kビット SRAM
Show on old repository browser