Even more sonarlint work
This commit is contained in:
@@ -382,7 +382,8 @@ static void
|
||||
sigma_recalctimings(sigma_t *sigma)
|
||||
{
|
||||
double disptime;
|
||||
double _dispontime, _dispofftime;
|
||||
double _dispontime;
|
||||
double _dispofftime;
|
||||
|
||||
if (sigma->sigmamode & MODE_80COLS) {
|
||||
disptime = (sigma->crtc[0] + 1) << 1;
|
||||
@@ -403,8 +404,8 @@ sigma_recalctimings(sigma_t *sigma)
|
||||
static void
|
||||
sigma_text80(sigma_t *sigma)
|
||||
{
|
||||
int x, c;
|
||||
uint8_t chr, attr;
|
||||
uint8_t chr;
|
||||
uint8_t attr;
|
||||
uint16_t ca = (sigma->crtc[15] | (sigma->crtc[14] << 8));
|
||||
uint16_t ma = ((sigma->ma & 0x3FFF) << 1);
|
||||
int drawcursor;
|
||||
@@ -418,7 +419,7 @@ sigma_text80(sigma_t *sigma)
|
||||
|
||||
/* The Sigma 400 seems to use screen widths stated in words
|
||||
(40 for 80-column, 20 for 40-column) */
|
||||
for (x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
for (uint8_t x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
chr = vram[x << 1];
|
||||
attr = vram[(x << 1) + 1];
|
||||
drawcursor = ((ma == ca) && sigma->con && sigma->cursoron);
|
||||
@@ -434,14 +435,14 @@ sigma_text80(sigma_t *sigma)
|
||||
}
|
||||
|
||||
if (drawcursor) {
|
||||
for (c = 0; c < 8; c++) {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
if (sigma->sigmamode & MODE_FONT16)
|
||||
buffer32->line[sigma->displine][(x << 3) + c + 8] = cols[(fontdatm[chr][sigma->sc & 15] & (1 << (c ^ 7))) ? 1 : 0] ^ 0xf;
|
||||
else
|
||||
buffer32->line[sigma->displine][(x << 3) + c + 8] = cols[(fontdat[chr][sigma->sc & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 0xf;
|
||||
}
|
||||
} else {
|
||||
for (c = 0; c < 8; c++) {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
if (sigma->sigmamode & MODE_FONT16)
|
||||
buffer32->line[sigma->displine][(x << 3) + c + 8] = cols[(fontdatm[chr][sigma->sc & 15] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
else
|
||||
@@ -458,8 +459,8 @@ sigma_text80(sigma_t *sigma)
|
||||
static void
|
||||
sigma_text40(sigma_t *sigma)
|
||||
{
|
||||
int x, c;
|
||||
uint8_t chr, attr;
|
||||
uint8_t chr;
|
||||
uint8_t attr;
|
||||
uint16_t ca = (sigma->crtc[15] | (sigma->crtc[14] << 8));
|
||||
uint16_t ma = ((sigma->ma & 0x3FFF) << 1);
|
||||
int drawcursor;
|
||||
@@ -473,7 +474,7 @@ sigma_text40(sigma_t *sigma)
|
||||
|
||||
/* The Sigma 400 seems to use screen widths stated in words
|
||||
(40 for 80-column, 20 for 40-column) */
|
||||
for (x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
for (uint8_t x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
chr = vram[x << 1];
|
||||
attr = vram[(x << 1) + 1];
|
||||
drawcursor = ((ma == ca) && sigma->con && sigma->cursoron);
|
||||
@@ -489,11 +490,11 @@ sigma_text40(sigma_t *sigma)
|
||||
}
|
||||
|
||||
if (drawcursor) {
|
||||
for (c = 0; c < 8; c++) {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[sigma->displine][(x << 4) + 2 * c + 8] = buffer32->line[sigma->displine][(x << 4) + 2 * c + 9] = cols[(fontdatm[chr][sigma->sc & 15] & (1 << (c ^ 7))) ? 1 : 0] ^ 0xf;
|
||||
}
|
||||
} else {
|
||||
for (c = 0; c < 8; c++) {
|
||||
for (uint8_t c = 0; c < 8; c++) {
|
||||
buffer32->line[sigma->displine][(x << 4) + 2 * c + 8] = buffer32->line[sigma->displine][(x << 4) + 2 * c + 9] = cols[(fontdatm[chr][sigma->sc & 15] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
}
|
||||
@@ -507,18 +508,17 @@ sigma_text40(sigma_t *sigma)
|
||||
static void
|
||||
sigma_gfx400(sigma_t *sigma)
|
||||
{
|
||||
int x;
|
||||
unsigned char *vram = &sigma->vram[((sigma->ma << 1) & 0x1FFF) + (sigma->sc & 3) * 0x2000];
|
||||
uint8_t plane[4];
|
||||
uint8_t mask, col, c;
|
||||
uint8_t col;
|
||||
|
||||
for (x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
for (uint8_t x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
plane[0] = vram[x];
|
||||
plane[1] = vram[0x8000 + x];
|
||||
plane[2] = vram[0x10000 + x];
|
||||
plane[3] = vram[0x18000 + x];
|
||||
|
||||
for (c = 0, mask = 0x80; c < 8; c++, mask >>= 1) {
|
||||
for (uint8_t c = 0, mask = 0x80; c < 8; c++, mask >>= 1) {
|
||||
col = ((plane[3] & mask) ? 8 : 0) | ((plane[2] & mask) ? 4 : 0) | ((plane[1] & mask) ? 2 : 0) | ((plane[0] & mask) ? 1 : 0);
|
||||
col |= 16;
|
||||
buffer32->line[sigma->displine][(x << 3) + c + 8] = col;
|
||||
@@ -536,18 +536,17 @@ sigma_gfx400(sigma_t *sigma)
|
||||
static void
|
||||
sigma_gfx200(sigma_t *sigma)
|
||||
{
|
||||
int x;
|
||||
unsigned char *vram = &sigma->vram[((sigma->ma << 1) & 0x1FFF) + (sigma->sc & 2) * 0x1000];
|
||||
uint8_t plane[4];
|
||||
uint8_t mask, col, c;
|
||||
uint8_t col;
|
||||
|
||||
for (x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
for (uint8_t x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
plane[0] = vram[x];
|
||||
plane[1] = vram[0x8000 + x];
|
||||
plane[2] = vram[0x10000 + x];
|
||||
plane[3] = vram[0x18000 + x];
|
||||
|
||||
for (c = 0, mask = 0x80; c < 8; c++, mask >>= 1) {
|
||||
for (uint8_t c = 0, mask = 0x80; c < 8; c++, mask >>= 1) {
|
||||
col = ((plane[3] & mask) ? 8 : 0) | ((plane[2] & mask) ? 4 : 0) | ((plane[1] & mask) ? 2 : 0) | ((plane[0] & mask) ? 1 : 0);
|
||||
col |= 16;
|
||||
buffer32->line[sigma->displine][(x << 3) + c + 8] = col;
|
||||
@@ -562,19 +561,19 @@ sigma_gfx200(sigma_t *sigma)
|
||||
static void
|
||||
sigma_gfx4col(sigma_t *sigma)
|
||||
{
|
||||
int x;
|
||||
unsigned char *vram = &sigma->vram[((sigma->ma << 1) & 0x1FFF) + (sigma->sc & 2) * 0x1000];
|
||||
uint8_t plane[4];
|
||||
uint8_t mask, col, c;
|
||||
uint8_t mask;
|
||||
uint8_t col;
|
||||
|
||||
for (x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
for (uint8_t x = 0; x < (sigma->crtc[1] << 1); x++) {
|
||||
plane[0] = vram[x];
|
||||
plane[1] = vram[0x8000 + x];
|
||||
plane[2] = vram[0x10000 + x];
|
||||
plane[3] = vram[0x18000 + x];
|
||||
|
||||
mask = 0x80;
|
||||
for (c = 0; c < 4; c++) {
|
||||
for (uint8_t c = 0; c < 4; c++) {
|
||||
col = ((plane[3] & mask) ? 2 : 0) | ((plane[2] & mask) ? 1 : 0);
|
||||
mask = mask >> 1;
|
||||
col |= ((plane[3] & mask) ? 8 : 0) | ((plane[2] & mask) ? 4 : 0);
|
||||
@@ -593,7 +592,8 @@ static void
|
||||
sigma_poll(void *p)
|
||||
{
|
||||
sigma_t *sigma = (sigma_t *) p;
|
||||
int x, c;
|
||||
int x;
|
||||
int c;
|
||||
int oldvc;
|
||||
uint32_t cols[4];
|
||||
int oldsc;
|
||||
@@ -767,7 +767,7 @@ sigma_poll(void *p)
|
||||
}
|
||||
if (sigma->cgadispon)
|
||||
sigma->sigmastat &= ~STATUS_RETR_H;
|
||||
if ((sigma->sc == (sigma->crtc[10] & 31) || ((sigma->crtc[8] & 3) == 3 && sigma->sc == ((sigma->crtc[10] & 31) >> 1))))
|
||||
if (sigma->sc == (sigma->crtc[10] & 31) || ((sigma->crtc[8] & 3) == 3 && sigma->sc == ((sigma->crtc[10] & 31) >> 1)))
|
||||
sigma->con = 1;
|
||||
}
|
||||
}
|
||||
@@ -829,7 +829,7 @@ static void
|
||||
static int
|
||||
sigma_available(void)
|
||||
{
|
||||
return ((rom_present(ROM_SIGMA_FONT) && rom_present(ROM_SIGMA_BIOS)));
|
||||
return (rom_present(ROM_SIGMA_FONT) && rom_present(ROM_SIGMA_BIOS));
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user