- [NEW] EAR getter in the ULA module
- [NEW] Flash attribute implemented - [NEW] Sound somewhat working (BEEP hangs)
This commit is contained in:
@@ -13,6 +13,10 @@ namespace zxscreen
|
||||
SDL_Renderer *ren = nullptr;
|
||||
SDL_Texture *tex = nullptr;
|
||||
|
||||
bool _flash = false;
|
||||
|
||||
void flash() { _flash = not _flash; }
|
||||
|
||||
void show()
|
||||
{
|
||||
if (win) return;
|
||||
@@ -48,9 +52,11 @@ namespace zxscreen
|
||||
|
||||
uint16_t address = 0x4000 | (x&0x1f) | ((y&0x7)<<8) | ((y&0x38)<<2) | ((y&0xc0)<<5);
|
||||
uint8_t block = memory[address];
|
||||
uint8_t c1 = color&0x7, c2 = (color>>3)&0x7;
|
||||
if ((color&0x80) && _flash) { c1=c2; c2=color&0x7; }
|
||||
for (int i=0;i<8;++i)
|
||||
{
|
||||
*(pixels++)=(block&0x80) ? palette[color&0x7] : palette[(color>>3)&0x7];
|
||||
*(pixels++)=(block&0x80) ? palette[c1] : palette[c2];
|
||||
block = block<<1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user