--- nono/vm/sprite.cpp 2026/04/29 17:04:50 1.1.1.5 +++ nono/vm/sprite.cpp 2026/04/29 17:05:11 1.1.1.8 @@ -4,33 +4,41 @@ // Licensed under nono-license.txt // +// +// スプライトコントローラ +// + #include "sprite.h" #include "mpu.h" -#include -std::unique_ptr gSprite; +// グローバル参照用 +SpriteDevice *gSprite; +// コンストラクタ SpriteDevice::SpriteDevice() + : inherited("Sprite") { - logname = "sprite"; - devname = "Sprite"; devaddr = baseaddr; devlen = 0x010000; mem.reset(new uint8[4 * 8192]); } +// デストラクタ SpriteDevice::~SpriteDevice() { + gSprite = NULL; } +// XXX ResetHard() 未調査 + uint64 SpriteDevice::Read8(uint32 addr) { if (addr >= 0xeb8000) { return mem[HB(addr - 0xeb8000)]; } - PANIC("not impl"); + VMPANIC("not impl"); } uint64 @@ -95,7 +103,7 @@ SpriteDevice::Write8(uint32 addr, uint32 // スプライトレジスタへの書き込み (InsideOut p.135) gMPU->AddCycle(20); - PANIC("not impl"); + VMPANIC("not impl"); } uint64