Skip to content

Commit

Permalink
more logical order
Browse files Browse the repository at this point in the history
  • Loading branch information
udo-munk committed May 19, 2024
1 parent 391a380 commit 4d6b2a6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arduino_8080.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1933,18 +1933,17 @@ void setup()
randomSeed(analogRead(UAP));

SPI.setClockDivider(SPI_CLOCK_DIV2);

if (!fram.begin()) {
Serial.println(F("No FRAM found"));
exit(1);
}
fram.writeEnable(true);

if (!SD.begin(SD_CS)) {
Serial.println(F("SD failed"));
exit(1);
}

init_memory();
init_cpu();
}

void loop()
Expand All @@ -1955,6 +1954,9 @@ void loop()

Serial.println(F("\f8080-SIM v1.4\n"));

init_cpu();
init_memory();

// run the 8080 CPU with whatever code is in memory
start = millis();
cpu_8080();
Expand Down

0 comments on commit 4d6b2a6

Please sign in to comment.