This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BLT Copy example | |
* | |
* Author: Thomas Cherryhomes <thom.cherryhomes@gmail.com> | |
*/ | |
#include <conio.h> | |
#include <i86.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tincan terminal protocol. | |
Dirt simple | |
escape 0x1b = command | |
0x1b 0x00 clear with current ink/paper | |
0x1b 0x01 YY XX set position | |
0x1b 0x02 BC Set Border | |
0x1b 0x03 II Set Ink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <malloc.h> | |
#define BUFFER_SIZE 4096 | |
long heap; // heap pointer will be defined in the binary. | |
int main(int argc,char* argv[]) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat plato.map | |
Modules list: | |
------------- | |
touch_base.o: | |
CODE Offs=000000 Size=0000C9 Align=00001 Fill=0000 | |
BSS Offs=000000 Size=00000A Align=00001 Fill=0000 | |
DATA Offs=000000 Size=000003 Align=00001 Fill=0000 | |
plato.o: | |
CODE Offs=0000C9 Size=000026 Align=00001 Fill=0000 | |
DATA Offs=000003 Size=000001 Align=00001 Fill=0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Given two rectangles (global vars): | |
* lx - Left X (left) | |
* ly - Left Y (top) | |
* lw - Left Width | |
* lh - Left Height | |
* rx - Right X (left) | |
* ry - Right Y (left) | |
* rw - Right Width | |
* rh - Right Height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Given two rectangles (global vars): | |
* lx - Left X (left) | |
* ly - Left Y (top) | |
* lw - Left Width | |
* lh - Left Height | |
* rx - Right X (left) | |
* ry - Right Y (left) | |
* rw - Right Width | |
* rh - Right Height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void bm_clearpixel(unsigned int x, unsigned int y) { | |
unsigned int addr = (8 * (x/8)) + (256 * (y/8)) + (y%8); | |
VDP_SET_ADDRESS(addr); | |
unsigned char bits = VDPRD; | |
bits = bits & (0xff - (0x80 >> (x%8))); | |
VDP_SET_ADDRESS_WRITE(addr); | |
VDPWD = bits; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
padByte splash[]={ | |
0x1b, | |
0x02, | |
0x1b, | |
0x0c, | |
0x1b, | |
0x12, | |
0x1b, | |
0xd1, | |
0xc0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <Quickdraw.h> | |
#include <MacMemory.h> | |
#include <Sound.h> | |
#include <Events.h> | |
#include <Fonts.h> | |
#include <NumberFormatting.h> | |
#include <Devices.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Processes.r" | |
#include "Menus.r" | |
#include "Windows.r" | |
#include "MacTypes.r" | |
#include "Finder.r" | |
type 'PLTO' as 'STR '; | |
resource 'PLTO' (0, purgeable) { | |
"PLATOTerm 0.1" | |
}; |