From ef641589bf763ea12e73abf4bf42e45ac1acd2ff Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 12 Jan 2007 00:40:03 +0000 Subject: Gone back to a simpler ARM9 only build as the new dynamic libfat library means I can use that, and dswifi wouldn't work with my AP. --- arm9/source/framebuffer.c | 276 ---------------------------------------------- 1 file changed, 276 deletions(-) delete mode 100644 arm9/source/framebuffer.c (limited to 'arm9/source/framebuffer.c') diff --git a/arm9/source/framebuffer.c b/arm9/source/framebuffer.c deleted file mode 100644 index 65bedc9..0000000 --- a/arm9/source/framebuffer.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - ds81 - Nintendo DS ZX81 emulator. - - Copyright (C) 2006 Ian Cowburn - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - $Id$ -*/ - -#include -#include - -#include "ds81_global.h" - -/* ---------------------------------------- STATIC DATA -*/ -#define WIDTH 256 -#define HEIGHT 192 - -static uint16 *buff=0; - -static uint8 font[]= -{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x00, - 0x00, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x24, 0x7e, 0x24, 0x24, 0x7e, 0x24, 0x00, - 0x00, 0x10, 0x7c, 0x14, 0x7c, 0x50, 0x7c, 0x10, - 0x00, 0x46, 0x26, 0x10, 0x08, 0x64, 0x62, 0x00, - 0x00, 0x08, 0x14, 0x08, 0x54, 0x22, 0x5c, 0x00, - 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00, - 0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00, - 0x00, 0x00, 0x28, 0x10, 0x7c, 0x10, 0x28, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, - 0x00, 0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x00, - 0x00, 0x3c, 0x62, 0x52, 0x4a, 0x46, 0x3c, 0x00, - 0x00, 0x18, 0x14, 0x10, 0x10, 0x10, 0x7c, 0x00, - 0x00, 0x3c, 0x42, 0x40, 0x3c, 0x02, 0x7e, 0x00, - 0x00, 0x3c, 0x42, 0x30, 0x40, 0x42, 0x3c, 0x00, - 0x00, 0x10, 0x18, 0x14, 0x12, 0x7e, 0x10, 0x00, - 0x00, 0x7e, 0x02, 0x3e, 0x40, 0x42, 0x3c, 0x00, - 0x00, 0x3c, 0x02, 0x3e, 0x42, 0x42, 0x3c, 0x00, - 0x00, 0x7e, 0x40, 0x20, 0x10, 0x08, 0x08, 0x00, - 0x00, 0x3c, 0x42, 0x3c, 0x42, 0x42, 0x3c, 0x00, - 0x00, 0x3c, 0x42, 0x42, 0x7c, 0x40, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x08, 0x04, - 0x00, 0x00, 0x20, 0x10, 0x08, 0x10, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x10, 0x20, 0x10, 0x08, 0x00, - 0x00, 0x3c, 0x42, 0x20, 0x10, 0x00, 0x10, 0x00, - 0x00, 0x3c, 0x52, 0x6a, 0x7a, 0x02, 0x3c, 0x00, - 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x00, - 0x00, 0x3e, 0x42, 0x3e, 0x42, 0x42, 0x3e, 0x00, - 0x00, 0x3c, 0x42, 0x02, 0x02, 0x42, 0x3c, 0x00, - 0x00, 0x1e, 0x22, 0x42, 0x42, 0x22, 0x1e, 0x00, - 0x00, 0x7e, 0x02, 0x3e, 0x02, 0x02, 0x7e, 0x00, - 0x00, 0x7e, 0x02, 0x3e, 0x02, 0x02, 0x02, 0x00, - 0x00, 0x3c, 0x42, 0x02, 0x72, 0x42, 0x3c, 0x00, - 0x00, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x00, - 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, - 0x00, 0x40, 0x40, 0x40, 0x42, 0x42, 0x3c, 0x00, - 0x00, 0x22, 0x12, 0x0e, 0x12, 0x22, 0x42, 0x00, - 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x7e, 0x00, - 0x00, 0x42, 0x66, 0x5a, 0x42, 0x42, 0x42, 0x00, - 0x00, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x00, - 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, - 0x00, 0x3e, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x00, - 0x00, 0x3c, 0x42, 0x42, 0x4a, 0x52, 0x3c, 0x00, - 0x00, 0x3e, 0x42, 0x42, 0x3e, 0x22, 0x42, 0x00, - 0x00, 0x3c, 0x02, 0x3c, 0x40, 0x42, 0x3c, 0x00, - 0x00, 0x7f, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, - 0x00, 0x42, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, - 0x00, 0x42, 0x42, 0x42, 0x42, 0x5a, 0x24, 0x00, - 0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00, - 0x00, 0x41, 0x22, 0x14, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x7e, 0x20, 0x10, 0x08, 0x04, 0x7e, 0x00, - 0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00, - 0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, - 0x00, 0x0e, 0x08, 0x08, 0x08, 0x08, 0x0e, 0x00, - 0x00, 0x08, 0x1c, 0x2a, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x38, 0x44, 0x1e, 0x04, 0x04, 0x7e, 0x00, - 0x00, 0x00, 0x1c, 0x20, 0x3c, 0x22, 0x3c, 0x00, - 0x00, 0x04, 0x04, 0x3c, 0x44, 0x44, 0x3c, 0x00, - 0x00, 0x00, 0x38, 0x04, 0x04, 0x04, 0x38, 0x00, - 0x00, 0x20, 0x20, 0x3c, 0x22, 0x22, 0x3c, 0x00, - 0x00, 0x00, 0x1c, 0x22, 0x1e, 0x02, 0x3c, 0x00, - 0x00, 0x30, 0x08, 0x18, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x00, 0x3c, 0x22, 0x22, 0x3c, 0x20, 0x1c, - 0x00, 0x02, 0x02, 0x1e, 0x22, 0x22, 0x22, 0x00, - 0x00, 0x08, 0x00, 0x0c, 0x08, 0x08, 0x1c, 0x00, - 0x00, 0x20, 0x00, 0x20, 0x20, 0x20, 0x24, 0x18, - 0x00, 0x04, 0x14, 0x0c, 0x0c, 0x14, 0x24, 0x00, - 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x30, 0x00, - 0x00, 0x00, 0x16, 0x2a, 0x2a, 0x2a, 0x2a, 0x00, - 0x00, 0x00, 0x1e, 0x22, 0x22, 0x22, 0x22, 0x00, - 0x00, 0x00, 0x1c, 0x22, 0x22, 0x22, 0x1c, 0x00, - 0x00, 0x00, 0x1e, 0x22, 0x22, 0x1e, 0x02, 0x02, - 0x00, 0x00, 0x3c, 0x22, 0x22, 0x3c, 0x20, 0x60, - 0x00, 0x00, 0x38, 0x04, 0x04, 0x04, 0x04, 0x00, - 0x00, 0x00, 0x1c, 0x02, 0x1c, 0x20, 0x1e, 0x00, - 0x00, 0x08, 0x1c, 0x08, 0x08, 0x08, 0x30, 0x00, - 0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x1c, 0x00, - 0x00, 0x00, 0x22, 0x22, 0x14, 0x14, 0x08, 0x00, - 0x00, 0x00, 0x22, 0x2a, 0x2a, 0x2a, 0x14, 0x00, - 0x00, 0x00, 0x22, 0x14, 0x08, 0x14, 0x22, 0x00, - 0x00, 0x00, 0x22, 0x22, 0x22, 0x3c, 0x20, 0x1c, - 0x00, 0x00, 0x3e, 0x10, 0x08, 0x04, 0x3e, 0x00, - 0x00, 0x70, 0x10, 0x0c, 0x10, 0x10, 0x70, 0x00, - 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, - 0x00, 0x0e, 0x08, 0x30, 0x08, 0x08, 0x0e, 0x00, - 0x00, 0x28, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3c, 0x42, 0x99, 0x85, 0x85, 0x99, 0x42, 0x3c -}; - -/* ---------------------------------------- PUBLIC INTERFACES -*/ -void FB_Init(uint16 *vram) -{ - buff=vram; -} - - -void FB_Print(const char *text, int x, int y, int colour, int paper) -{ - uint16 *base; - - base=buff+y*WIDTH+x; - - while(*text) - { - int x,y; - int ch; - - ch=((*text)-32)*8; - - for(y=0;y<8;y++) - { - for(x=0;x<8;x++) - { - if (font[ch]&(1<width==WIDTH && img->height==HEIGHT) - { - dmaCopy(img->data8,buff,SCREEN_WIDTH*SCREEN_HEIGHT*2); - } - else - { - int f; - - for(f=0;fheight;f++) - { - dmaCopy(img->data16+(f*img->width), - buff+x+(y+f)*WIDTH,img->width*2); - } - } -} -- cgit v1.2.3