File:  [Isaki's NoNo m68k/m88k emulator] / nono / vm / crtc2.h
Revision 1.1.1.14 (vendor branch): download - view: text, annotated - select for diffs
Wed Apr 29 17:05:55 2026 UTC (2 months, 3 weeks ago) by root
Branches: MAIN, Isaki
CVS tags: v027, v026, HEAD
nono 1.6.0

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

//
// CRTC-II (HD6445)
//

#pragma once

#include "device.h"

class LunafbDevice;
class VideoRenderer;

class CRTC2Device : public IODevice
{
	using inherited = IODevice;
 public:
	CRTC2Device();
	~CRTC2Device() override;

	bool Init() override;
	void ResetHard(bool poweron) override;

 protected:
	// BusIO インタフェース
	static const uint32 NPORT = 2;
	busdata ReadPort(uint32 offset);
	busdata WritePort(uint32 offset, uint32 data);
	busdata PeekPort(uint32 offset);
	bool PokePort(uint32 offset, uint32 data);

 private:
	// 垂直表示期間イベント
	void VDispCallback(Event *);

	// アドレスレジスタ
	uint ar {};

	// レジスタ
	uint8 reg[40] {};

	uint vdisp_state {};

	LunafbDevice *lunafb {};
	VideoRenderer *renderer {};

	Event *vdisp_event {};
};

unix.superglobalmegacorp.com

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