Skip to content

Commit 36576d2

Browse files
committed
SD card on VIA port B pins 0,4,6,7.
This matches the micro SD slot on adafruit's 240x320 TFT ILI9340 board, as connected to the port B connector on pda6502 V1 hardware.
1 parent 60dc5eb commit 36576d2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cli/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func ParseFlags() *Options {
3131
flag.BoolVar(&opt.Debug, "debug", false, "Run debugger")
3232
flag.Var(&opt.DebugCmds, "debug-commands", "Debugger commands to run, semicolon separated.")
3333
flag.StringVar(&opt.DebugSymbolFile, "debug-symbol-file", "", "ld65 debug file to load.")
34-
flag.StringVar(&opt.SdCard, "sd-card", "", "Load file as SD card on 6522 port A[4..7]")
34+
flag.StringVar(&opt.SdCard, "sd-card", "", "Load file as SD card")
3535
flag.BoolVar(&opt.Speedometer, "speedometer", false, "Measure effective clock speed")
3636
flag.BoolVar(&opt.ViaDumpBinary, "via-dump-binary", false, "6522 dumps binary output")
3737
flag.BoolVar(&opt.ViaDumpAscii, "via-dump-ascii", false, "6522 dumps ASCII output")

go6502.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ func mainReturningStatus() int {
7777

7878
if len(options.SdCard) > 0 {
7979
sd, err := sd.NewSdCard(spi.PinMap{
80-
Sclk: 4,
81-
Mosi: 5,
82-
Miso: 6,
83-
Ss: 7,
80+
Sclk: 0,
81+
Mosi: 6,
82+
Miso: 7,
83+
Ss: 4,
8484
})
8585
if err != nil {
8686
panic(err)
@@ -89,7 +89,7 @@ func mainReturningStatus() int {
8989
if err != nil {
9090
panic(err)
9191
}
92-
via.AttachToPortA(sd)
92+
via.AttachToPortB(sd)
9393
}
9494

9595
via.Reset()

0 commit comments

Comments
 (0)