2020-10-03 21:38:26 +00:00
|
|
|
package izapple2
|
2019-01-26 17:57:03 +00:00
|
|
|
|
2019-04-13 18:29:31 +00:00
|
|
|
import (
|
2019-04-15 21:13:05 +00:00
|
|
|
"flag"
|
2019-04-13 18:29:31 +00:00
|
|
|
)
|
2019-02-16 19:15:41 +00:00
|
|
|
|
2019-10-12 19:37:37 +00:00
|
|
|
const defaultInternal = "<default>"
|
|
|
|
|
2020-10-07 07:37:13 +00:00
|
|
|
// MainApple is a device independent main. Video, keyboard and speaker won't be defined
|
2019-06-01 15:11:25 +00:00
|
|
|
func MainApple() *Apple2 {
|
2019-04-15 21:13:05 +00:00
|
|
|
romFile := flag.String(
|
|
|
|
"rom",
|
2019-10-12 19:37:37 +00:00
|
|
|
defaultInternal,
|
2019-04-15 21:13:05 +00:00
|
|
|
"main rom file")
|
2019-05-09 22:09:15 +00:00
|
|
|
disk2Slot := flag.Int(
|
|
|
|
"disk2Slot",
|
|
|
|
6,
|
2019-05-17 21:28:20 +00:00
|
|
|
"slot for the disk driver. -1 for none.")
|
2019-04-15 21:13:05 +00:00
|
|
|
diskImage := flag.String(
|
|
|
|
"disk",
|
2022-03-08 19:11:26 +00:00
|
|
|
defaultInternal,
|
2019-04-15 21:13:05 +00:00
|
|
|
"file to load on the first disk drive")
|
2020-04-12 23:29:04 +00:00
|
|
|
diskBImage := flag.String(
|
|
|
|
"diskb",
|
|
|
|
"",
|
|
|
|
"file to load on the second disk drive")
|
2019-10-02 21:39:39 +00:00
|
|
|
hardDiskImage := flag.String(
|
|
|
|
"hd",
|
|
|
|
"",
|
2020-08-11 21:53:05 +00:00
|
|
|
"file to load on the boot hard disk (slot 7)")
|
2019-10-02 21:39:39 +00:00
|
|
|
hardDiskSlot := flag.Int(
|
|
|
|
"hdSlot",
|
|
|
|
-1,
|
|
|
|
"slot for the hard drive if present. -1 for none.")
|
2022-10-24 21:09:06 +00:00
|
|
|
fujinetSlot := flag.Int(
|
|
|
|
"fujinet",
|
|
|
|
-1,
|
|
|
|
"slot for the smatport card hosting the Fujinet. -1 for none.")
|
2020-08-11 21:53:05 +00:00
|
|
|
smartPortImage := flag.String(
|
|
|
|
"disk35",
|
|
|
|
"",
|
|
|
|
"file to load on the SmartPort disk (slot 5)")
|
2019-05-04 17:49:11 +00:00
|
|
|
cpuClock := flag.Float64(
|
|
|
|
"mhz",
|
2019-11-07 22:20:14 +00:00
|
|
|
CPUClockMhz,
|
2019-05-05 11:25:45 +00:00
|
|
|
"cpu speed in Mhz, use 0 for full speed. Use F5 to toggle.")
|
2019-04-21 16:18:43 +00:00
|
|
|
charRomFile := flag.String(
|
|
|
|
"charRom",
|
2019-10-12 19:37:37 +00:00
|
|
|
defaultInternal,
|
2019-06-02 21:18:35 +00:00
|
|
|
"rom file for the character generator")
|
2019-05-17 21:28:20 +00:00
|
|
|
languageCardSlot := flag.Int(
|
|
|
|
"languageCardSlot",
|
|
|
|
0,
|
|
|
|
"slot for the 16kb language card. -1 for none")
|
|
|
|
saturnCardSlot := flag.Int(
|
|
|
|
"saturnCardSlot",
|
|
|
|
-1,
|
|
|
|
"slot for the 256kb Saturn card. -1 for none")
|
2019-11-10 13:20:31 +00:00
|
|
|
vidHDCardSlot := flag.Int(
|
|
|
|
"vidHDSlot",
|
|
|
|
2,
|
2019-11-22 22:27:25 +00:00
|
|
|
"slot for the VidHD card, only for //e models. -1 for none")
|
2019-11-12 22:47:48 +00:00
|
|
|
fastChipCardSlot := flag.Int(
|
|
|
|
"fastChipSlot",
|
|
|
|
3,
|
|
|
|
"slot for the FASTChip accelerator card, -1 for none")
|
2020-03-08 22:39:25 +00:00
|
|
|
memoryExpansionCardSlot := flag.Int(
|
|
|
|
"memoryExpSlot",
|
2022-08-05 17:08:34 +00:00
|
|
|
-1,
|
2020-03-08 22:39:25 +00:00
|
|
|
"slot for the Memory Expansion card with 1GB. -1 for none")
|
2022-08-05 17:08:34 +00:00
|
|
|
parallelPrinterSlot := flag.Int(
|
|
|
|
"printer",
|
|
|
|
1,
|
|
|
|
"slot for the Parallel Printer Interface. -1 for none")
|
2020-08-10 18:52:17 +00:00
|
|
|
ramWorksKb := flag.Int(
|
|
|
|
"ramworks",
|
|
|
|
8192,
|
|
|
|
"memory to use with RAMWorks card, 0 for no card, max is 16384")
|
2019-11-12 22:47:48 +00:00
|
|
|
thunderClockCardSlot := flag.Int(
|
|
|
|
"thunderClockCardSlot",
|
2021-01-24 22:25:52 +00:00
|
|
|
-1,
|
2019-11-12 22:47:48 +00:00
|
|
|
"slot for the ThunderClock Plus card. -1 for none")
|
2021-01-24 15:56:06 +00:00
|
|
|
consoleCardSlot := flag.Int(
|
|
|
|
"consoleCardSlot",
|
|
|
|
-1,
|
|
|
|
"slot for the host console card. -1 for none")
|
2021-01-24 22:25:52 +00:00
|
|
|
mouseCardSlot := flag.Int(
|
|
|
|
"mouseCardSlot",
|
|
|
|
4,
|
|
|
|
"slot for the Mouse card. -1 for none")
|
2021-03-14 17:46:52 +00:00
|
|
|
videxCardSlot := flag.Int(
|
|
|
|
"videxCardSlot",
|
|
|
|
3,
|
|
|
|
"slot for the Videx Videoterm 80 columns card. For pre-2e models. -1 for none")
|
2022-03-08 19:11:26 +00:00
|
|
|
swyftCard := flag.Bool(
|
|
|
|
"swyftCard",
|
|
|
|
false,
|
|
|
|
"activate a Swyft Card in slot 3. Load the tutorial disk if none provided")
|
2020-09-01 15:46:30 +00:00
|
|
|
nsc := flag.Int(
|
2020-08-16 13:30:44 +00:00
|
|
|
"nsc",
|
2020-09-01 15:46:30 +00:00
|
|
|
-1,
|
|
|
|
"add a DS1216 No-Slot-Clock on the main ROM (use 0) or a slot ROM. -1 for none")
|
2020-08-06 16:35:34 +00:00
|
|
|
rgbCard := flag.Bool(
|
|
|
|
"rgb",
|
|
|
|
true,
|
|
|
|
"emulate the RGB modes of the 80col RGB card for DHGR")
|
2021-10-12 10:26:40 +00:00
|
|
|
romX := flag.Bool(
|
|
|
|
"romx",
|
|
|
|
false,
|
|
|
|
"emulate a RomX")
|
2019-05-10 16:07:36 +00:00
|
|
|
fastDisk := flag.Bool(
|
|
|
|
"fastDisk",
|
|
|
|
true,
|
2019-11-10 13:20:31 +00:00
|
|
|
"set fast mode when the disks are spinning")
|
2019-04-15 21:13:05 +00:00
|
|
|
panicSS := flag.Bool(
|
2019-11-01 17:48:39 +00:00
|
|
|
"panicSS",
|
2019-04-15 21:13:05 +00:00
|
|
|
false,
|
2019-11-10 13:20:31 +00:00
|
|
|
"panic if a not implemented softswitch is used")
|
2019-09-24 21:32:03 +00:00
|
|
|
traceCPU := flag.Bool(
|
|
|
|
"traceCpu",
|
|
|
|
false,
|
2019-11-10 13:20:31 +00:00
|
|
|
"dump to the console the CPU execution operations")
|
2019-09-24 21:32:03 +00:00
|
|
|
traceSS := flag.Bool(
|
|
|
|
"traceSS",
|
|
|
|
false,
|
2019-11-10 13:20:31 +00:00
|
|
|
"dump to the console the sofswitches calls")
|
2020-08-30 19:11:43 +00:00
|
|
|
traceSSReg := flag.Bool(
|
|
|
|
"traceSSReg",
|
|
|
|
false,
|
|
|
|
"dump to the console the sofswitch registrations")
|
2019-11-01 17:48:39 +00:00
|
|
|
traceHD := flag.Bool(
|
|
|
|
"traceHD",
|
|
|
|
false,
|
2022-10-24 21:09:06 +00:00
|
|
|
"dump to the console the hd accesses")
|
|
|
|
traceSP := flag.Bool(
|
|
|
|
"traceSP",
|
|
|
|
false,
|
|
|
|
"dump to the console the smarport commands")
|
2019-10-12 19:37:37 +00:00
|
|
|
model := flag.String(
|
|
|
|
"model",
|
2019-11-03 23:23:03 +00:00
|
|
|
"2enh",
|
2019-11-10 13:20:31 +00:00
|
|
|
"set base model. Models available 2plus, 2e, 2enh, base64a")
|
2020-01-11 16:23:34 +00:00
|
|
|
profile := flag.Bool(
|
|
|
|
"profile",
|
|
|
|
false,
|
|
|
|
"generate profile trace to analyse with pprof")
|
2020-06-07 16:23:39 +00:00
|
|
|
traceMLI := flag.Bool(
|
|
|
|
"traceMLI",
|
|
|
|
false,
|
2020-08-06 16:35:34 +00:00
|
|
|
"dump to the console the calls to ProDOS machine language interface calls to $BF00")
|
2021-04-02 18:39:37 +00:00
|
|
|
tracePascal := flag.Bool(
|
|
|
|
"tracePascal",
|
|
|
|
false,
|
|
|
|
"dump to the console the calls to the Apple Pascal BIOS")
|
2020-11-02 19:17:00 +00:00
|
|
|
forceCaps := flag.Bool(
|
|
|
|
"forceCaps",
|
|
|
|
false,
|
|
|
|
"force all letters to be uppercased (no need for caps lock!)")
|
2021-05-10 20:24:41 +00:00
|
|
|
sequencerDisk2 := flag.Bool(
|
|
|
|
"sequencer",
|
2021-05-09 17:48:54 +00:00
|
|
|
false,
|
|
|
|
"use the sequencer based Disk II card")
|
2021-07-22 17:33:34 +00:00
|
|
|
traceBBC := flag.Bool(
|
|
|
|
"traceBBC",
|
|
|
|
false,
|
|
|
|
"trace BBC MOS API calls used with Applecorn, skip console I/O calls")
|
|
|
|
traceBBCFull := flag.Bool(
|
|
|
|
"traceBBCFull",
|
|
|
|
false,
|
|
|
|
"trace BBC MOS API calls used with Applecorn")
|
2020-06-07 16:23:39 +00:00
|
|
|
|
2019-04-15 21:13:05 +00:00
|
|
|
flag.Parse()
|
|
|
|
|
2020-10-03 21:00:04 +00:00
|
|
|
// Process a filename with autodetection
|
|
|
|
filename := flag.Arg(0)
|
|
|
|
diskImageFinal := *diskImage
|
|
|
|
hardDiskImageFinal := *hardDiskImage
|
|
|
|
if filename != "" {
|
2022-01-28 18:25:52 +00:00
|
|
|
// Try loading as diskette
|
|
|
|
_, err := LoadDiskette(filename)
|
|
|
|
if err == nil {
|
2020-10-03 21:00:04 +00:00
|
|
|
diskImageFinal = filename
|
|
|
|
} else {
|
|
|
|
hardDiskImageFinal = filename
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-08 19:11:26 +00:00
|
|
|
// Resolve what is the default disk to use if not specified
|
|
|
|
if diskImageFinal == defaultInternal {
|
|
|
|
if *swyftCard {
|
|
|
|
diskImageFinal = "<internal>/SwyftWare_-_SwyftCard_Tutorial.woz"
|
|
|
|
} else {
|
|
|
|
diskImageFinal = "<internal>/dos33.dsk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-30 19:11:43 +00:00
|
|
|
a := newApple2()
|
2021-04-02 18:39:37 +00:00
|
|
|
a.setup(*cpuClock, *fastDisk)
|
2020-08-30 19:11:43 +00:00
|
|
|
a.io.setTrace(*traceSS)
|
|
|
|
a.io.setTraceRegistrations(*traceSSReg)
|
|
|
|
a.io.setPanicNotImplemented(*panicSS)
|
|
|
|
a.setProfiling(*profile)
|
2020-11-03 01:26:56 +00:00
|
|
|
a.SetForceCaps(*forceCaps)
|
2021-04-02 18:39:37 +00:00
|
|
|
if *traceMLI {
|
|
|
|
a.addTracer(newTraceProDOS(a))
|
|
|
|
}
|
|
|
|
if *tracePascal {
|
|
|
|
a.addTracer(newTracePascal(a))
|
|
|
|
}
|
2021-07-22 17:33:34 +00:00
|
|
|
if *traceBBC {
|
2021-07-23 15:23:24 +00:00
|
|
|
a.addTracer(newTraceApplecorn(a, true))
|
2021-07-22 17:33:34 +00:00
|
|
|
}
|
|
|
|
if *traceBBCFull {
|
2021-07-23 15:23:24 +00:00
|
|
|
a.addTracer(newTraceApplecorn(a, false))
|
2021-07-22 17:33:34 +00:00
|
|
|
}
|
2020-08-30 19:11:43 +00:00
|
|
|
|
2022-02-21 22:05:53 +00:00
|
|
|
initModel(a, *model, *romFile, *charRomFile)
|
|
|
|
a.cpu.SetTrace(*traceCPU)
|
|
|
|
|
|
|
|
// Disable incompatible cards
|
2019-10-12 19:37:37 +00:00
|
|
|
switch *model {
|
|
|
|
case "2plus":
|
2019-11-22 22:27:25 +00:00
|
|
|
*vidHDCardSlot = -1
|
2019-10-12 19:37:37 +00:00
|
|
|
case "2e":
|
2022-02-21 22:05:53 +00:00
|
|
|
*videxCardSlot = -1
|
2019-10-20 22:06:28 +00:00
|
|
|
case "2enh":
|
2022-02-21 22:05:53 +00:00
|
|
|
*videxCardSlot = -1
|
2019-10-12 19:37:37 +00:00
|
|
|
case "base64a":
|
2019-11-22 22:27:25 +00:00
|
|
|
*vidHDCardSlot = -1
|
2021-03-14 17:46:52 +00:00
|
|
|
*videxCardSlot = -1 // The videx firmware crashes the BASE64A, probably by use of ANN0
|
2019-10-12 19:37:37 +00:00
|
|
|
default:
|
|
|
|
panic("Model not supported")
|
|
|
|
}
|
2019-09-24 21:32:03 +00:00
|
|
|
|
2019-10-12 19:37:37 +00:00
|
|
|
// Externsion cards
|
2019-05-17 21:28:20 +00:00
|
|
|
if *languageCardSlot >= 0 {
|
|
|
|
a.AddLanguageCard(*languageCardSlot)
|
|
|
|
}
|
|
|
|
if *saturnCardSlot >= 0 {
|
|
|
|
a.AddSaturnCard(*saturnCardSlot)
|
|
|
|
}
|
2022-08-05 17:08:34 +00:00
|
|
|
if *parallelPrinterSlot >= 0 {
|
|
|
|
a.AddParallelPrinter(*parallelPrinterSlot)
|
|
|
|
}
|
2020-03-08 22:39:25 +00:00
|
|
|
if *memoryExpansionCardSlot >= 0 {
|
2020-10-14 19:54:51 +00:00
|
|
|
a.AddMemoryExpansionCard(*memoryExpansionCardSlot)
|
2020-03-08 22:39:25 +00:00
|
|
|
}
|
2019-09-28 11:37:42 +00:00
|
|
|
if *thunderClockCardSlot > 0 {
|
2021-01-24 15:56:06 +00:00
|
|
|
a.AddThunderClockPlusCard(*thunderClockCardSlot)
|
2019-09-28 11:37:42 +00:00
|
|
|
}
|
2019-11-12 22:47:48 +00:00
|
|
|
if *vidHDCardSlot >= 0 {
|
2019-11-10 13:20:31 +00:00
|
|
|
a.AddVidHD(*vidHDCardSlot)
|
|
|
|
}
|
2021-01-24 15:56:06 +00:00
|
|
|
if *consoleCardSlot >= 0 {
|
|
|
|
a.AddCardInOut(*consoleCardSlot)
|
2021-01-24 22:25:52 +00:00
|
|
|
}
|
|
|
|
if *mouseCardSlot > 0 {
|
|
|
|
a.AddMouseCard(*mouseCardSlot)
|
2021-01-24 15:56:06 +00:00
|
|
|
}
|
2021-03-14 17:46:52 +00:00
|
|
|
if *videxCardSlot > 0 {
|
|
|
|
a.AddVidexCard(*videxCardSlot)
|
|
|
|
}
|
2022-03-08 19:11:26 +00:00
|
|
|
if *swyftCard {
|
|
|
|
if !a.isApple2e {
|
|
|
|
panic("SwyftCard available only on Apple IIe or better")
|
|
|
|
}
|
|
|
|
a.AddSwyftCard()
|
|
|
|
}
|
2020-08-11 21:53:05 +00:00
|
|
|
|
|
|
|
if *smartPortImage != "" {
|
2022-10-24 21:09:06 +00:00
|
|
|
err := a.AddSmartPortDisk(5, *smartPortImage, *traceHD, *traceSP)
|
2020-08-11 21:53:05 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-24 21:09:06 +00:00
|
|
|
if *fujinetSlot >= 0 {
|
|
|
|
a.AddFujinet(*fujinetSlot, *traceSP)
|
|
|
|
}
|
|
|
|
|
2019-11-12 22:47:48 +00:00
|
|
|
if *fastChipCardSlot >= 0 {
|
|
|
|
a.AddFastChip(*fastChipCardSlot)
|
|
|
|
}
|
2019-10-02 21:39:39 +00:00
|
|
|
if *disk2Slot > 0 {
|
2021-05-10 20:24:41 +00:00
|
|
|
if *sequencerDisk2 {
|
2022-02-25 23:05:09 +00:00
|
|
|
err := a.AddDisk2Sequencer(*disk2Slot, diskImageFinal, *diskBImage, nil)
|
2021-05-09 17:48:54 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
} else {
|
2022-02-25 23:05:09 +00:00
|
|
|
err := a.AddDisk2(*disk2Slot, diskImageFinal, *diskBImage, nil)
|
2021-05-09 17:48:54 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
2019-10-05 23:26:00 +00:00
|
|
|
}
|
2019-05-09 22:09:15 +00:00
|
|
|
}
|
2020-10-03 21:00:04 +00:00
|
|
|
if hardDiskImageFinal != "" {
|
2019-10-02 21:39:39 +00:00
|
|
|
if *hardDiskSlot <= 0 {
|
|
|
|
// If there is a hard disk image, but no slot assigned, use slot 7.
|
|
|
|
*hardDiskSlot = 7
|
|
|
|
}
|
2022-10-24 21:09:06 +00:00
|
|
|
err := a.AddSmartPortDisk(*hardDiskSlot, hardDiskImageFinal, *traceHD, *traceSP)
|
2019-10-05 23:26:00 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2019-10-02 21:39:39 +00:00
|
|
|
}
|
2019-05-18 21:40:59 +00:00
|
|
|
|
2020-08-10 18:52:17 +00:00
|
|
|
if *ramWorksKb != 0 {
|
|
|
|
if *ramWorksKb%64 != 0 {
|
|
|
|
panic("Ramworks size must be a multiple of 64")
|
|
|
|
}
|
|
|
|
a.AddRAMWorks(*ramWorksKb / 64)
|
|
|
|
}
|
|
|
|
|
2020-08-06 16:35:34 +00:00
|
|
|
if *rgbCard {
|
|
|
|
a.AddRGBCard()
|
|
|
|
}
|
|
|
|
|
2020-09-01 15:46:30 +00:00
|
|
|
if *nsc == 0 {
|
2020-08-16 13:30:44 +00:00
|
|
|
a.AddNoSlotClock()
|
2020-09-01 15:46:30 +00:00
|
|
|
} else if *nsc > 0 {
|
|
|
|
err := a.AddNoSlotClockInCard(*nsc)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
2020-08-16 13:30:44 +00:00
|
|
|
}
|
|
|
|
|
2021-10-12 10:26:40 +00:00
|
|
|
if *romX {
|
|
|
|
err := a.AddRomX()
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-14 19:54:51 +00:00
|
|
|
// a.AddCardLogger(4)
|
2019-05-18 21:40:59 +00:00
|
|
|
|
2019-06-01 15:11:25 +00:00
|
|
|
return a
|
2019-01-26 17:57:03 +00:00
|
|
|
}
|
2022-02-21 22:05:53 +00:00
|
|
|
|
|
|
|
func initModel(a *Apple2, model string, romFile string, charRomFile string) {
|
|
|
|
var charGenMap charColumnMap
|
|
|
|
initialCharGenPage := 0
|
|
|
|
switch model {
|
|
|
|
case "2plus":
|
|
|
|
setApple2plus(a)
|
|
|
|
if romFile == defaultInternal {
|
|
|
|
romFile = "<internal>/Apple2_Plus.rom"
|
|
|
|
}
|
|
|
|
if charRomFile == defaultInternal {
|
|
|
|
charRomFile = "<internal>/Apple2rev7CharGen.rom"
|
|
|
|
}
|
|
|
|
charGenMap = charGenColumnsMap2Plus
|
|
|
|
|
|
|
|
case "2e":
|
|
|
|
setApple2e(a)
|
|
|
|
if romFile == defaultInternal {
|
|
|
|
romFile = "<internal>/Apple2e.rom"
|
|
|
|
}
|
|
|
|
if charRomFile == defaultInternal {
|
|
|
|
charRomFile = "<internal>/Apple IIe Video Unenhanced - 342-0133-A - 2732.bin"
|
|
|
|
}
|
|
|
|
charGenMap = charGenColumnsMap2e
|
|
|
|
|
|
|
|
case "2enh":
|
|
|
|
setApple2eEnhanced(a)
|
|
|
|
if romFile == defaultInternal {
|
|
|
|
romFile = "<internal>/Apple2e_Enhanced.rom"
|
|
|
|
}
|
|
|
|
if charRomFile == defaultInternal {
|
|
|
|
charRomFile = "<internal>/Apple IIe Video Enhanced - 342-0265-A - 2732.bin"
|
|
|
|
}
|
|
|
|
charGenMap = charGenColumnsMap2e
|
|
|
|
|
|
|
|
case "base64a":
|
|
|
|
setBase64a(a)
|
|
|
|
if romFile == defaultInternal {
|
|
|
|
err := loadBase64aRom(a)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
romFile = ""
|
|
|
|
}
|
|
|
|
if charRomFile == defaultInternal {
|
|
|
|
charRomFile = "<internal>/BASE64A_ROM7_CharGen.BIN"
|
|
|
|
initialCharGenPage = 1
|
|
|
|
}
|
|
|
|
charGenMap = charGenColumnsMapBase64a
|
|
|
|
|
|
|
|
default:
|
|
|
|
panic("Model not supported")
|
|
|
|
}
|
|
|
|
|
2022-03-08 19:11:26 +00:00
|
|
|
// Load ROM
|
2022-02-21 22:05:53 +00:00
|
|
|
if romFile != "" {
|
|
|
|
err := a.LoadRom(romFile)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-08 19:11:26 +00:00
|
|
|
// Load character generator
|
2022-02-21 22:05:53 +00:00
|
|
|
cg, err := newCharacterGenerator(charRomFile, charGenMap, a.isApple2e)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
cg.setPage(initialCharGenPage)
|
|
|
|
a.cg = cg
|
|
|
|
}
|