mirror of
https://github.com/ivanizag/izapple2.git
synced 2025-04-28 20:37:18 +00:00
Fixing lint warnings
This commit is contained in:
parent
faf97dcdc9
commit
3de2c9dc1a
@ -84,7 +84,7 @@ func (a *Apple2) LoadRom(filename string) error {
|
||||
|
||||
size := len(data)
|
||||
if size != apple2RomSize && size != apple2eRomSize {
|
||||
return errors.New("Rom size not supported")
|
||||
return errors.New("rom size not supported")
|
||||
}
|
||||
|
||||
romBase := 0x10000 - size
|
||||
@ -218,7 +218,7 @@ func (a *Apple2) AddRomX() {
|
||||
func (a *Apple2) AddNoSlotClockInCard(slot int) error {
|
||||
cardRom := a.mmu.cardsROM[slot]
|
||||
if cardRom == nil {
|
||||
return errors.New("No ROM available on the slot to add a no slot clock")
|
||||
return errors.New("no ROM available on the slot to add a no slot clock")
|
||||
}
|
||||
nsc := newNoSlotClockDS1216(a, cardRom)
|
||||
a.mmu.cardsROM[slot] = nsc
|
||||
|
18
cardDisk2.go
18
cardDisk2.go
@ -41,16 +41,6 @@ type cardDisk2Drive struct {
|
||||
tracksStep int // Stepmotor for tracks position. 4 steps per track
|
||||
}
|
||||
|
||||
const (
|
||||
maxHalfTrack = 68
|
||||
diskBitCycle = 4 // There is a dataLatch bit transferred every 4 cycles
|
||||
diskLatchReadCycles = 7 // Loaded data is available for a little more than 7ns
|
||||
diskWriteByteCycle = 32 // Load data to write every 32 cycles
|
||||
diskWriteSelfSyncCycle = 40 // Save $FF every 40 cycles. Self sync is 10 bits: 1111 1111 00
|
||||
diskMotorStartMs = 150 // Time with the disk spinning to get full speed
|
||||
|
||||
)
|
||||
|
||||
// NewCardDisk2 creates a new CardDisk2
|
||||
func NewCardDisk2() *CardDisk2 {
|
||||
var c CardDisk2
|
||||
@ -217,9 +207,11 @@ func (c *CardDisk2) processQ6Q7(in uint8) {
|
||||
}
|
||||
}
|
||||
|
||||
if c.dataLatch >= 0x80 {
|
||||
//fmt.Printf("Datalacth: 0x%.2x in cycle %v\n", c.dataLatch, c.a.cpu.GetCycles())
|
||||
}
|
||||
/*
|
||||
if c.dataLatch >= 0x80 {
|
||||
fmt.Printf("Datalach: 0x%.2x in cycle %v\n", c.dataLatch, c.a.cpu.GetCycles())
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
func (d *cardDisk2Drive) insertDiskette(name string, dt storage.Diskette) {
|
||||
|
@ -32,10 +32,10 @@ func (d *cardDisk2SequencerDrive) insertDiskette(filename string) error {
|
||||
|
||||
// Discard not supported features
|
||||
if f.Info.DiskType != 1 {
|
||||
return errors.New("Only 5.25 disks are supported")
|
||||
return errors.New("only 5.25 disks are supported")
|
||||
}
|
||||
if f.Info.BootSectorFormat == 2 { // Info not available in WOZ 1.0
|
||||
return errors.New("Woz 13 sector disks are not supported")
|
||||
return errors.New("woz 13 sector disks are not supported")
|
||||
}
|
||||
|
||||
d.data = f
|
||||
|
@ -91,8 +91,6 @@ func (c *CardMouse) readMouse() (uint16, uint16, bool) {
|
||||
return xTrans, yTrans, pressed
|
||||
}
|
||||
|
||||
const mouseReponse = "10,10,+4\n"
|
||||
|
||||
func (c *CardMouse) assign(a *Apple2, slot int) {
|
||||
c.addCardSoftSwitchR(0, func(*ioC0Page) uint8 {
|
||||
if c.iOut == 0 {
|
||||
|
@ -53,7 +53,7 @@ func (c *CardVidex) loadCharacterMap(filename string) error {
|
||||
}
|
||||
size := len(bytes)
|
||||
if size < 0x800 {
|
||||
return errors.New("Character ROM size not supported for Videx")
|
||||
return errors.New("character ROM size not supported for Videx")
|
||||
}
|
||||
c.charGen = bytes
|
||||
return nil
|
||||
|
@ -50,7 +50,7 @@ func (cg *CharacterGenerator) load(filename string) error {
|
||||
}
|
||||
size := len(bytes)
|
||||
if size < charGenPageSize {
|
||||
return errors.New("Character ROM size not supported")
|
||||
return errors.New("character ROM size not supported")
|
||||
}
|
||||
cg.data = bytes
|
||||
return nil
|
||||
|
@ -69,13 +69,15 @@ func (m *MicroPD1990ac) In(clock bool, strobe bool, command uint8, dataIn bool)
|
||||
}
|
||||
|
||||
func (m *MicroPD1990ac) Out() bool {
|
||||
if m.command == mpd1990commandRegHold {
|
||||
//panic("Output on RegHold should be a 1Hz signal. Not implemented.")
|
||||
}
|
||||
/*
|
||||
if m.command == mpd1990commandRegHold {
|
||||
panic("Output on RegHold should be a 1Hz signal. Not implemented.")
|
||||
}
|
||||
|
||||
if m.command == mpd1990commandTimeRead {
|
||||
//panic("Output on RegHold should be a 512Hz signal with LSB. Not implemented.")
|
||||
}
|
||||
if m.command == mpd1990commandTimeRead {
|
||||
panic("Output on RegHold should be a 512Hz signal with LSB. Not implemented.")
|
||||
}
|
||||
*/
|
||||
|
||||
// Return the LSB of the register shift
|
||||
return (m.register & 1) == 1
|
||||
|
@ -79,10 +79,6 @@ func (j *sdlJoysticks) putButtonEvent(e *sdl.JoyButtonEvent) {
|
||||
j.button[uint8(e.Which)*2+(e.Button%2)] = (e.State != 0)
|
||||
}
|
||||
|
||||
func mouseToJoyFull(x int32, w int32) uint8 {
|
||||
return uint8(256 * x / (w + 1))
|
||||
}
|
||||
|
||||
func mouseToJoyCentered(x int32, w int32) uint8 {
|
||||
r := x - (w / 2) + 127
|
||||
if r >= 255 {
|
||||
|
@ -52,6 +52,7 @@ func (m *memoryRangeROM) poke(address uint16, value uint8) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
//lint:ignore U1000 this is used to write debug code
|
||||
func identifyMemory(m memoryHandler) string {
|
||||
ram, ok := m.(*memoryRange)
|
||||
if ok {
|
||||
|
@ -12,14 +12,14 @@ const (
|
||||
ioFlagAnnunciator2 uint8 = 0x5c
|
||||
ioFlagAnnunciator3 uint8 = 0x5e
|
||||
|
||||
ioDataCassette uint8 = 0x60
|
||||
ioFlagButton0 uint8 = 0x61
|
||||
ioFlagButton1 uint8 = 0x62
|
||||
ioFlagButton2 uint8 = 0x63
|
||||
ioDataPaddle0 uint8 = 0x64
|
||||
ioDataPaddle1 uint8 = 0x65
|
||||
ioDataPaddle2 uint8 = 0x66
|
||||
ioDataPaddle3 uint8 = 0x67
|
||||
//ioDataCassette uint8 = 0x60
|
||||
//ioFlagButton0 uint8 = 0x61
|
||||
//ioFlagButton1 uint8 = 0x62
|
||||
//ioFlagButton2 uint8 = 0x63
|
||||
//ioDataPaddle0 uint8 = 0x64
|
||||
//ioDataPaddle1 uint8 = 0x65
|
||||
//ioDataPaddle2 uint8 = 0x66
|
||||
//ioDataPaddle3 uint8 = 0x67
|
||||
|
||||
// Not real softSwitches. Using the numbers to store the flags somewhere.
|
||||
ioFlagRGBCardActive uint8 = 0x7d
|
||||
|
@ -19,7 +19,6 @@ type traceApplecorn struct {
|
||||
skipConsole bool
|
||||
osbyteNames [256]string
|
||||
call mosCallData
|
||||
lastDepth int
|
||||
wasInKernel bool
|
||||
}
|
||||
|
||||
@ -107,7 +106,7 @@ func (t *traceApplecorn) inspect() {
|
||||
s = fmt.Sprintf("OSNWRCH(A=%02x, '%v')", regA, ch)
|
||||
skip = t.skipConsole
|
||||
case 0xffcb:
|
||||
s = fmt.Sprintf("OSNRDCH()")
|
||||
s = "OSNRDCH()"
|
||||
skip = t.skipConsole
|
||||
case 0xffce:
|
||||
s = "OSFIND(?)"
|
||||
@ -125,17 +124,17 @@ func (t *traceApplecorn) inspect() {
|
||||
filename := t.getTerminatedString(filenameAddress, 0x0d)
|
||||
s = fmt.Sprintf("OSFILE(A=%02x,FILE=%s)", regA, filename)
|
||||
case 0xffe0:
|
||||
s = fmt.Sprintf("OSRDCH()")
|
||||
s = "OSRDCH()"
|
||||
skip = t.skipConsole
|
||||
case 0xffe3: // This fallbacks to OSWRCH
|
||||
s = "OSASCI(?)"
|
||||
skip = t.skipConsole
|
||||
case 0xffe7: // This fallbacks to OSWRCH
|
||||
s = fmt.Sprintf("OSNEWL()")
|
||||
s = "OSNEWL()"
|
||||
skip = t.skipConsole
|
||||
case 0xffec: // This fallbacks to OSWRCH
|
||||
skip = t.skipConsole
|
||||
s = fmt.Sprintf("OSNECR()")
|
||||
s = "OSNECR()"
|
||||
case 0xffee:
|
||||
ch := ""
|
||||
if regA >= 0x20 && regA < 0x7f {
|
||||
|
@ -103,6 +103,7 @@ func (t *tracePascal) inspect() {
|
||||
See http://www.bitsavers.org/pdf/softech/softechPascalIV_intArch1981.pdf
|
||||
page 106
|
||||
*/
|
||||
//lint:ignore U1000 unused but stays as reference
|
||||
func (t *tracePascal) inspectPerArchitectureGuide() {
|
||||
bios := uint16(t.a.mmu.physicalMainRAM.peek(pascalJvabfoldL)) +
|
||||
uint16(t.a.mmu.physicalMainRAM.peek(pascalJvabfoldH))<<8
|
||||
|
@ -217,6 +217,7 @@ func (t *traceProDOS) dumpDriverCall() {
|
||||
fmt.Printf("\n Prodos driver $%04x command %02x-%s on unit $%x, block %v to $%04x ==> ", pc, command, commandName, unit, block, address)
|
||||
}
|
||||
|
||||
//lint:ignore U1000 unused but stays as reference
|
||||
func (t *traceProDOS) dumpDevices() {
|
||||
|
||||
// Active disk devices
|
||||
|
Loading…
x
Reference in New Issue
Block a user