Skip to content

Commit

Permalink
Emulator, Firmware, Documents
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Robson committed May 25, 2024
1 parent 774e821 commit 792a227
Show file tree
Hide file tree
Showing 27 changed files with 14 additions and 1,073 deletions.
6 changes: 0 additions & 6 deletions documents/TODO

This file was deleted.

Binary file removed documents/bytesweet16.pdf
Binary file not shown.
3 changes: 1 addition & 2 deletions documents/release/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ Many of these are helpful for understanding specific API functions, as many BASI
| stransmit \<a\>,\<s\> | |
| ssend \<data\> | Send data to SPI device ; this is comma seperated data, numbers or strings. If a semicolon is used as a seperator e.g. 4137; then the constant is sent as a 16 bit value. |
| stop | Halt program with error |
| sweet \<address\> | Run Sweet 16 code using the registers at the given address ; the registers are a 32 byte block of memory, and can be accessed easily using the \[\] operators. |
| sys \<address\> | Call 65C02 machine code at given address. Passes contents of variables A,X,Y in those registers. |
| tilemap addr,x,y | Define a tilemap. The tilemap data format is in the API. The tilemap is stored in memory at addr, and the offset into the |
| uconfig \<baud\>\[,\<prt\>\] | Set the baud rate and protocol for the UART. Currently only 8N1 is supported. |
Expand Down Expand Up @@ -214,7 +213,7 @@ You can also pass A X Y as variables. So you could delete line 150 and run it wi

The \[\] operator is used like an array, but it is actually a syntactic equivalent of deek and doke, e.g. reading and writing 16 bytes. mem\[x\] means the 16 bit value in mem + x \* 2, so if mem = 813 then mem\[2\] = -1 writes a 16 bit word to 817 and 818, and print mem\[2\] reads it. The index can only be from 0..127

The purpose of this is to provide a clean readable interface to data in 65C02, Sweet16 and other programs running under assembly language ; often accessing elements in the 'array' as a structure.
The purpose of this is to provide a clean readable interface to data in 65C02 and other programs running under assembly language ; often accessing elements in the 'array' as a structure.

### Zero Page Usage

Expand Down
6 changes: 0 additions & 6 deletions documents/release/source/api.gen.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ this also resets the 65C02.

Do a MOS command (a '* command') these are specified in the Wiki as they will be steadily expanded.

## Function 9 : Sweet 16 Virtual Machine

Execute Sweet 16 VM Code with the register set provided. The error return value is actually a re-entrant
call for Windows emulation ; if it returns non-zero it means the VM has been executed, if it returns zero
then the emulation can update as at the end of a normal frame.

## Function 10 : Write character to debug

Writes a single character to the debug port (the UART on the Pico, or stderr on the emulator). This allows
Expand Down
Binary file removed documents/sweet 16.odt
Binary file not shown.
Binary file removed documents/sweet 16.pdf
Binary file not shown.
9 changes: 1 addition & 8 deletions emulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COMMONOBJECTS = $(subst .cpp,.o,$(COMMONSOURCES))
SOURCES = src$(S)core$(S)sys_processor.o src$(S)core$(S)hardware.o src$(S)framework$(S)beeper.o \
src$(S)framework$(S)main.o src$(S)framework$(S)gfx.o src$(S)framework$(S)debugger.o \
src$(S)core$(S)sys_debugger.o \
src$(S)core$(S)processors$(S)sweet16.o src$(S)core$(S)processors$(S)6502.o \
src$(S)core$(S)6502.o \
$(COMMONOBJECTS)

CC = g++
Expand Down Expand Up @@ -135,13 +135,6 @@ prebuild:
$(PYTHON) scripts$(S)mapper.py >include$(S)hid2sdl.h
$(CCOPY) $(BINDIR)*_binary.h include

$(CMAKEDIR) build
$(CCOPY) scripts$(S)*.py build
$(CCOPY) build$(S)swasm.py build$(S)__main__.py
$(CDEL) $(BINDIR)swasm.zip
zip -j $(BINDIR)swasm.zip build$(S)__main__.py
$(CDEL) build$(S)*.py

# ***************************************************************************************
#
# Force firmware rebuild
Expand Down
2 changes: 1 addition & 1 deletion emulator/cross-compile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ COMMONSOURCES = $(wildcard $(IMPSRC)*.cpp)

SOURCES = $(FRASRC)main.cpp $(FRASRC)gfx.cpp $(FRASRC)debugger.cpp $(FRASRC)beeper.cpp \
$(EMUSRC)core$(S)sys_processor.cpp $(EMUSRC)core$(S)sys_debugger.cpp $(EMUSRC)core$(S)hardware.cpp \
$(EMUSRC)core$(S)processors$(S)6502.cpp $(EMUSRC)core$(S)processors$(S)sweet16.cpp \
$(EMUSRC)core$(S)6502.cpp \
$(COMMONSOURCES)

INCLUDES= -I ../include -I ../framework -I .. -I $(COMDIR)include
Expand Down
12 changes: 0 additions & 12 deletions emulator/include/sys_processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ void CPUEndRun(void);
void CPULoadBinary(char *fileName);
void CPUExit(void);
void CPUSaveArguments(int argc,char *argv[]);
BYTE8 CPUGetID(void);

// *******************************************************************************************************************************
//
Expand All @@ -85,15 +84,4 @@ CPUSTATUS65 *CPUGetStatus65(void);
WORD16 CPUGetPC65(void);
int CPUGetStep65(BYTE8 opcode);

// *******************************************************************************************************************************
//
// Sweet 16 Prototypes
//
// *******************************************************************************************************************************

BYTE8 CPUExecute16(void);
void CPUReset16(void);
WORD16 CPUGetPC16(void);
int CPUGetStep16(BYTE8 opcode);

#endif
236 changes: 0 additions & 236 deletions emulator/scripts/swasm.py

This file was deleted.

45 changes: 0 additions & 45 deletions emulator/scripts/test.asm

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 792a227

Please sign in to comment.