|
|
|
|
| 種類 | 税抜き定価(税込) | 製品型番 | 本体型番 |
| ミニファミコン(再生産) | 5980円(6458円) | CLV-S-HVCC | CLV-101 |
| ミニスーファミ | 7980円(8618円) | CLV-S-SHVF | CLV-301 |
| 週刊少年ジャンプ版 | 7980円(8618円) | CLV-S-HVJJ | CLV-101 |
| 専用 USB対応 ACアダプター +5V 1.5A出力 世界対応 LITEON製 | 1000円(1080円) | CLV-A-ADLQ | CLV-003 |
| 海外版ミニファミコン | CLV-001 Clover | ||
| 海外版ミニファミコン コントローラパッド | CLV-002 CloverCon |
![]() ニンテンドークラシックミニ ダブルパック 【Amazon.co.jp限定】オリジナル版『スーパーマリオブラザーズ』"風"説明書+オリジナル版『F-ZERO』"風"説明書+オリジナル壁紙 配信 ASIN: B07GVBWNPF バラで購入の場合購入価格の合計: 5980+7980+1000+税 = 16156円 ざっくり ACアダプターぶんお得。 |
![]() ニンテンドークラシックミニ ファミリーコンピュータ+【Amazon.co.jp限定】オリジナル版『スーパーマリオブラザーズ』"風"説明書+オリジナル壁紙 配信 ASIN: B07DCGLP59 |
![]() ニンテンドークラシックミニ スーパーファミコン+【Amazon.co.jp限定】オリジナル版『F-ZERO』"風"説明書+オリジナル壁紙 配信 ASIN: B07DCFDB1H |
![]() ニンテンドークラシックミニ ファミリーコンピュータ 週刊少年ジャンプ創刊50周年記念バージョン ASIN: B07D2HMM6Q ※本商品の参考価格は8,618円(税込)です。 |
![]() NEOGEO mini【Amazon.co.jp限定】「TWINKLE STAR SPRITES」STEAMコード 配信 ASIN: B07G341HR2 定価(税抜):11500円 税込み価格:12420円 |
// IPS Patch program
// IpsPatch.exe
// Copyright (c)2018 FREE WING, Y.Sakamoto
using System;
using System.IO;
namespace IpsPatch
{
class Program
{
static void Main(string[] args)
{
if (args.Length < 2)
{
Console.WriteLine("Error");
return;
}
string ipsFilePath = args[0];
byte[] ipsBuff = ReadByteFile(ipsFilePath);
string filePath = args[1];
byte[] rbuff = ReadByteFile(filePath);
string ext = Path.GetExtension(filePath);
string wfilePath = filePath.Replace(ext, "_pached" + ext);
if (args.Length >= 3)
{
wfilePath = args[2];
}
bool err = false;
int ipsstate = 0;
int ipspos = 0;
while ((ipspos < ipsBuff.Length) && (!err))
{
switch (ipsstate)
{
case 0:
// PATCH
byte[] patch = { 0x50, 0x41, 0x54, 0x43, 0x48 };
for (int pos = 0; pos < patch.Length; ++pos)
{
byte ib = ipsBuff[ipspos++];
if (ib != patch[pos])
{
err = true;
break;
}
}
if (err)
{
break;
}
++ipsstate;
break;
case 1:
// Chunk
// EOF
int offset = ipsBuff[ipspos++];
offset <<= 8;
offset |= ipsBuff[ipspos++];
offset <<= 8;
offset |= ipsBuff[ipspos++];
// EOF ?
if (offset == 0x00454F46)
{
if ( (ipspos == ipsBuff.Length) || (ipspos == (ipsBuff.Length - 3)) )
{
++ipsstate;
break;
}
}
int length = ipsBuff[ipspos++];
length <<= 8;
length |= ipsBuff[ipspos++];
if (length != 0x0000)
{
if (rbuff.Length < (offset + length))
{
Array.Resize(ref rbuff, (offset + length));
}
// AM
while (length-- > 0)
{
rbuff[offset++] = ipsBuff[ipspos++];
}
}
else
{
// EM
int count = ipsBuff[ipspos++];
count <<= 8;
count |= ipsBuff[ipspos++];
if (rbuff.Length < (offset + count))
{
Array.Resize(ref rbuff, (offset + count));
}
byte b = ipsBuff[ipspos++];
while (count-- > 0)
{
rbuff[offset++] = b;
}
}
break;
case 2:
// Truncate
int truncate = ipsBuff[ipspos++];
truncate <<= 8;
truncate |= ipsBuff[ipspos++];
truncate <<= 8;
truncate |= ipsBuff[ipspos++];
Array.Resize(ref rbuff, truncate);
break;
default:
err = true;
break;
}
}
if (err)
{
Console.WriteLine("Error");
return;
}
WriteByteFile(wfilePath, rbuff);
Console.WriteLine("Size = 0x" + rbuff.Length.ToString("x08"));
}
static byte[] ReadByteFile(string filePath)
{
using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
var buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
return buffer;
}
}
static void WriteByteFile(string filePath, byte[] buff)
{
using (var fs = new FileStream(filePath, FileMode.Create, FileAccess.Write))
{
fs.Write(buff, 0, buff.Length);
}
}
}
}