Silenced warning about integer overflow. We don't need no steenkin' signs.

This commit is contained in:
Scott Duensing 2024-01-16 19:09:08 -06:00
parent 0b79976955
commit 44bc230048
3 changed files with 21 additions and 2 deletions

View file

@ -36,8 +36,9 @@ static byte _BITMAP_CLUT[3];
static byte _color;
static byte _active; // Current drawing page.
#define bitmapPutPixelIOSet(x, y) FAR_POKE((_BITMAP_BASE[_active] + mathUnsignedAddition(mathUnsignedMultiply(y, _MAX_X), (int32_t)x)), _color)
static void bitmapPutPixelIOSet(uint16_t x, uint16_t y);
//static void bitmapPutPixelIOSet(uint16_t x, uint16_t y);
void bitmapClear(void) {
@ -143,6 +144,7 @@ void bitmapPutPixel(uint16_t x, uint16_t y) {
}
/*
// This does the actual pixel setting but depends on the I/O being umapped.
static void bitmapPutPixelIOSet(uint16_t x, uint16_t y) {
uint32_t pixelRAM;
@ -154,6 +156,7 @@ static void bitmapPutPixelIOSet(uint16_t x, uint16_t y) {
POKE(SWAP_SLOT, block);
POKE(SWAP_ADDR + pixelRAM, _color);
}
*/
void bitmapReset(void) {

View file

@ -81,3 +81,18 @@ byte FAR_PEEK(uint32_t address) {
return result;
}
void FAR_POKE(uint32_t address, byte value) {
byte block;
SWAP_IO_SETUP();
block = address / EIGHTK;
address &= 0x1FFF; // Find offset into this block.
POKE(SWAP_SLOT, block);
POKE(SWAP_ADDR + address, value);
SWAP_IO_SHUTDOWN();
}

View file

@ -58,7 +58,7 @@ typedef unsigned char bool;
// Our stuff.
#define SWAP_SLOT MMU_MEM_BANK_5
#define SWAP_ADDR ((SWAP_SLOT - MMU_MEM_BANK_0) * 0x2000)
#define SWAP_ADDR ((uint16_t)(SWAP_SLOT - MMU_MEM_BANK_0) * (uint16_t)0x2000)
// This is an attempt to allow us to free up slot 5 and use slot 6 for paging
// RAM in and out. Currently, it does not work.
@ -145,6 +145,7 @@ typedef struct colorS {
void f256Init(void);
byte FAR_PEEK(uint32_t address);
void FAR_POKE(uint32_t address, byte value);
#include "kernel.h"