[FEAT] memcpy

[CHANGE] New default color 0x0f
This commit is contained in:
2021-12-08 07:34:54 +01:00
parent 963958e596
commit 290d50e32f
3 changed files with 18 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ void reinit() {
case 1:
screen_width = 40;
screen_height = 30;
current_color = 0x1e;
current_color = 0x07;
cursor_x = 0;
cursor_y = 0;
char_screen = &mem[0];
@@ -78,7 +78,7 @@ void reinit() {
case 2:
screen_width = 20;
screen_height = 15;
current_color = 0x1e;
current_color = 0x07;
cursor_x = 0;
cursor_y = 0;
char_screen = &mem[0];
@@ -469,6 +469,12 @@ void poke(uint16_t addr, uint8_t val) {
}
}
void memcpy(uint16_t dst, uint16_t src, uint16_t size) {
if (dst <= src) return;
if (src+size>=dst) return;
SDL_memcpy(&mem[dst], &mem[src], size);
}
void sound(float freq, uint32_t len) {
// [TODO]
audio_len = len*44.1f;