From 7cc3dab687ef13cf136c48be5992f7267e36ca38 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Fri, 26 Apr 2024 16:01:31 +0200 Subject: [PATCH] casing --- loaders.cpp | 16 ++++++++-------- loaders.h | 4 ++-- main.cpp | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/loaders.cpp b/loaders.cpp index 8f71e3d..8752141 100644 --- a/loaders.cpp +++ b/loaders.cpp @@ -23,14 +23,14 @@ void loadbin(bus *const b, uint16_t base, const char *const file) FILE *fh = fopen(file, "rb"); while(!feof(fh)) - b -> writeByte(base++, fgetc(fh)); + b->writeByte(base++, fgetc(fh)); fclose(fh); } void set_boot_loader(bus *const b, const bootloader_t which) { - cpu *const c = b -> getCpu(); + cpu *const c = b->getCpu(); uint16_t offset = 0; uint16_t start = 0; @@ -139,12 +139,12 @@ void set_boot_loader(bus *const b, const bootloader_t which) } for(int i=0; i writeWord(offset + i * 2, bl[i]); + b->writeWord(offset + i * 2, bl[i]); - c -> setRegister(7, start); + c->setRegister(7, start); } -std::optional loadTape(bus *const b, const std::string & file) +std::optional load_tape(bus *const b, const std::string & file) { #if defined(ESP32) File32 fh; @@ -211,7 +211,7 @@ std::optional loadTape(bus *const b, const std::string & file) #endif csum += c; - b -> writeByte(p++, c); + b->writeByte(p++, c); } #if defined(ESP32) @@ -271,6 +271,6 @@ void load_p11_x11(bus *const b, const std::string & file) fclose(fh); - cpu *const c = b -> getCpu(); - c -> setRegister(7, 0); + cpu *const c = b->getCpu(); + c->setRegister(7, 0); } diff --git a/loaders.h b/loaders.h index 704535a..4b6846f 100644 --- a/loaders.h +++ b/loaders.h @@ -1,4 +1,4 @@ -// (C) 2018-2023 by Folkert van Heusden +// (C) 2018-2024 by Folkert van Heusden // Released under MIT license #include @@ -12,5 +12,5 @@ typedef enum { BL_NONE, BL_RK05, BL_RL02 } bootloader_t; void loadbin(bus *const b, uint16_t base, const char *const file); void set_boot_loader(bus *const b, const bootloader_t which); -std::optional loadTape(bus *const b, const std::string & file); +std::optional load_tape(bus *const b, const std::string & file); void load_p11_x11(bus *const b, const std::string & file); diff --git a/main.cpp b/main.cpp index 56f7c72..7426408 100644 --- a/main.cpp +++ b/main.cpp @@ -574,7 +574,7 @@ int main(int argc, char *argv[]) std::optional bic_start; if (tape.empty() == false) { - bic_start = loadTape(b, tape); + bic_start = load_tape(b, tape); if (bic_start.has_value() == false) return 1; // fail