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

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

//
// ABORT/INTERRUPT スイッチによる NMI 機構デバイス
//

#pragma once

#include "device.h"
#include "message.h"

class InterruptDevice;

class NMIDevice : public Device
{
	using inherited = Device;
 public:
	NMIDevice();
	~NMIDevice() override;

	bool Init() override;

	// NMI ボタンを押す
	void PressNMI();

	// NMI 信号線をアサートする
	void AssertNMI();

	// NMI 信号線をネゲートする
	void NegateNMI();

 private:
	void AssertMessage(MessageID, uint32);
	void NegateCallback(Event *);

	InterruptDevice *interrupt {};

	Event *event {};
};

inline NMIDevice *GetNMIDevice() {
	return Object::GetObject<NMIDevice>(OBJ_NMI);
}

unix.superglobalmegacorp.com

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