You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
765 B

package izapple2
import (
Logger card. It never existed, I use it to trace accesses to the card.
// CardLogger is a fake card to log soft switch invocations
type CardLogger struct {
// NewCardLogger creates a new VidHD card
func NewCardLogger() *CardLogger {
var c CardLogger = "Softswitch log card"
return &c
func (c *CardLogger) assign(a *Apple2, slot int) {
c.addCardSoftSwitches(func(address uint8, data uint8, write bool) uint8 {
if write {
fmt.Printf("[cardLogger] Write access to softswith 0x%x for slot %v, value 0x%02x.\n", address, slot, data)
} else {
fmt.Printf("[cardLogger] Read access to softswith 0x%x for slot %v.\n", address, slot)
return 0
}, "LOGGER")
c.cardBase.assign(a, slot)