--- nono/vm/human68k.h 2026/04/29 17:04:58 1.1.1.7 +++ nono/vm/human68k.h 2026/04/29 17:05:18 1.1.1.9 @@ -4,18 +4,26 @@ // Licensed under nono-license.txt // +// +// Human68k .r .x .z console emulator +// + #pragma once #include "device.h" -#include "ram.h" -#include "m68030.h" +#include "mainram.h" -// Human68k console emulator +class MPU680x0Device; // Human68k 構造 class Human68k : public Device { using inherited = Device; + + static const uint32 default_load_addr = 0x20000; + + static const int FilesCount = 256; + public: // .X ファイルのヘッダ構造 struct XFileHeader { @@ -58,17 +66,20 @@ class Human68k : public Device bool Init() override; - bool FLineOp(m68kcpu *cpu); + bool FLineOp(); + + // MSXDOSDevice からも呼ぶ + static void RequestExit(int code); private: // Human Emulation API - void RequestExit(int code); int32 OpenFile(uint32 fileaddr, uint16 atr, int mode); int32 CloseFile(int32 fileno); int32 WriteFile(int32 fileno, uint32 dataaddr, uint32 size); void FputsFile(int32 fileno, uint32 dataaddr); - void IOCS(m68kcpu *cpu); + void IOCS(); + void DOS_PRINT(uint32 dataptr); bool LoadR(uint8 *memfile, uint size); bool LoadX(uint8 *memfile, uint size); @@ -78,8 +89,6 @@ class Human68k : public Device bool isext(const char *file, const char *ext); - RAMDevice *ram {}; - const char *human68k_file {}; std::string human68k_arg {}; @@ -95,8 +104,8 @@ class Human68k : public Device uint32 data_size {}; // データセクションサイズ uint32 bss_size {}; // BSS セクションサイズ(記録用) - const uint32 default_load_addr = 0x20000; - - static const int FilesCount = 256; File Files[FilesCount] {}; + + MainRAMDevice *ram {}; + MPU680x0Device *mpu {}; };