mirror of
https://github.com/romychs/Ocean-240.2-Emulator.git
synced 2026-11-30 09:43:00 +03:00
fix cpu timings, fix irq for keyboard handling, fix cursor keys
This commit is contained in:
1 parent
a74841b048
commit
18df702750
11 files changed
+206
-116
No files matched your search
@@ -7,8 +7,6 @@ package pic
|
||||
By Romych, 2025.03.05
|
||||
*/
|
||||
|
||||
import log "github.com/sirupsen/logrus"
|
||||
|
||||
type I8259 struct {
|
||||
irr byte
|
||||
csw byte
|
||||
@@ -42,12 +40,11 @@ func (c *I8259) IRR() byte {
|
||||
return irr
|
||||
}
|
||||
|
||||
func (c *I8259) ResetIRQ(irq byte) {
|
||||
c.irr &= ^(byte(1) << (irq & 0x07))
|
||||
}
|
||||
func (c *I8259) SetIRQ(irq byte) {
|
||||
if irq < 8 {
|
||||
c.irr |= 1 << irq
|
||||
} else {
|
||||
log.Warnf("SetIRQ out of range [0..7]: %d", irq)
|
||||
}
|
||||
c.irr |= 1 << (irq & 0x07)
|
||||
}
|
||||
|
||||
func (c *I8259) CSW() byte {
|
||||
|
||||
Reference in new issue
Block a user