mirror of
https://github.com/ivanizag/izapple2.git
synced 2025-03-12 03:34:16 +00:00
Some work on the DiskII
This commit is contained in:
parent
84f45d9f99
commit
6babe07ea6
@ -14,9 +14,10 @@ http://yesterbits.com/media/pubs/AppleOrchard/articles/disk-ii-part-1-1983-apr.p
|
||||
|
||||
type cardDisk2 struct {
|
||||
cardBase
|
||||
phases [4]bool
|
||||
power [2]bool
|
||||
selected int // Only 0 and 1 supported
|
||||
phases [4]bool
|
||||
power [2]bool
|
||||
selected int // Only 0 and 1 supported
|
||||
writeMode bool
|
||||
}
|
||||
|
||||
// type softSwitchR func(io *ioC0Page) uint8
|
||||
@ -59,6 +60,38 @@ func newCardDisk2(filename string) *cardDisk2 {
|
||||
return 0
|
||||
}
|
||||
|
||||
var i uint8
|
||||
// Q6L
|
||||
c.ssr[0xC] = func(_ *ioC0Page) uint8 {
|
||||
fmt.Printf("DISKII: Reading\n")
|
||||
i++
|
||||
return i
|
||||
}
|
||||
|
||||
c.ssw[0xC] = func(_ *ioC0Page, value uint8) {
|
||||
fmt.Printf("DISKII: Writing the value 0x%02x\n", value)
|
||||
}
|
||||
|
||||
// Q6H
|
||||
c.ssr[0xD] = func(_ *ioC0Page) uint8 {
|
||||
c.writeMode = false
|
||||
fmt.Printf("DISKII: Sense write protection\n")
|
||||
return 0
|
||||
}
|
||||
|
||||
// Q7L
|
||||
c.ssr[0xE] = func(_ *ioC0Page) uint8 {
|
||||
c.writeMode = false
|
||||
fmt.Printf("DISKII: Set read mode\n")
|
||||
return 0
|
||||
}
|
||||
|
||||
// Q7H
|
||||
c.ssr[0xF] = func(_ *ioC0Page) uint8 {
|
||||
c.writeMode = true
|
||||
fmt.Printf("DISKII: Set write mode\n")
|
||||
return 0
|
||||
}
|
||||
// TODO: missing C, D, E, and F
|
||||
|
||||
return &c
|
||||
|
4
main.go
4
main.go
@ -6,10 +6,10 @@ func main() {
|
||||
//romFile := "apple2/romdumps/Apple2.rom"
|
||||
romFile := "apple2/romdumps/Apple2_Plus.rom"
|
||||
//romFile := "apple2/romdumps/Apple2e.rom"
|
||||
disk2RomFile := "apple2/romdumps/DISK2.rom"
|
||||
//disk2RomFile := "apple2/romdumps/DISK2.rom"
|
||||
|
||||
log := true
|
||||
a := apple2.NewApple2(romFile)
|
||||
a.AddDisk2(disk2RomFile)
|
||||
//a.AddDisk2(disk2RomFile)
|
||||
a.Run(log)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user