Skip to content

Commit 0fc0115

Browse files
committed
updated alingments from 8 (for a test) back to 4. added -diag binary suffix, combined sprite and tile mask testing
1 parent 0149d9b commit 0fc0115

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
"cstdint": "c",
4545
"array": "c",
4646
"string": "c",
47-
"string_view": "c"
47+
"string_view": "c",
48+
"pico.h": "c",
49+
"platform.h": "c",
50+
"gpu.h": "c"
4851
}
4952
}

src/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(PICO9918_PCB_MINOR_VER 4)
99

1010
set(PICO9918_SCANLINES 0)
1111
set(PICO9918_NO_SPLASH 0)
12-
set(PICO9918_DIAG 0)
12+
set(PICO9918_DIAG 1)
1313

1414
# end compile-time options
1515

@@ -31,6 +31,9 @@ if (${PICO9918_SCANLINES})
3131
set(PICO9918_BINARY_SUFFIX ${PICO9918_BINARY_SUFFIX}-sl)
3232
endif()
3333

34+
if (${PICO9918_DIAG})
35+
set(PICO9918_BINARY_SUFFIX ${PICO9918_BINARY_SUFFIX}-diag)
36+
endif()
3437

3538
set(PROGRAM pico9918${PICO9918_BINARY_SUFFIX})
3639

src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ static uint8_t nextValue = 0; /* TMS9918A read-ahead value */
138138
static bool currentInt = false; /* current interrupt state */
139139
static uint8_t currentStatus = 0x1f; /* current status register value */
140140

141-
static __attribute__((section(".scratch_y.buffer"))) uint32_t bg;
141+
static __attribute__((section(".scratch_y.buffer"))) uint32_t __aligned(4) bg;
142142

143-
static __attribute__((section(".scratch_x.buffer"))) uint8_t __aligned(8) tmsScanlineBuffer[TMS9918_PIXELS_X + 8];
143+
static __attribute__((section(".scratch_x.buffer"))) uint8_t __aligned(4) tmsScanlineBuffer[TMS9918_PIXELS_X + 8];
144144

145145
const uint tmsWriteSm = 0;
146146
const uint tmsReadSm = 1;

src/vga/vga.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ uint32_t __aligned(8) syncDataPorch[4]; // vertical porch
7979
uint32_t __aligned(8) syncDataSync[4]; // vertical sync
8080

8181
#if VGA_NO_MALLOC
82-
__attribute__((section(".scratch_y.lookup"))) uint16_t __aligned(8) rgbDataBuffer[2 + VGA_SCANLINE_TIME_DEBUG][VIRTUAL_PIXELS_X] = { 0 }; // two scanline buffers (odd and even)
82+
__attribute__((section(".scratch_y.lookup"))) uint16_t __aligned(4) rgbDataBuffer[2 + VGA_SCANLINE_TIME_DEBUG][VIRTUAL_PIXELS_X] = { 0 }; // two scanline buffers (odd and even)
8383
#else
8484
#include <stdlib.h>
8585
uint16_t* __aligned(8) rgbDataBuffer[2 + VGA_SCANLINE_TIME_DEBUG] = { 0 }; // two scanline buffers (odd and even)

submodules/vrEmuTms9918

0 commit comments

Comments
 (0)