SRCS = io_base.c keyboard_base.c plato.c protocol.c screen_base.c terminal.c \
touch_base.c
-FSRCS = font.c io.c keyboard.c scale.c screen.c splash.c \
- terminal_char_load.c touch.c
+FSRCS = fuzix/font.c fuzix/io.c fuzix/keyboard.c fuzix/scale.c fuzix/screen.c \
+ fuzix/splash.c fuzix/terminal_char_load.c fuzix/touch.c
INC = io.h keyboard.h plato_key.h protocol.h screen.h terminal.h touch.h
FOBJS = $(patsubst fuzix/%.c,%.rel, $(FSRCS))
plato: $(OBJS) $(FOBJS)
- $(CC) -o plato --nostdio $(OBJS) $(FOBJS)
+ $(CC) -o plato $(OBJS) $(FOBJS)
-$(OBJS):.c.rel:
+$(OBJS): %.rel: %.c
$(CC) $(COPT) $(CFLAGS) -c $< -o $@
-$(FOBJS):.c.rel:
+$(FOBJS): %.rel: fuzix/%.c
$(CC) $(COPT) $(CFLAGS) -c $< -o $@
-
-$(OBJS) : $(INC)
-
-$(FOBJS) : $(INC)
-
clean:
rm -f *.o *.rel *.lst *.sym *.asm *.map *.noi *.lk *.bin *~ plato
- (cd fuzix; rm -f *.o *.rel *.lst *.sym *.asm *.map *.noi *.lk *.bin *~ )
\ No newline at end of file
+ (cd fuzix; rm -f *.o *.rel *.lst *.sym *.asm *.map *.noi *.lk *.bin *~ )
extern padBool FastText; /* protocol.c */
-#ifndef __ATARI__
extern unsigned short scalex[];
extern unsigned short scaley[];
-#endif
extern uint8_t font[];
extern uint8_t fontm23[];
extern uint8_t FONT_SIZE_X;
extern uint8_t FONT_SIZE_Y;
-extern void (*io_recv_serial_flow_on)(void);
-extern void (*io_recv_serial_flow_off)(void);
-
-// Atari uses fast frac multiplies to save memory
-#ifdef __ATARI__
-extern uint16_t mul0625(uint16_t val);
-extern uint16_t mul0375(uint16_t val);
-#endif
-
/*
* Silly functions to get us going
*/
{
printf("\033[%d;%dH%c", y, x, " #"[pen]);
// printf("[%d,%d->%d]", x, y, pen);
- fflush(stdout);
}
static void tgi_bar(int x1, int y1, int x2, int y2)
for(x = x1; x < x2; x++)
putchar(' ');
}
- fflush(stdout);
// printf("[R %d,%d,%d,%d->%d]", x1, y1, x2,y2, pen);
}
else
tgi_setcolor(1);
-#ifdef __ATARI__
- tgi_bar(mul0625(Coord1->x),mul0375(Coord1->y^0x1FF),mul0625(Coord2->x),mul0375(Coord2->y^0x1FF));
-#else
tgi_bar(scalex[Coord1->x],scaley[Coord1->y],scalex[Coord2->x],scaley[Coord2->y]);
-#endif
-
}
/**
tgi_setcolor(0);
else
tgi_setcolor(1);
-#ifdef __ATARI__
- tgi_setpixel(mul0625(Coord->x),mul0375(Coord->y^0x1FF));
-#else
tgi_setpixel(scalex[Coord->x],scaley[Coord->y]);
-#endif
}
/**
*/
void screen_line_draw(padPt* Coord1, padPt* Coord2)
{
-#ifdef __ATARI__
- uint16_t x1=mul0625(Coord1->x);
- uint16_t x2=mul0625(Coord2->x);
- uint16_t y1=mul0375(Coord1->y^0x1FF);
- uint16_t y2=mul0375(Coord2->y^0x1FF);
-#else
uint16_t x1=scalex[Coord1->x];
uint16_t x2=scalex[Coord2->x];
uint16_t y1=scaley[Coord1->y];
uint16_t y2=scaley[Coord2->y];
-#endif
if (CurMode==ModeErase || CurMode==ModeInverse)
tgi_setcolor(0);
tgi_setcolor(mainColor);
-#ifdef __ATARI__
- x=mul0625((Coord->x&0x1FF));
- y=mul0375((Coord->y+14^0x1FF)&0x1FF);
-#else
x=scalex[(Coord->x&0x1FF)];
y=scaley[(Coord->y)+14&0x1FF];
-#endif
if (FastText==padF)
{
{
TTYLoc.x -= CharWide;
tgi_setcolor(0);
-#ifdef __ATARI__
- tgi_bar(mul0625(TTYLoc.x),mul0375(TTYLoc.y^0x1FF),mul0625(TTYLoc.x+CharWide),mul0375(TTYLoc.y^0x1FF+CharHigh));
-#else
tgi_bar(scalex[TTYLoc.x],scaley[TTYLoc.y],scalex[TTYLoc.x+CharWide],scaley[TTYLoc.y+CharHigh]);
-#endif
tgi_setcolor(1);
}
else if (theChar == 0x0A) /* line feed */