Compare commits

...

3 Commits

Author SHA1 Message Date
0xmac
cfce402934 Renamed Variable 2024-12-12 13:24:34 +01:00
0xmac
372af63728 Added Option for Optimisation 2024-12-12 13:24:03 +01:00
0xmac
d932a248c3 Fixed VRAM Size 2024-12-12 13:23:30 +01:00
3 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,7 @@
.ONESHELL: .ONESHELL:
CC=gcc CC=gcc
O=2
CFLAGS=-lcsfml-window -lcsfml-system -lcsfml-graphics CFLAGS=-lcsfml-window -lcsfml-system -lcsfml-graphics
PREFIX=$(HOME)/.local PREFIX=$(HOME)/.local
@ -12,7 +13,7 @@ clean:
ls7emulator: ls7emulator:
cd src cd src
$(CC) main.c -o ls7emulator $(CFLAGS) -O2 $(CC) main.c -o ls7emulator $(CFLAGS) -O$(O)
rm ../bin -rf rm ../bin -rf
mkdir ../bin mkdir ../bin

View File

@ -32,11 +32,11 @@ void pollEvents(sfRenderWindow *window){
break; break;
case sfKeyF2: case sfKeyF2:
if (displayScale > 1) displayScale--; if (displayscale > 1) displayscale--;
updateRenderStates(); updateRenderStates();
break; break;
case sfKeyF3: case sfKeyF3:
displayScale++; displayscale++;
updateRenderStates(); updateRenderStates();
break; break;
case sfKeyF5: case sfKeyF5:

View File

@ -36,7 +36,7 @@ static sfColor *videoColorIndex[] = {
&(sfColor){ 0, 0xFF, 0xFF }, &(sfColor){ 0, 0xFF, 0xFF },
&(sfColor){ 0xFF, 0xFF, 0xFF },*/ &(sfColor){ 0xFF, 0xFF, 0xFF },*/
}; };
static uint8_t videoMemory[0x7FFF]; static uint8_t videoMemory[0x8000];
void writeVideo(){ void writeVideo(){
@ -55,7 +55,7 @@ void initVideo(){
videoModified = 1; videoModified = 1;
videoMode = 0x01; videoMode = 0x01;
for (int i = 0; i < 0x7FFF; i++) videoMemory[i] = rand(); for (int i = 0; i < 0x8000; i++) videoMemory[i] = rand();
} }
void updateVideo(){ void updateVideo(){