File:  [Isaki's NoNo m68k/m88k emulator] / nono / util / sramedit / sramedit.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed Apr 29 17:04:55 2026 UTC (2 months, 3 weeks ago) by root
Branches: MAIN, Isaki
CVS tags: v027, v026, v025, v024, v023, v022, v021, v020, v019, v018, v017, v016, v015, v014, v013, v012, v011, HEAD
nono 0.2.0

//
// nono
// Copyright (C) 2021 nono project
// Licensed under nono-license.txt
//

//
// X680x0 SRAM.DAT エディタ
//

#pragma once

#include "header.h"
#include "mystring.h"
#include <cstdio>
#include <cstring>
#include <vector>

struct sraminfo_t {
	// このパラメータのオフセット (占有バイト数は持っていない)
	uint32 offset;
	// キー名
	const char *name;

	// 値の読み出しコールバック。
	// このパラメータの値を表示用にして返す。
	// 詳細未定。
	std::string (*reader)(const sraminfo_t&);

	// 値の書き込みコールバック。
	// このパラメータを値 input に更新する。
	// エラーなら -1、更新の必要がなければ 0、更新すれば更新件数(通常1)を返す。
	int (*writer)(const sraminfo_t&, const std::string& input);

	// ヘルプメッセージを返す。
	const std::string (*help)(const sraminfo_t&);
};

extern int debug;
extern uint8 *sram;
extern std::vector<sraminfo_t> sraminfo;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.