mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-27 00:29:18 +00:00
Ensure that AMIC pseudo-VBL timer is stopped when the object is destroyed.
This commit is contained in:
parent
2f326a8199
commit
f218a38294
@ -90,6 +90,14 @@ AMIC::AMIC() : MMIODevice()
|
|||||||
this->swim3->set_dma_channel(this->floppy_dma.get());
|
this->swim3->set_dma_channel(this->floppy_dma.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AMIC::~AMIC()
|
||||||
|
{
|
||||||
|
if (this->pseudo_vbl_tid) {
|
||||||
|
TimerManager::get_instance()->cancel_timer(this->pseudo_vbl_tid);
|
||||||
|
this->pseudo_vbl_tid = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int AMIC::device_postinit()
|
int AMIC::device_postinit()
|
||||||
{
|
{
|
||||||
MemCtrlBase *mem_ctrl = dynamic_cast<MemCtrlBase *>
|
MemCtrlBase *mem_ctrl = dynamic_cast<MemCtrlBase *>
|
||||||
|
@ -275,7 +275,7 @@ enum AMICReg : uint32_t {
|
|||||||
class AMIC : public MMIODevice, public InterruptCtrl {
|
class AMIC : public MMIODevice, public InterruptCtrl {
|
||||||
public:
|
public:
|
||||||
AMIC();
|
AMIC();
|
||||||
~AMIC() = default;
|
~AMIC();
|
||||||
|
|
||||||
static std::unique_ptr<HWComponent> create() {
|
static std::unique_ptr<HWComponent> create() {
|
||||||
return std::unique_ptr<AMIC>(new AMIC());
|
return std::unique_ptr<AMIC>(new AMIC());
|
||||||
@ -336,7 +336,7 @@ private:
|
|||||||
uint8_t via2_slot_ifr = 0x7F; // reverse logic
|
uint8_t via2_slot_ifr = 0x7F; // reverse logic
|
||||||
uint8_t via2_slot_irq = 0; // normal logic
|
uint8_t via2_slot_irq = 0; // normal logic
|
||||||
|
|
||||||
uint32_t pseudo_vbl_tid; // ID for the pseudo-VBL timer
|
uint32_t pseudo_vbl_tid = 0; // ID for the pseudo-VBL timer
|
||||||
|
|
||||||
// AMIC subdevice instances
|
// AMIC subdevice instances
|
||||||
Sc53C94* scsi;
|
Sc53C94* scsi;
|
||||||
|
Loading…
Reference in New Issue
Block a user