It lives!
This commit is contained in:
parent
d33b227a30
commit
4cedb359a2
4 changed files with 21 additions and 13 deletions
|
@ -1,6 +1,7 @@
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
port=COM3
|
port=/dev/ttyUSB1
|
||||||
labels=sample.lbl
|
labels=sample.lbl
|
||||||
flash_address=380000
|
flash_address=380000
|
||||||
chunk_size=1024
|
chunk_size=1024
|
||||||
cpu=65816
|
cpu=65c02
|
||||||
|
data_rate=6000000
|
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
reset();
|
reset();
|
||||||
//print("F256 LIVES!");
|
print("F256 LIVES!");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
python ../../FoenixMgr/FoenixMgr/fnxmgr.py --port /dev/ttyUSB1 --run-pgz pgztest.pgz
|
#python ../../FoenixMgr/FoenixMgr/fnxmgr.py --boot FLASH
|
||||||
|
python ../../FoenixMgr/FoenixMgr/fnxmgr.py --run-pgz pgztest.pgz
|
||||||
|
#python ../../FoenixMgr/FoenixMgr/fnxmgr.py --dump 2000 --count 200
|
||||||
|
#python ../../FoenixMgr/FoenixMgr/fnxmgr.py --copy pgztest.pgz
|
||||||
|
|
|
@ -29,10 +29,10 @@ static byte _row = 0;
|
||||||
static byte _col = 0;
|
static byte _col = 0;
|
||||||
|
|
||||||
|
|
||||||
// Clear screen, do not change text attributes.
|
// Clear screen, does not change text attributes.
|
||||||
void cls(void) {
|
void cls(void) {
|
||||||
int i;
|
int i;
|
||||||
char *vram = (byte *)TEXT_MATRIX;
|
byte *vram = (byte *)TEXT_MATRIX;
|
||||||
byte mmu;
|
byte mmu;
|
||||||
|
|
||||||
mmu = PEEK(MMU_IO_CTRL); // Get current MMU state.
|
mmu = PEEK(MMU_IO_CTRL); // Get current MMU state.
|
||||||
|
@ -51,7 +51,7 @@ void gotoxy(byte x, byte y) {
|
||||||
byte mmu;
|
byte mmu;
|
||||||
|
|
||||||
mmu = PEEK(MMU_IO_CTRL); // Get current MMU state.
|
mmu = PEEK(MMU_IO_CTRL); // Get current MMU state.
|
||||||
POKE(MMU_IO_CTRL, 2); // Swap I/O page 2 into bank 6.
|
POKE(MMU_IO_CTRL, 0); // Swap I/O page 0 into bank 6.
|
||||||
|
|
||||||
_col = x;
|
_col = x;
|
||||||
POKE(CURSOR_X_LOW, _col); // Set cursor X position.
|
POKE(CURSOR_X_LOW, _col); // Set cursor X position.
|
||||||
|
@ -69,7 +69,7 @@ void gotoxy(byte x, byte y) {
|
||||||
void print(char *message) {
|
void print(char *message) {
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
char *vram = (byte *)TEXT_MATRIX + _col * _row;
|
byte *vram = (byte *)TEXT_MATRIX + _col * _row;
|
||||||
byte mmu;
|
byte mmu;
|
||||||
|
|
||||||
mmu = PEEK(MMU_IO_CTRL); // Get current MMU state.
|
mmu = PEEK(MMU_IO_CTRL); // Get current MMU state.
|
||||||
|
@ -106,8 +106,7 @@ void print(char *message) {
|
||||||
|
|
||||||
POKE(MMU_IO_CTRL, mmu); // Restore MMU state.
|
POKE(MMU_IO_CTRL, mmu); // Restore MMU state.
|
||||||
|
|
||||||
POKE(CURSOR_X_LOW, _col);
|
gotoxy(_col, _row);
|
||||||
POKE(CURSOR_Y_LOW, _row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -118,11 +117,16 @@ void reset(void) {
|
||||||
mmu = PEEK(MMU_IO_CTRL); // Get current MMU state.
|
mmu = PEEK(MMU_IO_CTRL); // Get current MMU state.
|
||||||
POKE(MMU_IO_CTRL, 2); // Swap I/O page 2 into bank 6.
|
POKE(MMU_IO_CTRL, 2); // Swap I/O page 2 into bank 6.
|
||||||
|
|
||||||
|
// If we set 0xD000 to 0x01 and 0xD001 to 0x00, that will put us into text mode at 80 × 60.
|
||||||
|
POKE(VKY_MSTR_CTRL_0, 1);
|
||||||
|
POKE(VKY_MSTR_CTRL_1, 0);
|
||||||
|
|
||||||
_MAX_COL = 80;
|
_MAX_COL = 80;
|
||||||
_MAX_ROW = 60;
|
_MAX_ROW = 60;
|
||||||
|
|
||||||
|
POKE(MMU_IO_CTRL, 0); // Swap I/O page 0 into bank 6.
|
||||||
POKE(CURSOR_SETTINGS, 9); // Disable cursor flash.
|
POKE(CURSOR_SETTINGS, 9); // Disable cursor flash.
|
||||||
POKE(CURSOR_CHARACTER, '_'); // Set cursor shape.
|
POKE(CURSOR_CHARACTER, '_'); // Set cursor shape. (199 = Checkerboard)
|
||||||
|
|
||||||
POKE(MMU_IO_CTRL, mmu); // Restore MMU state.
|
POKE(MMU_IO_CTRL, mmu); // Restore MMU state.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue