From 56518229e62721fc01b84a0be0177d5d953e102c Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:06:11 +0200 Subject: [PATCH 01/15] add missing comma in adpcmLookup table --- src/core/spu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/spu.c b/src/core/spu.c index 77fc525..28cd870 100644 --- a/src/core/spu.c +++ b/src/core/spu.c @@ -122,7 +122,7 @@ static const int16_t adpcmLookup[] = { 145, 436, 728, 1019, 1311, 1602, 1894, 2185, -145, -436, -728, -1019, -1311, -1602, -1894, -2185, 160, 480, 801, 1121, 1442, 1762, 2083, 2403, -160, -480, -801, -1121, -1442, -1762, -2083, -2403, 176, 528, 881, 1233, 1587, 1939, 2292, 2644, -176, -528, -881, -1233, -1587, -1939, -2292, -2644, - 194, 582, 970, 1358, 1746, 2134, 2522, 2910, -194, -582, -970, -1358, -1746, -2134, -2522, -2910 + 194, 582, 970, 1358, 1746, 2134, 2522, 2910, -194, -582, -970, -1358, -1746, -2134, -2522, -2910, }; From e0555a6da14a090a61adfe868b6af4bf5c3e0a1e Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:11:21 +0200 Subject: [PATCH 02/15] fix typo in Misc_ADCtrl() --- src/core/hw/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hw/misc.c b/src/core/hw/misc.c index 7e582e4..ba6590d 100644 --- a/src/core/hw/misc.c +++ b/src/core/hw/misc.c @@ -255,7 +255,7 @@ void Misc_WriteADCCtrl(uint16_t data) { Timer_Adjust(this.adcTimers[i], 0); Timer_Reset(this.adcTimers[i]); } - // printf("conversion timers disabled\n"); + // printf("Conversion timers disabled\n"); } } From e6dbfc7b33e10da8770a388435b727ff5c1a9f74 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:12:15 +0200 Subject: [PATCH 03/15] fix missing uppercase in gpio.c --- src/core/hw/gpio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/hw/gpio.c b/src/core/hw/gpio.c index 6f0a939..e38af6d 100644 --- a/src/core/hw/gpio.c +++ b/src/core/hw/gpio.c @@ -138,10 +138,10 @@ uint16_t GPIO_GetIOB(uint16_t mask) { // Send data to IO port B void GPIO_SetIOB(uint16_t data, uint16_t mask) { - // printf("write to IOB (data: %04x, mask: %04x)\n", data, mask); + // printf("Write to IOB (data: %04x, mask: %04x)\n", data, mask); if (mask & 7) { Bus_SetChipSelectMode((data & 7)); - // printf("chip select set to %d\n", (data & 7)); + // printf("Chip select set to %d\n", (data & 7)); } } @@ -151,7 +151,7 @@ uint16_t GPIO_GetIOC(uint16_t mask) { uint16_t data = this.region; data |= Controller_GetRequests(); - // printf("read from IOC (%04x) at %06x\n", data, CPU_GetCSPC()); + // printf("Read from IOC (%04x) at %06x\n", data, CPU_GetCSPC()); return data; } @@ -159,7 +159,7 @@ uint16_t GPIO_GetIOC(uint16_t mask) { // Send data to IO port C void GPIO_SetIOC(uint16_t data, uint16_t mask) { - // printf("write to IOC with %04x at %06x\n", data, CPU_GetCSPC()); + // printf("Write to IOC with %04x at %06x\n", data, CPU_GetCSPC()); if ((mask >> 8) & 1) { Controller_SetSelect(0, (data >> 8) & 1); From 1981ba0eef695937b345e1343cbedfff0b70573e Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:12:36 +0200 Subject: [PATCH 04/15] fix uppercase in dma.c --- src/core/hw/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hw/dma.c b/src/core/hw/dma.c index e4a64ab..cd11be8 100644 --- a/src/core/hw/dma.c +++ b/src/core/hw/dma.c @@ -38,7 +38,7 @@ uint16_t DMA_Read(uint16_t addr) { case 0x3e02: return this.size; case 0x3e03: return this.dst; default: - VSmile_Warning("unknown read from DMA address %04x at %06x", addr, CPU_GetCSPC()); + VSmile_Warning("Unknown read from DMA address %04x at %06x", addr, CPU_GetCSPC()); } return 0x0000; @@ -61,6 +61,6 @@ void DMA_Write(uint16_t addr, uint16_t data) { } return; default: - VSmile_Warning("unknown read from DMA address %04x at %06x", addr, CPU_GetCSPC()); + VSmile_Warning("Unknown read from DMA address %04x at %06x", addr, CPU_GetCSPC()); } } From f95b1e88cdc4607ca1b0a6686f020a954dcce717 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:13:06 +0200 Subject: [PATCH 05/15] fix uppercase in vsmile.c --- src/core/vsmile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/vsmile.c b/src/core/vsmile.c index fb1cabb..e1763be 100644 --- a/src/core/vsmile.c +++ b/src/core/vsmile.c @@ -133,7 +133,7 @@ void VSmile_Step() { void VSmile_Log(const char* message, ...) { if(message == NULL) { - printf("[LOG] unknown log with NULL pointer thrown\n"); + printf("[LOG] Unknown log with NULL pointer thrown\n"); return; } From 2688723772ad79d1faccb0108e5be276560a14f3 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:14:02 +0200 Subject: [PATCH 06/15] fix uppercase in ppu.h --- src/core/ppu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ppu.h b/src/core/ppu.h index 6752fd0..cd41de6 100644 --- a/src/core/ppu.h +++ b/src/core/ppu.h @@ -120,7 +120,7 @@ typedef struct PPU_t { Sprite_t sprites[0x100]; }; - uint32_t pixelBuffer[320*240]; // Pixel buffer for screen + uint32_t pixelBuffer[320*240]; // Pixel buffer for Screen } PPU_t; bool PPU_Init(); From a2e301757ba9a2cbbaaeeeaf53ac55b25bfebaf2 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:15:44 +0200 Subject: [PATCH 07/15] fix uppercase in cpu.c --- src/core/cpu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/cpu.c b/src/core/cpu.c index dec24b7..889f577 100644 --- a/src/core/cpu.c +++ b/src/core/cpu.c @@ -443,7 +443,7 @@ void CPU_OpSPC() { // Perform unsigned multiply on two operands and store result in r3 and r4 void CPU_OpMULU() { if (this.ins.opN == 1 && this.ins.opA == 7) - VSmile_Error("invalid multiplication at 0x%06x (opN = %01x, opA = %01x)", CPU_GetCSPC(), this.ins.opN, this.ins.opA); + VSmile_Error("Invalid multiplication at 0x%06x (opN = %01x, opA = %01x)", CPU_GetCSPC(), this.ins.opN, this.ins.opA); uint16_t a = this.r[this.ins.opA]; uint16_t b = this.r[this.ins.opB]; @@ -463,7 +463,7 @@ void CPU_OpMULU() { // Perform signed multiply on two operands and store result in r3 and r4 void CPU_OpMULS() { if (this.ins.opN == 1 && this.ins.opA == 7) - VSmile_Error("invalid multiplication at 0x%06x (opN = %01x, opA = %01x)", CPU_GetCSPC(), this.ins.opN, this.ins.opA); + VSmile_Error("Invalid multiplication at 0x%06x (opN = %01x, opA = %01x)", CPU_GetCSPC(), this.ins.opN, this.ins.opA); uint16_t a = this.r[this.ins.opA]; int16_t b = this.r[this.ins.opB]; @@ -485,7 +485,7 @@ void CPU_OpMULS() { // Push PC and SR to the stack and perform a long jump to a specified location void CPU_OpCALL() { if ((this.ins.opA & 1) != 0) - VSmile_Error("illegal opcode 0x%04x at 0x%06x", this.ins.raw, CPU_GetCSPC()); + VSmile_Error("Illegal opcode 0x%04x at 0x%06x", this.ins.raw, CPU_GetCSPC()); uint16_t lowerPC = CPU_FetchNext(); CPU_Push(this.pc, 0); @@ -499,7 +499,7 @@ void CPU_OpCALL() { // Perform a long jump to a specified location void CPU_OpJMPF() { if (this.ins.opA != 7) - VSmile_Error("illegal opcode 0x%04x at 0x%06x", this.ins.raw, CPU_GetCSPC()); + VSmile_Error("Illegal opcode 0x%04x at 0x%06x", this.ins.raw, CPU_GetCSPC()); CPU_SetCSPC((this.ins.imm << 16) | CPU_FetchNext()); @@ -552,7 +552,7 @@ void CPU_OpMISC() { case 0x25: // NOP break; - default: VSmile_Error("unimplemented special instruction at 0x%06x (op1 = 0x%01x, offset = 0x%02x)", CPU_GetCSPC(), this.ins.op1, this.ins.imm); + default: VSmile_Error("Unimplemented special instruction at 0x%06x (op1 = 0x%01x, offset = 0x%02x)", CPU_GetCSPC(), this.ins.op1, this.ins.imm); } this.cycles += 2; @@ -750,7 +750,7 @@ void CPU_OpPSH() { void CPU_OpBAD() { - VSmile_Error("unknown CPU instruction %04x at %06x", this.ins.raw, this.pc); + VSmile_Error("Unknown CPU instruction %04x at %06x", this.ins.raw, this.pc); } @@ -777,7 +777,7 @@ void CPU_AddrImm6() { // Invalid addressing mode void CPU_AddrUnknown() { - VSmile_Error("unimplemented operand mode at 0x%06x (op1 = 0x%01x)", CPU_GetCSPC(), this.ins.op1); + VSmile_Error("Unimplemented operand mode at 0x%06x (op1 = 0x%01x)", CPU_GetCSPC(), this.ins.op1); } From 96e515a35cf87df5eb3d553ab8cab1bbb7d14047 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:17:04 +0200 Subject: [PATCH 08/15] fix uppercase and improve output in bus.c --- src/core/bus.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/bus.c b/src/core/bus.c index b06b3e1..4cb3c38 100644 --- a/src/core/bus.c +++ b/src/core/bus.c @@ -59,7 +59,7 @@ void Bus_Reset() { void Bus_LoadROM(const char* filePath) { FILE* file = fopen(filePath, "rb"); if (!file) { - VSmile_Error("unable to load ROM - can't open \"%s\"", filePath); + VSmile_Error("Unable to load ROM - can't open \"%s\"", filePath); return; } @@ -69,7 +69,7 @@ void Bus_LoadROM(const char* filePath) { fseek(file, 0, SEEK_SET); if (this.romSize > BUS_SIZE*sizeof(uint16_t)) { - VSmile_Error("file too large!"); + VSmile_Error("File is too large!"); this.romSize = BUS_SIZE*sizeof(uint16_t); } if (this.romBuffer) @@ -85,7 +85,7 @@ void Bus_LoadROM(const char* filePath) { void Bus_LoadSysRom(const char* filePath) { FILE* file = fopen(filePath, "rb"); if (!file) { - VSmile_Warning("unable to load system rom - can't open \"%s\"", filePath); + VSmile_Warning("Unable to load system rom - can't open \"%s\"", filePath); return; } @@ -121,7 +121,7 @@ uint16_t Bus_Load(uint32_t addr) { return SPU_Read(addr); } else if (addr < 0x3d00) { - VSmile_Warning("read from internal memory location %04x", addr); + VSmile_Warning("Read from internal memory location %04x", addr); return 0x0000; } else if (addr < IO_START+IO_SIZE+DMA_SIZE) { @@ -143,10 +143,10 @@ uint16_t Bus_Load(uint32_t addr) { return DMA_Read(addr); } - VSmile_Warning("unknown read from IO port %04x at %06x\n", addr, CPU_GetCSPC()); + VSmile_Warning("Unknown read from IO port %04x at %06x\n", addr, CPU_GetCSPC()); return 0x0000; } else if (addr < 0x4000) { - VSmile_Warning("read from internal memory location %04x", addr); + VSmile_Warning("Read from internal memory location %04x", addr); return 0x0000; } @@ -180,7 +180,7 @@ void Bus_Store(uint32_t addr, uint16_t data) { return; } else if (addr < 0x3d00) { - VSmile_Warning("write to internal memory location %04x with %04x", addr, data); + VSmile_Warning("Write to internal memory location %04x with %04x", addr, data); return; } else if (addr < IO_START+IO_SIZE+DMA_SIZE) { @@ -207,11 +207,11 @@ void Bus_Store(uint32_t addr, uint16_t data) { return; } - VSmile_Warning("write to unknown IO port %04x with %04x at %06x", addr, data, CPU_GetCSPC()); + VSmile_Warning("Write to unknown IO port %04x with %04x at %06x", addr, data, CPU_GetCSPC()); return; } else if (addr < 0x4000) { - VSmile_Warning("write to internal memory location %04x with %04x", addr, data); + VSmile_Warning("Write to internal memory location %04x with %04x", addr, data); return; } From a2d1c03e72e3556939e4de99054370202a7e1a3b Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:19:45 +0200 Subject: [PATCH 09/15] fix typo and uppercase in timers.c --- src/core/hw/timers.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/core/hw/timers.c b/src/core/hw/timers.c index 9fe670a..0b5bff7 100644 --- a/src/core/hw/timers.c +++ b/src/core/hw/timers.c @@ -116,7 +116,7 @@ uint16_t Timers_Read(uint16_t addr) { case 0x3d17: return this.timers[TIMERS_B].ctrl; case 0x3d18: return this.timers[TIMERS_B].enable; case 0x3d1c: return PPU_GetCurrLine(); - default: VSmile_Warning("unknown read from Timers address %04x\n", addr); + default: VSmile_Warning("Unknown read from Timers address %04x\n", addr); } return 0x0000; @@ -130,14 +130,14 @@ void Timers_Write(uint16_t addr, uint16_t data) { return; case 0x3d11: - // printf("timebase clear\n"); + // printf("Timebase clear\n"); this.timer2khz = 0; this.timer1khz = 0; this.timer4hz = 0; return; case 0x3d12: - // printf("timer A Data set to %04x at %06x\n", data, CPU_GetCSPC()); + // printf("Timer A Data set to %04x at %06x\n", data, CPU_GetCSPC()); this.timers[TIMERS_A].data = data; this.timerASetup = data; return; @@ -156,20 +156,20 @@ void Timers_Write(uint16_t addr, uint16_t data) { return; case 0x3d16: - // printf("timer B data set to %04x at %06x\n", data, CPU_GetCSPC()); + // printf("Timer B data set to %04x at %06x\n", data, CPU_GetCSPC()); this.timers[TIMERS_B].data = data; this.timerBSetup = data; return; case 0x3d17: - // printf("timer B CTRL set to %04x at %06x\n", data, CPU_GetCSPC()); + // printf("Timer B CTRL set to %04x at %06x\n", data, CPU_GetCSPC()); this.timers[TIMERS_B].ctrl = data; if (data == 1) Timers_UpdateTimerB(); return; case 0x3d18: - // printf("timer B enable set to %04x at %06x\n", data, CPU_GetCSPC()); + // printf("Timer B enable set to %04x at %06x\n", data, CPU_GetCSPC()); this.timers[TIMERS_B].enable = data & 1; if (data & 1) { Timers_UpdateTimerB(); @@ -184,13 +184,13 @@ void Timers_Write(uint16_t addr, uint16_t data) { return; default: - VSmile_Warning("unknown read from Timers address %04x\n", addr); + VSmile_Warning("Unknown read from Timers address %04x\n", addr); } } void Timers_SetTimebase(uint16_t data) { - // printf("timebase set to %04x\n", data); + // printf("Timebase set to %04x\n", data); if ((this.timebaseSetup & 0x3) != (data & 0x3)) { uint16_t hz = 8 << (data & 0x3); @@ -203,7 +203,7 @@ void Timers_SetTimebase(uint16_t data) { uint16_t hz = 128 << ((data & 0xc) >> 2); Timer_Adjust(this.tmb[1], SYSCLOCK / hz); Timer_Reset(this.tmb[1]); - // printf("[BUS] TMB2 freqency set to %d Hz", hz); + // printf("[BUS] TMB2 frequency set to %d Hz", hz); } this.timebaseSetup = data; @@ -211,7 +211,7 @@ void Timers_SetTimebase(uint16_t data) { void Timers_SetTimerACTRL(uint16_t data) { - // printf("timer A CTRL set to %04x at %06x\n", data, CPU_GetCSPC()); + // printf("Timer A CTRL set to %04x at %06x\n", data, CPU_GetCSPC()); uint32_t timerARate = 0; switch (data & 7) { case 2: @@ -257,7 +257,7 @@ void Timers_UpdateTimerB() { } Timer_Reset(this.timerCSource); - // printf("update timer B\n"); + // printf("Update Timer B\n"); } @@ -298,7 +298,7 @@ void Timers_TickTMB(uint32_t index) { void Timers_TickAB() { - // printf("timer AB Tick\n"); + // printf("Timer AB Tick\n"); if (this.timerBRate) { this.timerBDiv++; if (this.timerBDiv >= this.timerBRate) { @@ -312,7 +312,7 @@ void Timers_TickAB() { void Timers_TickA() { - // printf("timer A Tick\n"); + // printf("Timer A Tick\n"); this.timers[TIMERS_A].data++; // Timer A Data if (!this.timers[TIMERS_A].data) { this.timers[TIMERS_A].data = this.timerASetup; @@ -322,7 +322,7 @@ void Timers_TickA() { void Timers_TickC() { - // printf("timer C Tick\n"); + // printf("Timer C Tick\n"); this.timers[TIMERS_B].data++; // Timer B Data if (!this.timers[TIMERS_B].data) { this.timers[TIMERS_B].data = this.timerBSetup; From 7018e3187500fba916f0201eca4c907d10e0b323 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:20:45 +0200 Subject: [PATCH 10/15] fix uppercase in misc.c --- src/core/hw/misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/hw/misc.c b/src/core/hw/misc.c index ba6590d..1cf2e17 100644 --- a/src/core/hw/misc.c +++ b/src/core/hw/misc.c @@ -145,7 +145,7 @@ void Misc_SetIRQFlags(uint16_t addr, uint16_t data) { } else if (addr == 0x2863) { PPU_SetIRQFlags(data); } else { - VSmile_Warning("unknown IRQ Acknowledge for %04x with data %04x", addr, data); + VSmile_Warning("Unknown IRQ Acknowledge for %04x with data %04x", addr, data); } // switch (address) { @@ -156,7 +156,7 @@ void Misc_SetIRQFlags(uint16_t addr, uint16_t data) { // this.io[0x22] |= data; // break; // default: - // VSmile_Warning("unknown IRQ Acknowledge for %04x with data %04x", address, data); + // VSmile_Warning("Unknown IRQ Acknowledge for %04x with data %04x", address, data); // } // // CPU_ActivatePendingIRQs(); // Notify CPU that there might be IRQ's to handle @@ -226,7 +226,7 @@ void Misc_WriteADCCtrl(uint16_t data) { if (data & prevADC & 0x2000) { this.adcCtrl &= ~0x2000; Bus_Store(0x3d22, 0x2000); // Reset interrupt in IRQ - // printf("resetting interrupt status...\n"); + // printf("Resetting interrupt status...\n"); } if (this.adcCtrl & 1) { // ADE @@ -241,7 +241,7 @@ void Misc_WriteADCCtrl(uint16_t data) { uint32_t ticks = 16 << ((data >> 2) & 3); Timer_Adjust(this.adcTimers[channel], ticks); Timer_Reset(this.adcTimers[channel]); - // printf("conversion requested\n"); + // printf("Conversion requested\n"); } if (data & 0x0400) { // 8KHz Auto Request From 5a217b0a2b95da4f0f5e011b6cfbc28a5173d9d6 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:21:08 +0200 Subject: [PATCH 11/15] add version number to V.Frown --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index ffc7272..c843bfe 100644 --- a/src/main.c +++ b/src/main.c @@ -118,7 +118,7 @@ sapp_desc sokol_main(int argc, char* argv[]) { .event_cb = (void(*)(const sapp_event*))eventFunc, .width = 640, .height = 480, - .window_title = "V.Frown", + .window_title = "V.Frown v1.0", .enable_dragndrop = true, .max_dropped_files = 2, .sample_count = 1, From 5d9341a5b4f5ea5eed339a4503c0ff9f09d1c56e Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:21:41 +0200 Subject: [PATCH 12/15] use uppercase for move word --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index c843bfe..b0d7522 100644 --- a/src/main.c +++ b/src/main.c @@ -83,7 +83,7 @@ static void eventFunc(sapp_event* event) { Backend_HandleInput(event->key_code, event->type); Input_KeyboardMouseEvent(event); - // TODO: move this to the backend + // TODO: Move this to the backend if (event->type == SAPP_EVENTTYPE_FILES_DROPPED) { const int32_t numFiles = sapp_get_num_dropped_files(); From 2bbb83153095e50b2d20aee336531fded6a67b90 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:33:46 +0200 Subject: [PATCH 13/15] add recompile to Makefile --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1e96cd0..b5148fe 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ $(wildcard src/backend/lib/*.c)\ $(wildcard src/core/*.c)\ $(wildcard src/core/hw/*.c)\ -# platform +# Platform ifndef platform platform=linux endif @@ -34,7 +34,7 @@ else ifeq ($(platform), web) endif -# build type +# Build type ifndef build build=debug endif @@ -65,3 +65,7 @@ VFrown: $(obj) clean: rm -f $(obj) + +recompile: + make clean + make From 4e76fe8dbb45227de0d53a46b236b7c463c766d2 Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:36:40 +0200 Subject: [PATCH 14/15] fix uppercase in controller.c --- src/core/hw/controller.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/hw/controller.c b/src/core/hw/controller.c index bfea166..4d441c9 100644 --- a/src/core/hw/controller.c +++ b/src/core/hw/controller.c @@ -100,7 +100,7 @@ uint8_t Controller_SendByte() { void Controller_RecieveByte(uint8_t data) { - // printf("ctrl recieving %02x\n", data); + // printf("CTRL receiving %02x\n", data); if (controllers[0].select) { controllers[0].rxBuffer = data; Timer_Reset(controllers[0].rxTimer); @@ -116,7 +116,7 @@ void Controller_RecieveByte(uint8_t data) { bool Controller_PushTx(uint8_t ctrlNum, uint8_t data) { Controller_t* this = &controllers[ctrlNum]; - // printf("controller push %02x\n", data); + // printf("Controller push %02x\n", data); if (!this->txEmpty && (this->txHead == this->txTail)) { VSmile_Warning("Tx byte %02x discarded because FIFO is full", data); @@ -135,7 +135,7 @@ uint8_t Controller_PopTx(uint8_t ctrlNum) { Controller_t* this = &controllers[ctrlNum]; if (this->txEmpty) { - VSmile_Warning("returning 0x00 because Tx FIFO is empty"); + VSmile_Warning("Returning 0x00 because Tx FIFO is empty"); return 0x00; } @@ -143,7 +143,7 @@ uint8_t Controller_PopTx(uint8_t ctrlNum) { this->txTail = (this->txTail + 1) & 0xf; this->txEmpty = (this->txHead == this->txTail); - // printf("controller pop %02x\n", data); + // printf("Controller pop %02x\n", data); return data; } From eba26b884ed0864379993505071094c662854d7d Mon Sep 17 00:00:00 2001 From: Benjamin Funke <58399929+BJNFNE@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:37:10 +0200 Subject: [PATCH 15/15] add return true to DMA_Cleanup() --- src/core/hw/dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/hw/dma.c b/src/core/hw/dma.c index cd11be8..44952cf 100644 --- a/src/core/hw/dma.c +++ b/src/core/hw/dma.c @@ -11,6 +11,7 @@ bool DMA_Init() { void DMA_Cleanup() { + return true; }