File:  [Isaki's NoNo m68k/m88k emulator] / nono / vm / kbc.h
Revision 1.1.1.3 (vendor branch): download - view: text, annotated - select for diffs
Wed Apr 29 17:05:28 2026 UTC (2 months, 3 weeks ago) by root
Branches: MAIN, Isaki
CVS tags: v027, v026, v025, v024, v023, v022, v021, v020, HEAD
nono 1.0.0

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

//
// NWS-1750 のキーボードコントローラ(予定地)
//

#pragma once

#include "device.h"

class KBCDevice : public IODevice
{
	using inherited = IODevice;

	// レジスタ
	static const uint32 KEYDATA		= 0;
	static const uint32 KEYSTAT		= 1;
	static const uint32 KEYINTE		= 2;
	static const uint32 KEYRESET	= 3;
	static const uint32 KEYBUZZ		= 4;
	static const uint32 MSDATA		= 5;
	static const uint32 MSINTE		= 6;
	static const uint32 MSRESET		= 7;

 public:
	KBCDevice();
	~KBCDevice() override;

 protected:
	// BusIO インタフェース
	// 何も分からないのでとりあえず適当に折り返しておく
	static const uint32 NPORT = 8;
	busdata ReadPort(uint32 offset);
	busdata WritePort(uint32 offset, uint32 data);
	busdata PeekPort(uint32 offset);
	bool PokePort(uint32 offset, uint32 data);
};

unix.superglobalmegacorp.com

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