mirror of
https://github.com/dschmenk/PLASMA.git
synced 2026-03-13 08:41:53 +00:00
Compare commits
212 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e0f0ecd0f | ||
|
|
a8584753e0 | ||
|
|
3e91616666 | ||
|
|
ca95dd356d | ||
|
|
6211cb31a3 | ||
|
|
260ea6fe6b | ||
|
|
a6c94440a2 | ||
|
|
c6220f389d | ||
|
|
0743eba40c | ||
|
|
2e4364f9c6 | ||
|
|
ab57909099 | ||
|
|
b4c9c93c2e | ||
|
|
dbd1f336f4 | ||
|
|
51daf7e8ff | ||
|
|
2476b85fa8 | ||
|
|
974a7d63f6 | ||
|
|
fbcfae86e0 | ||
|
|
a818dec4aa | ||
|
|
29498dc6e7 | ||
|
|
a587aa477f | ||
|
|
5d5f60c2d5 | ||
|
|
1fb7960a1b | ||
|
|
a08bc126a2 | ||
|
|
ab3b91ad78 | ||
|
|
a9b4492504 | ||
|
|
66d674d494 | ||
|
|
8c2e3eaa5c | ||
|
|
e2f29ffb2a | ||
|
|
a717f15e02 | ||
|
|
42be6c6f80 | ||
|
|
7c9e24d332 | ||
|
|
80c8cd4e6a | ||
|
|
9b749d6f99 | ||
|
|
87c261bf3d | ||
|
|
67960518b0 | ||
|
|
211ce933b2 | ||
|
|
13f88a8ad3 | ||
|
|
f25f4c6dc7 | ||
|
|
969277f8ae | ||
|
|
a840f2b2ac | ||
|
|
cdfb59846f | ||
|
|
ee5c66e710 | ||
|
|
c9f081e1b3 | ||
|
|
b3b92b39c6 | ||
|
|
734d9a50c6 | ||
|
|
1a7f7bec62 | ||
|
|
7cb4534efb | ||
|
|
30437ce21a | ||
|
|
016b31a01c | ||
|
|
350ab5b783 | ||
|
|
96bac30316 | ||
|
|
1a3e8eb3da | ||
|
|
23a5e7840a | ||
|
|
81fa548f52 | ||
|
|
153e6f6f8b | ||
|
|
3dd07beaf8 | ||
|
|
ed295b0599 | ||
|
|
ff7c35deb9 | ||
|
|
b93b4d7c75 | ||
|
|
c2773d208c | ||
|
|
a9cadd9fda | ||
|
|
8d92e854ae | ||
|
|
f3ac3035ba | ||
|
|
bfb3eb4672 | ||
|
|
2434d262c5 | ||
|
|
547bdcc2ad | ||
|
|
6c6d6e664d | ||
|
|
76c85e350c | ||
|
|
e2163c856e | ||
|
|
96d4e3eb02 | ||
|
|
12de12b0b4 | ||
|
|
d0fc4120c9 | ||
|
|
3fcbf48665 | ||
|
|
92be9cd631 | ||
|
|
2a475a01e2 | ||
|
|
2578b1a3fb | ||
|
|
4364319176 | ||
|
|
da404a8dfa | ||
|
|
68e31ccc30 | ||
|
|
da0bf22b2e | ||
|
|
e14eda8617 | ||
|
|
3166341e96 | ||
|
|
c61a787271 | ||
|
|
637b1d8248 | ||
|
|
9ff1695012 | ||
|
|
86ef49cc5e | ||
|
|
8f3780617b | ||
|
|
912a865a25 | ||
|
|
12216fcab5 | ||
|
|
1d88369ae0 | ||
|
|
f2846bdaf3 | ||
|
|
3b3fc24246 | ||
|
|
232ced8fe3 | ||
|
|
c3cc7cb139 | ||
|
|
0515117d52 | ||
|
|
751799352c | ||
|
|
1be159e3ed | ||
|
|
7fe51aaf56 | ||
|
|
eaa0e3c7d4 | ||
|
|
9f45afe3d0 | ||
|
|
85710bbfdf | ||
|
|
ef9fc81ece | ||
|
|
2eacd75b69 | ||
|
|
d5c22b1ff0 | ||
|
|
dff6c2bd9b | ||
|
|
cefb8128c6 | ||
|
|
6e03017d25 | ||
|
|
8985011207 | ||
|
|
1548a63a9f | ||
|
|
1f1376c467 | ||
|
|
5832883da9 | ||
|
|
ea114c4350 | ||
|
|
2770a6f774 | ||
|
|
a755df496c | ||
|
|
de4d6fb104 | ||
|
|
3f9f56be74 | ||
|
|
fa94f4c8d8 | ||
|
|
b3f6c7970a | ||
|
|
bc1cf8368d | ||
|
|
7aed4d4d4a | ||
|
|
d9d57f383d | ||
|
|
3424b085cf | ||
|
|
eefd9ba2dd | ||
|
|
9587423c46 | ||
|
|
d4dee597dc | ||
|
|
919339041a | ||
|
|
d1f99e1142 | ||
|
|
5114ab48dd | ||
|
|
7bd13f1bcb | ||
|
|
8999c3286f | ||
|
|
bb4e0ee773 | ||
|
|
38832640e7 | ||
|
|
ca4cebf394 | ||
|
|
93c72c98ed | ||
|
|
82bc7ebb1f | ||
|
|
2e36d0f52f | ||
|
|
64ef4cca70 | ||
|
|
b54ba1fdaf | ||
|
|
41d56cdefa | ||
|
|
b481804a4d | ||
|
|
9e42e3d640 | ||
|
|
a067c3e804 | ||
|
|
1c3505a196 | ||
|
|
0d552c5e51 | ||
|
|
41ad4e9778 | ||
|
|
a3dc055897 | ||
|
|
420af77a96 | ||
|
|
1db7cd16ee | ||
|
|
2d4417c698 | ||
|
|
68cc31993f | ||
|
|
54a256cd60 | ||
|
|
1bf6c41be5 | ||
|
|
75ef74b3ba | ||
|
|
9aba6b71f1 | ||
|
|
8dd03a3413 | ||
|
|
3b8bad0abd | ||
|
|
b466a48a16 | ||
|
|
1dd792e87c | ||
|
|
6bb7a9dca9 | ||
|
|
a15658a714 | ||
|
|
b2ddb0434d | ||
|
|
965ccecf2a | ||
|
|
3455286a48 | ||
|
|
7ce2ab726c | ||
|
|
64b516f810 | ||
|
|
f7c37de60a | ||
|
|
3cb1d97a6c | ||
|
|
5d6b9b1f7e | ||
|
|
9aa0ab68ee | ||
|
|
677869ed4c | ||
|
|
a7c7cf9e19 | ||
|
|
99d584f45f | ||
|
|
7a73d2b621 | ||
|
|
e22e8f472f | ||
|
|
1ab3657f36 | ||
|
|
5dabd1dbb7 | ||
|
|
645278604f | ||
|
|
e953458e76 | ||
|
|
07e0397ba4 | ||
|
|
64b0e0ca80 | ||
|
|
4876ddea60 | ||
|
|
2fba961f14 | ||
|
|
4d2ab77740 | ||
|
|
8d0dad15b3 | ||
|
|
4e77f83bed | ||
|
|
59dbef75f1 | ||
|
|
5de565ebb1 | ||
|
|
bf13409d16 | ||
|
|
c874426091 | ||
|
|
ec9718de53 | ||
|
|
ec16b9cc78 | ||
|
|
27fc9a0fea | ||
|
|
3ddb448775 | ||
|
|
097bde5257 | ||
|
|
92078abec1 | ||
|
|
312bd349fc | ||
|
|
2242a02075 | ||
|
|
eab0727c71 | ||
|
|
9337e5f20f | ||
|
|
35b2aa3080 | ||
|
|
9a7593fafe | ||
|
|
929678269f | ||
|
|
21ac8cc402 | ||
|
|
7433b52e28 | ||
|
|
2e19e9f6b1 | ||
|
|
dad996203d | ||
|
|
4f9f58ba29 | ||
|
|
4cfadf3ec8 | ||
|
|
e47ca69101 | ||
|
|
37f906d5a6 | ||
|
|
550fde7f1e | ||
|
|
1fcc4c3735 |
165
README.md
165
README.md
@@ -1,9 +1,18 @@
|
||||
# 2/28/2023 PLASMA 2.0 Beta Available!
|
||||
Hopefully close to a 2.0 Release.
|
||||
# 2/15/2024 PLASMA 2.1 Available!
|
||||
|
||||
[Download and read the Release Notes](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%202.1.md)
|
||||
|
||||
[Change List](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%202.1.md#changes-in-plasma-for-21-release)
|
||||
|
||||
[Get single boot floppy for FORTH for PLASMA 2.1](https://github.com/dschmenk/PLASMA/blob/master/doc/PLFORTH.md)
|
||||
|
||||
# 3/24/2023 PLASMA 2.0 Available!
|
||||
|
||||
Only 5 years in the making!
|
||||
|
||||
[Download and read the Release Notes](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%202.0.md)
|
||||
|
||||
[Change List](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%202.0.md#changes-in-plasma-for-20-beta)
|
||||
[Change List](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%202.0.md#changes-in-plasma-for-20-release)
|
||||
|
||||
# 4/29/2018 PLASMA 1.2 Available!
|
||||
[Download and read the Release Notes](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%201.2.md)
|
||||
@@ -25,86 +34,90 @@ Different projects have led to the architecture of PLASMA, most notably Apple Pa
|
||||
|
||||
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
|
||||
|
||||
- [3/24/2023 PLASMA 2.0 Available!](#3242023-plasma-20-available)
|
||||
- [4/29/2018 PLASMA 1.2 Available!](#4292018-plasma-12-available)
|
||||
- [The PLASMA Programming Language](#the-plasma-programming-language)
|
||||
- [Contents](#contents)
|
||||
- [Build Environment](#build-environment)
|
||||
- [PLASMA Cross-Compiler](#plasma-cross-compiler)
|
||||
- [acme Cross-Assembler](#acme-cross-assembler)
|
||||
- [PLASMA Source](#plasma-source)
|
||||
- [Portable VM](#portable-vm)
|
||||
- [Target VM](#target-vm)
|
||||
- [Portable VM](#portable-vm)
|
||||
- [Target VM](#target-vm)
|
||||
- [PLASMA Target Hosted Compiler](#plasma-target-hosted-compiler)
|
||||
- [Tutorial](#tutorial)
|
||||
- [PLASMA Compiler/Assembler](#plasma-compilerassembler)
|
||||
- [PLASMA Modules](#plasma-modules)
|
||||
- [Data Types](#data-types)
|
||||
- [Obligatory 'Hello World'](#obligatory-hello-world)
|
||||
- [Character Case](#character-case)
|
||||
- [Comments](#comments)
|
||||
- [Numbers](#numbers)
|
||||
- [Characters](#characters)
|
||||
- [Strings](#strings)
|
||||
- [Organization of a PLASMA Source File](#organization-of-a-plasma-source-file)
|
||||
- [Module Dependencies](#module-dependencies)
|
||||
- [File Inclusion](#file-inclusion)
|
||||
- [Predefined Functions](#predefined-functions)
|
||||
- [Constant Declarations](#constant-declarations)
|
||||
- [Structure Declarations](#structure-declarations)
|
||||
- [Global Data & Variables Declarations](#global-data-variables-declarations)
|
||||
- [Function Definitions](#function-definitions)
|
||||
- [Statements and Expressions](#statements-and-expressions)
|
||||
- [Exported Declarations](#exported-declarations)
|
||||
- [Module Main Initialization Function](#module-main-initialization-function)
|
||||
- [Module Done](#module-done)
|
||||
- [Runtime](#runtime)
|
||||
- [Reference](#reference)
|
||||
- [Decimal and Hexadecimal Numbers](#decimal-and-hexadecimal-numbers)
|
||||
- [Character and String Literals](#character-and-string-literals)
|
||||
- [In-line String Literals](#in-line-string-literals)
|
||||
- [Words](#words)
|
||||
- [Bytes](#bytes)
|
||||
- [Addresses](#addresses)
|
||||
- [Arrays](#arrays)
|
||||
- [Type Overrides](#type-overrides)
|
||||
- [Multi-Dimensional Arrays](#multi-dimensional-arrays)
|
||||
- [Offsets (Structure Elements)](#offsets-structure-elements)
|
||||
- [Defining Structures](#defining-structures)
|
||||
- [Pointers](#pointers)
|
||||
- [Pointer Dereferencing](#pointer-dereferencing)
|
||||
- [Addresses of Data/Code](#addresses-of-datacode)
|
||||
- [Function Pointers](#function-pointers)
|
||||
- [PLASMA Compiler/Assembler](#plasma-compilerassembler)
|
||||
- [PLASMA Modules](#plasma-modules)
|
||||
- [Data Types](#data-types)
|
||||
- [Obligatory 'Hello World'](#obligatory-hello-world)
|
||||
- [Character Case](#character-case)
|
||||
- [Comments](#comments)
|
||||
- [Numbers](#numbers)
|
||||
- [Characters](#characters)
|
||||
- [Strings](#strings)
|
||||
- [Organization of a PLASMA Source File](#organization-of-a-plasma-source-file)
|
||||
- [Module Dependencies](#module-dependencies)
|
||||
- [File Inclusion](#file-inclusion)
|
||||
- [Predefined Functions](#predefined-functions)
|
||||
- [Constant Declarations](#constant-declarations)
|
||||
- [Structure Declarations](#structure-declarations)
|
||||
- [Global Data \& Variables Declarations](#global-data--variables-declarations)
|
||||
- [Function Definitions](#function-definitions)
|
||||
- [Expressions and Statements](#expressions-and-statements)
|
||||
- [Address Operators](#address-operators)
|
||||
- [Arithmetic, Bitwise, and Logical Operators](#arithmetic-bitwise-and-logical-operators)
|
||||
- [Assignment](#assignment)
|
||||
- [Empty Assignments](#empty-assignments)
|
||||
- [Increment and Decrement](#increment-and-decrement)
|
||||
- [Lambda (Anonymous) Functions](#lambda-functions)
|
||||
- [Control Flow](#control-flow)
|
||||
- [CALL](#call)
|
||||
- [RETURN](#return)
|
||||
- [IF/[ELSIF]/[ELSE]/FIN](#ifelsifelsefin)
|
||||
- [WHEN/IS/[OTHERWISE]/WEND](#whenisotherwisewend)
|
||||
- [FOR \<TO,DOWNTO\> [STEP]/NEXT](#for-todownto-stepnext)
|
||||
- [WHILE/LOOP](#whileloop)
|
||||
- [REPEAT/UNTIL](#repeatuntil)
|
||||
- [CONTINUE](#continue)
|
||||
- [BREAK](#break)
|
||||
- [Statements and Expressions](#statements-and-expressions)
|
||||
- [Exported Declarations](#exported-declarations)
|
||||
- [Module Main Initialization Function](#module-main-initialization-function)
|
||||
- [Module Done](#module-done)
|
||||
- [Runtime](#runtime)
|
||||
- [Reference](#reference)
|
||||
- [Decimal and Hexadecimal Numbers](#decimal-and-hexadecimal-numbers)
|
||||
- [Character and String Literals](#character-and-string-literals)
|
||||
- [In-line String Literals](#in-line-string-literals)
|
||||
- [Words](#words)
|
||||
- [Bytes](#bytes)
|
||||
- [Addresses](#addresses)
|
||||
- [Arrays](#arrays)
|
||||
- [Type Overrides](#type-overrides)
|
||||
- [Multi-Dimensional Arrays](#multi-dimensional-arrays)
|
||||
- [Offsets (Structure Elements)](#offsets-structure-elements)
|
||||
- [Defining Structures](#defining-structures)
|
||||
- [Pointers](#pointers)
|
||||
- [Pointer Dereferencing](#pointer-dereferencing)
|
||||
- [Addresses of Data/Code](#addresses-of-datacode)
|
||||
- [Function Pointers](#function-pointers)
|
||||
- [Function Definitions](#function-definitions-1)
|
||||
- [Expressions and Statements](#expressions-and-statements)
|
||||
- [Address Operators](#address-operators)
|
||||
- [Arithmetic, Bitwise, and Logical Operators](#arithmetic-bitwise-and-logical-operators)
|
||||
- [Assignment](#assignment)
|
||||
- [Empty Assignments](#empty-assignments)
|
||||
- [Increment and Decrement](#increment-and-decrement)
|
||||
- [Lambda Functions](#lambda-functions)
|
||||
- [Control Flow](#control-flow)
|
||||
- [CALL](#call)
|
||||
- [RETURN](#return)
|
||||
- [IF/\[ELSIF\]/\[ELSE\]/FIN](#ifelsifelsefin)
|
||||
- [WHEN/IS/\[OTHERWISE\]/WEND](#whenisotherwisewend)
|
||||
- [FOR \<TO,DOWNTO\> \[STEP\]/NEXT](#for-todownto-stepnext)
|
||||
- [WHILE/LOOP](#whileloop)
|
||||
- [REPEAT/UNTIL](#repeatuntil)
|
||||
- [CONTINUE](#continue)
|
||||
- [BREAK](#break)
|
||||
- [Advanced Topics](#advanced-topics)
|
||||
- [Code Optimizations](#code-optimizations)
|
||||
- [Functions Without Parameters Or Local Variables](#functions-without-parameters-or-local-variables)
|
||||
- [Return Values](#return-values)
|
||||
- [Native Assembly Functions](#native-assembly-functions)
|
||||
- [Libraries and Sample Code](https://github.com/dschmenk/PLASMA/wiki)
|
||||
- [Code Optimizations](#code-optimizations)
|
||||
- [Functions Without Parameters Or Local Variables](#functions-without-parameters-or-local-variables)
|
||||
- [Return Values](#return-values)
|
||||
- [Native Assembly Functions](#native-assembly-functions)
|
||||
- [Implementation](#implementation)
|
||||
- [A New Approach](#a-new-approach)
|
||||
- [The Virtual Machine](#the-virtual-machine)
|
||||
- [The Stacks](#the-stacks)
|
||||
- [Evaluation Stack](#evaluation-stack)
|
||||
- [Call Stack](#call-stack)
|
||||
- [Local Frame Stack](#local-frame-stack)
|
||||
- [Local String Pool](#local-string-pool)
|
||||
- [The Bytecodes](https://github.com/dschmenk/PLASMA/wiki/PLASMA-Byte-Codes)
|
||||
- [Apple 1 PLASMA](#apple-1-plasma)
|
||||
- [Apple II PLASMA](#apple-ii-plasma)
|
||||
- [Apple /// PLASMA](#apple--plasma)
|
||||
- [A New Approach](#a-new-approach)
|
||||
- [The Virtual Machine](#the-virtual-machine)
|
||||
- [The Stacks](#the-stacks)
|
||||
- [Evaluation Stack](#evaluation-stack)
|
||||
- [Call Stack](#call-stack)
|
||||
- [Local Frame Stack](#local-frame-stack)
|
||||
- [Local String Pool](#local-string-pool)
|
||||
- [Apple 1 PLASMA](#apple-1-plasma)
|
||||
- [Apple II PLASMA](#apple-ii-plasma)
|
||||
- [Apple /// PLASMA](#apple--plasma)
|
||||
- [Links](#links)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
123
doc/PLFORTH.md
Normal file
123
doc/PLFORTH.md
Normal file
@@ -0,0 +1,123 @@
|
||||
# FORTH PLASMA + PLFORTH !
|
||||
|
||||
PLFORTH represents a REPL and scripting language for the PLASMA environment. Or, what I did over the Holiday break.
|
||||
|
||||
The goals of PLFORTH are pretty straight forward:
|
||||
**Interactivity** and **debugging**.
|
||||
|
||||
PLFORTH is a PLASMA module written in PLASMA itself. As a first class citizen of the PLASMA environment, it has instant access to all the PLASMA modules, from floating point to high-res graphics libraries and everything in between.
|
||||
|
||||
## Missing words in PLFORTH
|
||||
|
||||
There are quite a few missing word that a standard FORTH would have. Mostly due to deliberately keeping PLFORTH as minimal as possible to reduce the memory footpring and load time. Most of the missing words can be synthesized using existing PLASMA modules and some glue words. The double word have mostly been made avialable through PLASMA's 32 bit integer module, `INT32` by way of the `int32.4th` script. You can always petition to get your favorite FORTH word included in the default vocabulary. Speaking of `VOCABULARY`, PLFORTH only has one.
|
||||
|
||||
## PLFORTH built-in words
|
||||
|
||||

|
||||
|
||||
## PLFORTH specific words
|
||||
|
||||
### Words for looking at internal structures:
|
||||
|
||||
`.RS`: Displays the return stack. Note: PLFORTH uses a software defined return stack, this is not the hardware stack
|
||||
|
||||
### Words for tracing and single stepping execution:
|
||||
|
||||
`TRON`: Turn tracing on
|
||||
|
||||
`TROFF`: Turn tracing off (will also turn off single stepping if enabled)
|
||||
|
||||
`STEPON`: Turn single stepping on
|
||||
|
||||
`STEPOFF`: Turn single stepping off
|
||||
|
||||
While running code, `<CTRL-T>` will toggle tracing on and off as well
|
||||
|
||||
### Words for breakpoints:
|
||||
|
||||
`BRK`: Used inside compiled word to effect a runtime break
|
||||
|
||||
`BRKON xxxx`: Enable breakpoint whenever word `xxxx` is executed
|
||||
|
||||
`BRKOFF`: Disable the breakpoint. Note: only one breakpoint is currently supported
|
||||
|
||||
While running code, `<CTRL-C>` will break out and return to the interpreter.
|
||||
|
||||
`CONT`: Continue running from the last break point
|
||||
|
||||
### Words for PLASMA linkage:
|
||||
|
||||
`LOOKUP yyyy`: Lookup symbol `yyyy` in PLASMA symbol table and return its address
|
||||
|
||||
`PLASMA zzzz`: Create word `zzzz` with code address from `LOOKUP`
|
||||
|
||||
### Words to run a script:
|
||||
|
||||
`SRC`: Source filename on stack as input. Can be nested
|
||||
|
||||
`SRC" ssss"`: Source file `ssss` as input. Can be nested
|
||||
|
||||
`?ENDSRC`: End sourcing file as input if stack flag non-zero
|
||||
|
||||
`ENDSRC`: End sourcing file as input
|
||||
|
||||
### Words for compiler modes:
|
||||
|
||||
`PBC`: Compile into PLASMA Byte Code
|
||||
|
||||
`ITC`: Compile into Indirect Threaded Code
|
||||
|
||||
### Word for converting string to number:
|
||||
|
||||
`NUM?`: Convert string and length to number, returning number and valid flag
|
||||
|
||||
Numbers entered with a preceeding `$` will be interpreted as hex values
|
||||
|
||||
### Words for displaying hex numbers
|
||||
|
||||
`$.`: Display TOS word in hex with leading `$`
|
||||
|
||||
`C$.`: Display TOS byte in hex with leading `$`
|
||||
|
||||
## Debugging vs Performance
|
||||
|
||||
PLFORTH defaults to compiling using ITC (Indirect Threaded Code). This supports a list of inspection and debugging features while developing programs and scripts. However, the compiler can easily switch to PBC (PLASMA Byte Code) to greatly improve performance, but most of the debugging tools are lost. ITC compiled words and PBC compiled words can be intermingled and call each other seemlessly. PLASMA Byte Code is a direct match to many low-level FORTH constructs.
|
||||
|
||||
## Graphics
|
||||
Due to the way the Apple II implements Hi-Res, Lo-Res and Double Lo-Res graphics, a stub loader is required to reserve the pages used.
|
||||
|
||||
`HRFORTH`: Reserve HGR page 1 before launching PLFORTH
|
||||
|
||||
`HR2FORTH`: Reserve HGR pages 1 and 2 before launching PLFORTH
|
||||
|
||||
`TX2FORTH`: Reserve GR and DGR pages 1 and 2 before launching PLFORTH
|
||||
|
||||
## Scripts
|
||||
|
||||
There are a few useful scripts located in the `scripts` directory. By far the most useful is `plasma.4th`
|
||||
|
||||
### plasma.4th useful words
|
||||
|
||||
`CAT`: Display files in current ProDOS directory
|
||||
|
||||
`CAT" pppp"`: Display files in `pppp` ProDOS directory
|
||||
|
||||
`PFX" pppp"`: Set current ProDOS prefix to `pppp`
|
||||
|
||||
`PFX.`: Display current ProDOS prefix
|
||||
|
||||
`EDIT" ssss"`: Edit file `ssss`
|
||||
|
||||
## Command line options
|
||||
|
||||
`-F`: Fast flag (like `PCB` as first command)
|
||||
|
||||
`-T`: Trace flag (like `TRON` as first command)
|
||||
|
||||
`SCRIPT NAME`: Soure filename to execute
|
||||
|
||||
## Links
|
||||
|
||||
Here is a (worse than usual) video running through some examples. This was a preliminary release so the final is a bit different: https://youtu.be/picPyXAk77I?si=Td2En5Z3oxVTzh0z
|
||||
|
||||
A pre-configured ProDOS floppy image able to run and a few utilities is available here: https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLFORTH.PO
|
||||
@@ -29,12 +29,12 @@ Screen Character Represents
|
||||
' ' space Crevasse (pit - don't fall in)
|
||||
= Exit
|
||||
- Entrance
|
||||
* Torch
|
||||
*,X Torch
|
||||
& Mana
|
||||
, Key (yep, hard to spot)
|
||||
@ Raft (need to cross water)
|
||||
<<< Water
|
||||
>>> Water (you will drown without raft)
|
||||
((( Water
|
||||
))) Water (you will drown without raft)
|
||||
$ Gold
|
||||
|
||||
Flashing Entity
|
||||
|
||||
@@ -1,34 +1,40 @@
|
||||
# PLASMA Version 2.0
|
||||
# PLASMA Version 2.1
|
||||
|
||||
Welcome to PLASMA: the Grand Unifying Platform for the Apple 1, ][, and ///.
|
||||
|
||||
Download the five disk images:
|
||||
|
||||
[PLASMA 2.0 800K Full System](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2.2mg?raw=true)
|
||||
[PLASMA 2.1 800K Full System](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1.2mg?raw=true)
|
||||
|
||||
[PLASMA 2.0 System and ProDOS Boot](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-SYS.PO?raw=true)
|
||||
[PLASMA 2.1 ProDOS Boot & Install](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-INST.po?raw=true)
|
||||
|
||||
[PLASMA 2.0 Build Tools](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-BLD.PO?raw=true)
|
||||
[PLASMA 2.1 System Libraries](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-SYS.po?raw=true)
|
||||
|
||||
[PLASMA 2.0 Demos](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-DEM.PO?raw=true)
|
||||
[PLASMA 2.1 Build Tools](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-BLD.po?raw=true)
|
||||
|
||||
[PLASMA 2.0 TCP/IP network modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-INET.PO?raw=true)
|
||||
[PLASMA 2.1 Demos](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-DEMOS.po?raw=true)
|
||||
|
||||
[PLASMA 2.0 Apple /// SOS Mame Boot and SANE floating point modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-FPSOS.PO?raw=true)
|
||||
[PLASMA 2.1 TCP/IP network modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-INET.po?raw=true)
|
||||
|
||||
[PLASMA 2.0 Alpha1 Apple /// Mame hard disk image](https://github.com/dschmenk/PLASMA/blob/master/images/apple/apple3.hd?raw=true)
|
||||
[PLASMA 2.1 Apple /// SOS Mame Boot and SANE floating point modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-FPSOS.po?raw=true)
|
||||
|
||||
PLASMA can be run from floppies, System in Drive 1, and Build or Demos in Drive 2. Mass storage is the recommended installation that looks like (replacing HARDISK with your volume name of choice):
|
||||
[PLASMA 2.1 Apple /// SOS Mame Boot](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-A3MAME.PO?raw=true)
|
||||
|
||||
System Files => /HARDISK/PLASMA/
|
||||
[PLASMA 2.1 Apple /// Mame hard disk image](https://github.com/dschmenk/PLASMA/blob/master/images/apple/apple3.hd?raw=true)
|
||||
|
||||
[PLASMA 2.1 PLFORTH stand-alone boot](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLFORTH.PO?raw=true)
|
||||
|
||||
PLASMA now has a ProDOS hard disk install script. Mass storage is the recommended installation that looks like (replacing HARDISK with your volume name of choice) if you want to copy files yourself:
|
||||
|
||||
Boot & System Files => /HARDISK/PLASMA/
|
||||
|
||||
Build Files => /HARDISK/PLASMA/BLD/
|
||||
|
||||
Demo Files => /HARDISK/PLASMA/DEMOS/
|
||||
|
||||
SANE files => /HARDISK/PLASMA/SYS
|
||||
Floating Point SANE Files => /HARDISK/PLASMA/SYS
|
||||
|
||||
INET files => /HARDDISK/PLASMA/SYS
|
||||
INET Files => /HARDDISK/PLASMA/SYS
|
||||
|
||||
Use the System Utilities to copy the floppy images into the above mentioned directories.
|
||||
|
||||
@@ -46,7 +52,7 @@ PLASMA can utilize the 16 bit features of the 65802 and 65816 processors to impr
|
||||
|
||||
## Apple ///
|
||||
|
||||
The Apple /// gets the environment it always wanted: The ability to navigate the filesystem with a command line interface. The Apple /// always boots from the floppy drive, even if a hard disk is installed. `PLASMA2-FPSOS.PO` is an Apple 3 bootable disk containing the SOS.DRIVER configured for the [Apple 3 Ready-To-Run Mame environment](https://github.com/datajerk/apple3rtr). `apple3.hd` is the pre-installed PLASMA hard disk image set up for [Apple 3 Ready-to-Run](https://github.com/datajerk/apple3rtr). For a physical Apple 3, the PLASMA2-FPSOS.PO floppy should be updated with the SOS.DRIVER configured for the machine. Once booted, type `S /HARDISK/PLASMA` (or your install directory of choice) to change to, and set, the system directory. This can be automated by creating an `AUTORUN` file on the boot floppy with the above command in it.
|
||||
The Apple /// gets the environment it always wanted: The ability to navigate the filesystem with a command line interface. The Apple /// always boots from the floppy drive, even if a hard disk is installed. `PLASMA2-A3MAME.PO` is an Apple 3 bootable disk containing the SOS.DRIVER configured for the [Apple 3 Ready-To-Run Mame environment](https://github.com/datajerk/apple3rtr). `apple3.hd` is the pre-installed PLASMA hard disk image set up for [Apple 3 Ready-to-Run](https://github.com/datajerk/apple3rtr). For a physical Apple 3, the PLASMA2-FPSOS.PO floppy should be updated with the SOS.DRIVER configured for the machine. Once booted, type `S /HARDISK/PLASMA` (or your install directory of choice) to change to, and set, the system directory. This can be automated by creating an `AUTORUN` file on the boot floppy with the above command in it.
|
||||
|
||||
## PLASMA Command Line Shell
|
||||
|
||||
|
||||
330
doc/Version 2.1.md
Normal file
330
doc/Version 2.1.md
Normal file
@@ -0,0 +1,330 @@
|
||||
# PLASMA Version 2.1
|
||||
|
||||
Welcome to PLASMA: the Grand Unifying Platform for the Apple 1, ][, and ///.
|
||||
|
||||
Download the five disk images:
|
||||
|
||||
[PLASMA 2.1 800K Full System](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1.2mg?raw=true)
|
||||
|
||||
[PLASMA 2.1 ProDOS Boot & Install](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-INST.po?raw=true)
|
||||
|
||||
[PLASMA 2.1 System Libraries](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-SYS.po?raw=true)
|
||||
|
||||
[PLASMA 2.1 Build Tools](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-BLD.po?raw=true)
|
||||
|
||||
[PLASMA 2.1 Demos](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-DEMOS.po?raw=true)
|
||||
|
||||
[PLASMA 2.1 TCP/IP network modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-INET.po?raw=true)
|
||||
|
||||
[PLASMA 2.1 Apple /// SOS and SANE floating point modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA-2.1-FPSOS.po?raw=true)
|
||||
|
||||
[PLASMA 2.1 Apple /// SOS Mame Boot](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-A3MAME.PO?raw=true)
|
||||
|
||||
[PLASMA 2.1 Apple /// Mame hard disk image](https://github.com/dschmenk/PLASMA/blob/master/images/apple/apple3.hd?raw=true)
|
||||
|
||||
[PLASMA 2.1 PLFORTH stand-alone boot](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLFORTH.PO?raw=true)
|
||||
|
||||
PLASMA now has a ProDOS hard disk install script. Mass storage is the recommended installation that looks like (replacing HARDISK with your volume name of choice) if you want to copy files yourself:
|
||||
|
||||
Boot & System Files => /HARDISK/PLASMA/
|
||||
|
||||
Build Files => /HARDISK/PLASMA/BLD/
|
||||
|
||||
Demo Files => /HARDISK/PLASMA/DEMOS/
|
||||
|
||||
Floating Point SANE Files => /HARDISK/PLASMA/SYS
|
||||
|
||||
INET Files => /HARDDISK/PLASMA/SYS
|
||||
|
||||
Use the System Utilities to copy the floppy images into the above mentioned directories.
|
||||
|
||||
## Apple 1
|
||||
|
||||
The Apple 1 is a very constrained system compared to the ][ and ///. It is required to have the CFFA1 disk adapter installed to provide file storage and a full 32K od RAM. To get the files onto the CF card required the use of [CiderPress](http://a2ciderpress.com) and they must be placed in one directory. Most PLASMA programs won't work on the Apple 1 due to limited filesystem support, video/graphics capabilities, and lack of audio output. It does, however, make a good place to start when porting PLASMA to a new platform.
|
||||
|
||||
## Apple ][
|
||||
|
||||
To boot directly into PLASMA, you will need to put the system files in the root prefix of the boot device and make sure PLASMA.SYSTEM is the first SYSTEM file in the directory. Otherwise, start PLASMA.SYSTEM from your program launcher of choice. All Apple ][ models with 64K and two floppy drives are supported up to a maxed out IIGS with accelerator and hard drive.
|
||||
|
||||
#### 65802/65816 Support
|
||||
|
||||
PLASMA can utilize the 16 bit features of the 65802 and 65816 processors to improve performance of the PLASMA VM operation. This is transparent to the programmer/user and doesn't make any additional memory or capabilities available to PLASMA. PLASMA will automatically run the most optimal VM for your configuration.
|
||||
|
||||
## Apple ///
|
||||
|
||||
The Apple /// gets the environment it always wanted: The ability to navigate the filesystem with a command line interface. The Apple /// always boots from the floppy drive, even if a hard disk is installed. `PLASMA2-A3MAME.PO` is an Apple 3 bootable disk containing the SOS.DRIVER configured for the [Apple 3 Ready-To-Run Mame environment](https://github.com/datajerk/apple3rtr). `apple3.hd` is the pre-installed PLASMA hard disk image set up for [Apple 3 Ready-to-Run](https://github.com/datajerk/apple3rtr). For a physical Apple 3, the PLASMA2-FPSOS.PO floppy should be updated with the SOS.DRIVER configured for the machine. Once booted, type `S /HARDISK/PLASMA` (or your install directory of choice) to change to, and set, the system directory. This can be automated by creating an `AUTORUN` file on the boot floppy with the above command in it.
|
||||
|
||||
## PLASMA Command Line Shell
|
||||
|
||||
PLASMA incorporates a very basic command line shell to facilitate navigating the filesystem and executing both SYSTEM/SOS programs and PLASMA modules. It has a few built-in commands:
|
||||
|
||||
| Command | Operation |
|
||||
|:----------------------------:|-------------------------|
|
||||
| C [PREFIX] | Catalog prefix
|
||||
| P \<PREFIX\> | change to Prefix
|
||||
| / | change to parent prefix
|
||||
| V | show online Volumes
|
||||
| S \<PREFIX\> | set System prefix*
|
||||
| +SOS \<SOS.INTERP\> [PREFIX] | launch SOS interpreter*
|
||||
| -\<SYSTEM PROGRAM\> [PARAMS] | launch SYSTEM program**
|
||||
| +\<PLASMA MODULE\> [PARAMS] | exec PLASMA module
|
||||
```
|
||||
[Optional parameters]
|
||||
<Required parameters>
|
||||
* Apple /// only
|
||||
** Apple ][ only
|
||||
```
|
||||
|
||||
The shell is very brief with error messages. It is meant solely as a way to run programs that accept command line parameters and take up as little memory as possible. It does, however, provide a rich runtime for PLASMA modules.
|
||||
|
||||
## Included Modules
|
||||
|
||||
PLASMA comes with many library modules used by the tools, demos and sample code. The PLASMA system volume must remain in place for the duration of PLASMAs run otherwise it won't be able to find CMD or the system libraries. Probably the most useful included module is the editor. It is used for editing PLASMA source file, assembly source files, or any text file. Execute it with:
|
||||
```
|
||||
+ED [TEXT FILE] [GOTO LINE NUMBER]
|
||||
```
|
||||
The file manipulation utilities to copy, delete, rename, create directories, and change file type and aux type remove the need for external programs to do the same. PLASMA can now be installed with the tools included on the PLASMA2-SYS boot floppy. They are:
|
||||
```
|
||||
+COPY [-R] <SRCPATH>+ <DSTPATH>
|
||||
+DEL [-R] <FILEPATH>
|
||||
+REN <FILENAME> <NEWNAME>
|
||||
+NEWDIR <NEWDIRECTORY>
|
||||
+TYPE <FILENAME> [NEWTYPE [NEWAUX]]
|
||||
+CAT [-R] <FILEPATH]
|
||||
```
|
||||
The ```-R``` option will operate on the directories recursively. Wildcard filenames can be specified with ```'*'``` matching zero or more characters, and ```'?'``` matching any character. When copying files to the current directory, ```=``` can be used as a shortcut.
|
||||
|
||||
## Compiler Modules
|
||||
|
||||
The build disk includes sample source, include files for the system modules, and the PLASMA compiler+optimizer modules. The compiler is invoked with:
|
||||
```
|
||||
+PLASM [-[W][O[2]] <SOURCE FILE> [OUTPUT FILE]
|
||||
```
|
||||
Compiler warnings are enabled with `-W`. The optional optimizer is enabled with `-O` and extra optimizations are enabled with `-O2`. The source code for a few sample programs are included. The big one, `RPNCALC.PLA`, is the sample RPN calculator that uses many of PLASMA's advanced features. The self-hosted compiler is the same compiler as the cross-compiler, just transcribed from C to PLASMA (yes, the self-hosted PLASMA compiler is written in PLASMA). It requires patience when compiling: it is a fairly large and extensive program.
|
||||
|
||||
## FORTH Module
|
||||
|
||||
New for version 2.1 is a FORTH language module capable of interpreting script files and interactive programming. Further documentation here: https://github.com/dschmenk/PLASMA/blob/master/doc/PLFORTH.md. Samples scripts are in /HARDISK/BLD/SCRIPTS
|
||||
|
||||
## Demos
|
||||
|
||||
There are some demo programs included for your perusal. Check out `ROGUE` for some diversion. You can find the documentation here: https://github.com/dschmenk/PLASMA/blob/master/doc/Rogue%20Instructions.md. A music sequencer to play through a MockingBoard if it is detected, or the built-in speaker if not. A minimal Web server if you have an Uthernet2 card (required). Try `SPIDERS`for some hires shoot'em-up action. Bug reports appreciated.
|
||||
|
||||
## Source Code
|
||||
|
||||
Most sample source code is included from the project. They build without alteration and should be a good starting point for further explorations. The header files for the included library modules are in the INC directory.
|
||||
|
||||
## Video Playlist
|
||||
|
||||
There is a [YouTube playlist](https://www.youtube.com/playlist?list=PLlPKgUMQbJ79VJvZRfv1CJQf4SP2Gw3yU) created for learning PLASMA.
|
||||
|
||||
## Issues
|
||||
|
||||
- All the modules and runtime are written mostly in PLASMA; the compiler and editor as well. This means that there may be some startup delay as the PLASMA module loader reads in the module dependencies and performs dynamic linking. But a 1 MHz, 8 bit CPU interpreting bytecodes is never going to match a modern computer. As noted earlier, an accelerator and mass storage are your (and PLASMA's) friend.
|
||||
|
||||
- All the project modules are included. They have been lightly tested.
|
||||
|
||||
- The Apple /// may not always report errors properly or at all.
|
||||
|
||||
- The documentation is sparse and incomplete. Yep, could use your help...
|
||||
|
||||
# Changes in PLASMA for 2.1 Release
|
||||
|
||||
1. Lots of small bug fixes in floating point, file copy and graphics libraries
|
||||
|
||||
2. MULT opcode speedup improvements
|
||||
|
||||
3. Overhaul 65802/65814 VM for better speed and compatibility with PLFORTH compilation
|
||||
|
||||
4. Many Apple /// improvements and bug fixes
|
||||
|
||||
5. Low memory fixes and tests
|
||||
|
||||
6. FORTH language support as a PLASMA module. Full accessabilit to PLASMA modules and libraries
|
||||
|
||||
7. Install script for ProDOS mass storage
|
||||
|
||||
# Changes in PLASMA for 2.0 Release
|
||||
|
||||
1. Fix command line buffer overflow
|
||||
|
||||
2. Use VBlank to blink editor cursor so not CPU speed dependent
|
||||
|
||||
3. Add ```=``` for ```+COPY``` current destination
|
||||
|
||||
4. Add //c support for DGRLIB and GRLIB wait-for-VBlank routines
|
||||
|
||||
# Changes in PLASMA for 2.0 Beta
|
||||
|
||||
1. Compilers allows for including self imported defines
|
||||
|
||||
2. Compilers fixed for local constants
|
||||
|
||||
3. Floating point string formatting fixes and improvements
|
||||
|
||||
4. Fiber library exports number of active fibers
|
||||
|
||||
# Changes in PLASMA for 2.0 Alpha 2
|
||||
|
||||
1. Self hosted compiler fixes for invalid array size constants
|
||||
|
||||
2. Ensure IDs in self hosted compiler are 31 characters significant
|
||||
|
||||
3. Fix bug COPY file parsing and move common routine into MATCHFILES
|
||||
|
||||
# Changes in PLASMA for 2.0 Alpha 1
|
||||
|
||||
1. Improved entry/exit for 128K Apple IIe //c
|
||||
|
||||
2. Improved entry for Apple ///
|
||||
|
||||
3. Improved entry and function calls for 16 bit VM
|
||||
|
||||
# Changes in PLASMA for 2.0 DP 4
|
||||
|
||||
1. Improved editor auto-indenting
|
||||
|
||||
2. Compiler fix for terneray operator precedence
|
||||
|
||||
3. Machine check for HGR library
|
||||
|
||||
# Changes in PLASMA for 2.0 DP 3
|
||||
|
||||
1. File manipulation utilities fixed for Apple /// SOS vs ProDOS differences
|
||||
|
||||
2. More optimizations for HiRes graphics libraries
|
||||
|
||||
3. Spiders From Mars hires demo game
|
||||
|
||||
# Changes in PLASMA for 2.0 DP 2
|
||||
|
||||
1. Many file manipulaition utilities (COPY, REName, NEWDIRectory, DELete, CATalog, TYPE)
|
||||
|
||||
2. New and updated libraries for lo-res. double lo-res and hi-res graphics w/ sprites
|
||||
|
||||
3. 32 bit integer library for those times when 16 bits just isn't enough
|
||||
|
||||
4. Apple /// improvements to other SOS.INTERP launching with SOS utility
|
||||
|
||||
5. Apple /// JIT VM for speed and non JIT version to free up global memory
|
||||
|
||||
6. Editor improvements
|
||||
|
||||
7. A couple small compiler optimizations
|
||||
|
||||
8. Needed to break out TCP/IP modules into seperate floppy image
|
||||
|
||||
9. Library changes require full install
|
||||
|
||||
# Changes in PLASMA for 2.0 DP 1z
|
||||
|
||||
1. Many fixes for the value zero - especially in 65802/65816 divide routine
|
||||
|
||||
# Changes in PLASMA for 2.0 DP 1 E+C
|
||||
|
||||
1. Greatly improved code editor and additional compiler stats
|
||||
|
||||
# Changes in PLASMA for 2.0 DP 1a
|
||||
|
||||
1. Fix interaction with JIT compiler and module load/unload
|
||||
|
||||
# Changes in PLASMA for 2.0 DP 1
|
||||
|
||||
1. Expanded bytecode for more efficient size/performance of programs
|
||||
|
||||
2. Just-In-Time Compiler for native code performance (6502 and 65816) for frequently called routines
|
||||
|
||||
3. Automatically identify and run most optimal VM for configuration
|
||||
|
||||
# Changes in PLASMA for 1.2
|
||||
|
||||
1. Add TFTPD TFTP server
|
||||
|
||||
2. Fix Uthernet 1 driver
|
||||
|
||||
3. Add mouse module
|
||||
|
||||
4. Fix IRQ issues for interrupt driven mouse driver
|
||||
|
||||
# Changes in PLASMA for 1.1
|
||||
|
||||
1. All known bugs are fixed
|
||||
|
||||
2. PLASM compiler received a little performance boost with an assembly language helper for ID/keyword lexical scanner
|
||||
|
||||
# Changes in PLASMA for 1.0
|
||||
|
||||
If you have been programming in PLASMA before, the 1.0 version has some major and minor changes that you should be aware of:
|
||||
|
||||
1. Case is no longer significant. Imported symbols were always upper case. Now, all symbols are treated as if they were upper case. You may find that some symbols clash with previously defined symbols of different case. Hey, we didn't need lower case in 1977 and we don't need it now. You kids, get off my lawn!
|
||||
|
||||
2. Modules are now first class citizens. Translation: importing a module adds a symbol with the module name. You can simply refer to a module's address with it's name. This is how a module's API table is accessed (instead of adding a variable of the same name in the IMPORT section).
|
||||
|
||||
3. Bytecode changes means previously compiled modules will crash. Rebuild.
|
||||
|
||||
4. `BYTE` and `WORD` have aliases that may improve readability of the code. `CHAR` (character) and `RES` (reserve) are synonyms for `BYTE`. `VAR` (variable) is a synonym for `WORD`. These aliases add no functionality. They are simply syntactic sugar to add context to the source code, but may cause problems if you've previously used the same names for identifiers.
|
||||
|
||||
5. When declaring variables, a base size can come after the type, and an array size can folllow the identifier. For instance:
|
||||
```
|
||||
res[10] a, b, c
|
||||
```
|
||||
will reserve three variables of 10 bytes each. Additionally:
|
||||
```
|
||||
res[10] v[5], w[3]
|
||||
```
|
||||
will reserve a total of 80 bytes (10 * 5 + 10 * 3). This would be useful when combined with a structure definition. One could:
|
||||
```
|
||||
res[t_record] patients[20]
|
||||
```
|
||||
to reserve an array of 20 patient records.
|
||||
|
||||
6. Ternary operator. Just like C and descendants, `??` and `::` allow for an if-then-else inside an expression:
|
||||
```
|
||||
puts(truth == TRUE ?? "TRUE" :: "FALSE")
|
||||
```
|
||||
|
||||
7. Multiple value assignements. Multiple values can be returned from functions and listed on variable assignments:
|
||||
```
|
||||
def func#3 // Return 3 values
|
||||
return 10, 20, 30
|
||||
end
|
||||
|
||||
a, b, c = 1, 2, 3
|
||||
c, d, f = func()
|
||||
x, y = y, x // Swap x and y
|
||||
```
|
||||
|
||||
8. `DROP` allows for explicit dropping of values. In the above `func()` example, if the middle value was the only one desired, the others can be ignored with:
|
||||
```
|
||||
drop, h, drop = func()
|
||||
```
|
||||
|
||||
9. The compiler tracks parameter and return counts for functions. If the above `func()` were used without assigning all the return values, they would be dropped:
|
||||
```
|
||||
a = func() // Two values silently dropped
|
||||
```
|
||||
To generate compiler warning for this issue, and a few others, use the `-W` option when compiling.
|
||||
|
||||
10. Lambda (Anonymous) Functions. The ability to code a quick function in-line can be very powerful when used properly. Look here, https://en.wikipedia.org/wiki/Anonymous_function, for more information.
|
||||
|
||||
11. SANE (Standard Apple Numerics Environment) Floating Point Library. An extensive library (two, actually) of extended floating point (80 bit IEEE precision) functionality is suported. A wrapper library has been written to greatly simplify the interface to SANE. Look at the `RPNCALC.PLA` source code as an example.
|
||||
|
||||
12. Library Documentation. Preliminary documentation is available on the Wiki: https://github.com/dschmenk/PLASMA/wiki
|
||||
|
||||
13. Significant effort has gone into VM tuning and speeding up module loading/dynamic linking.
|
||||
|
||||
14. The VM zero page usage has changed. If you write assembly language routines, you will need to rebuild.
|
||||
|
||||
# Thanks
|
||||
|
||||
I wish to thank the people who have contributed the the PLASMA project. They have greatly improved the development of the language and documentation:
|
||||
|
||||
- Martin Haye: PLASMA programmer extraordinaire. Mr. Lawless Legends has requested many of the crucial features that set PLASMA apart.
|
||||
- Steve F (ZornsLemma): Has taken the optimizer to new levels and his work on porting PLASMA to the Beeb are amazing: http://stardot.org.uk/forums/viewtopic.php?f=55&t=12306&sid=5a503c593f0698ebc31e590ac61b09fc
|
||||
- Peter Ferrie: Assembly optimizer extraordinaire. He has made significant improvements into the code footprint in PLASMA so all the functionality can exist in just a few bytes.
|
||||
- David Schmidt (DaveX): His help in documentation have made it much more accessible and professional. Of course any errors are all his. Just kidding, they're mine ;-)
|
||||
- Andy Werner (6502.org): Catching the grammatical errors that I ain't no good at.
|
||||
- John Brooks: Apple II Guru par excellence. His insights got 10% performance increase out of the VM.
|
||||
|
||||
Dave Schmenk
|
||||
http://schmenk.is-a-geek.com
|
||||
BIN
doc/forthwords.png
Normal file
BIN
doc/forthwords.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
images/apple/BLANK140.po
Executable file
BIN
images/apple/BLANK140.po
Executable file
Binary file not shown.
BIN
images/apple/BLANK800.po
Normal file
BIN
images/apple/BLANK800.po
Normal file
Binary file not shown.
BIN
images/apple/PLASMA-2.1-BLD.po
Normal file
BIN
images/apple/PLASMA-2.1-BLD.po
Normal file
Binary file not shown.
BIN
images/apple/PLASMA-2.1-DEMOS.po
Normal file
BIN
images/apple/PLASMA-2.1-DEMOS.po
Normal file
Binary file not shown.
BIN
images/apple/PLASMA-2.1-FPSOS.po
Normal file
BIN
images/apple/PLASMA-2.1-FPSOS.po
Normal file
Binary file not shown.
BIN
images/apple/PLASMA-2.1-INET.po
Normal file
BIN
images/apple/PLASMA-2.1-INET.po
Normal file
Binary file not shown.
BIN
images/apple/PLASMA-2.1-INST.po
Normal file
BIN
images/apple/PLASMA-2.1-INST.po
Normal file
Binary file not shown.
BIN
images/apple/PLASMA-2.1-SYS.po
Normal file
BIN
images/apple/PLASMA-2.1-SYS.po
Normal file
Binary file not shown.
BIN
images/apple/PLASMA-2.1.po
Normal file
BIN
images/apple/PLASMA-2.1.po
Normal file
Binary file not shown.
BIN
images/apple/PLASMA2-A3MAME.PO
Normal file
BIN
images/apple/PLASMA2-A3MAME.PO
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
images/apple/PLFORTH.PO
Normal file
BIN
images/apple/PLFORTH.PO
Normal file
Binary file not shown.
BIN
images/apple/ROGUE.PO
Executable file
BIN
images/apple/ROGUE.PO
Executable file
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,7 @@ import cmdsys
|
||||
//
|
||||
// Useful values for everyone
|
||||
//
|
||||
const _SYSVER_ = $0200 // Version built against
|
||||
const _SYSVER_ = $0210 // Version built against
|
||||
const FALSE = 0
|
||||
const TRUE = not FALSE
|
||||
const NULL = 0
|
||||
@@ -11,7 +11,7 @@ import cmdsys
|
||||
//
|
||||
const MACHID_CLOCK = $01
|
||||
const MACHID_80COL = $02
|
||||
const MACHID_MEM = $03
|
||||
const MACHID_MEM = $30
|
||||
const MACHID_64K = $20
|
||||
const MACHID_128K = $30
|
||||
const MACHID_MODEL = $C8
|
||||
@@ -54,8 +54,10 @@ import cmdsys
|
||||
byte syserr
|
||||
byte jitcount
|
||||
byte jitsize
|
||||
byte refcons // Apple /// specific
|
||||
byte devcons // Apple /// specific
|
||||
word sysexec[] // Apple II specific
|
||||
byte refcons // Apple /// specific
|
||||
byte devcons // Apple /// specific
|
||||
word lookupsym
|
||||
end
|
||||
//
|
||||
// CMD exported functions
|
||||
|
||||
@@ -13,4 +13,7 @@ import dgrlib
|
||||
predef dgrSwap#0
|
||||
predef dgrDrawBuf(page)#0
|
||||
predef dgrColor(clr)#0
|
||||
const dgrPage1 = 0
|
||||
const dgrPage2 = 1
|
||||
const dgrOff = -1
|
||||
end
|
||||
|
||||
@@ -13,4 +13,7 @@ import grlib
|
||||
predef grSwap#0
|
||||
predef grDrawBuf(page)#0
|
||||
predef grColor(clr)#0
|
||||
const grPage1 = 0
|
||||
const grPage2 = 1
|
||||
const grOff = -1
|
||||
end
|
||||
|
||||
@@ -21,4 +21,7 @@ import hgrlib
|
||||
predef hgrSwap#1
|
||||
predef hgrDrawBuf(page)#1
|
||||
predef hgrColor(clr)#0
|
||||
const hgrPage1 = 0
|
||||
const hgrPage2 = 1
|
||||
const hgrOff = -1
|
||||
end
|
||||
|
||||
@@ -5,9 +5,5 @@ import hgrtile
|
||||
predef tileAndDraw(x, y, tileptr)#0
|
||||
predef tileDrawStr(x, y, strptr, strlen, tileset)#0
|
||||
predef tileFromText(txtpage, tileset)#0
|
||||
predef tileMode(mode)#1
|
||||
predef tileClear#0
|
||||
predef tileShow(page)#1
|
||||
predef tileSwap#1
|
||||
predef tileDrawBuf(page)#1
|
||||
end
|
||||
|
||||
@@ -80,6 +80,7 @@ word = $0850,$08D0,$0950,$09D0,$0A50,$0AD0,$0B50,$0BD0
|
||||
byte textbwmode[] = 2, 16, 0
|
||||
byte textclrmode[] = 2, 16, 1
|
||||
byte grcharset[] = 1, 0, $7F, $7F, $7F, $7F, $00, $00, $00, $00
|
||||
byte a3keyqueue = 0
|
||||
//
|
||||
// Random number for Apple 1 and III.
|
||||
//
|
||||
@@ -151,7 +152,13 @@ end
|
||||
// Apple 1 routines.
|
||||
//
|
||||
def a1keypressed
|
||||
return ^$D011 >= 128
|
||||
return ^$D011 >= 128 ?? ^$D011 :: 0
|
||||
end
|
||||
def a1getkey
|
||||
while not a1keypressed
|
||||
randnum = randnum + 123
|
||||
loop
|
||||
return getc()
|
||||
end
|
||||
def a12echo(state)
|
||||
return 0
|
||||
@@ -198,7 +205,7 @@ end
|
||||
// Apple II routines.
|
||||
//
|
||||
def a2keypressed
|
||||
return ^keyboard >= 128
|
||||
return ^keyboard >= 128 ?? ^keyboard :: 0
|
||||
end
|
||||
def a2home
|
||||
//curshpos = 0
|
||||
@@ -221,7 +228,7 @@ def a2viewport(left, top, width, height)
|
||||
^$20 = left
|
||||
^$21 = width
|
||||
^$22 = top
|
||||
^$23 = height + top - 1
|
||||
^$23 = height + top
|
||||
return a2gotoxy(0, 0)
|
||||
end
|
||||
def a2texttype(type)
|
||||
@@ -278,8 +285,22 @@ def dev_status(devnum, code, list)
|
||||
end
|
||||
def a3keypressed
|
||||
byte count
|
||||
|
||||
dev_status(cmdsys.devcons, 5, @count)
|
||||
return count
|
||||
if count
|
||||
a3keyqueue = getc
|
||||
fin
|
||||
return a3keyqueue ?? a3keyqueue | $80 :: 0
|
||||
end
|
||||
def a3getkey
|
||||
byte keycode
|
||||
repeat
|
||||
randnum = randnum + 123
|
||||
a3keypressed
|
||||
keycode = a3keyqueue
|
||||
until keycode
|
||||
a3keyqueue = 0
|
||||
return keycode
|
||||
end
|
||||
def a3echo(state)
|
||||
return dev_control(cmdsys.devcons, 11, @state)
|
||||
@@ -362,12 +383,6 @@ end
|
||||
//
|
||||
// Apple 1 and III combined routines.
|
||||
//
|
||||
def a13getkey
|
||||
while not conio:keypressed()
|
||||
randnum = randnum + 123
|
||||
loop
|
||||
return getc()
|
||||
end
|
||||
def a13rnd
|
||||
randnum = (randnum << 1) + randnum + 123
|
||||
return randnum & $7FFF
|
||||
@@ -378,7 +393,7 @@ end
|
||||
when MACHID & MACHID_MODEL
|
||||
is MACHID_III
|
||||
conio:keypressed = @a3keypressed
|
||||
conio:getkey = @a13getkey
|
||||
conio:getkey = @a3getkey
|
||||
conio:echo = @a3echo
|
||||
conio:home = @a3home
|
||||
conio:gotoxy = @a3gotoxy
|
||||
@@ -391,7 +406,7 @@ when MACHID & MACHID_MODEL
|
||||
break
|
||||
is MACHID_I
|
||||
conio:keypressed = @a1keypressed
|
||||
conio:getkey = @a13getkey
|
||||
conio:getkey = @a1getkey
|
||||
conio:home = @a1home
|
||||
conio:gotoxy = @a1gotoxy
|
||||
conio:viewport = @a1viewport
|
||||
@@ -403,4 +418,8 @@ when MACHID & MACHID_MODEL
|
||||
break
|
||||
otherwise // MACHID_II puts("Found MACHID_MODEL = $"); putb(MACHID & MACHID_MODEL); putln
|
||||
wend
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -52,10 +52,10 @@ end
|
||||
//
|
||||
export asm dgrPlot(x, y)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA SRCL
|
||||
LDA $3001
|
||||
STA SRCH
|
||||
STA SRCH
|
||||
STX ESP
|
||||
LDA ESTKL,X ; Y COORD
|
||||
AND #$FE
|
||||
@@ -84,10 +84,10 @@ end
|
||||
//
|
||||
export asm dgrHLin(x1, x2, y)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA SRCL
|
||||
LDA $3001
|
||||
STA SRCH
|
||||
STA SRCH
|
||||
STX ESP
|
||||
LDA ESTKL+1,X ; X2 COORD
|
||||
STA TMPH
|
||||
@@ -126,10 +126,10 @@ end
|
||||
//
|
||||
export asm dgrVLin(y1, y2, x)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA SRCL
|
||||
LDA $3001
|
||||
STA SRCH
|
||||
STA SRCH
|
||||
STX ESP
|
||||
LDA ESTKL+2,X ; Y1 COORD
|
||||
PHP
|
||||
@@ -165,10 +165,10 @@ end
|
||||
//
|
||||
export asm dgrBLT(x, y, width, height, src)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA DSTL
|
||||
LDA $3001
|
||||
STA DSTH
|
||||
STA DSTH
|
||||
LDA ESTKL,X ; SPRITE
|
||||
STA SRCL
|
||||
LDA ESTKH,X
|
||||
@@ -325,10 +325,10 @@ end
|
||||
//
|
||||
export asm dgrTile(x, y, src)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA DSTL
|
||||
LDA $3001
|
||||
STA DSTH
|
||||
STA DSTH
|
||||
STX ESP
|
||||
LDA ESTKL,X ; TILE
|
||||
STA SRCL
|
||||
@@ -520,32 +520,48 @@ export def dgrClear(clr)#0
|
||||
dgrFill(0, 0, @clrtile)
|
||||
end
|
||||
export def dgrMode(mode)#1
|
||||
if mode
|
||||
//
|
||||
// Set double lores graphics, return draw buffer
|
||||
//
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show80 = 0
|
||||
^an3on
|
||||
drawpage = 1
|
||||
drawbuff = dgrbuff[1]
|
||||
return 1
|
||||
fin
|
||||
//
|
||||
// Set text mode
|
||||
//
|
||||
^showtext
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
call($FC58, 0, 0, 0, 0) // home()
|
||||
return 0
|
||||
when mode
|
||||
is page1
|
||||
//
|
||||
// Set double lores graphics, return draw buffer
|
||||
//
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show80 = 0
|
||||
^an3on
|
||||
drawpage = page2
|
||||
drawbuff = dgrbuff[page2]
|
||||
break
|
||||
is page2
|
||||
//
|
||||
// Set double lores graphics, return draw buffer
|
||||
//
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show80 = 0
|
||||
^an3on
|
||||
drawpage = page1
|
||||
drawbuff = dgrbuff[page1]
|
||||
break
|
||||
otherwise
|
||||
//
|
||||
// Set text mode
|
||||
//
|
||||
^showtext
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
call($FC58, 0, 0, 0, 0) // home()
|
||||
wend
|
||||
return mode
|
||||
end
|
||||
//
|
||||
// Set display page, return other page
|
||||
@@ -607,4 +623,8 @@ dgrTile:1 = @drawbuff
|
||||
dgrTile:6 = @drawbuff+1
|
||||
// Put read AUX mem routine in scary location
|
||||
memcpy($0100, @auxRead, 9)
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -23,14 +23,14 @@ const sysbuf = $0800
|
||||
//
|
||||
// External interface
|
||||
//
|
||||
predef a2getpfx(path), a23setpfx(path), a2getfileinfo(path, fileinfo), a2setfileinfo(path, fileinfo), a23geteof(refnum)#2, a23seteof(refnum, eofl, eofh), a2iobufs(iobufs), a2open(path), a2close(refnum)
|
||||
predef a2getpfx(path), a2setpfx(path), a2getfileinfo(path, fileinfo), a2setfileinfo(path, fileinfo), a23geteof(refnum)#2, a23seteof(refnum, eofl, eofh), a2iobufs(iobufs), a2open(path), a2close(refnum)
|
||||
predef a23read(refnum, buf, len), a2write(refnum, buf, len), a2create(path, type, aux), a23destroy(path), a23rename(path, newpath)
|
||||
predef a2newline(refnum, emask, nlchar), a2online(unit, buf), a2readblock(unit, buf, block), a2writeblock(unit, buf, block)
|
||||
//
|
||||
// Exported function table.
|
||||
//
|
||||
word fileio[]
|
||||
word = @a2getpfx, @a23setpfx, @a2getfileinfo, @a2setfileinfo, @a23geteof, @a23seteof, @a2iobufs, @a2open, @a2close
|
||||
word = @a2getpfx, @a2setpfx, @a2getfileinfo, @a2setfileinfo, @a23geteof, @a23seteof, @a2iobufs, @a2open, @a2close
|
||||
word = @a23read, @a2write, @a2create, @a23destroy, @a23rename
|
||||
word = @a2newline, @a2online, @a2readblock, @a2writeblock
|
||||
//
|
||||
@@ -60,7 +60,7 @@ def a2getpfx(path)
|
||||
return path
|
||||
end
|
||||
def a3getpfx(path)
|
||||
byte params[3]
|
||||
byte params[4]
|
||||
|
||||
params.0 = 2
|
||||
params:1 = path
|
||||
@@ -71,7 +71,7 @@ end
|
||||
def a1setpfx(path)
|
||||
return path
|
||||
end
|
||||
def a23setpfx(path)
|
||||
def a2setpfx(path)
|
||||
byte params[3]
|
||||
|
||||
params.0 = 1
|
||||
@@ -79,6 +79,29 @@ def a23setpfx(path)
|
||||
perr = syscall($C6, @params)
|
||||
return path
|
||||
end
|
||||
def a3setpfx(path)
|
||||
byte params[6]
|
||||
byte fileinfo[2]
|
||||
char fullpath[65]
|
||||
|
||||
if ^path and ^(path + 1) <> '/' and ^(path + 1) <> '.'
|
||||
a3getpfx(@fullpath)
|
||||
strcat(@fullpath, path)
|
||||
path = @fullpath
|
||||
fin
|
||||
params.0 = 3
|
||||
params:1 = path
|
||||
params:3 = @fileinfo
|
||||
params.5 = 2
|
||||
if not syscall($C4, @params) and (fileinfo.1 == $00 or fileinfo.1 == $0F) // Make sure it's a directory
|
||||
params.0 = 1
|
||||
params:1 = path
|
||||
syscall($C6, @params)
|
||||
else
|
||||
a3getpfx(path) // Get current path
|
||||
fin
|
||||
return path
|
||||
end
|
||||
def a1getfileinfo(path, fileinfo)
|
||||
perr = $01
|
||||
return perr
|
||||
@@ -191,7 +214,7 @@ end
|
||||
def a2open(path)
|
||||
byte i, params[6]
|
||||
|
||||
for i = 0 to MAX_IOBUFS-1
|
||||
for i = MAX_IOBUFS-1 downto 0
|
||||
if iobuf_addr[i] and not iobuf_ref[i]
|
||||
params.0 = 3
|
||||
params:1 = path
|
||||
@@ -221,7 +244,7 @@ end
|
||||
def a2close(refnum)
|
||||
byte i, params[2]
|
||||
|
||||
for i = 0 to MAX_IOBUFS-1
|
||||
for i = MAX_IOBUFS-1 downto 0
|
||||
if refnum == iobuf_ref[i]
|
||||
iobuf_ref[i] = 0
|
||||
params.0 = 1
|
||||
@@ -445,6 +468,7 @@ end
|
||||
when MACHID & MACHID_MODEL
|
||||
is MACHID_III
|
||||
fileio:getpfx = @a3getpfx
|
||||
fileio:setpfx = @a3setpfx
|
||||
fileio:getfileinfo = @a3getfileinfo
|
||||
fileio:setfileinfo = @a3setfileinfo
|
||||
fileio:iobufalloc = @a13iobufs
|
||||
@@ -479,4 +503,8 @@ when MACHID & MACHID_MODEL
|
||||
break
|
||||
otherwise // Apple ][
|
||||
wend
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -2,6 +2,7 @@ include "inc/cmdsys.plh"
|
||||
|
||||
byte gfxref, gfxseg
|
||||
byte params[8], cmd[16]
|
||||
byte textmode[] = 16, 0, 15
|
||||
|
||||
export def pencolor(clr)#0
|
||||
params:4 = 2
|
||||
@@ -112,6 +113,31 @@ export def drawmode(mode)#0
|
||||
syscall($CB, @params)
|
||||
end
|
||||
|
||||
def gfxopen#1
|
||||
//
|
||||
// Allocate bank 0
|
||||
//
|
||||
params.0 = 4
|
||||
params:1 = $2000
|
||||
params:3 = $9F00
|
||||
params.5 = $10
|
||||
params.6 = $00
|
||||
syscall($40, @params)
|
||||
gfxseg = params.6
|
||||
^$1907 = $80 // Set graphics pages allocated
|
||||
//
|
||||
// Open graphics driver
|
||||
//
|
||||
params.0 = 4
|
||||
params:1 = ".GRAFIX"
|
||||
params.3 = 0
|
||||
params:4 = 0
|
||||
params.6 = 0
|
||||
syscall($C8, @params)
|
||||
gfxref = params.3
|
||||
return gfxref <> 0
|
||||
end
|
||||
|
||||
export def setmode(mode)#0
|
||||
if mode < 0
|
||||
//
|
||||
@@ -122,15 +148,19 @@ export def setmode(mode)#0
|
||||
syscall($CC, @params)
|
||||
gfxref = 0
|
||||
//
|
||||
// Deaalocate bank 0
|
||||
// Deallocate bank 0
|
||||
//
|
||||
params.0 = 1
|
||||
params.1 = gfxseg
|
||||
syscall($45, @params)
|
||||
^$1907 = $00 // Unset graphics pages allocated
|
||||
fin
|
||||
if not gfxref
|
||||
//
|
||||
// Reset textmode
|
||||
//
|
||||
cmdsys:syswrite(cmdsys.refcons, @textmode, 3)
|
||||
return
|
||||
elsif not gfxref
|
||||
gfxopen
|
||||
fin
|
||||
params.0 = 3
|
||||
params.1 = gfxref
|
||||
@@ -151,24 +181,7 @@ if MACHID <> $F2
|
||||
return -1
|
||||
fin
|
||||
//
|
||||
// Allocate bank 0
|
||||
// Keep module in memory
|
||||
//
|
||||
params.0 = 4
|
||||
params:1 = $2000
|
||||
params:3 = $9F00
|
||||
params.5 = $10
|
||||
params.6 = $00
|
||||
syscall($40, @params)
|
||||
gfxseg = params.6
|
||||
^$1907 = $80 // Set graphics pages allocated
|
||||
//
|
||||
// Open graphics driver
|
||||
//
|
||||
params.0 = 4
|
||||
params:1 = ".GRAFIX"
|
||||
params.3 = 0
|
||||
params:4 = 0
|
||||
params.6 = 0
|
||||
syscall($C8, @params)
|
||||
gfxref = params.3
|
||||
return gfxopen ?? modkeep :: -1
|
||||
done
|
||||
|
||||
@@ -45,10 +45,10 @@ end
|
||||
//
|
||||
export asm grPlot(x, y)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA SRCL
|
||||
LDA $3001
|
||||
STA SRCH
|
||||
STA SRCH
|
||||
LDA ESTKL,X ; Y COORD
|
||||
AND #$FE
|
||||
TAY
|
||||
@@ -78,10 +78,10 @@ end
|
||||
//
|
||||
export asm grHLin(x1, x2, y)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA SRCL
|
||||
LDA $3001
|
||||
STA SRCH
|
||||
STA SRCH
|
||||
LDA ESTKL+1,X ; X2 COORD
|
||||
STA TMPH
|
||||
LDA ESTKL+0,X ; Y COORD
|
||||
@@ -120,10 +120,10 @@ end
|
||||
//
|
||||
export asm grVLin(y1, y2, x)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA SRCL
|
||||
LDA $3001
|
||||
STA SRCH
|
||||
STA SRCH
|
||||
LDA ESTKL+2,X ; Y1 COORD
|
||||
- AND #$FE
|
||||
TAY
|
||||
@@ -160,10 +160,10 @@ end
|
||||
//
|
||||
export asm grBLT(x, y, width, height, src)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA DSTL
|
||||
LDA $3001
|
||||
STA DSTH
|
||||
STA DSTH
|
||||
LDA ESTKL,X ; SPRITE
|
||||
STA SRCL
|
||||
LDA ESTKH,X
|
||||
@@ -252,10 +252,10 @@ end
|
||||
//
|
||||
export asm grTile(x, y, src)#0
|
||||
; GET ROW BUFFER ADDRESSES
|
||||
LDA $3000
|
||||
LDA $3000
|
||||
STA DSTL
|
||||
LDA $3001
|
||||
STA DSTH
|
||||
STA DSTH
|
||||
STX ESP
|
||||
LDA ESTKL,X ; TILE
|
||||
STA SRCL
|
||||
@@ -443,33 +443,50 @@ end
|
||||
// Set lores graphics, return draw buffer
|
||||
//
|
||||
export def grMode(mode)#1
|
||||
if mode
|
||||
//
|
||||
// Set GR mode
|
||||
//
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
drawpage = 1
|
||||
drawbuff = grbuff[1]
|
||||
return 1
|
||||
fin
|
||||
//
|
||||
// Set text mode
|
||||
//
|
||||
^showtext
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
call($FC58, 0, 0, 0, 0) // home()
|
||||
return 0
|
||||
when mode
|
||||
is page1
|
||||
//
|
||||
// Set GR mode
|
||||
//
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
drawpage = page2
|
||||
drawbuff = grbuff[page2]
|
||||
break
|
||||
is page2
|
||||
//
|
||||
// Set GR mode
|
||||
//
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage2
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
drawpage = page1
|
||||
drawbuff = grbuff[page1]
|
||||
break
|
||||
otherwise
|
||||
//
|
||||
// Set text mode
|
||||
//
|
||||
^showtext
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
call($FC58, 0, 0, 0, 0) // home()
|
||||
wend
|
||||
return mode
|
||||
end
|
||||
//
|
||||
// Set display page, return other page
|
||||
@@ -513,4 +530,8 @@ grBLT:1 = @drawbuff
|
||||
grBLT:6 = @drawbuff+1
|
||||
grTile:1 = @drawbuff
|
||||
grTile:6 = @drawbuff+1
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/hgrtile.plh"
|
||||
//
|
||||
// Apple //e hires character font
|
||||
@@ -137,4 +138,8 @@ byte = $00,$2C,$1A,$00,$00,$00,$00,$00,$00,$2A,$14,$2A,$14,$2A,$00,$00
|
||||
export def hgrPutStr(x, y, strptr)#0
|
||||
tileDrawStr(x, y, strptr + 1, ^strptr, @hgrFont + 1024) // Offset into regular char
|
||||
end
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -121,7 +121,7 @@ export asm divmod7(x)#2
|
||||
BCC +
|
||||
LDY #40 ; > 512 SO CLIP AT MAX
|
||||
LDA #00
|
||||
BEQ +++
|
||||
BEQ +++
|
||||
+ CMP #140
|
||||
BCC +
|
||||
++ SEC
|
||||
@@ -332,7 +332,7 @@ export asm hgrCopySrc(ofst, y, w, h, srcptr)#0
|
||||
; LDA ESTKL+0,X ; SRC PTR
|
||||
; STA SRCL
|
||||
; LDA ESTKH+0,X
|
||||
; STA SRCH
|
||||
; STA SRCH
|
||||
-- LDY ESTKL+3,X ; Y COORD
|
||||
LDA ESTKL+4,X ; HORIZ OFFSET
|
||||
CLC
|
||||
@@ -383,7 +383,7 @@ export asm hgrAndSrc(ofst, y, w, h, srcptr)#0
|
||||
; LDA ESTKL+0,X ; SRC PTR
|
||||
; STA SRCL
|
||||
; LDA ESTKH+0,X
|
||||
; STA SRCH
|
||||
; STA SRCH
|
||||
-- LDY ESTKL+3,X ; Y COORD
|
||||
LDA ESTKL+4,X ; HORIZ OFFSET
|
||||
CLC
|
||||
@@ -435,7 +435,7 @@ export asm hgrXorSrc(ofst, y, w, h, srcptr)#0
|
||||
; LDA ESTKL+0,X ; SRC PTR
|
||||
; STA SRCL
|
||||
; LDA ESTKH+0,X
|
||||
; STA SRCH
|
||||
; STA SRCH
|
||||
-- LDY ESTKL+3,X ; Y COORD
|
||||
LDA ESTKL+4,X ; HORIZ OFFSET
|
||||
CLC
|
||||
@@ -487,7 +487,7 @@ export asm hgrOrSrc(ofst, y, w, h, srcptr)#0
|
||||
; LDA ESTKL+0,X ; SRC PTR
|
||||
; STA SRCL
|
||||
; LDA ESTKH+0,X
|
||||
; STA SRCH
|
||||
; STA SRCH
|
||||
-- LDY ESTKL+3,X ; Y COORD
|
||||
LDA ESTKL+4,X ; HORIZ OFFSET
|
||||
CLC
|
||||
@@ -524,7 +524,7 @@ end
|
||||
//export def hgrPlot(x, y)#0
|
||||
// word pixptr
|
||||
// byte ofst, pixofst, pmask
|
||||
//
|
||||
//
|
||||
// ofst, pixofst = divmod7(x)
|
||||
// pixptr = hgrscan[y] + drawbuff + ofst
|
||||
// pmask = hbmask[pixofst]
|
||||
@@ -570,7 +570,7 @@ end
|
||||
//export def hgrXorPlot(x, y)#0
|
||||
// word pixptr
|
||||
// byte ofst, pixofst, pmask
|
||||
//
|
||||
//
|
||||
// ofst, pixofst = divmod7(x)
|
||||
// pixptr = hgrscan[y] + drawbuff + ofst
|
||||
// pmask = hbmask[pixofst]
|
||||
@@ -615,7 +615,7 @@ end
|
||||
//export def hgrOrPlot(x, y)#0
|
||||
// word pixptr
|
||||
// byte ofst, pixofst, pmask
|
||||
//
|
||||
//
|
||||
// ofst, pixofst = divmod7(x)
|
||||
// pixptr = hgrscan[y] + drawbuff + ofst
|
||||
// pmask = hbmask[pixofst]
|
||||
@@ -661,7 +661,7 @@ end
|
||||
// word pixptr, x
|
||||
// byte lofst, lpixofst, lpmask
|
||||
// byte rofst, rpixofst, rpmask
|
||||
//
|
||||
//
|
||||
// if x1 == x2
|
||||
// hgrPlot(x1, y)
|
||||
// else
|
||||
@@ -779,7 +779,7 @@ end
|
||||
// word pixptr, x
|
||||
// byte lofst, lpixofst, lpmask
|
||||
// byte rofst, rpixofst, rpmask
|
||||
//
|
||||
//
|
||||
// if x1 == x2
|
||||
// hgrPlot(x1, y)
|
||||
// else
|
||||
@@ -894,7 +894,7 @@ end
|
||||
//export def hgrVlin(y1, y2, x)#0
|
||||
// word pixptr, y, ofst
|
||||
// byte pixofst, pmask, cmask
|
||||
//
|
||||
//
|
||||
// if y1 == y2
|
||||
// hgrPlot(x, y1)
|
||||
// else
|
||||
@@ -925,7 +925,7 @@ end
|
||||
asm _hgrVLinB
|
||||
LDA $2000,Y ; CURHCLR
|
||||
AND TMPL
|
||||
STA TMPL
|
||||
STA TMPL
|
||||
LDY ESTKL+3,X ; Y1 COORD
|
||||
end
|
||||
asm _hgrVLinC
|
||||
@@ -954,7 +954,7 @@ end
|
||||
//export def hgrXVlin(y1, y2, x)#0
|
||||
// word pixptr, y, ofst
|
||||
// byte pixofst, pmask, cmask
|
||||
//
|
||||
//
|
||||
// if y1 == y2
|
||||
// hgrXorPlot(x, y1)
|
||||
// else
|
||||
@@ -985,7 +985,7 @@ end
|
||||
asm _hgrXVLinB
|
||||
LDA $2000,Y ; CURHCLR
|
||||
AND TMPL
|
||||
STA TMPL
|
||||
STA TMPL
|
||||
LDY ESTKL+3,X ; Y1 COORD
|
||||
end
|
||||
asm _hgrXVLinC
|
||||
@@ -1036,13 +1036,13 @@ asm _scanBLTA
|
||||
DEX
|
||||
DEX
|
||||
LDA ESTKL+5,X ; X COORDL
|
||||
STA ESTKL+1,X
|
||||
STA ESTKL+1,X
|
||||
LDA ESTKH+5,X ; X COORDH
|
||||
STA ESTKH+1,X
|
||||
STA ESTKH+1,X
|
||||
LDA ESTKL+4,X ; Y COORDL
|
||||
STA ESTKL+0,X
|
||||
STA ESTKL+0,X
|
||||
LDA ESTKH+4,X ; Y COORDH
|
||||
STA ESTKH+0,X
|
||||
STA ESTKH+0,X
|
||||
PLA
|
||||
AND #$08
|
||||
BEQ +
|
||||
@@ -1073,13 +1073,13 @@ asm _scanBLTC
|
||||
DEX
|
||||
DEX
|
||||
LDA ESTKL+5,X ; X COORDL
|
||||
STA ESTKL+1,X
|
||||
STA ESTKL+1,X
|
||||
LDA ESTKH+5,X ; X COORDH
|
||||
STA ESTKH+1,X
|
||||
STA ESTKH+1,X
|
||||
LDA ESTKL+4,X ; Y COORDL
|
||||
STA ESTKL+0,X
|
||||
STA ESTKL+0,X
|
||||
LDA ESTKH+4,X ; Y COORDH
|
||||
STA ESTKH+0,X
|
||||
STA ESTKH+0,X
|
||||
PLA
|
||||
AND #$08
|
||||
BEQ +
|
||||
@@ -1105,7 +1105,7 @@ BLTDONE INX
|
||||
end
|
||||
export def hgrRect(x1, y1, x2, y2)#0
|
||||
word y
|
||||
|
||||
|
||||
if x1 == x2
|
||||
hgrVLin(y1, y2, x1)
|
||||
else
|
||||
@@ -1116,7 +1116,7 @@ export def hgrRect(x1, y1, x2, y2)#0
|
||||
end
|
||||
export def hgrXorRect(x1, y1, x2, y2)#0
|
||||
word y
|
||||
|
||||
|
||||
if x1 == x2
|
||||
hgrXorVLin(y1, y2, x1)
|
||||
else
|
||||
@@ -1129,7 +1129,7 @@ export def hgrBLT(x, y, w, h, srcptr)#0
|
||||
word i, j
|
||||
word saveclr
|
||||
byte c
|
||||
|
||||
|
||||
saveclr = curhclr
|
||||
for j = y to y + h - 1
|
||||
scanBLT(x, j, w, srcptr)
|
||||
@@ -1156,25 +1156,39 @@ export def hgrBLT(x, y, w, h, srcptr)#0
|
||||
curhclr = saveclr
|
||||
end
|
||||
export def hgrMode(mode)#1
|
||||
if mode
|
||||
//
|
||||
// Set HGR mode
|
||||
//
|
||||
memset(hgr1, 0, $2000) // Clear HGR page 1
|
||||
^showpage1
|
||||
^showfull
|
||||
^showhires
|
||||
^showgraphics
|
||||
drawpage = 1
|
||||
drawbuff = hgrbuff[1]
|
||||
return 1
|
||||
fin
|
||||
//
|
||||
// Show text mode
|
||||
//
|
||||
^showpage1
|
||||
^showtext
|
||||
return 0
|
||||
when mode
|
||||
is page1
|
||||
//
|
||||
// Set HGR1 mode
|
||||
//
|
||||
memset(hgr1, 0, $2000) // Clear HGR1
|
||||
^showpage1
|
||||
^showfull
|
||||
^showhires
|
||||
^showgraphics
|
||||
drawpage = page2
|
||||
drawbuff = hgrbuff[page2]
|
||||
break
|
||||
is page2
|
||||
//
|
||||
// Set HGR2 mode
|
||||
//
|
||||
memset(hgr2, 0, $2000) // Clear HGR2
|
||||
^showpage2
|
||||
^showfull
|
||||
^showhires
|
||||
^showgraphics
|
||||
drawpage = page1
|
||||
drawbuff = hgrbuff[page1]
|
||||
break
|
||||
otherwise
|
||||
//
|
||||
// Show text mode
|
||||
//
|
||||
^showpage1
|
||||
^showtext
|
||||
wend
|
||||
return mode
|
||||
end
|
||||
export def hgrClear#0
|
||||
memset(drawbuff, curhclr, drawbuff) // Clear current HGR page
|
||||
@@ -1292,4 +1306,8 @@ _scanBLTB:8 = @hgrOrPlot
|
||||
_scanBLTC:1 = @hgrColor
|
||||
_scanBLTD:1 = @hgrPlot
|
||||
_scanBLTD:8 = @hgrOrPlot
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -48,13 +48,13 @@ asm _scanMaskA
|
||||
DEX
|
||||
DEX
|
||||
LDA ESTKL+5,X ; X COORDL
|
||||
STA ESTKL+1,X
|
||||
STA ESTKL+1,X
|
||||
LDA ESTKH+5,X ; X COORDH
|
||||
STA ESTKH+1,X
|
||||
STA ESTKH+1,X
|
||||
LDA ESTKL+4,X ; Y COORDL
|
||||
STA ESTKL+0,X
|
||||
STA ESTKL+0,X
|
||||
LDA ESTKH+4,X ; Y COORDH
|
||||
STA ESTKH+0,X
|
||||
STA ESTKH+0,X
|
||||
end
|
||||
asm _scanMaskB
|
||||
JSR $D000 ; HPLOT
|
||||
@@ -81,13 +81,13 @@ asm _scanMaskC
|
||||
DEX
|
||||
DEX
|
||||
LDA ESTKL+5,X ; X COORDL
|
||||
STA ESTKL+1,X
|
||||
STA ESTKL+1,X
|
||||
LDA ESTKH+5,X ; X COORDH
|
||||
STA ESTKH+1,X
|
||||
STA ESTKH+1,X
|
||||
LDA ESTKL+4,X ; Y COORDL
|
||||
STA ESTKL+0,X
|
||||
STA ESTKL+0,X
|
||||
LDA ESTKH+4,X ; Y COORDH
|
||||
STA ESTKH+0,X
|
||||
STA ESTKH+0,X
|
||||
end
|
||||
asm _scanMaskD
|
||||
JSR $D000 ; HPLOT
|
||||
@@ -109,7 +109,7 @@ def spriteBLTMask(x, y, w, h, srcptr)#0
|
||||
word i, j
|
||||
byte pitch
|
||||
byte c
|
||||
|
||||
|
||||
pitch = (w + 1) / 2
|
||||
for j = y to y + h - 1
|
||||
scanMask(x, j, w, srcptr)
|
||||
@@ -127,7 +127,7 @@ def spriteBLTMask(x, y, w, h, srcptr)#0
|
||||
end
|
||||
export def spriteCompile(w, h, xcenter, ycenter, srcptr)#1
|
||||
var sprtptr, bytewidth, spritesize, i
|
||||
|
||||
|
||||
sprtptr = heapalloc(t_sprite)
|
||||
if not sprtptr; return 0; fin
|
||||
bytewidth = (w + 13) / 7
|
||||
@@ -160,7 +160,7 @@ end
|
||||
export def spriteDup(sprtsrc)#1
|
||||
var sprtdup
|
||||
byte i
|
||||
|
||||
|
||||
sprtdup = heapalloc(t_sprite)
|
||||
if not sprtdup; return 0; fin
|
||||
memcpy(sprtdup, sprtsrc, t_sprite)
|
||||
@@ -171,7 +171,7 @@ end
|
||||
export def spriteRead(filestr)#1
|
||||
var sprtptr, spritesize
|
||||
byte refnum, i
|
||||
|
||||
|
||||
sprtptr = heapalloc(t_sprite)
|
||||
if not sprtptr; return 0; fin
|
||||
refnum = fileio:open(filestr)
|
||||
@@ -226,7 +226,7 @@ end
|
||||
export def spriteDraw(sprtptr)#0
|
||||
byte map, pitch, height
|
||||
var ofst, y
|
||||
|
||||
|
||||
y = sprtptr=>s_ypos
|
||||
ofst, map = divmod7(sprtptr=>s_xpos)
|
||||
if ofst & 1
|
||||
@@ -252,7 +252,7 @@ end
|
||||
export def spriteDrawXor(sprtptr)#0
|
||||
byte map, pitch, height
|
||||
var ofst, y
|
||||
|
||||
|
||||
y = sprtptr=>s_ypos
|
||||
ofst, map = divmod7(sprtptr=>s_xpos)
|
||||
if ofst & 1
|
||||
@@ -282,7 +282,7 @@ end
|
||||
export def spriteUnDrawList#0
|
||||
byte i
|
||||
var undrawptr
|
||||
|
||||
|
||||
undrawptr = undrawList[drawpage]
|
||||
for i = 15 downto 0
|
||||
if undrawptr=>[i]
|
||||
@@ -294,7 +294,7 @@ end
|
||||
export def spriteDrawList#0
|
||||
byte i
|
||||
var undrawptr
|
||||
|
||||
|
||||
undrawptr = undrawList[drawpage]
|
||||
for i = 15 downto 0
|
||||
if undrawptr=>[i]
|
||||
@@ -311,7 +311,7 @@ end
|
||||
export def spriteUnDrawXorList#0
|
||||
byte i
|
||||
var undrawptr
|
||||
|
||||
|
||||
undrawptr = undrawList[drawpage]
|
||||
for i = 0 to 15
|
||||
if undrawptr=>[i]
|
||||
@@ -323,7 +323,7 @@ end
|
||||
export def spriteDrawXorList#0
|
||||
byte i
|
||||
var undrawptr
|
||||
|
||||
|
||||
undrawptr = undrawList[drawpage]
|
||||
for i = 0 to 15
|
||||
if undrawptr=>[i]
|
||||
@@ -337,7 +337,7 @@ export def spriteDrawXorList#0
|
||||
end
|
||||
export def spriteAdd(i, sprtptr)#1
|
||||
var sprtprev
|
||||
|
||||
|
||||
i = i & 15
|
||||
sprtprev = drawList[i]
|
||||
drawList[i] = sprtptr
|
||||
@@ -345,7 +345,7 @@ export def spriteAdd(i, sprtptr)#1
|
||||
end
|
||||
export def spriteDel(i)#1
|
||||
var sprtprev
|
||||
|
||||
|
||||
i = i & 15
|
||||
sprtprev = drawList[i]
|
||||
drawList[i] = 0
|
||||
@@ -362,4 +362,8 @@ _scanMaskA:1 = @hgrColor
|
||||
_scanMaskB:1 = @hgrPlot
|
||||
_scanMaskC:1 = @hgrColor
|
||||
_scanMaskD:1 = @hgrPlot
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -55,7 +55,7 @@ TBAS2E = TBAS2L
|
||||
end
|
||||
//export def tileDraw(x, y, tileptr)#0
|
||||
// var scrnptr
|
||||
//
|
||||
//
|
||||
// scrnptr = (scanaddr[y] | drawbuff) + x
|
||||
// scrnptr->[$1C00] = tileptr->[7]
|
||||
// scrnptr->[$1800] = tileptr->[6]
|
||||
@@ -99,7 +99,7 @@ asm _tileDraw
|
||||
end
|
||||
//export def tileXorDraw(x, y, tileptr)#0
|
||||
// var scrnptr
|
||||
//
|
||||
//
|
||||
// scrnptr = (scanaddr[y] | drawbuff) + x
|
||||
// scrnptr->[$1C00] = tileptr->[7]
|
||||
// scrnptr->[$1800] = tileptr->[6]
|
||||
@@ -145,7 +145,7 @@ asm _tileXDraw
|
||||
end
|
||||
//export def tileOrDraw(x, y, tileptr)#0
|
||||
// var scrnptr
|
||||
//
|
||||
//
|
||||
// scrnptr = (scanaddr[y] | drawbuff) + x
|
||||
// scrnptr->[$1C00] = tileptr->[7]
|
||||
// scrnptr->[$1800] = tileptr->[6]
|
||||
@@ -191,7 +191,7 @@ asm _tileODraw
|
||||
end
|
||||
//export def tileAndDraw(x, y, tileptr)#0
|
||||
// var scrnptr
|
||||
//
|
||||
//
|
||||
// scrnptr = (scanaddr[y] | drawbuff) + x
|
||||
// scrnptr->[$1C00] = tileptr->[7]
|
||||
// scrnptr->[$1800] = tileptr->[6]
|
||||
@@ -347,50 +347,15 @@ end
|
||||
export def tileFromText(txtpage, tileset)#0
|
||||
byte y
|
||||
word txtptr
|
||||
|
||||
|
||||
txtptr = txtbuff[txtpage & 1]
|
||||
for y = 0 to 23
|
||||
tileDrawStr(0, y, rowaddr[y] | txtptr, 40, tileset)
|
||||
next
|
||||
end
|
||||
export def tileMode(mode)#1
|
||||
if mode
|
||||
//
|
||||
// Set HGR mode
|
||||
//
|
||||
memset(hgr1, 0, $2000) // Clear HGR page 1
|
||||
^showpage1
|
||||
^showfull
|
||||
^showhires
|
||||
^showgraphics
|
||||
drawpage = 0
|
||||
drawbuff = hgr1
|
||||
return 0
|
||||
fin
|
||||
//
|
||||
// Show text mode
|
||||
//
|
||||
^showpage1
|
||||
^showtext
|
||||
return 0
|
||||
end
|
||||
export def tileClear#0
|
||||
memset(drawbuff, $0000, drawbuff) // Clear current HGR page
|
||||
next
|
||||
end
|
||||
//
|
||||
// Set display page, return other page
|
||||
// Set draw buffer
|
||||
//
|
||||
export def tileShow(page)#1
|
||||
page = page & 1
|
||||
^(showpage1 + page)
|
||||
return page ^ 1
|
||||
end
|
||||
export def tileSwap#1
|
||||
^(showpage1 + drawpage)
|
||||
drawpage = drawpage ^ 1
|
||||
drawbuff = hgrbuff[drawpage]
|
||||
return drawpage
|
||||
end
|
||||
export def tileDrawBuf(page)#1
|
||||
drawpage = page & 1
|
||||
drawbuff = hgrbuff[drawpage]
|
||||
@@ -431,5 +396,9 @@ _tileDSb:28 = @_tileDSc.28
|
||||
_tileDSb:33 = @_tileDSc.34
|
||||
_tileDSb:38 = @_tileDSc.40
|
||||
_tileDSb:43 = @_tileDSc.46
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ if *jitcomp
|
||||
return 0
|
||||
fin
|
||||
*jitcomp = @compiler
|
||||
cmdsys.jitcount = 32
|
||||
cmdsys.jitsize = 96
|
||||
cmdsys.jitcount = 48
|
||||
cmdsys.jitsize = 128
|
||||
puts("16-bit VM/JITC enabled\n")
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
include "inc/cmdsys.plh"
|
||||
asm asmdefs
|
||||
!SOURCE "vmsrc/plvmzp.inc"
|
||||
SPEAKER = $C030
|
||||
@@ -57,4 +58,8 @@ GC1DLY NOP ; TIMING
|
||||
BUZZDLY BNE + ; TIMING
|
||||
+ BNE GC0READ
|
||||
end
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -206,6 +206,9 @@ for rom = $C100 to $C700 step $0100
|
||||
updateMouse:5 = rom + rom->$14 // readMouseFW
|
||||
readMouse.1 = index
|
||||
call(rom + rom->$19, $00, slot, page, $04) // initMouseFW
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
fin
|
||||
next
|
||||
|
||||
@@ -20,28 +20,26 @@ const WAIT = $FCA8
|
||||
export def digitalRead(pin)
|
||||
return FLAG0[pin&3] > 127
|
||||
end
|
||||
|
||||
export def portRead
|
||||
return (^FLAG0>>7)&1|(^FLAG1>>6)&2|(^FLAG2>>5)&4|(^FLAG3>>4)&8
|
||||
end
|
||||
|
||||
export def digitalWrite(pin, val)#0
|
||||
ANN0[((pin&3)<<1)+(val&1)]
|
||||
end
|
||||
|
||||
export def portWrite(val)#0
|
||||
ANN0[val&1]
|
||||
ANN1[(val>>1)&1]
|
||||
ANN2[(val>>2)&1]
|
||||
ANN3[(val>>3)&1]
|
||||
end
|
||||
|
||||
export def analogRead(pin)
|
||||
return call(PREAD,0,pin&3,0,0).2
|
||||
end
|
||||
|
||||
export def delay(time)#0
|
||||
call(WAIT,time,0,0,0)
|
||||
end
|
||||
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -38,7 +38,7 @@ GBASH = $27
|
||||
GBASE = GBASL
|
||||
GCLR = $30
|
||||
STORE80DIS = $C000
|
||||
STORE80EN = $C001
|
||||
STORE80EN = $C001
|
||||
MAINWRT = $C004
|
||||
AUXWRT = $C005
|
||||
VIDCTL = $C029
|
||||
@@ -138,7 +138,7 @@ end
|
||||
export def shrPalette(pal, rgbptr)#0
|
||||
word palptr
|
||||
byte i
|
||||
|
||||
|
||||
palptr = palbuf + pal * 32
|
||||
for i = 0 to 31
|
||||
shrPoke(palptr + i, ^(rgbptr + i))
|
||||
@@ -175,7 +175,9 @@ export def shrMode(mode)#0
|
||||
^an3off
|
||||
call($FC58, 0, 0, 0, 0) // home()
|
||||
end
|
||||
|
||||
// Put read AUX mem routine in scary location
|
||||
memcpy($0100, @auxRead, 9)
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
done
|
||||
|
||||
@@ -867,7 +867,9 @@ if mbSlot < 0
|
||||
spkrOctave0[instr] = mbOctave0[instr]/NOTEDIV
|
||||
next
|
||||
fin
|
||||
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
done
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -5,14 +5,12 @@ include "inc/cmdsys.plh"
|
||||
const SPI_SLAVE_READY = '@'
|
||||
const SPI_SLAVE_ERROR = '!'
|
||||
const SPI_SLAVE_BUSY = $FF
|
||||
|
||||
word spiReadWriteByte, spiWriteBytes, spiReadBytes
|
||||
|
||||
asm spiInc
|
||||
!SOURCE "vmsrc/plvmzp.inc"
|
||||
!CPU 65C02
|
||||
end
|
||||
|
||||
asm spiXferByteStd(outbyte)
|
||||
PHP ; DISABLE INTS
|
||||
SEI
|
||||
@@ -80,7 +78,6 @@ asm spiXferByteStd(outbyte)
|
||||
PLP
|
||||
RTS
|
||||
end
|
||||
|
||||
asm spiXferByteGS(outbyte)
|
||||
PHP ; DISABLE INTS
|
||||
SEI
|
||||
@@ -211,7 +208,6 @@ asm spiReadBytesStd(buf, len)
|
||||
PLP
|
||||
RTS
|
||||
end
|
||||
|
||||
asm spiReadBytesGS(buf, len)
|
||||
PHP ; DISABLE INTS
|
||||
SEI
|
||||
@@ -275,7 +271,6 @@ asm spiReadBytesGS(buf, len)
|
||||
PLP
|
||||
RTS
|
||||
end
|
||||
|
||||
asm spiWriteBytesStd(buf, len)
|
||||
PHP ; DISABLE INTS
|
||||
SEI
|
||||
@@ -348,7 +343,6 @@ asm spiWriteBytesStd(buf, len)
|
||||
PLP
|
||||
RTS
|
||||
end
|
||||
|
||||
asm spiWriteBytesGS(buf, len)
|
||||
PHP ; DISABLE INTS
|
||||
SEI
|
||||
@@ -393,15 +387,12 @@ asm spiWriteBytesGS(buf, len)
|
||||
PLP
|
||||
RTS
|
||||
end
|
||||
|
||||
export def spiXferByte(outbyte)
|
||||
return (spiReadWriteByte)(outbyte)
|
||||
end
|
||||
|
||||
export def spiDelay(time)
|
||||
return call($FCA8, time, 0, 0, 0) // DELAY
|
||||
end
|
||||
|
||||
export def spiSend(data)
|
||||
byte timeout, status
|
||||
|
||||
@@ -415,23 +406,19 @@ export def spiSend(data)
|
||||
putc(status);putc('0'+data/10);putc('0'+data%10)
|
||||
return status
|
||||
end
|
||||
|
||||
export def spiRecv
|
||||
return spiSend(0)
|
||||
end
|
||||
|
||||
export def spiWriteBuf(buf, len)
|
||||
spiSend(13) // CMD_BUF_WRITE
|
||||
spiSend(len >> 8); spiSend(len)
|
||||
return (spiWriteBytes)(buf, len)
|
||||
end
|
||||
|
||||
export def spiReadBuf(buf, len)
|
||||
spiSend(12) // CMD_BUF_READ
|
||||
spiSend(len >> 8); spiSend(len)
|
||||
return (spiReadBytes)(buf, len)
|
||||
end
|
||||
|
||||
export def spiReady
|
||||
byte timeout
|
||||
|
||||
@@ -442,13 +429,11 @@ export def spiReady
|
||||
loop
|
||||
return timeout
|
||||
end
|
||||
|
||||
export def spiReset
|
||||
^$C05B // DISABLE SLAVE SELECT
|
||||
^$C05D // CLOCK RAISE (GS ONLY)
|
||||
return spiReady
|
||||
end
|
||||
|
||||
if call($FE1F, 0, 0, 0, 1).3 & 1 // GS ID ROUTINE
|
||||
spiReadWriteByte = @spiXferByteStd
|
||||
spiReadBytes = @spiReadBytesStd
|
||||
@@ -458,5 +443,8 @@ else
|
||||
spiReadBytes = @spiReadBytesGS
|
||||
spiWriteBytes = @spiWriteBytesGS
|
||||
fin
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return spiReset <> 0
|
||||
done
|
||||
|
||||
@@ -243,6 +243,9 @@ for slot = $90 to $F0 step $10
|
||||
//
|
||||
puts("Found Uthernet I in slot #"); putc('0' + ((slot - $80) >> 4)); putln
|
||||
setEtherDriver(@utherMAC, @peekfrmlen, @peekfrm, @pokefrmlen, @pokefrm)
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
fin
|
||||
fin
|
||||
|
||||
@@ -909,6 +909,9 @@ for slot = $90 to $F0 step $10
|
||||
iNet:getInterfaceHA = @getWizHA
|
||||
iNet:setCallback = @wizSetCallback
|
||||
iNet:setParam = @wizSetParam
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
fin
|
||||
fin
|
||||
|
||||
@@ -602,4 +602,8 @@ iNet:setInterfaceIP = @setEtherIP
|
||||
iNet:getInterfaceHA = @getEtherHA
|
||||
iNet:setCallback = @etherSetCallback
|
||||
iNet:setParam = @etherSetParam
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -63,7 +63,7 @@ export def str2ext(str, ext)
|
||||
// Parse decimal point
|
||||
//
|
||||
i++
|
||||
if !decrec:exp
|
||||
if !decrec.sig
|
||||
//
|
||||
// Skip leading zeros
|
||||
//
|
||||
@@ -270,3 +270,8 @@ export def ext2str(ext, str, intdigits, fracdigits, format)
|
||||
^str = istr - str
|
||||
return str
|
||||
end
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -369,4 +369,8 @@ def reset
|
||||
next
|
||||
return sane:restoreZP(0)
|
||||
end
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -204,4 +204,8 @@ end
|
||||
//
|
||||
iNet:initIP = @iNetInit
|
||||
iNet:setDNS = @iNetSetDNS
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -360,7 +360,7 @@ _DIV STY DVSIGN ; LSB = SIGN OF DVSR
|
||||
ORA ACCUM32+1
|
||||
ORA ACCUM32+2
|
||||
ORA ACCUM32+3
|
||||
BEQ -
|
||||
BEQ -
|
||||
LDA ACCUM32+3 ; DVDND = ACCUM32
|
||||
BPL +
|
||||
LDA #$81 ; DVDND IS NEG
|
||||
@@ -654,7 +654,7 @@ export def i32tos(i32ptr, strptr)#1
|
||||
res[t_i32] save
|
||||
word iptr, rem
|
||||
char[12] istr
|
||||
|
||||
|
||||
iptr = @istr.11
|
||||
store32(@save)
|
||||
load32(i32ptr)
|
||||
@@ -674,9 +674,12 @@ export def i32tos(i32ptr, strptr)#1
|
||||
end
|
||||
export def puti32(i32ptr)#0
|
||||
char[12] i32str
|
||||
|
||||
|
||||
puts(i32tos(i32ptr, @i32str))
|
||||
end
|
||||
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ asm _hlineB
|
||||
end
|
||||
//def vline(y1, y2, dy2, x, dx2, sx)#0
|
||||
// var dxy2, y
|
||||
//
|
||||
//
|
||||
// err = dx2 - dy2 / 2
|
||||
// dxy2 = dx2 - dy2
|
||||
// for y = y1 to y2
|
||||
@@ -386,7 +386,7 @@ def vmajorspans(x1, y1, x2, y2, dx, dy, sx)#0
|
||||
end
|
||||
export def linespans(x1, y1, x2, y2)#0
|
||||
var dx, dy, dx2, dy2, halflen, rem, sx, sy
|
||||
|
||||
|
||||
sx = 1
|
||||
sy = 1
|
||||
dx = x2 - x1
|
||||
@@ -430,7 +430,7 @@ export def setlineplot(p)#0
|
||||
end
|
||||
export def line(x1, y1, x2, y2)#0
|
||||
var sx, sy, dx2, dy2
|
||||
|
||||
|
||||
sx = 1
|
||||
sy = 1
|
||||
dx2 = (x2 - x1) * 2
|
||||
@@ -503,4 +503,8 @@ _vlineB:6 = @err
|
||||
_vlineB:9 = @err
|
||||
_vlineB:13 = @err.1
|
||||
_vlineB:16 = @err.1
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
@@ -60,10 +60,11 @@ export asm throw(env, retval)
|
||||
DEC DST+1
|
||||
LDX TMPL
|
||||
TXS
|
||||
LDY TMPL
|
||||
LDY #$FE
|
||||
- LDA (DST),Y
|
||||
STA $0100,Y
|
||||
INY
|
||||
DEY
|
||||
CPY TMPL
|
||||
BNE -
|
||||
LDX ESP
|
||||
LDA SRC
|
||||
|
||||
@@ -839,10 +839,8 @@ def fpInit()
|
||||
fpzpsave = heapalloc($0034*2)
|
||||
(@fixupXS)=>1 = fpzpsave+$34
|
||||
(@fixupXR)=>1 = fpzpsave+$34
|
||||
zpSaveX // Clear XBYTEs
|
||||
heaprelease(fpzpsave)
|
||||
sane[9] = @zpNopSave//zpSaveX
|
||||
sane[10] = @zpNopRestore//zpRestoreX
|
||||
sane[9] = @zpSaveX
|
||||
sane[10] = @zpRestoreX
|
||||
else // Apple II
|
||||
fpzpsave = heapalloc($0034)
|
||||
sane[9] = @zpSave
|
||||
@@ -896,4 +894,8 @@ end
|
||||
def uninit3(op, dst, src, src2)
|
||||
return uninit
|
||||
end
|
||||
//
|
||||
// Keep module in memory
|
||||
//
|
||||
return modkeep
|
||||
done
|
||||
|
||||
38
src/makefile
38
src/makefile
@@ -76,7 +76,7 @@ ROGUE = rel/ROGUE\#FE1000
|
||||
ROGUEMAP = rel/ROGUEMAP\#FE1000
|
||||
ROGUECOMBAT= rel/ROGUECOMBAT\#FE1000
|
||||
MON = rel/apple/MON\#FE1000
|
||||
CONIOTST = rel/apple/CONIOTST\#FE1000
|
||||
CONIOTEST = rel/apple/CONIOTEST\#FE1000
|
||||
TILETEST = rel/apple/TILETEST\#FE1000
|
||||
HGRTEST = rel/apple/HGRTEST\#FE1000
|
||||
GRTEST = rel/apple/GRTEST\#FE1000
|
||||
@@ -92,6 +92,10 @@ TESTLIB = TESTLIB\#FE1000
|
||||
PLASM = plasm
|
||||
PLASMAPLASM = rel/PLASM\#FE1000
|
||||
CODEOPT = rel/CODEOPT\#FE1000
|
||||
PLFORTH = rel/PLFORTH\#FE1000
|
||||
HRFORTH = rel/HRFORTH\#FE1000
|
||||
HR2FORTH = rel/HR2FORTH\#FE1000
|
||||
TX2FORTH = rel/TX2FORTH\#FE1000
|
||||
INCS = toolsrc/plasm.h toolsrc/tokens.h toolsrc/symbols.h toolsrc/lex.h toolsrc/parse.h toolsrc/codegen.h
|
||||
OBJS = toolsrc/plasm.c toolsrc/parse.c toolsrc/lex.c toolsrc/codegen.c
|
||||
#
|
||||
@@ -110,7 +114,7 @@ TXTTYPE = .TXT
|
||||
#SYSTYPE = \#FF2000
|
||||
#TXTTYPE = \#040000
|
||||
|
||||
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(ZIPCHIP) $(MATCHFILES) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(COPY) $(DEL) $(REN) $(CAT) $(NEWDIR) $(TYPE) $(SOS) $(ROD) $(SIEVE) $(PRIMEGAP) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(SFM) $(SFMSPRT) $(GRAFIX) $(GFXDEMO) $(LINES) $(HGRTILE) $(HGRFONT) $(HGRSPRITE) $(HGRLIB) $(TILETEST) $(HGRTEST) $(GRLIB) $(DGRLIB) $(GRTEST) $(DGRTEST) $(HGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(INT32) $(INT32TEST) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) $(CONIOTST)
|
||||
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(PLFORTH) $(HRFORTH) $(HR2FORTH) $(TX2FORTH) $(ZIPCHIP) $(MATCHFILES) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(COPY) $(DEL) $(REN) $(CAT) $(NEWDIR) $(TYPE) $(SOS) $(ROD) $(SIEVE) $(PRIMEGAP) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(SFM) $(SFMSPRT) $(GRAFIX) $(GFXDEMO) $(LINES) $(HGRTILE) $(HGRFONT) $(HGRSPRITE) $(HGRLIB) $(TILETEST) $(HGRTEST) $(GRLIB) $(DGRLIB) $(GRTEST) $(DGRTEST) $(HGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(INT32) $(INT32TEST) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) $(CONIOTEST)
|
||||
|
||||
-rm vmsrc/plvmzp.inc
|
||||
|
||||
@@ -150,6 +154,22 @@ $(CODEOPT): toolsrc/codeopt.pla toolsrc/codeseq.plh
|
||||
./$(PLASM) -AMOW toolsrc/codeopt.pla
|
||||
acme --setpc 4094 -o $(CODEOPT) toolsrc/codeopt.a
|
||||
|
||||
$(HRFORTH): toolsrc/hrforth.pla
|
||||
./$(PLASM) -AMOW toolsrc/hrforth.pla
|
||||
acme --setpc 4094 -o $(HRFORTH) toolsrc/hrforth.a
|
||||
|
||||
$(HR2FORTH): toolsrc/hr2forth.pla
|
||||
./$(PLASM) -AMOW toolsrc/hr2forth.pla
|
||||
acme --setpc 4094 -o $(HR2FORTH) toolsrc/hr2forth.a
|
||||
|
||||
$(TX2FORTH): toolsrc/tx2forth.pla
|
||||
./$(PLASM) -AMOW toolsrc/tx2forth.pla
|
||||
acme --setpc 4094 -o $(TX2FORTH) toolsrc/tx2forth.a
|
||||
|
||||
$(PLFORTH): toolsrc/plforth.pla
|
||||
./$(PLASM) -AMOW toolsrc/plforth.pla
|
||||
acme --setpc 4094 -o $(PLFORTH) toolsrc/plforth.a
|
||||
|
||||
#
|
||||
# PLASMA VMs
|
||||
#
|
||||
@@ -160,13 +180,13 @@ $(PLVMZP_APL): FORCE
|
||||
-mkdir -p rel
|
||||
-mkdir -p rel/apple
|
||||
-rm -f vmsrc/plvmzp.inc
|
||||
-ln -s apple/plvmzp.inc vmsrc/plvmzp.inc
|
||||
-cp vmsrc/apple/plvmzp.inc vmsrc/plvmzp.inc
|
||||
|
||||
$(PLVMZP_C64): FORCE
|
||||
-mkdir -p rel
|
||||
-mkdir -p rel/c64
|
||||
-rm -f vmsrc/plvmzp.inc
|
||||
-ln -s c64/plvmzp.inc vmsrc/plvmzp.inc
|
||||
-cp vmsrc/c64/plvmzp.inc vmsrc/plvmzp.inc
|
||||
|
||||
FORCE:
|
||||
|
||||
@@ -184,11 +204,11 @@ $(PLVM01): vmsrc/apple/plvm01.s vmsrc/apple/a1cmd.a
|
||||
|
||||
$(CMD): vmsrc/apple/cmd.pla vmsrc/apple/cmdstub.s $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AOW vmsrc/apple/cmd.pla
|
||||
acme --setpc 8192 -o $(CMD) vmsrc/apple/cmdstub.s
|
||||
acme --setpc 8192 -o $(CMD) -l vmsrc/apple/cmd.sym vmsrc/apple/cmdstub.s
|
||||
|
||||
$(CMDJIT): vmsrc/apple/cmdjit.pla vmsrc/apple/cmdjitstub.s $(PLVMJIT) $(PLASM)
|
||||
./$(PLASM) -AOW vmsrc/apple/cmdjit.pla
|
||||
acme --setpc 8192 -o $(CMDJIT) vmsrc/apple/cmdjitstub.s
|
||||
acme --setpc 8192 -o $(CMDJIT) -l vmsrc/apple/cmdjit.sym vmsrc/apple/cmdjitstub.s
|
||||
|
||||
$(SOSCMD): vmsrc/apple/soscmd.pla $(PLVM03) $(PLASM)
|
||||
./$(PLASM) -AMOW vmsrc/apple/soscmd.pla
|
||||
@@ -289,9 +309,9 @@ hello: samplesrc/hello.pla $(PLVM) $(PLASM)
|
||||
acme --setpc 4094 -o $(HELLO) samplesrc/hello.a
|
||||
./$(PLVM) HELLO
|
||||
|
||||
$(CONIOTST): samplesrc/coniotst.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW samplesrc/coniotst.pla
|
||||
acme --setpc 4094 -o $(CONIOTST) samplesrc/coniotst.a
|
||||
$(CONIOTEST): samplesrc/coniotest.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW samplesrc/coniotest.pla
|
||||
acme --setpc 4094 -o $(CONIOTEST) samplesrc/coniotest.a
|
||||
|
||||
$(ROD): samplesrc/rod.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW samplesrc/rod.pla
|
||||
|
||||
9
src/mk140
Executable file
9
src/mk140
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
./mkrel
|
||||
|
||||
./mkinst
|
||||
./mksys
|
||||
./mkfpsos
|
||||
./mkbld
|
||||
./mkinet
|
||||
./mkdemos
|
||||
49
src/mk4th
Executable file
49
src/mk4th
Executable file
@@ -0,0 +1,49 @@
|
||||
cp ../sysfiles/BLANK140.po PLFORTH.PO
|
||||
./ac.jar -n PLFORTH.PO PLFORTH
|
||||
cat ../sysfiles/PRODOS#FF0000 | ./ac.jar -p PLFORTH.PO PRODOS SYS
|
||||
cat rel/apple/CMD#061000 | ./ac.jar -p PLFORTH.PO CMD BIN $1000
|
||||
cat rel/apple/PLASMA.SYSTEM#FF2000 | ./ac.jar -p PLFORTH.PO PLASMA.SYSTEM SYS
|
||||
cat rel/apple/FILEIO#FE1000 | ./ac.jar -p PLFORTH.PO sys/FILEIO REL
|
||||
cat rel/apple/CONIO#FE1000 | ./ac.jar -p PLFORTH.PO sys/CONIO REL
|
||||
cat rel/ARGS#FE1000 | ./ac.jar -p PLFORTH.PO sys/ARGS REL
|
||||
cat rel/LONGJMP#FE1000 | ./ac.jar -p PLFORTH.PO sys/LONGJMP REL
|
||||
cat rel/HRFORTH#FE1000 | ./ac.jar -p PLFORTH.PO sys/HRFORTH REL
|
||||
cat rel/HR2FORTH#FE1000 | ./ac.jar -p PLFORTH.PO sys/HR2FORTH REL
|
||||
cat rel/TX2FORTH#FE1000 | ./ac.jar -p PLFORTH.PO sys/TX2FORTH REL
|
||||
cat rel/PLFORTH#FE1000 | ./ac.jar -p PLFORTH.PO sys/PLFORTH REL
|
||||
cat rel/apple/COPY#FE1000 | ./ac.jar -p PLFORTH.PO sys/COPY REL
|
||||
cat rel/apple/DEL#FE1000 | ./ac.jar -p PLFORTH.PO sys/DEL REL
|
||||
cat rel/apple/REN#FE1000 | ./ac.jar -p PLFORTH.PO sys/REN REL
|
||||
cat rel/apple/CAT#FE1000 | ./ac.jar -p PLFORTH.PO sys/CAT REL
|
||||
#cat rel/apple/TYPE#FE1000 | ./ac.jar -p PLFORTH.PO sys/TYPE REL
|
||||
#cat rel/apple/NEWDIR#FE1000 | ./ac.jar -p PLFORTH.PO sys/NEWDIR REL
|
||||
cat rel/apple/MATCHFILES#FE1000 | ./ac.jar -p PLFORTH.PO sys/MATCHFILES REL
|
||||
cat rel/INT32#FE1000 | ./ac.jar -p PLFORTH.PO sys/INT32 REL
|
||||
#cat rel/FPSTR#FE1000 | ./ac.jar -p PLFORTH.PO sys/FPSTR REL
|
||||
#cat rel/FPU#FE1000 | ./ac.jar -p PLFORTH.PO sys/FPU REL
|
||||
#cat rel/SANE#FE1000 | ./ac.jar -p PLFORTH.PO sys/SANE REL
|
||||
#cat ../sysfiles/FP6502.CODE#060000 | ./ac.jar -p PLFORTH.PO sys/FP6502.CODE BIN
|
||||
#cat ../sysfiles/ELEMS.CODE#060000 | ./ac.jar -p PLFORTH.PO sys/ELEMS.CODE BIN
|
||||
cat rel/ED#FE1000 | ./ac.jar -p PLFORTH.PO sys/ED REL
|
||||
cat rel/LINES#FE1000 | ./ac.jar -p PLFORTH.PO sys/LINES REL
|
||||
cat rel/apple/HGRFONT#FE1000 | ./ac.jar -p PLFORTH.PO sys/HGRFONT REL
|
||||
cat rel/apple/HGRTILE#FE1000 | ./ac.jar -p PLFORTH.PO sys/HGRTILE REL
|
||||
cat rel/apple/HGRSPRITE#FE1000 | ./ac.jar -p PLFORTH.PO sys/HGRSPRITE REL
|
||||
cat rel/apple/HGRLIB#FE1000 | ./ac.jar -p PLFORTH.PO sys/HGRLIB REL
|
||||
cat rel/apple/GRLIB#FE1000 | ./ac.jar -p PLFORTH.PO sys/GRLIB REL
|
||||
cat rel/apple/DGRLIB#FE1000 | ./ac.jar -p PLFORTH.PO sys/DGRLIB REL
|
||||
cat scripts/plasma.4th | ./ac.jar -ptx PLFORTH.PO sys/scripts/PLASMA.4TH TXT
|
||||
cat scripts/machid.4th | ./ac.jar -ptx PLFORTH.PO sys/scripts/MACHID.4TH TXT
|
||||
cat scripts/conio.4th | ./ac.jar -ptx PLFORTH.PO sys/scripts/CONIO.4TH TXT
|
||||
cat scripts/fileio.4th | ./ac.jar -ptx PLFORTH.PO sys/scripts/FILEIO.4TH TXT
|
||||
cat scripts/grlib.4th | ./ac.jar -ptx PLFORTH.PO sys/scripts/GRLIB.4TH TXT
|
||||
cat scripts/dgrlib.4th | ./ac.jar -ptx PLFORTH.PO sys/scripts/DGRLIB.4TH TXT
|
||||
cat scripts/hgrlib.4th | ./ac.jar -ptx PLFORTH.PO sys/scripts/HGRLIB.4TH TXT
|
||||
cat scripts/int32.4th | ./ac.jar -ptx PLFORTH.PO sys/scripts/INT32.4TH TXT
|
||||
#cat scripts/fpu.4th | ./ac.jar -ptx PLFORTH.PO sys/scripts/FPU.4TH TXT
|
||||
cat scripts/rod.4th | ./ac.jar -ptx PLFORTH.PO scripts/ROD.4TH TXT
|
||||
cat scripts/bounce.4th | ./ac.jar -ptx PLFORTH.PO scripts/BOUNCE.4TH TXT
|
||||
cat scripts/dbounce.4th | ./ac.jar -ptx PLFORTH.PO scripts/DBOUNCE.4TH TXT
|
||||
cat scripts/hrbounce.4th | ./ac.jar -ptx PLFORTH.PO scripts/HRBOUNCE.4TH TXT
|
||||
#cat scripts/hrplot.4th | ./ac.jar -ptx PLFORTH.PO scripts/HRPLOT.4TH TXT
|
||||
echo "+PLFORTH PLASMA.4TH" | ./ac.jar -ptx PLFORTH.PO AUTORUN TXT
|
||||
299
src/mk800
Executable file
299
src/mk800
Executable file
@@ -0,0 +1,299 @@
|
||||
#!/bin/bash
|
||||
./mkrel
|
||||
cp ../sysfiles/BLANK800.po PLASMA-2.1.po
|
||||
./ac.jar -n PLASMA-2.1.po PLASMA2
|
||||
cat ../sysfiles/PRODOS#FF0000 | ./ac.jar -p PLASMA-2.1.po PRODOS SYS
|
||||
cat rel/apple/CMD#061000 | ./ac.jar -p PLASMA-2.1.po CMD BIN $1000
|
||||
cat rel/apple/CMD128#061000 | ./ac.jar -p PLASMA-2.1.po CMD128 BIN $1000
|
||||
cat rel/apple/PLASMA.SYSTEM#FF2000 | ./ac.jar -p PLASMA-2.1.po PLASMA.SYSTEM SYS
|
||||
cat rel/apple/PLVM.128#FF2000 | ./ac.jar -p PLASMA-2.1.po PLVM.128 SYS
|
||||
cat rel/apple/PLVM16#FF2000 | ./ac.jar -p PLASMA-2.1.po PLVM16 SYS
|
||||
cat ../doc/Editor.md | ./ac.jar -ptx PLASMA-2.1.po EDITOR.README TXT
|
||||
|
||||
#mkdir sys
|
||||
cat rel/apple/FILEIO#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/FILEIO REL
|
||||
cat rel/apple/CONIO#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/CONIO REL
|
||||
cat rel/LINES#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/LINES REL
|
||||
cat rel/apple/HGRFONT#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/HGRFONT REL
|
||||
cat rel/apple/HGRTILE#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/HGRTILE REL
|
||||
cat rel/apple/HGRSPRITE#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/HGRSPRITE REL
|
||||
cat rel/apple/HGRLIB#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/HGRLIB REL
|
||||
cat rel/apple/GRLIB#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/GRLIB REL
|
||||
cat rel/apple/DGRLIB#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/DGRLIB REL
|
||||
cat rel/apple/COPY#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/COPY REL
|
||||
cat rel/apple/DEL#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/DEL REL
|
||||
cat rel/apple/REN#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/REN REL
|
||||
cat rel/apple/CAT#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/CAT REL
|
||||
cat rel/apple/NEWDIR#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/NEWDIR REL
|
||||
cat rel/apple/TYPE#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/TYPE REL
|
||||
cat rel/apple/MATCHFILES#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/MATCHFILES REL
|
||||
cat rel/ARGS#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/ARGS REL
|
||||
cat rel/ED#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/ED REL
|
||||
cat rel/FIBER#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/FIBER REL
|
||||
cat rel/LONGJMP#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/LONGJMP REL
|
||||
cat rel/MEMMGR#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/MEMMGR REL
|
||||
cat rel/INET#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/INET REL
|
||||
cat rel/DHCP#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/DHCP REL
|
||||
cat rel/ETHERIP#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/ETHERIP REL
|
||||
cat rel/apple/MOUSE#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/MOUSE REL
|
||||
cat rel/apple/UTHERNET2#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/UTHERNET2 REL
|
||||
cat rel/apple/UTHERNET#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/UTHERNET REL
|
||||
cat rel/apple/PORTIO#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/PORTIO REL
|
||||
cat rel/apple/JOYBUZZ#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/JOYBUZZ REL
|
||||
cat rel/apple/SNDSEQ#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/SNDSEQ REL
|
||||
cat rel/apple/JIT#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/JIT REL
|
||||
cat rel/apple/JIT16#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/JIT16 REL
|
||||
cat rel/apple/JITUNE#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/JITUNE REL
|
||||
cat rel/apple/ZIPCHIP#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/ZIPCHIP REL
|
||||
cat rel/LZ4#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/LZ4 REL
|
||||
cat rel/TFTPD#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/TFTPD REL
|
||||
cat rel/INT32#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/INT32 REL
|
||||
cat rel/FPSTR#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/FPSTR REL
|
||||
cat rel/FPU#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/FPU REL
|
||||
cat rel/SANE#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/SANE REL
|
||||
cat ../sysfiles/FP6502.CODE#060000 | ./ac.jar -p PLASMA-2.1.po sys/FP6502.CODE BIN
|
||||
cat ../sysfiles/ELEMS.CODE#060000 | ./ac.jar -p PLASMA-2.1.po sys/ELEMS.CODE BIN
|
||||
cat rel/apple/SOS#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/SOS REL
|
||||
cat rel/apple/GRAFIX#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/GRAFIX REL
|
||||
cat rel/HRFORTH#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/HRFORTH REL
|
||||
cat rel/HR2FORTH#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/HR2FORTH REL
|
||||
cat rel/TX2FORTH#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/TX2FORTH REL
|
||||
cat rel/PLFORTH#FE1000 | ./ac.jar -p PLASMA-2.1.po sys/PLFORTH REL
|
||||
|
||||
#mkdir sys/scripts
|
||||
cat scripts/hdinstall.4th | ./ac.jar -ptx PLASMA-2.1.po HDINSTALL.4TH TXT
|
||||
cat scripts/plasma.4th | ./ac.jar -ptx PLASMA-2.1.po sys/scripts/PLASMA.4TH TXT
|
||||
cat scripts/machid.4th | ./ac.jar -ptx PLASMA-2.1.po sys/scripts/MACHID.4TH TXT
|
||||
cat scripts/conio.4th | ./ac.jar -ptx PLASMA-2.1.po sys/scripts/CONIO.4TH TXT
|
||||
cat scripts/fileio.4th | ./ac.jar -ptx PLASMA-2.1.po sys/scripts/FILEIO.4TH TXT
|
||||
cat scripts/grlib.4th | ./ac.jar -ptx PLASMA-2.1.po sys/scripts/GRLIB.4TH TXT
|
||||
cat scripts/dgrlib.4th | ./ac.jar -ptx PLASMA-2.1.po sys/scripts/DGRLIB.4TH TXT
|
||||
cat scripts/hgrlib.4th | ./ac.jar -ptx PLASMA-2.1.po sys/scripts/HGRLIB.4TH TXT
|
||||
cat scripts/int32.4th | ./ac.jar -ptx PLASMA-2.1.po sys/scripts/INT32.4TH TXT
|
||||
cat scripts/fpu.4th | ./ac.jar -ptx PLASMA-2.1.po sys/scripts/FPU.4TH TXT
|
||||
|
||||
#rm -rf syspro
|
||||
#mkdir syspro
|
||||
#cat ../sysfiles/PRODOS#FF0000 | ./ac.jar -p PLASMA-2.1.po syspro/PRODOS SYS
|
||||
#cat rel/apple/CMD#061000 | ./ac.jar -p PLASMA-2.1.po syspro/CMD BIN
|
||||
#cat rel/apple/CMD128#061000 | ./ac.jar -p PLASMA-2.1.po syspro/CMD128 BIN
|
||||
#cat rel/apple/PLASMA.SYSTEM#FF2000 | ./ac.jar -p PLASMA-2.1.po syspro/PLASMA.SYSTEM SYS
|
||||
#cat rel/apple/PLVM.128#FF2000 | ./ac.jar -p PLASMA-2.1.po syspro/PLVM.128 SYS
|
||||
#cat rel/apple/PLVM16#FF2000 | ./ac.jar -p PLASMA-2.1.po syspro/PLVM16 SYS
|
||||
#cat ../doc/Editor.md | ./ac.jar -ptx PLASMA-2.1.po syspro/EDITOR.README TXT
|
||||
|
||||
#mkdir syspro/sys
|
||||
#cat rel/apple/FILEIO#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/FILEIO REL
|
||||
#cat rel/apple/CONIO#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/CONIO REL
|
||||
#cat rel/LINES#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/LINES REL
|
||||
#cat rel/apple/HGRFONT#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/HGRFONT REL
|
||||
#cat rel/apple/HGRTILE#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/HGRTILE REL
|
||||
#cat rel/apple/HGRSPRITE#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/HGRSPRITE REL
|
||||
#cat rel/apple/HGRLIB#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/HGRLIB REL
|
||||
#cat rel/apple/GRLIB#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/GRLIB REL
|
||||
#cat rel/apple/DGRLIB#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/DGRLIB REL
|
||||
#cat rel/apple/COPY#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/COPY REL
|
||||
#cat rel/apple/DEL#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/DEL REL
|
||||
#cat rel/apple/REN#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/REN REL
|
||||
#cat rel/apple/CAT#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/CAT REL
|
||||
#cat rel/apple/NEWDIR#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/NEWDIR REL
|
||||
#cat rel/apple/TYPE#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/TYPE REL
|
||||
#cat rel/apple/MATCHFILES#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/MATCHFILES REL
|
||||
#cat rel/ARGS#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/ARGS REL
|
||||
#cat rel/ED#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/ED REL
|
||||
#cat rel/FIBER#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/FIBER REL
|
||||
#cat rel/LONGJMP#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/LONGJMP REL
|
||||
#cat rel/MEMMGR#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/MEMMGR REL
|
||||
#cat rel/apple/MOUSE#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/MOUSE REL
|
||||
#cat rel/apple/PORTIO#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/PORTIO REL
|
||||
#cat rel/apple/JOYBUZZ#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/JOYBUZZ REL
|
||||
#cat rel/apple/SNDSEQ#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/SNDSEQ REL
|
||||
#cat rel/apple/JIT#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/JIT REL
|
||||
#cat rel/apple/JIT16#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/JIT16 REL
|
||||
#cat rel/apple/JITUNE#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/JITUNE REL
|
||||
#cat rel/apple/ZIPCHIP#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/ZIPCHIP REL
|
||||
#cat rel/LZ4#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/LZ4 REL
|
||||
#cat rel/INT32#FE1000 | ./ac.jar -p PLASMA-2.1.po syspro/sys/INT32 REL
|
||||
|
||||
#rm -rf sysforth
|
||||
#mkdir sysforth
|
||||
#mkdir sysforth/sys
|
||||
#cat rel/HRFORTH#FE1000 | ./ac.jar -p PLASMA-2.1.po sysforth/sys/HRFORTH REL
|
||||
#cat rel/HR2FORTH#FE1000 | ./ac.jar -p PLASMA-2.1.po sysforth/sys/HR2FORTH REL
|
||||
#cat rel/PLFORTH#FE1000 | ./ac.jar -p PLASMA-2.1.po sysforth/sys/PLFORTH REL
|
||||
|
||||
#mkdir sysforth/sys/scripts
|
||||
#cat scripts/plasma.4th | ./ac.jar -ptx PLASMA-2.1.po sysforth/sys/scripts/PLASMA.4TH TXT
|
||||
#cat scripts/conio.4th | ./ac.jar -ptx PLASMA-2.1.po sysforth/sys/scripts/CONIO.4TH TXT
|
||||
#cat scripts/fileio.4th | ./ac.jar -ptx PLASMA-2.1.po sysforth/sys/scripts/FILEIO.4TH TXT
|
||||
#cat scripts/grlib.4th | ./ac.jar -ptx PLASMA-2.1.po sysforth/sys/scripts/GRLIB.4TH TXT
|
||||
#cat scripts/hgrlib.4th | ./ac.jar -ptx PLASMA-2.1.po sysforth/sys/scripts/HGRLIB.4TH TXT
|
||||
#cat scripts/int32.4th | ./ac.jar -ptx PLASMA-2.1.po sysforth/sys/scripts/INT32.4TH TXT
|
||||
#cat scripts/fpu.4th | ./ac.jar -ptx PLASMA-2.1.po sysforth/sys/scripts/FPU.4TH TXT
|
||||
|
||||
#rm -rf sysinet
|
||||
#mkdir sysinet
|
||||
#mkdir sysinet/sys
|
||||
#cat rel/INET#FE1000 | ./ac.jar -p PLASMA-2.1.po sysinet/sys/INET REL
|
||||
#cat rel/DHCP#FE1000 | ./ac.jar -p PLASMA-2.1.po sysinet/sys/DHCP REL
|
||||
#cat rel/ETHERIP#FE1000 | ./ac.jar -p PLASMA-2.1.po sysinet/sys/ETHERIP REL
|
||||
#cat rel/apple/UTHERNET2#FE1000 | ./ac.jar -p PLASMA-2.1.po sysinet/sys/UTHERNET2 REL
|
||||
#cat rel/apple/UTHERNET#FE1000 | ./ac.jar -p PLASMA-2.1.po sysinet/sys/UTHERNET REL
|
||||
#cat rel/TFTPD#FE1000 | ./ac.jar -p PLASMA-2.1.po sysinet/sys/TFTPD REL
|
||||
|
||||
#rm -rf fpsos
|
||||
#mkdir fpsos
|
||||
#cat ../sysfiles/SOS.KERNEL#0C0000 | ./ac.jar -p PLASMA-2.1.po fpsos/SOS.KERNEL \$0C
|
||||
#cat ../sysfiles/SOS.DRIVER#0C0000 | ./ac.jar -p PLASMA-2.1.po fpsos/SOS.DRIVER \$0C
|
||||
#cat rel/apple/SOS.INTERP#050000 | ./ac.jar -p PLASMA-2.1.po fpsos/SOS.INTERP \$05
|
||||
#cat rel/apple/SOS.CMD#FE1000 | ./ac.jar -p PLASMA-2.1.po fpsos/SOS.CMD REL
|
||||
#cat rel/apple/SOS.INTERPJIT#050000 | ./ac.jar -p PLASMA-2.1.po fpsos/SOS.INTERPJIT \$05
|
||||
#cat rel/apple/SOS.CMDJIT#FE1000 | ./ac.jar -p PLASMA-2.1.po fpsos/SOS.CMDJIT REL
|
||||
|
||||
#mkdir fpsos/sys
|
||||
#cat rel/apple/SOS#FE1000 | ./ac.jar -p PLASMA-2.1.po fpsos/sys/SOS REL
|
||||
#cat rel/apple/GRAFIX#FE1000 | ./ac.jar -p PLASMA-2.1.po fpsos/sys/GRAFIX REL
|
||||
#cat rel/FPSTR#FE1000 | ./ac.jar -p PLASMA-2.1.po fpsos/sys/FPSTR REL
|
||||
#cat rel/FPU#FE1000 | ./ac.jar -p PLASMA-2.1.po fpsos/sys/FPU REL
|
||||
#cat rel/SANE#FE1000 | ./ac.jar -p PLASMA-2.1.po fpsos/sys/SANE REL
|
||||
#cat ../sysfiles/FP6502.CODE#060000 | ./ac.jar -p PLASMA-2.1.po fpsos/sys/FP6502.CODE BIN
|
||||
#cat ../sysfiles/ELEMS.CODE#060000 | ./ac.jar -p PLASMA-2.1.po fpsos/sys/ELEMS.CODE BIN
|
||||
|
||||
#rm -rf demos
|
||||
#mkdir demos
|
||||
cat rel/INT32TEST#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/INT32TEST REL
|
||||
cat rel/apple/CONIOTEST#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/CONIOTEST REL
|
||||
cat rel/apple/ROD#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/ROD REL
|
||||
cat rel/RPNCALC#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/RPNCALC REL
|
||||
cat rel/LZ4CAT#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/LZ4CAT REL
|
||||
cat ../doc/ROGUE.LZ4.BIN | ./ac.jar -p PLASMA-2.1.po demos/ROGUE.LZ4 BIN
|
||||
cat rel/PRIMEGAP#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/PRIMEGAP REL
|
||||
|
||||
#mkdir demos/rogue
|
||||
cat rel/ROGUE#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/rogue/ROGUE REL
|
||||
cat rel/ROGUECOMBAT#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/rogue/ROGUECOMBAT REL
|
||||
cat rel/ROGUEMAP#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/rogue/ROGUEMAP REL
|
||||
cat samplesrc/LEVEL0#040000 | ./ac.jar -ptx PLASMA-2.1.po demos/rogue/LEVEL0 TXT
|
||||
cat samplesrc/LEVEL1#040000 | ./ac.jar -ptx PLASMA-2.1.po demos/rogue/LEVEL1 TXT
|
||||
|
||||
#mkdir demos/music
|
||||
cat rel/apple/PLAYSEQ#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/music/PLAYSEQ REL
|
||||
cat mockingboard/ultima3.seq | ./ac.jar -p PLASMA-2.1.po demos/music/ULTIMA3.SEQ BIN
|
||||
cat mockingboard/startrek.seq | ./ac.jar -p PLASMA-2.1.po demos/music/STARTREK.SEQ BIN
|
||||
|
||||
#mkdir demos/net
|
||||
cat rel/HTTPD#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/net/HTTPD REL
|
||||
cat samplesrc/index.html | ./ac.jar -ptx PLASMA-2.1.po demos/net/INDEX.HTML TXT
|
||||
|
||||
#mkdir demos/apple2
|
||||
cat rel/apple/TILETEST#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/TILETEST REL
|
||||
cat rel/apple/HGRTEST#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/HGRTEST REL
|
||||
cat rel/apple/GRTEST#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/GRTEST REL
|
||||
cat rel/apple/DGRTEST#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/DGRTEST REL
|
||||
|
||||
#mkdir demos/apple2/spiders
|
||||
cat rel/apple/SFM#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/spiders/SFM REL
|
||||
cat rel/apple/SFMSPRT#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/spiders/SFMSPRT REL
|
||||
|
||||
#mkdir demos/apple2/sdutils
|
||||
cat rel/apple/SPIPORT#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/sdutils/SPIPORT REL
|
||||
cat rel/apple/SDFAT#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/sdutils/SDFAT REL
|
||||
cat rel/apple/FATCAT#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/sdutils/FATCAT REL
|
||||
cat rel/apple/FATGET#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/sdutils/FATGET REL
|
||||
cat rel/apple/FATPUT#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/sdutils/FATPUT REL
|
||||
cat rel/apple/FATREADDSK#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/sdutils/FATREADDSK REL
|
||||
cat rel/apple/FATWRITEDSK#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple2/sdutils/FATWRITEDSK REL
|
||||
|
||||
#mkdir demos/apple3
|
||||
cat rel/apple/GFXDEMO#FE1000 | ./ac.jar -p PLASMA-2.1.po demos/apple3/GFXDEMO REL
|
||||
cat samplesrc/APPLE3.PIX#060000 | ./ac.jar -p PLASMA-2.1.po demos/apple3/APPLE3.PIX BIN
|
||||
|
||||
#rm -rf bld
|
||||
#mkdir bld
|
||||
cat rel/PLASM#FE1000 | ./ac.jar -p PLASMA-2.1.po bld/PLASM REL
|
||||
cat rel/CODEOPT#FE1000 | ./ac.jar -p PLASMA-2.1.po bld/CODEOPT REL
|
||||
|
||||
#mkdir bld/samples
|
||||
cat samplesrc/hello.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/HELLO.PLA TXT
|
||||
cat samplesrc/int32test.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/INT32TEST.PLA TXT
|
||||
cat samplesrc/coniotest.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/CONIOTEST.PLA TXT
|
||||
cat samplesrc/grtest.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/GRTEST.PLA TXT
|
||||
cat samplesrc/dgrtest.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/DGRTEST.PLA TXT
|
||||
cat samplesrc/hgrtest.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/HGRTEST.PLA TXT
|
||||
cat samplesrc/tiletest.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/TILETEST.PLA TXT
|
||||
cat samplesrc/fibertest.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/FIBERTEST.PLA TXT
|
||||
cat samplesrc/mousetest.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/MOUSETEST.PLA TXT
|
||||
cat samplesrc/memtest.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/MEMTEST.PLA TXT
|
||||
cat samplesrc/rod.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/ROD.PLA TXT
|
||||
cat samplesrc/sieve.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/SIEVE.PLA TXT
|
||||
cat samplesrc/test.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/TEST.PLA TXT
|
||||
cat samplesrc/testlib.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/TESTLIB.PLA TXT
|
||||
cat samplesrc/playseq.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/PLAYSEQ.PLA TXT
|
||||
cat samplesrc/rpncalc.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/RPNCALC.PLA TXT
|
||||
cat samplesrc/fatcat.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/FATCAT.PLA TXT
|
||||
#cat samplesrc/gfxdemo.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/GFXDEMO.PLA TXT
|
||||
cat samplesrc/lz4cat.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/LZ4CAT.PLA TXT
|
||||
cat samplesrc/sfm.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/SFM.PLA TXT
|
||||
cat samplesrc/sfmsprt.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/SFMSPRT.PLA TXT
|
||||
cat samplesrc/fppow.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/FPPOW.PLA TXT
|
||||
cat utilsrc/apple/mon.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/MON.PLA TXT
|
||||
cat utilsrc/apple/zipchip.pla | ./ac.jar -ptx PLASMA-2.1.po bld/samples/ZIPCHIP.PLA TXT
|
||||
|
||||
#mkdir bld/scripts
|
||||
cat scripts/rod.4th | ./ac.jar -ptx PLASMA-2.1.po bld/scripts/ROD.4TH TXT
|
||||
cat scripts/bounce.4th | ./ac.jar -ptx PLASMA-2.1.po bld/scripts/BOUNCE.4TH TXT
|
||||
cat scripts/dbounce.4th | ./ac.jar -ptx PLASMA-2.1.po bld/scripts/DBOUNCE.4TH TXT
|
||||
cat scripts/hrbounce.4th | ./ac.jar -ptx PLASMA-2.1.po bld/scripts/HRBOUNCE.4TH TXT
|
||||
cat scripts/plot.4th | ./ac.jar -ptx PLASMA-2.1.po bld/scripts/PLOT.4TH TXT
|
||||
cat scripts/hrplot.4th | ./ac.jar -ptx PLASMA-2.1.po bld/scripts/HRPLOT.4TH TXT
|
||||
|
||||
#mkdir bld/examples
|
||||
#cat samplesrc/examples/ex.1.pla bld/examples/EX.1.PLA TXT
|
||||
#cat samplesrc/examples/ex.2.pla bld/examples/EX.2.PLA TXT
|
||||
#cat samplesrc/examples/ex.3.pla bld/examples/EX.3.PLA TXT
|
||||
#cat samplesrc/examples/ex.4.pla bld/examples/EX.4.PLA TXT
|
||||
#cat samplesrc/examples/ex.5.pla bld/examples/EX.5.PLA TXT
|
||||
#cat samplesrc/examples/ex.6.pla bld/examples/EX.6.PLA TXT
|
||||
#cat samplesrc/examples/ex.7.pla bld/examples/EX.7.PLA TXT
|
||||
#cat samplesrc/examples/ex.8.pla bld/examples/EX.8.PLA TXT
|
||||
#cat samplesrc/examples/ex.9.pla bld/examples/EX.9.PLA TXT
|
||||
#cat samplesrc/examples/ex.10.pla bld/examples/EX.10.PLA TXT
|
||||
#cat samplesrc/examples/ex.11.pla bld/examples/EX.11.PLA TXT
|
||||
#cat samplesrc/examples/ex.12.pla bld/examples/EX.12.PLA TXT
|
||||
#cat samplesrc/examples/ex.13.pla bld/examples/EX.13.PLA TXT
|
||||
#cat samplesrc/examples/ex.14.pla bld/examples/EX.14.PLA TXT
|
||||
#cat samplesrc/examples/ex.15.pla bld/examples/EX.15.PLA TXT
|
||||
#cat samplesrc/examples/ex.16.pla bld/examples/EX.16.PLA TXT
|
||||
#cat samplesrc/examples/ex.17.pla bld/examples/EX.17.PLA TXT
|
||||
|
||||
#mkdir bld/inc
|
||||
cat inc/args.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/ARGS.PLH TXT
|
||||
cat inc/matchfiles.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/MATCHFILES.PLH TXT
|
||||
cat inc/cmdsys.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/CMDSYS.PLH TXT
|
||||
cat inc/conio.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/CONIO.PLH TXT
|
||||
cat inc/lines.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/LINES.PLH TXT
|
||||
cat inc/hgrfont.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/HGRFONT.PLH TXT
|
||||
cat inc/hgrtile.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/HGRTILE.PLH TXT
|
||||
cat inc/hgrsprite.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/HGRSPRITE.PLH TXT
|
||||
cat inc/hgrlib.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/HGRLIB.PLH TXT
|
||||
cat inc/grlib.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/GRLIB.PLH TXT
|
||||
cat inc/dgrlib.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/DGRLIB.PLH TXT
|
||||
cat inc/fiber.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/FIBER.PLH TXT
|
||||
cat inc/fileio.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/FILEIO.PLH TXT
|
||||
cat inc/int32.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/INT32.PLH TXT
|
||||
cat inc/fpstr.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/FPSTR.PLH TXT
|
||||
cat inc/fpu.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/FPU.PLH TXT
|
||||
cat inc/mouse.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/MOUSE.PLH TXT
|
||||
cat inc/inet.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/INET.PLH TXT
|
||||
cat inc/longjmp.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/LONGJMP.PLH TXT
|
||||
cat inc/memmgr.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/MEMMGR.PLH TXT
|
||||
cat inc/sane.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/SANE.PLH TXT
|
||||
cat inc/joybuzz.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/JOYBUZZ.PLH TXT
|
||||
cat inc/portio.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/PORTIO.PLH TXT
|
||||
cat inc/sdfat.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/SDFAT.PLH TXT
|
||||
cat inc/sndseq.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/SNDSEQ.PLH TXT
|
||||
cat inc/spiport.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/SPIPORT.PLH TXT
|
||||
cat inc/testlib.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/TESTLIB.PLH TXT
|
||||
cat inc/grafix.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/GRAFIX.PLH TXT
|
||||
cat inc/lz4.plh | ./ac.jar -ptx PLASMA-2.1.po bld/inc/LZ4.PLH TXT
|
||||
cat vmsrc/apple/plvmzp.inc | ./ac.jar -ptx PLASMA-2.1.po bld/inc/PLVMZP.INC TXT
|
||||
66
src/mkbld
Executable file
66
src/mkbld
Executable file
@@ -0,0 +1,66 @@
|
||||
cp ../sysfiles/BLANK140.po PLASMA-2.1-BLD.po
|
||||
./ac.jar -n PLASMA-2.1-BLD.po PLASMA.BLD
|
||||
cat rel/PLASM#FE1000 | ./ac.jar -p PLASMA-2.1-BLD.po bld/PLASM REL
|
||||
cat rel/CODEOPT#FE1000 | ./ac.jar -p PLASMA-2.1-BLD.po bld/CODEOPT REL
|
||||
cat inc/args.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/ARGS.PLH TXT
|
||||
cat inc/matchfiles.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/MATCHFILES.PLH TXT
|
||||
cat inc/cmdsys.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/CMDSYS.PLH TXT
|
||||
cat inc/conio.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/CONIO.PLH TXT
|
||||
cat inc/lines.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/LINES.PLH TXT
|
||||
cat inc/hgrfont.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/HGRFONT.PLH TXT
|
||||
cat inc/hgrtile.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/HGRTILE.PLH TXT
|
||||
cat inc/hgrsprite.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/HGRSPRITE.PLH TXT
|
||||
cat inc/hgrlib.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/HGRLIB.PLH TXT
|
||||
cat inc/grlib.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/GRLIB.PLH TXT
|
||||
cat inc/dgrlib.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/DGRLIB.PLH TXT
|
||||
cat inc/fiber.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/FIBER.PLH TXT
|
||||
cat inc/fileio.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/FILEIO.PLH TXT
|
||||
cat inc/int32.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/INT32.PLH TXT
|
||||
cat inc/fpstr.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/FPSTR.PLH TXT
|
||||
cat inc/fpu.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/FPU.PLH TXT
|
||||
cat inc/mouse.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/MOUSE.PLH TXT
|
||||
cat inc/inet.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/INET.PLH TXT
|
||||
cat inc/longjmp.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/LONGJMP.PLH TXT
|
||||
cat inc/memmgr.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/MEMMGR.PLH TXT
|
||||
cat inc/sane.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/SANE.PLH TXT
|
||||
cat inc/joybuzz.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/JOYBUZZ.PLH TXT
|
||||
cat inc/portio.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/PORTIO.PLH TXT
|
||||
cat inc/sdfat.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/SDFAT.PLH TXT
|
||||
cat inc/sndseq.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/SNDSEQ.PLH TXT
|
||||
cat inc/spiport.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/SPIPORT.PLH TXT
|
||||
cat inc/testlib.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/TESTLIB.PLH TXT
|
||||
#cat inc/grafix.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/GRAFIX.PLH TXT
|
||||
cat inc/lz4.plh | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/LZ4.PLH TXT
|
||||
cat vmsrc/apple/plvmzp.inc | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/inc/PLVMZP.INC TXT
|
||||
|
||||
cat samplesrc/hello.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/HELLO.PLA TXT
|
||||
cat samplesrc/int32test.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/INT32TEST.PLA TXT
|
||||
cat samplesrc/coniotest.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/CONIOTEST.PLA TXT
|
||||
cat samplesrc/grtest.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/GRTEST.PLA TXT
|
||||
cat samplesrc/dgrtest.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/DGRTEST.PLA TXT
|
||||
cat samplesrc/hgrtest.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/HGRTEST.PLA TXT
|
||||
cat samplesrc/tiletest.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/TILETEST.PLA TXT
|
||||
cat samplesrc/fibertest.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/FIBERTEST.PLA TXT
|
||||
cat samplesrc/mousetest.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/MOUSETEST.PLA TXT
|
||||
cat samplesrc/memtest.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/MEMTEST.PLA TXT
|
||||
cat samplesrc/rod.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/ROD.PLA TXT
|
||||
#cat samplesrc/sieve.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/SIEVE.PLA TXT
|
||||
#cat samplesrc/test.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/TEST.PLA TXT
|
||||
#cat samplesrc/testlib.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/TESTLIB.PLA TXT
|
||||
cat samplesrc/playseq.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/PLAYSEQ.PLA TXT
|
||||
cat samplesrc/rpncalc.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/RPNCALC.PLA TXT
|
||||
#cat samplesrc/fatcat.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/FATCAT.PLA TXT
|
||||
#cat samplesrc/gfxdemo.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/GFXDEMO.PLA TXT
|
||||
cat samplesrc/lz4cat.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/LZ4CAT.PLA TXT
|
||||
cat samplesrc/sfm.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/SFM.PLA TXT
|
||||
cat samplesrc/sfmsprt.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/SFMSPRT.PLA TXT
|
||||
#cat samplesrc/fppow.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/FPPOW.PLA TXT
|
||||
cat utilsrc/apple/mon.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/MON.PLA TXT
|
||||
#cat utilsrc/apple/zipchip.pla | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/samples/ZIPCHIP.PLA TXT
|
||||
|
||||
cat scripts/rod.4th | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/scripts/ROD.4TH TXT
|
||||
cat scripts/bounce.4th | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/scripts/BOUNCE.4TH TXT
|
||||
cat scripts/dbounce.4th | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/scripts/DBOUNCE.4TH TXT
|
||||
cat scripts/hrbounce.4th | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/scripts/HRBOUNCE.4TH TXT
|
||||
cat scripts/plot.4th | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/scripts/PLOT.4TH TXT
|
||||
cat scripts/hrplot.4th | ./ac.jar -ptx PLASMA-2.1-BLD.po bld/scripts/HRPLOT.4TH TXT
|
||||
32
src/mkdemos
Executable file
32
src/mkdemos
Executable file
@@ -0,0 +1,32 @@
|
||||
cp ../sysfiles/BLANK140.po PLASMA-2.1-DEMOS.po
|
||||
./ac.jar -n PLASMA-2.1-DEMOS.po PLASMA.DEMOS
|
||||
cat rel/INT32TEST#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/INT32TEST REL
|
||||
cat rel/apple/CONIOTEST#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/CONIOTEST REL
|
||||
cat rel/apple/ROD#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/ROD REL
|
||||
cat rel/RPNCALC#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/RPNCALC REL
|
||||
cat rel/LZ4CAT#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/LZ4CAT REL
|
||||
cat ../doc/ROGUE.LZ4.BIN | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/ROGUE.LZ4 BIN
|
||||
cat rel/PRIMEGAP#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/PRIMEGAP REL
|
||||
cat rel/ROGUE#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/rogue/ROGUE REL
|
||||
cat rel/ROGUECOMBAT#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/rogue/ROGUECOMBAT REL
|
||||
cat rel/ROGUEMAP#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/rogue/ROGUEMAP REL
|
||||
cat samplesrc/LEVEL0#040000 | ./ac.jar -ptx PLASMA-2.1-DEMOS.po demos/rogue/LEVEL0 TXT
|
||||
cat samplesrc/LEVEL1#040000 | ./ac.jar -ptx PLASMA-2.1-DEMOS.po demos/rogue/LEVEL1 TXT
|
||||
cat rel/apple/PLAYSEQ#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/music/PLAYSEQ REL
|
||||
cat mockingboard/ultima3.seq | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/music/ULTIMA3.SEQ BIN
|
||||
cat mockingboard/startrek.seq | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/music/STARTREK.SEQ BIN
|
||||
cat rel/HTTPD#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/net/HTTPD REL
|
||||
cat samplesrc/index.html | ./ac.jar -ptx PLASMA-2.1-DEMOS.po demos/net/INDEX.HTML TXT
|
||||
cat rel/apple/TILETEST#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/TILETEST REL
|
||||
cat rel/apple/HGRTEST#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/HGRTEST REL
|
||||
cat rel/apple/GRTEST#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/GRTEST REL
|
||||
cat rel/apple/DGRTEST#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/DGRTEST REL
|
||||
cat rel/apple/SFM#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/spiders/SFM REL
|
||||
cat rel/apple/SFMSPRT#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/spiders/SFMSPRT REL
|
||||
cat rel/apple/SPIPORT#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/sdutils/SPIPORT REL
|
||||
cat rel/apple/SDFAT#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/sdutils/SDFAT REL
|
||||
cat rel/apple/FATCAT#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/sdutils/FATCAT REL
|
||||
cat rel/apple/FATGET#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/sdutils/FATGET REL
|
||||
cat rel/apple/FATPUT#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/sdutils/FATPUT REL
|
||||
cat rel/apple/FATREADDSK#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/sdutils/FATREADDSK REL
|
||||
cat rel/apple/FATWRITEDSK#FE1000 | ./ac.jar -p PLASMA-2.1-DEMOS.po demos/apple2/sdutils/FATWRITEDSK REL
|
||||
4
src/mkdist
Executable file
4
src/mkdist
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
./mk140
|
||||
./mk800
|
||||
21
src/mkfpsos
Executable file
21
src/mkfpsos
Executable file
@@ -0,0 +1,21 @@
|
||||
cp ../sysfiles/BLANK140.po PLASMA-2.1-FPSOS.po
|
||||
./ac.jar -n PLASMA-2.1-FPSOS.po PLASMA.FPSOS
|
||||
cat ../sysfiles/SOS.KERNEL#0C0000 | ./ac.jar -p PLASMA-2.1-FPSOS.po SOS.KERNEL \$0C
|
||||
cat ../sysfiles/SOS.DRIVER#0C0000 | ./ac.jar -p PLASMA-2.1-FPSOS.po SOS.DRIVER \$0C
|
||||
cat rel/apple/SOS.INTERP#050000 | ./ac.jar -p PLASMA-2.1-FPSOS.po SOS.INTERP \$05
|
||||
cat rel/apple/SOS.CMD#FE1000 | ./ac.jar -p PLASMA-2.1-FPSOS.po SOS.CMD REL
|
||||
cat rel/apple/SOS.INTERPJIT#050000 | ./ac.jar -p PLASMA-2.1-FPSOS.po SOS.INTERPJIT \$05
|
||||
cat rel/apple/SOS.CMDJIT#FE1000 | ./ac.jar -p PLASMA-2.1-FPSOS.po SOS.CMDJIT REL
|
||||
cat rel/apple/SOS#FE1000 | ./ac.jar -p PLASMA-2.1-FPSOS.po sys/SOS REL
|
||||
cat rel/apple/GRAFIX#FE1000 | ./ac.jar -p PLASMA-2.1-FPSOS.po sys/GRAFIX REL
|
||||
cat rel/FPSTR#FE1000 | ./ac.jar -p PLASMA-2.1-FPSOS.po sys/FPSTR REL
|
||||
cat rel/FPU#FE1000 | ./ac.jar -p PLASMA-2.1-FPSOS.po sys/FPU REL
|
||||
cat rel/SANE#FE1000 | ./ac.jar -p PLASMA-2.1-FPSOS.po sys/SANE REL
|
||||
cat ../sysfiles/FP6502.CODE#060000 | ./ac.jar -p PLASMA-2.1-FPSOS.po sys/FP6502.CODE BIN
|
||||
cat ../sysfiles/ELEMS.CODE#060000 | ./ac.jar -p PLASMA-2.1-FPSOS.po sys/ELEMS.CODE BIN
|
||||
cat inc/grafix.plh | ./ac.jar -ptx PLASMA-2.1-FPSOS.po bld/inc/GRAFIX.PLH TXT
|
||||
cat samplesrc/gfxdemo.pla | ./ac.jar -ptx PLASMA-2.1-FPSOS.po bld/samples/GFXDEMO.PLA TXT
|
||||
cat scripts/grafix.4th | ./ac.jar -ptx PLASMA-2.1-FPSOS.po sys/scripts/GRAFIX.4TH TXT
|
||||
cat scripts/gfxplot.4th | ./ac.jar -ptx PLASMA-2.1-FPSOS.po bld/scripts/GFXPLOT.4TH TXT
|
||||
cat rel/apple/GFXDEMO#FE1000 | ./ac.jar -p PLASMA-2.1-FPSOS.po demos/apple3/GFXDEMO REL
|
||||
cat samplesrc/APPLE3.PIX#060000 | ./ac.jar -p PLASMA-2.1-FPSOS.po demos/apple3/APPLE3.PIX BIN
|
||||
8
src/mkinet
Executable file
8
src/mkinet
Executable file
@@ -0,0 +1,8 @@
|
||||
cp ../sysfiles/BLANK140.po PLASMA-2.1-INET.po
|
||||
./ac.jar -n PLASMA-2.1-INET.po PLASMA.INET
|
||||
cat rel/INET#FE1000 | ./ac.jar -p PLASMA-2.1-INET.po sys/INET REL
|
||||
cat rel/DHCP#FE1000 | ./ac.jar -p PLASMA-2.1-INET.po sys/DHCP REL
|
||||
cat rel/ETHERIP#FE1000 | ./ac.jar -p PLASMA-2.1-INET.po sys/ETHERIP REL
|
||||
cat rel/apple/UTHERNET2#FE1000 | ./ac.jar -p PLASMA-2.1-INET.po sys/UTHERNET2 REL
|
||||
cat rel/apple/UTHERNET#FE1000 | ./ac.jar -p PLASMA-2.1-INET.po sys/UTHERNET REL
|
||||
cat rel/TFTPD#FE1000 | ./ac.jar -p PLASMA-2.1-INET.po sys/TFTPD REL
|
||||
38
src/mkinst
Executable file
38
src/mkinst
Executable file
@@ -0,0 +1,38 @@
|
||||
cp ../sysfiles/BLANK140.po PLASMA-2.1-INST.po
|
||||
./ac.jar -n PLASMA-2.1-INST.po PLASMA.INST
|
||||
cat ../sysfiles/PRODOS#FF0000 | ./ac.jar -p PLASMA-2.1-INST.po PRODOS SYS
|
||||
cat rel/apple/CMD#061000 | ./ac.jar -p PLASMA-2.1-INST.po CMD BIN $1000
|
||||
cat rel/apple/CMD128#061000 | ./ac.jar -p PLASMA-2.1-INST.po CMD128 BIN $1000
|
||||
cat rel/apple/PLASMA.SYSTEM#FF2000 | ./ac.jar -p PLASMA-2.1-INST.po PLASMA.SYSTEM SYS
|
||||
cat rel/apple/PLVM.128#FF2000 | ./ac.jar -p PLASMA-2.1-INST.po PLVM.128 SYS
|
||||
cat rel/apple/PLVM16#FF2000 | ./ac.jar -p PLASMA-2.1-INST.po PLVM16 SYS
|
||||
cat rel/apple/JIT#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/JIT REL
|
||||
cat rel/apple/JIT16#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/JIT16 REL
|
||||
cat rel/apple/FILEIO#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/FILEIO REL
|
||||
cat rel/apple/CONIO#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/CONIO REL
|
||||
cat rel/apple/COPY#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/COPY REL
|
||||
cat rel/apple/DEL#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/DEL REL
|
||||
cat rel/apple/REN#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/REN REL
|
||||
cat rel/apple/CAT#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/CAT REL
|
||||
cat rel/apple/TYPE#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/TYPE REL
|
||||
cat rel/apple/NEWDIR#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/NEWDIR REL
|
||||
cat rel/apple/MATCHFILES#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/MATCHFILES REL
|
||||
cat rel/ARGS#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/ARGS REL
|
||||
cat rel/LONGJMP#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/LONGJMP REL
|
||||
cat rel/INT32#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/INT32 REL
|
||||
cat rel/HRFORTH#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/HRFORTH REL
|
||||
cat rel/HR2FORTH#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/HR2FORTH REL
|
||||
cat rel/TX2FORTH#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/TX2FORTH REL
|
||||
cat rel/PLFORTH#FE1000 | ./ac.jar -p PLASMA-2.1-INST.po sys/PLFORTH REL
|
||||
cat scripts/plasma.4th | ./ac.jar -ptx PLASMA-2.1-INST.po sys/scripts/PLASMA.4TH TXT
|
||||
cat scripts/machid.4th | ./ac.jar -ptx PLASMA-2.1-INST.po sys/scripts/MACHID.4TH TXT
|
||||
cat scripts/conio.4th | ./ac.jar -ptx PLASMA-2.1-INST.po sys/scripts/CONIO.4TH TXT
|
||||
cat scripts/fileio.4th | ./ac.jar -ptx PLASMA-2.1-INST.po sys/scripts/FILEIO.4TH TXT
|
||||
cat scripts/grlib.4th | ./ac.jar -ptx PLASMA-2.1-INST.po sys/scripts/GRLIB.4TH TXT
|
||||
cat scripts/dgrlib.4th | ./ac.jar -ptx PLASMA-2.1-INST.po sys/scripts/DGRLIB.4TH TXT
|
||||
cat scripts/hgrlib.4th | ./ac.jar -ptx PLASMA-2.1-INST.po sys/scripts/HGRLIB.4TH TXT
|
||||
cat scripts/int32.4th | ./ac.jar -ptx PLASMA-2.1-INST.po sys/scripts/INT32.4TH TXT
|
||||
cat scripts/fpu.4th | ./ac.jar -ptx PLASMA-2.1-INST.po sys/scripts/FPU.4TH TXT
|
||||
cat scripts/hdinstall1.4th | ./ac.jar -ptx PLASMA-2.1-INST.po HDINSTALL.4TH TXT
|
||||
cat scripts/hdinstall2.4th | ./ac.jar -ptx PLASMA-2.1-INST.po HDINSTALL2.4TH TXT
|
||||
echo "+PLFORTH HDINSTALL.4TH" | ./ac.jar -ptx PLASMA-2.1-INST.po AUTORUN TXT
|
||||
117
src/mkrel
117
src/mkrel
@@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
make apple
|
||||
|
||||
cp rel/apple/CMD#061000 prodos/CMD.BIN
|
||||
cp rel/apple/CMD128#061000 prodos/CMD128.BIN
|
||||
cp rel/apple/PLASMA.SYSTEM#FF2000 prodos/PLASMA.SYSTEM.SYS
|
||||
@@ -51,87 +55,32 @@ cp ../sysfiles/FP6502.CODE#060000 prodos/sys/FP6502.CODE.BIN
|
||||
cp ../sysfiles/ELEMS.CODE#060000 prodos/sys/ELEMS.CODE.BIN
|
||||
cp rel/apple/SOS#FE1000 prodos/sys/SOS.REL
|
||||
cp rel/apple/GRAFIX#FE1000 prodos/sys/GRAFIX.REL
|
||||
cp rel/HRFORTH#FE1000 prodos/sys/HRFORTH.REL
|
||||
cp rel/HR2FORTH#FE1000 prodos/sys/HR2FORTH.REL
|
||||
cp rel/TX2FORTH#FE1000 prodos/sys/TX2FORTH.REL
|
||||
cp rel/PLFORTH#FE1000 prodos/sys/PLFORTH.REL
|
||||
|
||||
rm -rf prodos/syspro
|
||||
mkdir prodos/syspro
|
||||
cp ../sysfiles/PRODOS#FF0000 prodos/syspro/PRODOS.SYS
|
||||
cp rel/apple/CMD#061000 prodos/syspro/CMD.BIN
|
||||
cp rel/apple/CMD128#061000 prodos/syspro/CMD128.BIN
|
||||
cp rel/apple/PLASMA.SYSTEM#FF2000 prodos/syspro/PLASMA.SYSTEM.SYS
|
||||
cp rel/apple/PLVM.128#FF2000 prodos/syspro/PLVM.128.SYS
|
||||
cp rel/apple/PLVM16#FF2000 prodos/syspro/PLVM16.SYS
|
||||
cp ../doc/Editor.md prodos/syspro/EDITOR.README.TXT
|
||||
|
||||
mkdir prodos/syspro/sys
|
||||
cp rel/apple/FILEIO#FE1000 prodos/syspro/sys/FILEIO.REL
|
||||
cp rel/apple/CONIO#FE1000 prodos/syspro/sys/CONIO.REL
|
||||
cp rel/LINES#FE1000 prodos/syspro/sys/LINES.REL
|
||||
cp rel/apple/HGRFONT#FE1000 prodos/syspro/sys/HGRFONT.REL
|
||||
cp rel/apple/HGRTILE#FE1000 prodos/syspro/sys/HGRTILE.REL
|
||||
cp rel/apple/HGRSPRITE#FE1000 prodos/syspro/sys/HGRSPRITE.REL
|
||||
cp rel/apple/HGRLIB#FE1000 prodos/syspro/sys/HGRLIB.REL
|
||||
cp rel/apple/GRLIB#FE1000 prodos/syspro/sys/GRLIB.REL
|
||||
cp rel/apple/DGRLIB#FE1000 prodos/syspro/sys/DGRLIB.REL
|
||||
cp rel/apple/COPY#FE1000 prodos/syspro/sys/COPY.REL
|
||||
cp rel/apple/DEL#FE1000 prodos/syspro/sys/DEL.REL
|
||||
cp rel/apple/REN#FE1000 prodos/syspro/sys/REN.REL
|
||||
cp rel/apple/CAT#FE1000 prodos/syspro/sys/CAT.REL
|
||||
cp rel/apple/NEWDIR#FE1000 prodos/syspro/sys/NEWDIR.REL
|
||||
cp rel/apple/TYPE#FE1000 prodos/syspro/sys/TYPE.REL
|
||||
cp rel/apple/MATCHFILES#FE1000 prodos/syspro/sys/MATCHFILES.REL
|
||||
cp rel/ARGS#FE1000 prodos/syspro/sys/ARGS.REL
|
||||
cp rel/ED#FE1000 prodos/syspro/sys/ED.REL
|
||||
cp rel/FIBER#FE1000 prodos/syspro/sys/FIBER.REL
|
||||
cp rel/LONGJMP#FE1000 prodos/syspro/sys/LONGJMP.REL
|
||||
cp rel/MEMMGR#FE1000 prodos/syspro/sys/MEMMGR.REL
|
||||
cp rel/apple/MOUSE#FE1000 prodos/syspro/sys/MOUSE.REL
|
||||
cp rel/apple/PORTIO#FE1000 prodos/syspro/sys/PORTIO.REL
|
||||
cp rel/apple/JOYBUZZ#FE1000 prodos/syspro/sys/JOYBUZZ.REL
|
||||
cp rel/apple/SNDSEQ#FE1000 prodos/syspro/sys/SNDSEQ.REL
|
||||
cp rel/apple/JIT#FE1000 prodos/syspro/sys/JIT.REL
|
||||
cp rel/apple/JIT16#FE1000 prodos/syspro/sys/JIT16.REL
|
||||
cp rel/apple/JITUNE#FE1000 prodos/syspro/sys/JITUNE.REL
|
||||
cp rel/apple/ZIPCHIP#FE1000 prodos/syspro/sys/ZIPCHIP.REL
|
||||
cp rel/LZ4#FE1000 prodos/syspro/sys/LZ4.REL
|
||||
cp rel/INT32#FE1000 prodos/syspro/sys/INT32.REL
|
||||
|
||||
rm -rf prodos/sysinet
|
||||
mkdir prodos/sysinet
|
||||
mkdir prodos/sysinet/sys
|
||||
cp rel/INET#FE1000 prodos/sysinet/sys/INET.REL
|
||||
cp rel/DHCP#FE1000 prodos/sysinet/sys/DHCP.REL
|
||||
cp rel/ETHERIP#FE1000 prodos/sysinet/sys/ETHERIP.REL
|
||||
cp rel/apple/UTHERNET2#FE1000 prodos/sysinet/sys/UTHERNET2.REL
|
||||
cp rel/apple/UTHERNET#FE1000 prodos/sysinet/sys/UTHERNET.REL
|
||||
cp rel/TFTPD#FE1000 prodos/sysinet/sys/TFTPD.REL
|
||||
|
||||
rm -rf prodos/fpsos
|
||||
mkdir prodos/fpsos
|
||||
cp ../sysfiles/SOS.KERNEL#0C0000 prodos/fpsos/SOS.KERNEL.\$0C
|
||||
cp ../sysfiles/SOS.DRIVER#0C0000 prodos/fpsos/SOS.DRIVER.\$0C
|
||||
cp rel/apple/SOS.INTERP#050000 prodos/fpsos/SOS.INTERP.\$05
|
||||
cp rel/apple/SOS.CMD#FE1000 prodos/fpsos/SOS.CMD.REL
|
||||
cp rel/apple/SOS.INTERPJIT#050000 prodos/fpsos/SOS.INTERPJIT.\$05
|
||||
cp rel/apple/SOS.CMDJIT#FE1000 prodos/fpsos/SOS.CMDJIT.REL
|
||||
|
||||
mkdir prodos/fpsos/sys
|
||||
cp rel/apple/SOS#FE1000 prodos/fpsos/sys/SOS.REL
|
||||
cp rel/apple/GRAFIX#FE1000 prodos/fpsos/sys/GRAFIX.REL
|
||||
cp rel/FPSTR#FE1000 prodos/fpsos/sys/FPSTR.REL
|
||||
cp rel/FPU#FE1000 prodos/fpsos/sys/FPU.REL
|
||||
cp rel/SANE#FE1000 prodos/fpsos/sys/SANE.REL
|
||||
cp ../sysfiles/FP6502.CODE#060000 prodos/fpsos/sys/FP6502.CODE.BIN
|
||||
cp ../sysfiles/ELEMS.CODE#060000 prodos/fpsos/sys/ELEMS.CODE.BIN
|
||||
mkdir prodos/sys/scripts
|
||||
cp scripts/plasma.4th prodos/sys/scripts/PLASMA.4TH.TXT
|
||||
cp scripts/machid.4th prodos/sys/scripts/MACHID.4TH.TXT
|
||||
cp scripts/conio.4th prodos/sys/scripts/CONIO.4TH.TXT
|
||||
cp scripts/fileio.4th prodos/sys/scripts/FILEIO.4TH.TXT
|
||||
cp scripts/grlib.4th prodos/sys/scripts/GRLIB.4TH.TXT
|
||||
cp scripts/dgrlib.4th prodos/sys/scripts/DGRLIB.4TH.TXT
|
||||
cp scripts/hgrlib.4th prodos/sys/scripts/HGRLIB.4TH.TXT
|
||||
cp scripts/grafix.4th prodos/sys/scripts/GRAFIX.4TH.TXT
|
||||
cp scripts/int32.4th prodos/sys/scripts/INT32.4TH.TXT
|
||||
cp scripts/fpu.4th prodos/sys/scripts/FPU.4TH.TXT
|
||||
|
||||
rm -rf prodos/demos
|
||||
mkdir prodos/demos
|
||||
cp rel/INT32TEST#FE1000 prodos/demos/INT32TEST.REL
|
||||
cp rel/apple/CONIOTST#FE1000 prodos/demos/CONIOTST.REL
|
||||
cp rel/apple/ROD#FE1000 prodos/demos/ROD.REL
|
||||
cp rel/RPNCALC#FE1000 prodos/demos/RPNCALC.REL
|
||||
cp rel/LZ4CAT#FE1000 prodos/demos/LZ4CAT.REL
|
||||
cp ../doc/ROGUE.LZ4.BIN prodos/demos/ROGUE.LZ4.BIN
|
||||
cp rel/PRIMEGAP#FE1000 prodos/demos/PRIMEGAP.REL
|
||||
cp rel/INT32TEST#FE1000 prodos/demos/INT32TEST.REL
|
||||
cp rel/apple/CONIOTEST#FE1000 prodos/demos/CONIOTEST.REL
|
||||
cp rel/apple/ROD#FE1000 prodos/demos/ROD.REL
|
||||
cp rel/RPNCALC#FE1000 prodos/demos/RPNCALC.REL
|
||||
cp rel/LZ4CAT#FE1000 prodos/demos/LZ4CAT.REL
|
||||
cp ../doc/ROGUE.LZ4.BIN prodos/demos/ROGUE.LZ4.BIN
|
||||
cp rel/PRIMEGAP#FE1000 prodos/demos/PRIMEGAP.REL
|
||||
|
||||
mkdir prodos/demos/rogue
|
||||
cp rel/ROGUE#FE1000 prodos/demos/rogue/ROGUE.REL
|
||||
@@ -180,7 +129,7 @@ cp rel/CODEOPT#FE1000 prodos/bld/CODEOPT.REL
|
||||
mkdir prodos/bld/samples
|
||||
cp samplesrc/hello.pla prodos/bld/samples/HELLO.PLA.TXT
|
||||
cp samplesrc/int32test.pla prodos/bld/samples/INT32TEST.PLA.TXT
|
||||
cp samplesrc/coniotst.pla prodos/bld/samples/CONIOTST.PLA.TXT
|
||||
cp samplesrc/coniotest.pla prodos/bld/samples/CONIOTEST.PLA.TXT
|
||||
cp samplesrc/grtest.pla prodos/bld/samples/GRTEST.PLA.TXT
|
||||
cp samplesrc/dgrtest.pla prodos/bld/samples/DGRTEST.PLA.TXT
|
||||
cp samplesrc/hgrtest.pla prodos/bld/samples/HGRTEST.PLA.TXT
|
||||
@@ -203,6 +152,18 @@ cp samplesrc/fppow.pla prodos/bld/samples/FPPOW.PLA.TXT
|
||||
cp utilsrc/apple/mon.pla prodos/bld/samples/MON.PLA.TXT
|
||||
cp utilsrc/apple/zipchip.pla prodos/bld/samples/ZIPCHIP.PLA.TXT
|
||||
|
||||
mkdir prodos/bld/scripts
|
||||
cp scripts/rod.4th prodos/bld/scripts/ROD.4TH.TXT
|
||||
cp scripts/bounce.4th prodos/bld/scripts/BOUNCE.4TH.TXT
|
||||
cp scripts/dbounce.4th prodos/bld/scripts/DBOUNCE.4TH.TXT
|
||||
cp scripts/hrbounce.4th prodos/bld/scripts/HRBOUNCE.4TH.TXT
|
||||
cp scripts/plot.4th prodos/bld/scripts/PLOT.4TH.TXT
|
||||
cp scripts/hrplot.4th prodos/bld/scripts/HRPLOT.4TH.TXT
|
||||
cp scripts/gfxplot.4th prodos/bld/scripts/GFXPLOT.4TH.TXT
|
||||
cp scripts/hdinstall.4th prodos/bld/scripts/HDINSTALL.4TH.TXT
|
||||
cp scripts/hdinstall1.4th prodos/bld/scripts/HDINSTALL1.4TH.TXT
|
||||
cp scripts/hdinstall2.4th prodos/bld/scripts/HDINSTALL2.4TH.TXT
|
||||
|
||||
#mkdir prodos/bld/examples
|
||||
#cp samplesrc/examples/ex.1.pla prodos/bld/examples/EX.1.PLA.TXT
|
||||
#cp samplesrc/examples/ex.2.pla prodos/bld/examples/EX.2.PLA.TXT
|
||||
|
||||
40
src/mksys
Executable file
40
src/mksys
Executable file
@@ -0,0 +1,40 @@
|
||||
cp ../sysfiles/BLANK140.po PLASMA-2.1-SYS.po
|
||||
./ac.jar -n PLASMA-2.1-SYS.po PLASMA.SYS
|
||||
#cat ../sysfiles/PRODOS#FF0000 | ./ac.jar -p PLASMA-2.1-SYS.po PRODOS SYS
|
||||
#cat rel/apple/CMD#061000 | ./ac.jar -p PLASMA-2.1-SYS.po CMD BIN $1000
|
||||
#cat rel/apple/CMD128#061000 | ./ac.jar -p PLASMA-2.1-SYS.po CMD128 BIN $1000
|
||||
#cat rel/apple/PLASMA.SYSTEM#FF2000 | ./ac.jar -p PLASMA-2.1-SYS.po PLASMA.SYSTEM SYS
|
||||
#cat rel/apple/PLVM.128#FF2000 | ./ac.jar -p PLASMA-2.1-SYS.po PLVM.128 SYS
|
||||
#cat rel/apple/PLVM16#FF2000 | ./ac.jar -p PLASMA-2.1-SYS.po PLVM16 SYS
|
||||
cat ../doc/Editor.md | ./ac.jar -ptx PLASMA-2.1-SYS.po EDITOR.README TXT
|
||||
#cat rel/apple/FILEIO#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/FILEIO REL
|
||||
#cat rel/apple/CONIO#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/CONIO REL
|
||||
cat rel/LINES#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/LINES REL
|
||||
cat rel/apple/HGRFONT#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/HGRFONT REL
|
||||
cat rel/apple/HGRTILE#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/HGRTILE REL
|
||||
cat rel/apple/HGRSPRITE#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/HGRSPRITE REL
|
||||
cat rel/apple/HGRLIB#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/HGRLIB REL
|
||||
cat rel/apple/GRLIB#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/GRLIB REL
|
||||
cat rel/apple/DGRLIB#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/DGRLIB REL
|
||||
#cat rel/apple/COPY#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/COPY REL
|
||||
#cat rel/apple/DEL#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/DEL REL
|
||||
#cat rel/apple/REN#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/REN REL
|
||||
#cat rel/apple/CAT#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/CAT REL
|
||||
#cat rel/apple/NEWDIR#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/NEWDIR REL
|
||||
#cat rel/apple/TYPE#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/TYPE REL
|
||||
#cat rel/apple/MATCHFILES#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/MATCHFILES REL
|
||||
#cat rel/ARGS#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/ARGS REL
|
||||
cat rel/ED#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/ED REL
|
||||
cat rel/FIBER#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/FIBER REL
|
||||
#cat rel/LONGJMP#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/LONGJMP REL
|
||||
cat rel/MEMMGR#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/MEMMGR REL
|
||||
cat rel/apple/MOUSE#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/MOUSE REL
|
||||
cat rel/apple/PORTIO#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/PORTIO REL
|
||||
cat rel/apple/JOYBUZZ#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/JOYBUZZ REL
|
||||
cat rel/apple/SNDSEQ#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/SNDSEQ REL
|
||||
#cat rel/apple/JIT#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/JIT REL
|
||||
#cat rel/apple/JIT16#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/JIT16 REL
|
||||
cat rel/apple/JITUNE#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/JITUNE REL
|
||||
cat rel/apple/ZIPCHIP#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/ZIPCHIP REL
|
||||
cat rel/LZ4#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/LZ4 REL
|
||||
#cat rel/INT32#FE1000 | ./ac.jar -p PLASMA-2.1-SYS.po sys/INT32 REL
|
||||
BIN
src/mockingboard/LLtitle.mid
Normal file
BIN
src/mockingboard/LLtitle.mid
Normal file
Binary file not shown.
1159
src/mockingboard/LLtitle.s
Normal file
1159
src/mockingboard/LLtitle.s
Normal file
File diff suppressed because it is too large
Load Diff
BIN
src/mockingboard/LLtitle.seq
Normal file
BIN
src/mockingboard/LLtitle.seq
Normal file
Binary file not shown.
5
src/runrel
Executable file
5
src/runrel
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
./mkrel
|
||||
open /Applications/Virtual\ \]\[/Virtual\ \]\[.app/
|
||||
|
||||
@@ -24,8 +24,8 @@ def dgrTest#0
|
||||
byte b, l, k
|
||||
word i, j, ii, ij
|
||||
|
||||
b = dgrMode(TRUE)
|
||||
dgrDrawBuf(0)
|
||||
b = dgrMode(dgrPage1)
|
||||
dgrDrawBuf(dgrPage1)
|
||||
for k = 15 downto 0
|
||||
dgrClear(k)
|
||||
next
|
||||
@@ -43,7 +43,7 @@ def dgrTest#0
|
||||
i = 40
|
||||
j = 10
|
||||
^$C010
|
||||
dgrDrawBuf(1)
|
||||
dgrDrawBuf(dgrPage2)
|
||||
while ^$C000 < 128
|
||||
dgrFill(k, k, @tile1)
|
||||
dgrBLT(i, j, 8, 8, @sprite1)
|
||||
@@ -59,7 +59,7 @@ def dgrTest#0
|
||||
fin
|
||||
loop
|
||||
^$C010
|
||||
dgrMode(FALSE)
|
||||
dgrMode(dgrOff)
|
||||
end
|
||||
|
||||
dgrTest
|
||||
|
||||
@@ -24,8 +24,8 @@ def grTest#0
|
||||
byte b, l, k
|
||||
word i, j, ii, ij
|
||||
|
||||
b = grMode(TRUE)
|
||||
grDrawBuf(0)
|
||||
b = grMode(grPage1)
|
||||
grDrawBuf(grPage1)
|
||||
for k = 15 downto 0
|
||||
grClear(k)
|
||||
next
|
||||
@@ -43,7 +43,7 @@ def grTest#0
|
||||
i = 20
|
||||
j = 10
|
||||
^$C010
|
||||
grDrawBuf(1)
|
||||
grDrawBuf(grPage2)
|
||||
while ^$C000 < 128
|
||||
grFill(k, k, @tile1)
|
||||
grBLT(i, j, 8, 8, @sprite1)
|
||||
@@ -59,7 +59,7 @@ def grTest#0
|
||||
fin
|
||||
loop
|
||||
^$C010
|
||||
grMode(FALSE)
|
||||
grMode(grOff)
|
||||
end
|
||||
|
||||
grTest
|
||||
|
||||
212
src/samplesrc/hgrogue.combat.pla
Normal file
212
src/samplesrc/hgrogue.combat.pla
Normal file
@@ -0,0 +1,212 @@
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/conio.plh"
|
||||
|
||||
import roguemap
|
||||
predef moveplayer
|
||||
end
|
||||
|
||||
struc t_pos
|
||||
byte xpos
|
||||
byte ypos
|
||||
end
|
||||
|
||||
//
|
||||
// Player
|
||||
//
|
||||
|
||||
struc t_player
|
||||
byte[t_pos]
|
||||
byte angle
|
||||
byte lamp
|
||||
byte fov
|
||||
byte skill
|
||||
byte health
|
||||
byte energy
|
||||
word oil
|
||||
byte gold
|
||||
byte key
|
||||
byte raft
|
||||
byte[32] name[32]
|
||||
end
|
||||
|
||||
//
|
||||
// ASCII Warrior
|
||||
//
|
||||
|
||||
byte[] ascii_warrior
|
||||
byte = " | "
|
||||
byte = " T "
|
||||
byte = " \\ () "
|
||||
byte = " \\^ "
|
||||
byte = " #\\_] "
|
||||
byte = " # ] "
|
||||
byte = " /\\ "
|
||||
byte = " / \\ "
|
||||
byte = " / / "
|
||||
byte = " = = "
|
||||
|
||||
//
|
||||
// Other monsters
|
||||
//
|
||||
|
||||
struc t_other
|
||||
byte[t_pos]
|
||||
byte kind
|
||||
byte tileid
|
||||
byte life
|
||||
byte power
|
||||
word prev_other
|
||||
word next_other
|
||||
end
|
||||
|
||||
//
|
||||
// ASCII Enemy Art
|
||||
//
|
||||
byte[] ascii_thief
|
||||
byte = " "
|
||||
byte = " "
|
||||
byte = " ____ "
|
||||
byte = " /o_o\\\\ "
|
||||
byte = "| \\ = // "
|
||||
byte = "T /###|\\\\ "
|
||||
byte = "@==###||| "
|
||||
byte = " xxx@// "
|
||||
byte = " #|#|\\\\ "
|
||||
byte = " #|#| \\\\"
|
||||
|
||||
byte[] ascii_ogre
|
||||
byte = " :^; "
|
||||
byte = " @ }\"{ "
|
||||
byte = " # /'\\ "
|
||||
byte = " ##=<#>=##"
|
||||
byte = " ===== #"
|
||||
byte = " \\===/ ?"
|
||||
byte = " ===== :"
|
||||
byte = " ()^() :"
|
||||
byte = " () () *"
|
||||
byte = " {{} {}} "
|
||||
|
||||
byte[] ascii_zombie
|
||||
byte = " \\\\/ "
|
||||
byte = " {o|0} "
|
||||
byte = " { ^ } "
|
||||
byte = " ### "
|
||||
byte = " /:\\ "
|
||||
byte = " /%%%%%\\ "
|
||||
byte = "|%%%//%%|\\"
|
||||
byte = "|%%%\\%%%||"
|
||||
byte = "|%%//%%%/|"
|
||||
byte = "<===|@___/"
|
||||
|
||||
byte[] ascii_rogue
|
||||
byte = " "
|
||||
byte = " \\ / "
|
||||
byte = " < - - > "
|
||||
byte = " ( \" ) "
|
||||
byte = " \\VVV/ "
|
||||
byte = " \\M/ "
|
||||
byte = " ^^^^^^ "
|
||||
byte = " / \\ "
|
||||
byte = "( ) ^^>--="
|
||||
byte = "( ) WW>--//"
|
||||
|
||||
word ascii_entity = @ascii_thief, @ascii_ogre, @ascii_zombie, @ascii_rogue
|
||||
//
|
||||
// Monster types
|
||||
//
|
||||
byte thief = "Thief", 5
|
||||
byte ogre = "Ogre", 20
|
||||
byte zombie = "Zombie", 40
|
||||
byte rogue = "Rogue", 80
|
||||
export word entity = @thief, @ogre, @zombie, @rogue
|
||||
export word entities = 0
|
||||
|
||||
//
|
||||
// Combat Return 1 if running away, 0 if end of fight
|
||||
//
|
||||
|
||||
def win#0
|
||||
conio:tone(30, 15)
|
||||
conio:tone(5, 15)
|
||||
conio:tone(5, 15)
|
||||
conio:tone(30, 5)
|
||||
end
|
||||
|
||||
export def fight(player, enemy)
|
||||
word p_atck, e_atck
|
||||
|
||||
conio:echo(ECHO_ON)
|
||||
repeat
|
||||
conio:home()
|
||||
conio:gotoxy(0, 0)
|
||||
puts(player+name)
|
||||
conio:gotoxy(1, 2)
|
||||
puts("Skill :"); puti(player->skill)
|
||||
conio:gotoxy(1, 3)
|
||||
puts("Health :"); puti(player->health)
|
||||
conio:gotoxy(1, 4)
|
||||
puts("Energy :"); puti(player->energy)
|
||||
conio:gotoxy(20, 0)
|
||||
puts(entity[enemy->kind])
|
||||
conio:gotoxy(21, 2)
|
||||
puts("Power :"); puti(enemy->power)
|
||||
conio:gotoxy(21, 3)
|
||||
puts("Life :"); puti(enemy->life)
|
||||
for e_atck = 0 to 9
|
||||
conio:gotoxy(0, 10 + e_atck)
|
||||
puts(@ascii_warrior + e_atck * 11)
|
||||
conio:gotoxy(20, 10 + e_atck)
|
||||
puts(ascii_entity[enemy->kind] + e_atck * 11)
|
||||
next
|
||||
conio:gotoxy(12, 8); puts("F)ight or R)un?")
|
||||
if toupper(conio:getkey()) == 'R'
|
||||
conio:echo(ECHO_OFF)
|
||||
return 1
|
||||
fin
|
||||
//
|
||||
// Turn player in random direction
|
||||
//
|
||||
player->angle = conio:rnd() & 7
|
||||
//
|
||||
// Calculate attack (with a little random variation)
|
||||
//
|
||||
p_atck = player->skill + player->energy / 10 - enemy->power / 25 + (conio:rnd() & 7)
|
||||
e_atck = enemy->power - player->skill / 5 - player->energy / 20 + (conio:rnd() & 7)
|
||||
if enemy->life > p_atck
|
||||
enemy->life = enemy->life - p_atck
|
||||
else
|
||||
win
|
||||
enemy->life = 0
|
||||
p_atck = player->skill + enemy->power / 3
|
||||
if p_atck > 100 // Limit skill
|
||||
p_atck = 100
|
||||
fin
|
||||
player->skill = p_atck
|
||||
//
|
||||
// Unlink dead enemy from entities list
|
||||
//
|
||||
if enemy == entities
|
||||
entities = enemy=>next_other
|
||||
fin
|
||||
if enemy=>next_other
|
||||
enemy=>next_other=>prev_other = enemy=>prev_other
|
||||
fin
|
||||
if enemy=>prev_other
|
||||
enemy=>prev_other=>next_other = enemy=>next_other
|
||||
fin
|
||||
fin
|
||||
if player->health > e_atck
|
||||
player->health = player->health - e_atck
|
||||
else
|
||||
player->energy = 0
|
||||
player->health = 0
|
||||
fin
|
||||
if player->energy >= 4
|
||||
player->energy = player->energy - 4
|
||||
fin
|
||||
until player->health == 0 or enemy->life == 0
|
||||
conio:echo(ECHO_OFF)
|
||||
return 0
|
||||
end
|
||||
|
||||
done
|
||||
464
src/samplesrc/hgrogue.map.pla
Normal file
464
src/samplesrc/hgrogue.map.pla
Normal file
@@ -0,0 +1,464 @@
|
||||
//
|
||||
// Map module
|
||||
//
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/conio.plh"
|
||||
include "inc/fileio.plh"
|
||||
|
||||
//
|
||||
// Title page
|
||||
//
|
||||
|
||||
byte[] initstr
|
||||
byte = " ( )\n"
|
||||
byte = " )\\ ) ( /( (\n"
|
||||
byte = "(()/( )\\()) )\\ ) ( (\n"
|
||||
byte = " /(_))((_)\\ (()/( )\\ )\\\n"
|
||||
byte = "(_)) ((_) /(_))_ _ ((_)((_)\n"
|
||||
byte = "| _ \\ / _ \\(_)) __|| | | || __|\n"
|
||||
byte = "| / | (_) | | (_ || |_| || _|\n"
|
||||
byte = "|_|_\\ \\___/ \\___| \\___/ |___|\n"
|
||||
byte = "\n"
|
||||
byte = " By Resman\n"
|
||||
byte = " Artwork by Seth Sternberger\n"
|
||||
byte = ""
|
||||
word titlestr = @initstr
|
||||
|
||||
//
|
||||
// Octant beam parameters
|
||||
//
|
||||
|
||||
const beamdepth = 23
|
||||
|
||||
byte dbeam = 0,2,4,8,12,17,22,28,37,44,53,63,72,83,96,109,123,137,151,166,183,202,220,239
|
||||
const beampts = 240
|
||||
|
||||
word[] posibeam
|
||||
word = 0
|
||||
word = 1,0
|
||||
word = 1,0
|
||||
word = 2,2,1,0
|
||||
word = 3,2,1,0
|
||||
word = 4,3,2,1,0
|
||||
word = 4,3,2,1,0
|
||||
word = 5,4,3,2,1,0
|
||||
word = 6,5,5,4,3,3,2,1,0
|
||||
word = 6,5,4,3,2,1,0
|
||||
word = 7,7,6,5,4,3,2,1,0
|
||||
word = 8,7,6,6,5,4,3,2,1,0
|
||||
word = 8,7,6,5,4,3,2,1,0
|
||||
word = 9,9,8,7,6,5,4,3,2,1,0
|
||||
word = 10,9,8,8,7,6,5,4,4,3,2,1,0
|
||||
word = 11,10,10,9,8,7,6,5,4,3,2,1,0
|
||||
word = 11,10,9,9,8,7,7,6,5,4,3,2,1,0
|
||||
word = 12,12,11,10,9,8,7,6,5,4,3,2,1,0
|
||||
word = 13,12,11,10,9,8,7,6,5,4,3,2,1,0
|
||||
word = 13,12,11,11,10,9,8,7,6,5,4,3,2,1,0
|
||||
word = 14,14,13,12,11,10,10,9,8,7,6,5,4,3,2,1,0
|
||||
word = 15,14,13,13,12,12,11,10,9,8,8,7,6,5,4,3,2,1,0
|
||||
word = 16,15,14,13,12,11,10,9,8,7,6,5,5,4,3,2,1,0
|
||||
word = 16,15,15,14,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
|
||||
word[] posjbeam
|
||||
word = 0
|
||||
word = 1,1
|
||||
word = 2,2
|
||||
word = 2,3,3,3
|
||||
word = 3,4,4,4
|
||||
word = 4,4,5,5,5
|
||||
word = 5,5,6,6,6
|
||||
word = 5,6,6,7,7,7
|
||||
word = 6,6,7,7,7,8,8,8,8
|
||||
word = 7,8,8,9,9,9,9
|
||||
word = 7,8,8,9,9,10,10,10,10
|
||||
word = 8,9,9,10,10,10,11,11,11,11
|
||||
word = 9,10,11,11,11,12,12,12,12
|
||||
word = 9,10,10,11,12,12,12,13,13,13,13
|
||||
word = 10,11,11,12,12,13,13,13,14,14,14,14,14
|
||||
word = 11,11,12,12,13,13,14,14,15,15,15,15,15
|
||||
word = 12,13,13,14,14,14,15,15,15,16,16,16,16,16
|
||||
word = 12,13,13,14,15,15,16,16,16,17,17,17,17,17
|
||||
word = 13,14,14,15,16,16,17,17,17,18,18,18,18,18
|
||||
word = 14,15,15,16,16,17,17,18,18,18,19,19,19,19,19
|
||||
word = 14,15,15,16,17,17,18,18,18,19,19,19,20,20,20,20,20
|
||||
word = 15,16,16,17,17,18,18,19,19,19,20,20,20,20,21,21,21,21,21
|
||||
word = 16,16,17,18,19,19,20,20,21,21,21,21,22,22,22,22,22,22
|
||||
word = 17,17,18,18,19,19,20,20,21,21,22,22,22,23,23,23,23,23,23
|
||||
word[beampts] negibeam, negjbeam
|
||||
|
||||
byte[] vbeam
|
||||
byte = 0
|
||||
byte = 0,0
|
||||
byte = 2,2
|
||||
byte = 1,3,4,4
|
||||
byte = 5,7,7,8
|
||||
byte = 9,6,11,11,12
|
||||
byte = 14,10,16,16,17
|
||||
byte = 13,19,15,21,21,22
|
||||
byte = 23,18,24,25,20,26,26,27,28
|
||||
byte = 30,32,33,35,35,36,37
|
||||
byte = 29,38,31,40,34,42,42,43,44
|
||||
byte = 45,47,39,48,49,41,51,51,52,53
|
||||
byte = 46,56,58,59,50,60,61,62,63
|
||||
byte = 54,64,55,57,67,68,60,69,70,71,72
|
||||
byte = 73,75,65,76,66,78,79,69,80,80,81,82,83
|
||||
byte = 84,74,85,86,88,77,90,91,93,93,94,95,96
|
||||
byte = 98,100,87,101,102,89,103,104,92,105,106,107,108,109
|
||||
byte = 97,110,99,112,114,115,117,118,105,119,120,121,122,123
|
||||
byte = 124,126,111,113,129,116,131,132,119,133,134,135,136,137
|
||||
byte = 125,140,127,141,128,143,130,145,146,133,147,148,149,150,151
|
||||
byte = 138,152,139,154,156,142,157,158,144,160,161,147,162,163,164,165,166
|
||||
byte = 167,169,153,170,155,171,172,174,175,159,176,177,178,178,179,180,181,182,183
|
||||
byte = 184,168,186,188,190,173,192,193,195,196,197,197,214,198,199,200,201,202
|
||||
byte = 204,185,205,187,206,189,208,191,210,194,212,213,214,215,216,217,218,219,220
|
||||
|
||||
byte[beampts] vispix = 1
|
||||
|
||||
const rowshift = 6
|
||||
const maprows = 64
|
||||
const mapcols = 64
|
||||
const mapsize = maprows*mapcols
|
||||
|
||||
const WALL_TILE = '#'
|
||||
const FLOOR_TILE = '.'
|
||||
const TORCH_TILE = '*'
|
||||
const PIT_TILE = ' '
|
||||
const DOOR_TILE = '+'
|
||||
const LOCKED_TILE = '%'
|
||||
const WATER1_TILE = '>'
|
||||
const WATER2_TILE = '<'
|
||||
const KEY_TILE = ','
|
||||
const RAFT_TILE = '@'
|
||||
const GOLD_TILE = '$'
|
||||
const FOOD_TILE = '&'
|
||||
const ENTER_TILE = '-'
|
||||
const EXIT_TILE = '='
|
||||
const OPAQUE_TILE = $01
|
||||
const VIEWED_TILE = $80
|
||||
const LIT_TILE = $80
|
||||
const INV_TILE = $3F
|
||||
const MAP_TILE = $7F
|
||||
|
||||
byte catacomb = "LEVEL0"
|
||||
word map, viewmap
|
||||
|
||||
const xcentr = 20
|
||||
const ycentr = 12
|
||||
const scrnwidth = 40
|
||||
const scrnheight = 22
|
||||
|
||||
//
|
||||
// Buffer to void checks in octant caster
|
||||
//
|
||||
|
||||
byte[scrnwidth] linebuffer
|
||||
|
||||
word = @linebuffer, @linebuffer, @linebuffer, @linebuffer, @linebuffer
|
||||
word = @linebuffer, @linebuffer, @linebuffer, @linebuffer, @linebuffer
|
||||
|
||||
word[] screen
|
||||
word = $400, $480, $500, $580, $600, $680, $700, $780
|
||||
word = $428, $4A8, $528, $5A8, $628, $6A8, $728, $7A8
|
||||
word = $450, $4D0, $550, $5D0, $650, $6D0, $750, @linebuffer // $7D0
|
||||
|
||||
word = @linebuffer, @linebuffer, @linebuffer, @linebuffer, @linebuffer
|
||||
word = @linebuffer, @linebuffer, @linebuffer, @linebuffer, @linebuffer
|
||||
|
||||
//
|
||||
// Load map - levels 0 to 9
|
||||
//
|
||||
|
||||
export def loadmap(level)
|
||||
byte mapref, row, l
|
||||
|
||||
//
|
||||
// Init the view map
|
||||
//
|
||||
if not viewmap
|
||||
viewmap = heapalloc(mapsize)
|
||||
fin
|
||||
memset(viewmap, $A0A0, mapsize)
|
||||
//
|
||||
// Load catacomb map from file
|
||||
//
|
||||
if not map
|
||||
map = heapalloc(mapsize)
|
||||
fin
|
||||
memset(map, $2323, mapsize) // Solid walls
|
||||
//
|
||||
// Set level map and read it
|
||||
//
|
||||
catacomb[catacomb] = '0' + level
|
||||
mapref = fileio:open(@catacomb)
|
||||
if mapref
|
||||
fileio:newline(mapref, $7F, $0D)
|
||||
for row = 1 to maprows - 2
|
||||
l = fileio:read(mapref, map + (row << 6) + 1, mapcols)
|
||||
^(map + (row << 6) + l) = WALL_TILE
|
||||
next
|
||||
fileio:close(mapref)
|
||||
return TRUE
|
||||
fin
|
||||
return FALSE
|
||||
end
|
||||
|
||||
//
|
||||
// Tile access to map
|
||||
//
|
||||
|
||||
export def getmaptile(xmap, ymap)
|
||||
return ^(map + (ymap << rowshift) + xmap)
|
||||
end
|
||||
|
||||
export def setmaptile(xmap, ymap, tile)#0
|
||||
word imap
|
||||
|
||||
imap = (ymap << rowshift) + xmap
|
||||
^(map + imap) = tile
|
||||
if ^(viewmap + imap) <> $A0
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
fin
|
||||
end
|
||||
|
||||
export def updtmaptile(xmap, ymap, tile)#0
|
||||
word imap
|
||||
|
||||
imap = (ymap << rowshift) + xmap
|
||||
^(map + imap) = (^(map + imap) & LIT_TILE) | tile
|
||||
if ^(viewmap + imap) <> $A0
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
fin
|
||||
end
|
||||
|
||||
//
|
||||
// Light torches in map
|
||||
//
|
||||
|
||||
export def lighttorches#0
|
||||
word imap, tmap
|
||||
byte xmap, ymap, xt, yt
|
||||
|
||||
for ymap = 1 to maprows - 2
|
||||
for xmap = 1 to mapcols - 2
|
||||
imap = (ymap << rowshift) + xmap
|
||||
if ^(map + imap) & MAP_TILE == TORCH_TILE
|
||||
for yt = ymap - 1 to ymap + 1
|
||||
for xt = xmap - 1 to xmap + 1
|
||||
tmap = (yt << rowshift) + xt
|
||||
^(map + tmap) = ^(map + tmap) | LIT_TILE
|
||||
next
|
||||
next
|
||||
fin
|
||||
next
|
||||
if not (ymap & 7)
|
||||
putc('.')
|
||||
fin
|
||||
next
|
||||
end
|
||||
|
||||
//
|
||||
// Draw the map. Return 0 if any light visible, 1 if in complete darkness
|
||||
//
|
||||
|
||||
def castoctant(darkness, lightdist, viewdist, xorg, yorg, xbeam, ybeam)#1
|
||||
word imap
|
||||
byte l, dist, tile, adjtile, occluded,
|
||||
|
||||
dist = lightdist + 1
|
||||
occluded = 1
|
||||
//
|
||||
// Run through lit octant beam points
|
||||
//
|
||||
for l = 1 to dbeam[lightdist]
|
||||
//
|
||||
// Check parent visiblity
|
||||
//
|
||||
if vispix[vbeam[l]]
|
||||
imap = ((yorg + ybeam=>[l]) << rowshift) + xorg + xbeam=>[l]
|
||||
tile = ^(map + imap)
|
||||
if tile & OPAQUE_TILE
|
||||
//
|
||||
// The view stops here
|
||||
//
|
||||
vispix[l] = 0
|
||||
else
|
||||
//
|
||||
// This tile is transparent
|
||||
//
|
||||
vispix[l] = 1
|
||||
//
|
||||
// Check adjacent tile for opaqueness - improves wall display
|
||||
//
|
||||
//adjtile = ^(map + imap + adjx) & INV_TILE
|
||||
//if adjtile & OPAQUE_TILE
|
||||
// ^(viewmap + imap + adjdir) = adjtile | VIEWED_TILE
|
||||
// screen.[ycentr + ybeam=>[l], xcentr + xbeam=>[l]+1] = adjtile
|
||||
//fin
|
||||
fin
|
||||
//
|
||||
// Update view
|
||||
//
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr + ybeam=>[l], xcentr + xbeam=>[l]] = tile & INV_TILE
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
next
|
||||
//
|
||||
// Run through visible octant beam points
|
||||
//
|
||||
for l = dbeam[lightdist]+1 to dbeam[viewdist]
|
||||
//
|
||||
// Check parent visiblity
|
||||
//
|
||||
if vispix[vbeam[l]]
|
||||
imap = ((yorg + ybeam=>[l]) << rowshift) + xorg + xbeam=>[l]
|
||||
tile = ^(map + imap)
|
||||
if tile & OPAQUE_TILE
|
||||
//
|
||||
// The view stops here
|
||||
//
|
||||
vispix[l] = 0
|
||||
else
|
||||
//
|
||||
// This tile is transparent
|
||||
//
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
//
|
||||
// If the tile is in light, update view
|
||||
//
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr + ybeam=>[l], xcentr + xbeam=>[l]] = tile & INV_TILE
|
||||
darkness = FALSE
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
//
|
||||
// Advance beam distance
|
||||
//
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
//
|
||||
// Beam fully occluded
|
||||
//
|
||||
return darkness
|
||||
fin
|
||||
//
|
||||
// Update distance
|
||||
//
|
||||
occluded = 1
|
||||
dist++
|
||||
fin
|
||||
next
|
||||
return darkness
|
||||
end
|
||||
export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
word ymap, xmap, imap, o
|
||||
byte yscr, xscr, darkness, l
|
||||
|
||||
if viewdist > beamdepth
|
||||
viewdist = beamdepth
|
||||
fin
|
||||
if lightdist > viewdist
|
||||
lightdist = viewdist
|
||||
fin
|
||||
//
|
||||
// Clear screen
|
||||
//
|
||||
conio:home()
|
||||
//
|
||||
// Draw background map if in light
|
||||
//
|
||||
darkness = TRUE
|
||||
imap = (yorg << rowshift) + xorg
|
||||
if lightdist or ^(map + imap) & LIT_TILE
|
||||
//
|
||||
// Update current spot in viewmap
|
||||
//
|
||||
^(viewmap + imap) = ^(map + imap) | VIEWED_TILE
|
||||
//
|
||||
// Draw the viewmap
|
||||
//
|
||||
xmap = xorg - xcentr
|
||||
if xmap < 0
|
||||
l = mapcols
|
||||
xscr = -xmap
|
||||
xmap = 0
|
||||
else
|
||||
l = mapcols - xmap
|
||||
xscr = 0
|
||||
fin
|
||||
if xscr + l > scrnwidth
|
||||
l = scrnwidth - xscr
|
||||
fin
|
||||
for yscr = 0 to scrnheight
|
||||
ymap = yscr - ycentr + yorg
|
||||
if ymap >= 0 and ymap < maprows
|
||||
memcpy(screen[yscr] + xscr, viewmap + (ymap << rowshift) + xmap, l)
|
||||
fin
|
||||
next
|
||||
darkness = FALSE
|
||||
fin
|
||||
//
|
||||
// Draw visible octants
|
||||
//
|
||||
for o = viewdir - viewfield - 1 to viewdir + viewfield
|
||||
when o & 7
|
||||
is 0
|
||||
darkness = castoctant(darkness, lightdist, viewdist, xorg, yorg, @negjbeam, @posibeam)//, 1)
|
||||
break
|
||||
is 1
|
||||
darkness = castoctant(darkness, lightdist, viewdist, xorg, yorg, @negibeam, @posjbeam)//, -mapcols)
|
||||
break
|
||||
is 2
|
||||
darkness = castoctant(darkness, lightdist, viewdist, xorg, yorg, @posibeam, @posjbeam)//, mapcols)
|
||||
break
|
||||
is 3
|
||||
darkness = castoctant(darkness, lightdist, viewdist, xorg, yorg, @posjbeam, @posibeam)//, 1)
|
||||
break
|
||||
is 4
|
||||
darkness = castoctant(darkness, lightdist, viewdist, xorg, yorg, @posjbeam, @negibeam)//, -1)
|
||||
break
|
||||
is 5
|
||||
darkness = castoctant(darkness, lightdist, viewdist, xorg, yorg, @posibeam, @negjbeam)//, mapcols)
|
||||
break
|
||||
is 6
|
||||
darkness = castoctant(darkness, lightdist, viewdist, xorg, yorg, @negibeam, @negjbeam)//, -mapcols)
|
||||
break
|
||||
is 7
|
||||
darkness = castoctant(darkness, lightdist, viewdist, xorg, yorg, @negjbeam, @negibeam)//, -1)
|
||||
break
|
||||
wend
|
||||
next
|
||||
return darkness
|
||||
end
|
||||
|
||||
//
|
||||
// Draw other entities
|
||||
//
|
||||
|
||||
export def drawvisentity(xofst, yofst, tile)#0
|
||||
if screen.[ycentr+yofst, xcentr+xofst] < $80
|
||||
screen.[ycentr+yofst, xcentr+xofst] = tile
|
||||
fin
|
||||
end
|
||||
|
||||
//
|
||||
// Print title page
|
||||
//
|
||||
|
||||
conio:home()
|
||||
while ^titlestr
|
||||
puts(titlestr)
|
||||
titlestr = titlestr + ^titlestr + 1
|
||||
loop
|
||||
for map = 0 to beampts-1
|
||||
negibeam[map] = -posibeam[map]
|
||||
negjbeam[map] = -posjbeam[map]
|
||||
next
|
||||
done
|
||||
662
src/samplesrc/hgrogue.pla
Executable file
662
src/samplesrc/hgrogue.pla
Executable file
@@ -0,0 +1,662 @@
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/conio.plh"
|
||||
|
||||
import roguemap
|
||||
const xcentr = 20
|
||||
const ycentr = 12
|
||||
const scrnwidth = 40
|
||||
const scrnheight = 22
|
||||
const maprows = 64
|
||||
const mapcols = 64
|
||||
const mapsize = maprows*mapcols
|
||||
|
||||
const FLOOR_TILE = '.'
|
||||
const WALL_TILE = '#'
|
||||
const TORCH_TILE = '*'
|
||||
const PIT_TILE = ' '
|
||||
const DOOR_TILE = '+'
|
||||
const LOCKED_TILE = '%'
|
||||
const WATER1_TILE = '>'
|
||||
const WATER2_TILE = '<'
|
||||
const KEY_TILE = ','
|
||||
const RAFT_TILE = '@'
|
||||
const GOLD_TILE = '$'
|
||||
const FOOD_TILE = '&'
|
||||
const ENTER_TILE = '-'
|
||||
const EXIT_TILE = '='
|
||||
const OPAQUE_TILE = $01
|
||||
const VIEWED_TILE = $80
|
||||
const LIT_TILE = $80
|
||||
const INV_TILE = $3F
|
||||
const MAP_TILE = $7F
|
||||
|
||||
predef loadmap(level), getmaptile(xmap, ymap), setmaptile(xmap, ymap, tile)#0
|
||||
predef updtmaptile(xmap, ymap, tile)#0, lighttorches#0
|
||||
predef drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
predef drawvisentity(xofst, yofst, tile)#0
|
||||
end
|
||||
|
||||
import roguecombat
|
||||
predef fight(player, enemy)
|
||||
word entity, entities
|
||||
end
|
||||
|
||||
const maxlight = 10
|
||||
const maxview = 19
|
||||
|
||||
word xdir = 0, 1, 1, 1, 0, -1, -1, -1
|
||||
word ydir = -1, -1, 0, 1, 1, 1, 0, -1
|
||||
byte vplayer = '^', '\\', '>', '/', 'v', '\\', '<', '/'
|
||||
byte totaldarkness = 0
|
||||
byte level = 0
|
||||
word free_entities
|
||||
|
||||
//
|
||||
// Power-ups
|
||||
//
|
||||
|
||||
const TORCH_OIL = 250
|
||||
const MANA = 50
|
||||
const RUN_ENERGY = 4
|
||||
|
||||
struc t_pos
|
||||
byte xpos
|
||||
byte ypos
|
||||
end
|
||||
|
||||
//
|
||||
// Player
|
||||
//
|
||||
|
||||
struc t_player
|
||||
byte[t_pos]
|
||||
byte angle
|
||||
byte lamp
|
||||
byte fov
|
||||
byte skill
|
||||
byte health
|
||||
byte energy
|
||||
word oil
|
||||
byte gold
|
||||
byte key
|
||||
byte raft
|
||||
byte[16] name
|
||||
end
|
||||
|
||||
byte player = 0 // xpos
|
||||
byte = 0 // ypos
|
||||
byte = 4 // angle
|
||||
byte = 4 // lamp
|
||||
byte = 1 // fov
|
||||
byte = 15 // skill
|
||||
byte = 100 // health
|
||||
byte = 100 // energy
|
||||
word = 500 // oil
|
||||
byte = 0 // gold
|
||||
byte = 0 // key
|
||||
byte = 0 // raft
|
||||
byte[16] = "Player"
|
||||
|
||||
predef moveplayer(dir)#0
|
||||
|
||||
//
|
||||
// Other monsters
|
||||
//
|
||||
|
||||
struc t_other
|
||||
byte[t_pos]
|
||||
byte kind
|
||||
byte tileid
|
||||
byte life
|
||||
byte power
|
||||
word prev_other
|
||||
word next_other
|
||||
end
|
||||
|
||||
//
|
||||
// One line status strings
|
||||
//
|
||||
|
||||
const statusline = 23
|
||||
|
||||
byte helthstr = "Hlth:"
|
||||
byte enrgystr = "NRG:"
|
||||
byte oilstr = "Oil:"
|
||||
byte goldstr = "Gld:"
|
||||
byte keystr = "Key"
|
||||
byte raftstr = "Flt"
|
||||
|
||||
//
|
||||
// Messages
|
||||
//
|
||||
|
||||
word instr
|
||||
byte namestr = "\nGreetings Warrior,\n what is your name"
|
||||
byte prepstr = "\nPrepare."
|
||||
byte quitstr = "Are you sure you want to quit?"
|
||||
byte youmadeitstr = "You made it out alive with $"
|
||||
byte youdiedstr = "You perished inside the catacombs :-("
|
||||
byte againstr = "\n\nPlay again by typing: +rogue\n"
|
||||
|
||||
//
|
||||
// Utility functions
|
||||
//
|
||||
|
||||
def abs(i)
|
||||
if i < 0
|
||||
i = -i
|
||||
fin
|
||||
return i
|
||||
end
|
||||
|
||||
//
|
||||
// Sound functions
|
||||
//
|
||||
|
||||
def ouch#0
|
||||
conio:tone(128,5)
|
||||
end
|
||||
|
||||
def gotit#0
|
||||
conio:tone(10,8)
|
||||
conio:tone(80,2)
|
||||
end
|
||||
|
||||
def fall#0
|
||||
byte i
|
||||
|
||||
for i = 0 to 10
|
||||
conio:tone(50, i)
|
||||
next
|
||||
end
|
||||
|
||||
def drown#0
|
||||
word i
|
||||
|
||||
conio:tone(10,20)
|
||||
conio:tone(10,1)
|
||||
for i = 0 to 1000
|
||||
next
|
||||
conio:tone(10,25)
|
||||
conio:tone(10,2)
|
||||
for i = 0 to 1000
|
||||
next
|
||||
conio:tone(10,30)
|
||||
conio:tone(10,3)
|
||||
end
|
||||
|
||||
def groan#0
|
||||
byte i
|
||||
|
||||
for i = 0 to 5
|
||||
conio:tone(5, 40 + i)
|
||||
next
|
||||
end
|
||||
|
||||
//
|
||||
// Update status line
|
||||
//
|
||||
|
||||
def status#0
|
||||
conio:gotoxy(0, statusline)
|
||||
puts(@helthstr)
|
||||
puti(player.health)
|
||||
conio:gotoxy(9, statusline)
|
||||
puts(@enrgystr)
|
||||
puti(player.energy)
|
||||
conio:gotoxy(17, statusline)
|
||||
puts(@oilstr)
|
||||
puti(player:oil/10)
|
||||
conio:gotoxy(25, statusline)
|
||||
puts(@goldstr)
|
||||
puti(player.gold)
|
||||
if player.raft
|
||||
conio:gotoxy(32, statusline)
|
||||
puts(@raftstr)
|
||||
fin
|
||||
if player.key
|
||||
conio:gotoxy(36, statusline)
|
||||
puts(@keystr)
|
||||
fin
|
||||
end
|
||||
|
||||
def clearstatus#0
|
||||
memset($07D0, $A0A0, 40)
|
||||
end
|
||||
|
||||
//
|
||||
// Move player, check for obstacles
|
||||
//
|
||||
|
||||
def moveplayer(dir)#0
|
||||
byte xmove, ymove
|
||||
|
||||
xmove = player.xpos + dir * xdir[player.angle]
|
||||
ymove = player.ypos + dir * ydir[player.angle]
|
||||
when getmaptile(xmove, ymove) & MAP_TILE
|
||||
is PIT_TILE
|
||||
fall
|
||||
player.energy = 0
|
||||
player.health = 0
|
||||
break
|
||||
is WATER1_TILE
|
||||
is WATER2_TILE
|
||||
if not player.raft
|
||||
drown
|
||||
player.energy = 0
|
||||
player.health = 0
|
||||
break
|
||||
fin
|
||||
is FLOOR_TILE
|
||||
is TORCH_TILE
|
||||
is KEY_TILE
|
||||
is RAFT_TILE
|
||||
is GOLD_TILE
|
||||
is FOOD_TILE
|
||||
if player.energy < 10
|
||||
player.fov = 0
|
||||
fin
|
||||
if player.energy
|
||||
player.energy = player.energy - 1
|
||||
fin
|
||||
player.xpos = xmove
|
||||
player.ypos = ymove
|
||||
break
|
||||
otherwise
|
||||
ouch
|
||||
wend
|
||||
end
|
||||
|
||||
//
|
||||
// Find other entities in map and put in database
|
||||
//
|
||||
|
||||
def findentities#0
|
||||
word newother
|
||||
byte xmap, ymap, what
|
||||
|
||||
for ymap = 1 to maprows - 2
|
||||
for xmap = 2 to mapcols - 2
|
||||
what = 0
|
||||
when getmaptile(xmap, ymap) & MAP_TILE
|
||||
is ENTER_TILE
|
||||
player.xpos = xmap
|
||||
player.ypos = ymap
|
||||
if getmaptile(xmap, ymap - 1) & MAP_TILE == FLOOR_TILE
|
||||
player.angle = 0
|
||||
else
|
||||
player.angle = 4
|
||||
fin
|
||||
break
|
||||
is 'R' // Rogue
|
||||
what = what + 1
|
||||
is 'Z' // Zombie
|
||||
what = what + 1
|
||||
is 'O' // Ogre
|
||||
what = what + 1
|
||||
is 'T' // Thief
|
||||
newother = heapalloc(t_other)
|
||||
newother->xpos = xmap
|
||||
newother->ypos = ymap
|
||||
newother->kind = what
|
||||
newother->tileid = ^(entity[what] + 1) // First character of name string
|
||||
newother->power = ^(entity[what] + ^entity[what] + 1)
|
||||
newother->life = 100
|
||||
//
|
||||
// Insert into head of entities list
|
||||
//
|
||||
newother=>prev_other = 0
|
||||
newother=>next_other = entities
|
||||
if entities
|
||||
entities=>prev_other = newother
|
||||
fin
|
||||
entities = newother
|
||||
//
|
||||
// Clear entity from map, replace with floor
|
||||
//
|
||||
setmaptile(xmap, ymap, FLOOR_TILE)
|
||||
wend
|
||||
next
|
||||
if not (ymap & 7)
|
||||
putc('.')
|
||||
fin
|
||||
next
|
||||
end
|
||||
|
||||
//
|
||||
// Draw other entities on map if visible
|
||||
//
|
||||
|
||||
def drawentities#0
|
||||
word other, xofst, yofst
|
||||
|
||||
other = entities
|
||||
while other
|
||||
xofst = other->xpos - player.xpos
|
||||
yofst = other->ypos - player.ypos
|
||||
if abs(xofst) < 20 and abs(yofst) < 12
|
||||
drawvisentity(xofst, yofst, other->tileid)
|
||||
fin
|
||||
other = other=>next_other
|
||||
loop
|
||||
end
|
||||
|
||||
//
|
||||
// Move entitiess
|
||||
//
|
||||
|
||||
def lineofsight(x1, y1, x2, y2)
|
||||
word sx, sy, dx, dy, dx2, dy2, dd2, err
|
||||
|
||||
dx = x2 - x1
|
||||
if dx < 0
|
||||
dx = -dx
|
||||
sx = -1
|
||||
else
|
||||
sx = 1
|
||||
fin
|
||||
dy = y2 - y1
|
||||
if dy < 0
|
||||
dy = -dy
|
||||
sy = -1
|
||||
else
|
||||
sy = 1
|
||||
fin
|
||||
if dx > maxview or dy > maxview
|
||||
return FALSE
|
||||
fin
|
||||
dx2 = dx << 1
|
||||
dy2 = dy << 1
|
||||
if dx > dy
|
||||
dd2 = dx2 - dy2
|
||||
err = dx - dy2
|
||||
while x1 <> x2
|
||||
if err < 0
|
||||
y1 = y1 + sy
|
||||
err = err + dd2
|
||||
else
|
||||
err = err - dy2
|
||||
fin
|
||||
x1 = x1 + sx
|
||||
if getmaptile(x1, y1) & OPAQUE_TILE
|
||||
return FALSE
|
||||
fin
|
||||
loop
|
||||
else
|
||||
dd2 = dy2 - dx2
|
||||
err = dy - dx2
|
||||
while y1 <> y2
|
||||
if err < 0
|
||||
x1 = x1 + sx
|
||||
err = err + dd2
|
||||
else
|
||||
err = err - dx2
|
||||
fin
|
||||
y1 = y1 + sy
|
||||
if getmaptile(x1, y1) & OPAQUE_TILE
|
||||
return FALSE
|
||||
fin
|
||||
loop
|
||||
fin
|
||||
return TRUE
|
||||
end
|
||||
|
||||
def moveentities(playerisvis)#0
|
||||
byte xmove, ymove
|
||||
word other
|
||||
|
||||
other = entities
|
||||
while other
|
||||
if playerisvis
|
||||
if lineofsight(player.xpos, player.ypos, other->xpos, other->ypos)
|
||||
xmove = other->xpos
|
||||
ymove = other->ypos
|
||||
if player.xpos > other->xpos
|
||||
xmove = other->xpos + 1
|
||||
elsif player.xpos < other->xpos
|
||||
xmove = other->xpos - 1
|
||||
fin
|
||||
if player.ypos > other->ypos
|
||||
ymove = other->ypos + 1
|
||||
elsif player.ypos < other->ypos
|
||||
ymove = other->ypos - 1
|
||||
fin
|
||||
when getmaptile(xmove, ymove) & MAP_TILE
|
||||
is FLOOR_TILE
|
||||
is TORCH_TILE
|
||||
is KEY_TILE
|
||||
is GOLD_TILE
|
||||
is FOOD_TILE
|
||||
other->xpos = xmove
|
||||
other->ypos = ymove
|
||||
groan
|
||||
wend
|
||||
fin
|
||||
fin
|
||||
if other->xpos == player.xpos and other->ypos == player.ypos
|
||||
if fight(@player, other)
|
||||
//
|
||||
// Player trying to run away
|
||||
//
|
||||
if player.energy > RUN_ENERGY
|
||||
moveplayer(1)
|
||||
fin
|
||||
moveplayer(1)
|
||||
fin
|
||||
return
|
||||
fin
|
||||
other = other=>next_other
|
||||
loop
|
||||
end
|
||||
|
||||
//
|
||||
// Read player input and do something
|
||||
//
|
||||
|
||||
def play
|
||||
byte xt, yt
|
||||
|
||||
if player.health == 0
|
||||
return FALSE
|
||||
fin
|
||||
conio:gotoxy(xcentr, ycentr)
|
||||
when toupper(conio:getkey())
|
||||
is 'I'
|
||||
if totaldarkness
|
||||
player.angle = conio:rnd() & 7
|
||||
else
|
||||
player.angle = 0
|
||||
fin
|
||||
moveplayer(1)
|
||||
break
|
||||
is 'J'
|
||||
if totaldarkness
|
||||
player.angle = conio:rnd() & 7
|
||||
else
|
||||
player.angle = 6
|
||||
fin
|
||||
moveplayer(1)
|
||||
break
|
||||
is 'K'
|
||||
if totaldarkness
|
||||
player.angle = conio:rnd() & 7
|
||||
else
|
||||
player.angle = 2
|
||||
fin
|
||||
moveplayer(1)
|
||||
break
|
||||
is 'M'
|
||||
if totaldarkness
|
||||
player.angle = conio:rnd() & 7
|
||||
else
|
||||
player.angle = 4
|
||||
fin
|
||||
moveplayer(1)
|
||||
break
|
||||
is 'Q'
|
||||
if player.energy > RUN_ENERGY
|
||||
player.energy = player.energy - RUN_ENERGY
|
||||
moveplayer(1)
|
||||
fin
|
||||
is 'W'
|
||||
is $0B // Up Arrow
|
||||
moveplayer(1)
|
||||
break
|
||||
is 'S'
|
||||
is $0A // Down Arrow
|
||||
moveplayer(-1)
|
||||
break
|
||||
is 'A'
|
||||
is $08 // Left Arrow
|
||||
player.angle = (player.angle - 1) & 7
|
||||
break
|
||||
is 'D'
|
||||
is $15 // Right Arrow
|
||||
player.angle = (player.angle + 1) & 7
|
||||
break
|
||||
is ' '
|
||||
when getmaptile(player.xpos + xdir[player.angle], player.ypos + ydir[player.angle]) & MAP_TILE
|
||||
is LOCKED_TILE
|
||||
if not player.key
|
||||
ouch
|
||||
break
|
||||
fin
|
||||
is DOOR_TILE
|
||||
updtmaptile(player.xpos + xdir[player.angle], player.ypos + ydir[player.angle], FLOOR_TILE)
|
||||
break
|
||||
is ENTER_TILE
|
||||
break
|
||||
is EXIT_TILE
|
||||
return FALSE
|
||||
wend
|
||||
break
|
||||
is $0D // Return
|
||||
when getmaptile(player.xpos, player.ypos) & MAP_TILE
|
||||
is KEY_TILE
|
||||
player.key = 1
|
||||
updtmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
gotit
|
||||
break
|
||||
is RAFT_TILE
|
||||
player.raft = 1
|
||||
updtmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
gotit
|
||||
break
|
||||
is GOLD_TILE
|
||||
player.gold = player.gold + 1
|
||||
updtmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
gotit
|
||||
break
|
||||
is TORCH_TILE
|
||||
if player.oil < 1000
|
||||
player:oil = player:oil + TORCH_OIL
|
||||
if player:oil > 1000
|
||||
player:oil = 1000
|
||||
fin
|
||||
setmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
for yt = player.ypos - 1 to player.ypos + 1
|
||||
for xt = player.xpos - 1 to player.xpos + 1
|
||||
setmaptile(xt, yt, getmaptile(xt, yt) & MAP_TILE)
|
||||
next
|
||||
next
|
||||
gotit
|
||||
fin
|
||||
break
|
||||
is FOOD_TILE
|
||||
if player.health < 100 or player.energy < 100
|
||||
player.health = player.health + MANA/2
|
||||
if player.health > 100
|
||||
player.health = 100
|
||||
fin
|
||||
player.energy = player.energy + MANA
|
||||
if player.energy > 100
|
||||
player.energy = 100
|
||||
fin
|
||||
updtmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
player.fov = 1
|
||||
gotit
|
||||
fin
|
||||
break
|
||||
wend
|
||||
break
|
||||
is 'O'
|
||||
player.lamp = 0
|
||||
break
|
||||
is '<'
|
||||
is ','
|
||||
if player.lamp > 0
|
||||
player.lamp = player.lamp - 1
|
||||
fin
|
||||
break
|
||||
is '>'
|
||||
is '.'
|
||||
if player.lamp < maxlight - 1
|
||||
player.lamp = player.lamp + 1
|
||||
fin
|
||||
break
|
||||
is 'X'
|
||||
clearstatus
|
||||
conio:gotoxy(0, statusline)
|
||||
puts(@quitstr)
|
||||
if toupper(conio:getkey()) == 'Y'
|
||||
player.health = 0
|
||||
return FALSE
|
||||
fin
|
||||
wend
|
||||
if player.energy and player.health < 100
|
||||
player.health = player.health + 1
|
||||
fin
|
||||
if player:oil > player.lamp
|
||||
player:oil = player:oil - player.lamp
|
||||
else
|
||||
player:oil = 0
|
||||
player.lamp = 0
|
||||
fin
|
||||
return player.health
|
||||
end
|
||||
|
||||
//
|
||||
// Main loop
|
||||
//
|
||||
|
||||
puts(@namestr)
|
||||
instr = gets($BA)
|
||||
if ^instr > 15
|
||||
^instr = 15
|
||||
fin
|
||||
memcpy(@player.name, instr, ^instr + 1)
|
||||
conio:echo(ECHO_OFF)
|
||||
while loadmap(level)
|
||||
puts(@prepstr)
|
||||
free_entities = heapmark()
|
||||
findentities
|
||||
lighttorches
|
||||
repeat
|
||||
moveentities(player.lamp or getmaptile(player.xpos, player.ypos) & LIT_TILE))
|
||||
totaldarkness = drawmap(player.xpos, player.ypos, player.fov, player.angle, player.lamp, maxview)
|
||||
if not totaldarkness
|
||||
drawentities
|
||||
conio:gotoxy(xcentr, ycentr)
|
||||
putc(vplayer[player.angle])
|
||||
fin
|
||||
status
|
||||
until not play
|
||||
heaprelease(free_entities)
|
||||
entities = 0
|
||||
player.key = 0
|
||||
level = level + 1
|
||||
clearstatus
|
||||
conio:gotoxy(0, statusline)
|
||||
if player.health == 0
|
||||
break
|
||||
fin
|
||||
loop
|
||||
conio:echo(ECHO_ON)
|
||||
if player.health > 0
|
||||
puts(@youmadeitstr)
|
||||
puti(player.gold)
|
||||
else
|
||||
puts(@youdiedstr)
|
||||
fin
|
||||
puts(@againstr)
|
||||
done
|
||||
@@ -65,16 +65,16 @@ def testblt(sprtnum)#0
|
||||
loop
|
||||
end
|
||||
|
||||
hgrMode(TRUE)
|
||||
spriteDrawBuf(hgrDrawBuf(0)) // So we can see the compile process
|
||||
hgrMode(hgrPage1)
|
||||
spriteDrawBuf(hgrDrawBuf(hgrPage1)) // So we can see the compile process
|
||||
sprtBall = spriteCompile(10, 10, 5, 5, @ball)
|
||||
hgrColor(0)
|
||||
hgrClear()
|
||||
testline
|
||||
memcpy($4000, $2000, $2000) // Copy to both buffers
|
||||
spriteDrawBuf(hgrDrawBuf(1))
|
||||
spriteDrawBuf(hgrDrawBuf(hgrPage2))
|
||||
spriteAdd(0, sprtBall)
|
||||
testblt(16)
|
||||
getc
|
||||
hgrMode(FALSE)
|
||||
hgrMode(hgrOff)
|
||||
done
|
||||
|
||||
@@ -24,7 +24,7 @@ def rod#0
|
||||
conio:grplot(i, fmk)
|
||||
conio:grplot(fmk, i)
|
||||
if conio:keypressed()
|
||||
getc
|
||||
conio:getkey()
|
||||
return
|
||||
fin
|
||||
next
|
||||
|
||||
@@ -24,6 +24,12 @@ byte = " Artwork by Seth Sternberger\n"
|
||||
byte = ""
|
||||
word titlestr = @initstr
|
||||
|
||||
//
|
||||
// Animated tile sequence
|
||||
//
|
||||
|
||||
byte animseq = 0
|
||||
|
||||
//
|
||||
// Octant beam parameters
|
||||
//
|
||||
@@ -146,6 +152,12 @@ const ycentr = 12
|
||||
const scrnwidth = 40
|
||||
const scrnheight = 22
|
||||
|
||||
//
|
||||
// Screen buffer
|
||||
//
|
||||
|
||||
byte[scrnheight * scrnwidth] screenbuffer
|
||||
|
||||
//
|
||||
// Buffer to void checks in octant caster
|
||||
//
|
||||
@@ -155,14 +167,20 @@ byte[scrnwidth] linebuffer
|
||||
word = @linebuffer, @linebuffer, @linebuffer, @linebuffer, @linebuffer
|
||||
word = @linebuffer, @linebuffer, @linebuffer, @linebuffer, @linebuffer
|
||||
|
||||
word[] screen
|
||||
word = $400, $480, $500, $580, $600, $680, $700, $780
|
||||
word = $428, $4A8, $528, $5A8, $628, $6A8, $728, $7A8
|
||||
word = $450, $4D0, $550, $5D0, $650, $6D0, $750, @linebuffer // $7D0
|
||||
word[scrnheight] screen
|
||||
|
||||
word = @linebuffer, @linebuffer, @linebuffer, @linebuffer, @linebuffer
|
||||
word = @linebuffer, @linebuffer, @linebuffer, @linebuffer, @linebuffer
|
||||
|
||||
//
|
||||
// Visisble screen row addresses
|
||||
//
|
||||
|
||||
word[] viscreen
|
||||
word = $400, $480, $500, $580, $600, $680, $700, $780
|
||||
word = $428, $4A8, $528, $5A8, $628, $6A8, $728, $7A8
|
||||
word = $450, $4D0, $550, $5D0, $650, $6D0, $750, @linebuffer // $7D0
|
||||
|
||||
//
|
||||
// Load map - levels 0 to 9
|
||||
//
|
||||
@@ -234,17 +252,19 @@ end
|
||||
//
|
||||
|
||||
export def lighttorches#0
|
||||
word imap, tmap
|
||||
word imap, tmap, rowmap
|
||||
byte xmap, ymap, xt, yt
|
||||
|
||||
for ymap = 1 to maprows - 2
|
||||
rowmap = map + (ymap << rowshift)
|
||||
for xmap = 1 to mapcols - 2
|
||||
imap = (ymap << rowshift) + xmap
|
||||
if ^(map + imap) & MAP_TILE == TORCH_TILE
|
||||
imap = rowmap + xmap
|
||||
if ^imap & MAP_TILE == TORCH_TILE
|
||||
for yt = ymap - 1 to ymap + 1
|
||||
imap = map + (yt << rowshift)
|
||||
for xt = xmap - 1 to xmap + 1
|
||||
tmap = (yt << rowshift) + xt
|
||||
^(map + tmap) = ^(map + tmap) | LIT_TILE
|
||||
tmap = imap + xt
|
||||
^tmap = ^tmap | LIT_TILE
|
||||
next
|
||||
next
|
||||
fin
|
||||
@@ -255,6 +275,36 @@ export def lighttorches#0
|
||||
next
|
||||
end
|
||||
|
||||
//
|
||||
// Animate tiles in map
|
||||
//
|
||||
|
||||
export def animate(tile)
|
||||
if animseq
|
||||
when tile & MAP_TILE
|
||||
is TORCH_TILE
|
||||
tile = 'X'
|
||||
break
|
||||
is WATER1_TILE
|
||||
tile = '('
|
||||
break
|
||||
is WATER2_TILE
|
||||
tile = ')'
|
||||
break
|
||||
wend
|
||||
else
|
||||
when tile & MAP_TILE
|
||||
is WATER1_TILE
|
||||
tile = ')'
|
||||
break
|
||||
is WATER2_TILE
|
||||
tile = '('
|
||||
break
|
||||
wend
|
||||
fin
|
||||
return tile & INV_TILE
|
||||
end
|
||||
|
||||
//
|
||||
// Draw the map. Return 0 if any light visible, 1 if in complete darkness
|
||||
//
|
||||
@@ -273,7 +323,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
//
|
||||
// Clear screen
|
||||
//
|
||||
conio:home()
|
||||
memset(@screenbuffer, $A0A0, scrnheight * scrnwidth)
|
||||
//
|
||||
// Draw background map if in light
|
||||
//
|
||||
@@ -349,7 +399,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
//
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr+xbeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr+xbeam[l]] = animate(tile)
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
@@ -382,7 +432,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
//
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr+xbeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr+xbeam[l]] = animate(tile)
|
||||
darkness = 0
|
||||
fin
|
||||
else
|
||||
@@ -402,7 +452,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
// Update distance
|
||||
//
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
dist++
|
||||
fin
|
||||
next
|
||||
break
|
||||
@@ -423,7 +473,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr+ybeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr+ybeam[l]] = animate(tile)
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
@@ -441,7 +491,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr+ybeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr+ybeam[l]] = animate(tile)
|
||||
darkness = 0
|
||||
fin
|
||||
else
|
||||
@@ -452,7 +502,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
dist++
|
||||
fin
|
||||
next
|
||||
break
|
||||
@@ -473,7 +523,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr+ybeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr+ybeam[l]] = animate(tile)
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
@@ -491,7 +541,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr+ybeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr+ybeam[l]] = animate(tile)
|
||||
darkness = 0
|
||||
fin
|
||||
else
|
||||
@@ -502,7 +552,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
dist++
|
||||
fin
|
||||
next
|
||||
break
|
||||
@@ -523,7 +573,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr+xbeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr+xbeam[l]] = animate(tile)
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
@@ -541,7 +591,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr+xbeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr+xbeam[l]] = animate(tile)
|
||||
darkness = 0
|
||||
fin
|
||||
else
|
||||
@@ -552,7 +602,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
dist++
|
||||
fin
|
||||
next
|
||||
break
|
||||
@@ -573,7 +623,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr-xbeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr-xbeam[l]] = animate(tile)
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
@@ -591,7 +641,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr-xbeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr-xbeam[l]] = animate(tile)
|
||||
darkness = 0
|
||||
fin
|
||||
else
|
||||
@@ -602,7 +652,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
dist++
|
||||
fin
|
||||
next
|
||||
break
|
||||
@@ -623,7 +673,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr-ybeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr-ybeam[l]] = animate(tile)
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
@@ -641,7 +691,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr-ybeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr-ybeam[l]] = animate(tile)
|
||||
darkness = 0
|
||||
fin
|
||||
else
|
||||
@@ -652,7 +702,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
dist++
|
||||
fin
|
||||
next
|
||||
break
|
||||
@@ -673,7 +723,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr-ybeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr-ybeam[l]] = animate(tile)
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
@@ -691,7 +741,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr-ybeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr-ybeam[l]] = animate(tile)
|
||||
darkness = 0
|
||||
fin
|
||||
else
|
||||
@@ -702,7 +752,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
dist++
|
||||
fin
|
||||
next
|
||||
break
|
||||
@@ -723,7 +773,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr-xbeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr-xbeam[l]] = animate(tile)
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
@@ -741,7 +791,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr-xbeam[l]] = tile & INV_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr-xbeam[l]] = animate(tile)
|
||||
darkness = 0
|
||||
fin
|
||||
else
|
||||
@@ -752,12 +802,13 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
dist++
|
||||
fin
|
||||
next
|
||||
break
|
||||
wend
|
||||
next
|
||||
animseq = animseq ^ 1 // Update animation sequence
|
||||
return darkness
|
||||
end
|
||||
|
||||
@@ -771,6 +822,22 @@ export def drawvisentity(xofst, yofst, tile)#0
|
||||
fin
|
||||
end
|
||||
|
||||
export def drawplayer(tile)#0
|
||||
screen.[ycentr, xcentr] = tile | $80
|
||||
end
|
||||
|
||||
//
|
||||
// Update visible screen with screen buffer
|
||||
//
|
||||
|
||||
export def updatescreen#0
|
||||
byte row
|
||||
|
||||
for row = 0 to scrnheight - 2
|
||||
memcpy(viscreen[row], screen[row], 40)
|
||||
next
|
||||
end
|
||||
|
||||
//
|
||||
// Print title page
|
||||
//
|
||||
@@ -780,5 +847,7 @@ while ^titlestr
|
||||
puts(titlestr)
|
||||
titlestr = titlestr + ^titlestr + 1
|
||||
loop
|
||||
|
||||
for titlestr = 0 to scrnheight - 1
|
||||
screen[titlestr] = @screenbuffer + titlestr * scrnwidth
|
||||
next
|
||||
done
|
||||
|
||||
@@ -33,7 +33,8 @@ import roguemap
|
||||
predef loadmap(level), getmaptile(xmap, ymap), setmaptile(xmap, ymap, tile)#0
|
||||
predef updtmaptile(xmap, ymap, tile)#0, lighttorches#0
|
||||
predef drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
predef drawvisentity(xofst, yofst, tile)#0
|
||||
predef drawvisentity(xofst, yofst, tile)#0, drawplayer(tile)#0
|
||||
predef updatescreen#0
|
||||
end
|
||||
|
||||
import roguecombat
|
||||
@@ -198,6 +199,7 @@ end
|
||||
//
|
||||
|
||||
def status#0
|
||||
memset($07D0, $A0A0, 40)
|
||||
conio:gotoxy(0, statusline)
|
||||
puts(@helthstr)
|
||||
puti(player.health)
|
||||
@@ -449,10 +451,37 @@ def moveentities(playerisvis)#0
|
||||
loop
|
||||
end
|
||||
|
||||
//
|
||||
// Draw entire map view
|
||||
//
|
||||
|
||||
def drawview#0
|
||||
totaldarkness = drawmap(player.xpos, player.ypos, player.fov, player.angle, player.lamp, maxview)
|
||||
if not totaldarkness
|
||||
drawentities
|
||||
drawplayer(vplayer[player.angle])
|
||||
fin
|
||||
updatescreen
|
||||
end
|
||||
|
||||
//
|
||||
// Read player input and do something
|
||||
//
|
||||
|
||||
def waitkey
|
||||
word delay
|
||||
|
||||
delay = 200
|
||||
while not conio:keypressed()
|
||||
delay--
|
||||
if delay == 0
|
||||
drawview
|
||||
delay = 200
|
||||
fin
|
||||
loop
|
||||
return toupper(conio:getkey())
|
||||
end
|
||||
|
||||
def play
|
||||
byte xt, yt
|
||||
|
||||
@@ -460,7 +489,7 @@ def play
|
||||
return FALSE
|
||||
fin
|
||||
conio:gotoxy(xcentr, ycentr)
|
||||
when toupper(conio:getkey())
|
||||
when waitkey
|
||||
is 'I'
|
||||
if totaldarkness
|
||||
player.angle = conio:rnd() & 7
|
||||
@@ -633,12 +662,7 @@ while loadmap(level)
|
||||
lighttorches
|
||||
repeat
|
||||
moveentities(player.lamp or getmaptile(player.xpos, player.ypos) & LIT_TILE))
|
||||
totaldarkness = drawmap(player.xpos, player.ypos, player.fov, player.angle, player.lamp, maxview)
|
||||
if not totaldarkness
|
||||
drawentities
|
||||
conio:gotoxy(xcentr, ycentr)
|
||||
putc(vplayer[player.angle])
|
||||
fin
|
||||
drawview
|
||||
status
|
||||
until not play
|
||||
heaprelease(free_entities)
|
||||
|
||||
@@ -575,8 +575,8 @@ next
|
||||
heapstart = heapmark()
|
||||
//puts("\nBeginning available memory: "); puti(heapavail()); putln
|
||||
repeat
|
||||
hgrMode(TRUE)
|
||||
spriteDrawBuf(hgrDrawBuf(0)) // Single buffered
|
||||
hgrMode(hgrPage1)
|
||||
spriteDrawBuf(hgrDrawBuf(hgrPage1)) // Single buffered
|
||||
spriteAdd(SHIP_SPRTNUM, sprtShip)
|
||||
spriteAdd(SPIDER_SPRTEBASE, sprtEgg3)
|
||||
//
|
||||
@@ -617,7 +617,8 @@ repeat
|
||||
puts("\nEarth has been overrun")
|
||||
puts("\nby the Spiders from Mars\n")
|
||||
fin
|
||||
hgrMode(FALSE)
|
||||
hgrMode(hgrOFF)
|
||||
//hgrDrawBuf(hgrPage1)
|
||||
//
|
||||
// Clear sprite lists
|
||||
//
|
||||
|
||||
@@ -169,8 +169,8 @@ var sprtSplat1, sprtSplat2
|
||||
var sprtWeb1, sprtWeb2, sprtWeb3
|
||||
var sprtShip, sprtMissle, sprtDummy
|
||||
|
||||
hgrMode(TRUE)
|
||||
spriteDrawBuf(hgrDrawBuf(0)) // So we can see the compile process
|
||||
hgrMode(hgrPage1)
|
||||
spriteDrawBuf(hgrDrawBuf(hgrPage1)) // So we can see the compile process
|
||||
sprtShip = spriteCompile(14, 14, 7, 13, @ship)
|
||||
sprtMissle = spriteCompile( 6, 8, 3, 0, @missle)
|
||||
sprtEgg3 = spriteCompile(14, 12, 7, 6, @egg3)
|
||||
@@ -185,7 +185,7 @@ sprtWeb3 = spriteCompile(20, 8, 10, 0, @web3)
|
||||
sprtSplat1 = spriteCompile(20, 13, 10, 6, @splat1)
|
||||
sprtSplat2 = spriteCompile(24, 17, 12, 8, @splat2)
|
||||
sprtDummy = spriteCompile( 7, 8, 0, 0, @dummy)
|
||||
hgrMode(FALSE)
|
||||
hgrMode(hgrOff)
|
||||
spriteSave("SHIP", sprtShip)
|
||||
spriteSave("MISSLE", sprtMissle)
|
||||
spriteSave("EGG3", sprtEgg3)
|
||||
|
||||
@@ -209,4 +209,6 @@ puts("5*0="); puti(ptr*0); putln
|
||||
puts("5*1="); puti(ptr*1); putln
|
||||
puts("5*2="); puti(ptr*2); putln
|
||||
puts("5/1="); puti(ptr/1); putln
|
||||
ptr = -1
|
||||
puts("-1 * -1 = "); puti(ptr * ptr); putln
|
||||
done
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/hgrlib.plh"
|
||||
include "inc/hgrtile.plh"
|
||||
include "inc/hgrfont.plh"
|
||||
sysflags reshgr1 // Reserve HGR page 1
|
||||
|
||||
tileMode(TRUE)
|
||||
hgrMode(hgrPage1)
|
||||
tileDrawBuf(hgrPage1)
|
||||
hgrPutStr(5, 1, "Hello HiRes Tile Demo")
|
||||
getc
|
||||
tileFromText(0, @hgrFont)
|
||||
getc
|
||||
tileMode(FALSE)
|
||||
hgrMode(hgrOff)
|
||||
done
|
||||
|
||||
|
||||
41
src/scripts/bounce.4th
Normal file
41
src/scripts/bounce.4th
Normal file
@@ -0,0 +1,41 @@
|
||||
SRC" PLASMA.4TH"
|
||||
SRC" CONIO.4TH"
|
||||
SRC" GRLIB.4TH"
|
||||
|
||||
5 VARIABLE BALLCLR
|
||||
10 VARIABLE BALLX
|
||||
20 VARIABLE BALLY
|
||||
1 VARIABLE INCX
|
||||
1 VARIABLE INCY
|
||||
|
||||
: BEEP 30 10 TONE ;
|
||||
|
||||
: BOOP 10 30 TONE ;
|
||||
|
||||
: MOVEBALL
|
||||
BALLX @ 0= IF INCX @ NEGATE INCX ! BEEP THEN
|
||||
BALLX @ 39 = IF INCX @ NEGATE INCX ! BEEP THEN
|
||||
BALLY @ 0= IF INCY @ NEGATE INCY ! BOOP THEN
|
||||
BALLY @ 47 = IF INCY @ NEGATE INCY ! BOOP THEN
|
||||
INCX @ BALLX +!
|
||||
INCY @ BALLY +!
|
||||
1 BALLCLR DUP @ GRCOLOR +!
|
||||
0 0 BALLX @ BALLY @ GRLINE
|
||||
39 47 BALLX @ BALLY @ GRLINE
|
||||
0 47 BALLX @ BALLY @ GRLINE
|
||||
39 0 BALLX @ BALLY @ GRLINE
|
||||
;
|
||||
|
||||
: BOUNCE
|
||||
0 GRMODE DROP
|
||||
0 GRDRAWBUF
|
||||
0 GRCLEAR
|
||||
BEGIN
|
||||
MOVEBALL
|
||||
KEY?
|
||||
UNTIL
|
||||
KEY DROP
|
||||
-1 GRMODE DROP
|
||||
;
|
||||
|
||||
BOUNCE
|
||||
15
src/scripts/conio.4th
Normal file
15
src/scripts/conio.4th
Normal file
@@ -0,0 +1,15 @@
|
||||
' CONIOAPI ?ENDSRC
|
||||
LOOKUP CONIO CONSTANT CONIOAPI
|
||||
CONIOAPI 3 IFACE PLASMA _HOME : HOME _HOME DROP ;
|
||||
CONIOAPI 4 IFACE PLASMA _GOTOXY : GOTOXY _GOTOXY DROP ;
|
||||
CONIOAPI 5 IFACE PLASMA _VIEWPORT : VIEWPORT _VIEWPORT DROP ;
|
||||
CONIOAPI 6 IFACE PLASMA _TEXTTYPE
|
||||
: NORMALTEXT $FF _TEXTTYPE DROP ;
|
||||
: INVERSETEXT $3F _TEXTTYPE DROP ;
|
||||
: FLASHTEXT $7F _TEXTTYPE DROP ;
|
||||
CONIOAPI 7 IFACE PLASMA _TEXT : TEXT 40 _TEXT DROP ;
|
||||
CONIOAPI 8 IFACE PLASMA _GR : GR 1 _GR DROP ;
|
||||
CONIOAPI 9 IFACE PLASMA _COLOR : COLOR _COLOR DROP ;
|
||||
CONIOAPI 10 IFACE PLASMA _PLOT : PLOT _PLOT DROP ;
|
||||
CONIOAPI 11 IFACE PLASMA _TONE : TONE _TONE DROP ;
|
||||
CONIOAPI 12 IFACE PLASMA RAND
|
||||
43
src/scripts/dbounce.4th
Normal file
43
src/scripts/dbounce.4th
Normal file
@@ -0,0 +1,43 @@
|
||||
LOOKUP TX2FORTH NOT ?ABORT" Must run with TX2FORTH."
|
||||
|
||||
SRC" PLASMA.4TH"
|
||||
SRC" CONIO.4TH"
|
||||
SRC" DGRLIB.4TH"
|
||||
|
||||
5 VARIABLE BALLCLR
|
||||
10 VARIABLE BALLX
|
||||
20 VARIABLE BALLY
|
||||
1 VARIABLE INCX
|
||||
1 VARIABLE INCY
|
||||
|
||||
: BEEP 30 10 TONE ;
|
||||
|
||||
: BOOP 10 30 TONE ;
|
||||
|
||||
: MOVEBALL
|
||||
BALLX @ 0= IF INCX @ NEGATE INCX ! BEEP THEN
|
||||
BALLX @ 79 = IF INCX @ NEGATE INCX ! BEEP THEN
|
||||
BALLY @ 0= IF INCY @ NEGATE INCY ! BOOP THEN
|
||||
BALLY @ 47 = IF INCY @ NEGATE INCY ! BOOP THEN
|
||||
INCX @ BALLX +!
|
||||
INCY @ BALLY +!
|
||||
1 BALLCLR DUP @ DGRCOLOR +!
|
||||
0 0 BALLX @ BALLY @ DGRLINE
|
||||
79 47 BALLX @ BALLY @ DGRLINE
|
||||
0 47 BALLX @ BALLY @ DGRLINE
|
||||
79 0 BALLX @ BALLY @ DGRLINE
|
||||
;
|
||||
|
||||
: BOUNCE
|
||||
0 DGRMODE DROP
|
||||
0 DGRDRAWBUF
|
||||
0 DGRCLEAR
|
||||
BEGIN
|
||||
MOVEBALL
|
||||
KEY?
|
||||
UNTIL
|
||||
KEY DROP
|
||||
-1 DGRMODE DROP
|
||||
;
|
||||
|
||||
BOUNCE
|
||||
20
src/scripts/dgrlib.4th
Normal file
20
src/scripts/dgrlib.4th
Normal file
@@ -0,0 +1,20 @@
|
||||
' DGRMODE ?ENDSRC ( Avoid multiple loads )
|
||||
" DGRLIB" LOADMOD" "
|
||||
" LINES" LOADMOD" "
|
||||
LOOKUP DGRPLOT PLASMA DGRPLOT
|
||||
LOOKUP DGRHLIN PLASMA DGRHLIN
|
||||
LOOKUP DGRVLIN PLASMA DGRVLIN
|
||||
LOOKUP DGRBLT PLASMA DGRBLT
|
||||
LOOKUP DGRTILE PLASMA DGRTILE
|
||||
LOOKUP DGRTILESTR PLASMA DGRTILESTR
|
||||
LOOKUP DGRFILL PLASMA DGRFILL
|
||||
LOOKUP DGRVLB PLASMA DGRVLB
|
||||
LOOKUP DGRCLEAR PLASMA DGRCLEAR
|
||||
LOOKUP DGRMODE PLASMA DGRMODE
|
||||
LOOKUP DGRSHOW PLASMA DGRSHOW
|
||||
LOOKUP DGRSWAP PLASMA DGRSWAP
|
||||
LOOKUP DGRDRAWBUF PLASMA DGRDRAWBUF
|
||||
LOOKUP DGRCOLOR PLASMA DGRCOLOR
|
||||
LOOKUP SETLINESPANS PLASMA SETLINESPANS
|
||||
LOOKUP LINESPANS PLASMA DGRLINE
|
||||
LOOKUP DGRHLIN LOOKUP DGRVLIN SETLINESPANS
|
||||
16
src/scripts/fileio.4th
Normal file
16
src/scripts/fileio.4th
Normal file
@@ -0,0 +1,16 @@
|
||||
' FILEIOAPI ?ENDSRC
|
||||
LOOKUP PERR CONSTANT PERR
|
||||
LOOKUP FILEIO CONSTANT FILEIOAPI
|
||||
FILEIOAPI 2 IFACE PLASMA GETFILEINFO
|
||||
FILEIOAPI 3 IFACE PLASMA SETFILEINFO
|
||||
FILEIOAPI 4 IFACE PLASMA GETEOF
|
||||
FILEIOAPI 5 IFACE PLASMA SETEOF
|
||||
FILEIOAPI 7 IFACE PLASMA OPEN
|
||||
FILEIOAPI 8 IFACE PLASMA CLOSE
|
||||
FILEIOAPI 9 IFACE PLASMA READ
|
||||
FILEIOAPI 10 IFACE PLASMA WRITE
|
||||
FILEIOAPI 11 IFACE PLASMA CREATE
|
||||
FILEIOAPI 12 IFACE PLASMA DESTROY
|
||||
FILEIOAPI 13 IFACE PLASMA RENAME
|
||||
FILEIOAPI 14 IFACE PLASMA NEWLINE
|
||||
FILEIOAPI 15 IFACE PLASMA ONLINE
|
||||
86
src/scripts/fpu.4th
Normal file
86
src/scripts/fpu.4th
Normal file
@@ -0,0 +1,86 @@
|
||||
' FPULIB ?ENDSRC
|
||||
" SANE" LOADMOD" "
|
||||
" FPSTR" LOADMOD" "
|
||||
" FPU" LOADMOD" "
|
||||
0 VARIABLE FPERR
|
||||
LOOKUP FPU CONSTANT FPULIB
|
||||
FPULIB 0 IFACE PLASMA _FPRESET : FPRESET _FPRESET FPERR ! ;
|
||||
FPULIB 1 IFACE PLASMA _FPGETENV : FPGETENV _FPGETENV FPERR ! ;
|
||||
FPULIB 2 IFACE PLASMA _FPSETENV : FPSETENV _FPSETENV FPERR ! ;
|
||||
FPULIB 3 IFACE PLASMA _FPTESTEXEPT : FPTESTECEPT _FPTESTEXEPT FPERR ! ;
|
||||
FPULIB 4 IFACE PLASMA _FPSETEXCEPT : FPSETEXCEPT _FPSETEXCEPT FPERR ! ;
|
||||
FPULIB 5 IFACE PLASMA _FPENTERPROC : FPENTERPROC _FPENTERPROC FPERR ! ;
|
||||
FPULIB 6 IFACE PLASMA _FPEXITPROC : FPEXITPROC _FPEXITPROC FPERR ! ;
|
||||
FPULIB 7 IFACE PLASMA _FPCONSTPI : FPCONSTPI _FPCONSTPI FPERR ! ;
|
||||
FPULIB 8 IFACE PLASMA _FPCONSTE : FPCONSTE _FPCONSTE FPERR ! ;
|
||||
FPULIB 9 IFACE PLASMA _FPINT@ : FPINT@ _FPINT@ FPERR ! ;
|
||||
FPULIB 10 IFACE PLASMA _FPSGL@ : FPSGL@ _FPSGL@ FPERR ! ;
|
||||
FPULIB 11 IFACE PLASMA _FPDBL@ : FPDBL@ _FPDBL@ FPERR ! ;
|
||||
FPULIB 12 IFACE PLASMA _FPEXT@ : FPEXT@ _FPEXT@ FPERR ! ;
|
||||
FPULIB 13 IFACE PLASMA _FPSTR@ : FPSTR@ _FPSTR@ FPERR ! ;
|
||||
FPULIB 14 IFACE PLASMA _FPINT! : FPINT! _FPINT! FPERR ! ;
|
||||
FPULIB 15 IFACE PLASMA _FPSGL! : FPSGL! _FPSGL! FPERR ! ;
|
||||
FPULIB 16 IFACE PLASMA _FPDBL! : FPDBL! _FPDBL! FPERR ! ;
|
||||
FPULIB 17 IFACE PLASMA _FPEXT! : FPEXT! _FPEXT! FPERR ! ;
|
||||
FPULIB 18 IFACE PLASMA _FPSTR! : FPSTR! _FPSTR! FPERR ! ;
|
||||
FPULIB 19 IFACE PLASMA _FPINTLOD : FPINTLOD _FPINTLOD FPERR ! ;
|
||||
FPULIB 20 IFACE PLASMA _FPSGLLOD : FPSGLLOD _FPSGLLOD FPERR ! ;
|
||||
FPULIB 21 IFACE PLASMA _FPDBLLOD : FPDBLLOD _FPDBLLOD FPERR ! ;
|
||||
FPULIB 22 IFACE PLASMA _FPEXTLOD : FPEXTLOD _FPEXTLOD FPERR ! ;
|
||||
FPULIB 23 IFACE PLASMA _FPSTRLOD : FPSTRLOD _FPSTRLOD FPERR ! ;
|
||||
FPULIB 24 IFACE PLASMA _FPINTSTOR : FPINTSTOR _FPINTSTOR FPERR ! ;
|
||||
FPULIB 25 IFACE PLASMA _FPSGLSTOR : FPSGLSTOR _FPSGLSTOR FPERR ! ;
|
||||
FPULIB 26 IFACE PLASMA _FPDBLSTOR : FPDBLSTOR _FPDBLSTOR FPERR ! ;
|
||||
FPULIB 27 IFACE PLASMA _FPEXTSTOR : FPEXTSTOR _FPEXTSTOR FPERR ! ;
|
||||
FPULIB 28 IFACE PLASMA _FPSTRSTOR : FPSTRSTOR _FPSTRSTOR FPERR ! ;
|
||||
FPULIB 29 IFACE PLASMA _FPSHIFTUP : FPSHIFTUP _FPSHIFTUP FPERR ! ;
|
||||
FPULIB 30 IFACE PLASMA _FPSHIFTDOWN : FPSHIFTDOWN _FPSHIFTDOWN FPERR ! ;
|
||||
: FPDROP _FPSHIFTDOWN FPERR ! ;
|
||||
FPULIB 31 IFACE PLASMA _FPROTATEUP : FPROTATEUP _FPROTATEUP FPERR ! ;
|
||||
FPULIB 32 IFACE PLASMA _FPROTATEDOWN : FPROTATEDOWN _FPROTATEDOWN FPERR ! ;
|
||||
FPULIB 33 IFACE PLASMA _FPDUP : FPDUP _FPDUP FPERR ! ;
|
||||
FPULIB 34 IFACE PLASMA _FPSWAP : FPSWAP _FPSWAP FPERR ! ;
|
||||
FPULIB 35 IFACE PLASMA _FPCLEAR : FPCLEAR _FPCLEAR FPERR ! ;
|
||||
FPULIB 36 IFACE PLASMA _FP+ : FP+ _FP+ FPERR ! ;
|
||||
FPULIB 37 IFACE PLASMA _FP- : FP- _FP- FPERR ! ;
|
||||
FPULIB 38 IFACE PLASMA _FP* : FP* _FP* FPERR ! ;
|
||||
FPULIB 39 IFACE PLASMA _FP/ : FP/ _FP/ FPERR ! ;
|
||||
FPULIB 40 IFACE PLASMA _FPREM : FPREM _FPREM FPERR ! ;
|
||||
FPULIB 41 IFACE PLASMA _FPNEG : FPNEG _FPNEG FPERR ! ;
|
||||
FPULIB 42 IFACE PLASMA _FPABS : FPABS _FPABS FPERR ! ;
|
||||
FPULIB 43 IFACE PLASMA _FPTYPE : FPTYPE _FPTYPE FPERR ! ;
|
||||
FPULIB 44 IFACE PLASMA _FPCMP : FPCMP _FPCMP FPERR ! ;
|
||||
FPULIB 45 IFACE PLASMA _FPLOGB : FPLOGB _FPLOGB FPERR ! ;
|
||||
FPULIB 46 IFACE PLASMA _FPSCALEBINT : FPSCALEBINT _FPSCALEBINT FPERR ! ;
|
||||
FPULIB 47 IFACE PLASMA _FPTRUNC : FPTRUNC _FPTRUNC FPERR ! ;
|
||||
FPULIB 48 IFACE PLASMA _FPROUND : FPROUND _FPROUND FPERR ! ;
|
||||
FPULIB 49 IFACE PLASMA _FPSQRT : FPSQRT _FPSQRT FPERR ! ;
|
||||
FPULIB 50 IFACE PLASMA _FPSQUARE : FPSQUARE _FPSQUARE FPERR ! ;
|
||||
FPULIB 51 IFACE PLASMA _FPCOS : FPCOS _FPCOS FPERR ! ;
|
||||
FPULIB 52 IFACE PLASMA _FPSIN : FPSIN _FPSIN FPERR ! ;
|
||||
FPULIB 53 IFACE PLASMA _FPTAN : FPTAN _FPTAN FPERR ! ;
|
||||
FPULIB 54 IFACE PLASMA _FPATAN : FPATAN _FPATAN FPERR ! ;
|
||||
FPULIB 55 IFACE PLASMA _FPLOG2 : FPLOG2 _FPLOG2 FPERR ! ;
|
||||
FPULIB 56 IFACE PLASMA _FPLOG21 : FPLOG21 _FPLOG21 FPERR ! ;
|
||||
FPULIB 57 IFACE PLASMA _FPLN : FPLN _FPLN FPERR ! ;
|
||||
FPULIB 58 IFACE PLASMA _FPLN1 : FPLN1 _FPLN1 FPERR ! ;
|
||||
FPULIB 59 IFACE PLASMA _FPPOW2 : FPPOW2 _FPPOW2 FPERR ! ;
|
||||
FPULIB 60 IFACE PLASMA _FPPOW21 : FPPOW21 _FPPOW21 FPERR ! ;
|
||||
FPULIB 61 IFACE PLASMA _FPPOWE : FPPOWE _FPPOWE FPERR ! ;
|
||||
FPULIB 62 IFACE PLASMA _FPPOWE1 : FPPOWE1 _FPPOWE1 FPERR ! ;
|
||||
FPULIB 63 IFACE PLASMA _FPPOWE21 : FPPOWE21 _FPPOWE21 FPERR ! ;
|
||||
FPULIB 64 IFACE PLASMA _FPPOWINT : FPPOWINT _FPPOWINT FPERR ! ;
|
||||
FPULIB 65 IFACE PLASMA _FPPOW : FPPOW _FPPOW FPERR ! ;
|
||||
FPULIB 66 IFACE PLASMA _FPCOMP : FPCOMP _FPCOMP FPERR ! ;
|
||||
FPULIB 67 IFACE PLASMA _FPANNUITY : FPANNUITY _FPANNUITY FPERR ! ;
|
||||
FPULIB 68 IFACE PLASMA _FPRANDNUM : FPRANDNUM _FPRANDNUM FPERR ! ;
|
||||
1 CONSTANT FPSTR.FIXED
|
||||
0 CONSTANT FPSTR.FLOAT
|
||||
2 CONSTANT FPSTR.STRIP
|
||||
4 CONSTANT FPSTR.EXP
|
||||
8 CONSTANT FPSTR.FLEX
|
||||
: >FPINT PAD ! PAD FPINT@ ;
|
||||
: FPINT> PAD FPINT! PAD @ ;
|
||||
: FP. PAD 10 4 FPSTR.FLEX FPSTR! PAD (.") ;
|
||||
: FPEXT CREATE 10 ALLOT ;
|
||||
FPRESET
|
||||
40
src/scripts/gfxplot.4th
Normal file
40
src/scripts/gfxplot.4th
Normal file
@@ -0,0 +1,40 @@
|
||||
SRC" PLASMA.4TH"
|
||||
SRC" CONIO.4TH"
|
||||
SRC" GRAFIX.4TH"
|
||||
SRC" FPU.4TH"
|
||||
|
||||
: DRAWAXIS
|
||||
3 GFXSETMODE
|
||||
6 GFXPENCOLOR
|
||||
0 96 139 96 GFXLINE
|
||||
70 0 70 191 GFXLINE
|
||||
;
|
||||
|
||||
: PLOTDONE
|
||||
KEY DROP
|
||||
-1 GFXSETMODE
|
||||
;
|
||||
|
||||
FPEXT XSCALE
|
||||
FPCONSTPI 69 >FPINT FP/ XSCALE FPEXT!
|
||||
|
||||
FPEXT YSCALE
|
||||
95 >FPINT YSCALE FPEXT!
|
||||
|
||||
DEFER FUNC
|
||||
|
||||
: PLOTFUNC
|
||||
15 GFXPENCOLOR
|
||||
140 0 DO
|
||||
I DUP 69 - >FPINT XSCALE FPEXT@ FP*
|
||||
FUNC
|
||||
YSCALE FPEXT@ FP* FPINT> 95 +
|
||||
GFXPLOT
|
||||
LOOP
|
||||
;
|
||||
|
||||
' FPSIN IS FUNC
|
||||
DRAWAXIS PLOTFUNC PLOTDONE
|
||||
|
||||
' FPCOS IS FUNC
|
||||
DRAWAXIS PLOTFUNC PLOTDONE
|
||||
14
src/scripts/grafix.4th
Normal file
14
src/scripts/grafix.4th
Normal file
@@ -0,0 +1,14 @@
|
||||
' GRAFIX ?ENDSRC
|
||||
" GRAFIX" LOADMOD" "
|
||||
LOOKUP PENCOLOR PLASMA GFXPENCOLOR
|
||||
LOOKUP FILLCOLOR PLASMA GFXFILLCOLOR
|
||||
LOOKUP FILLSCREEN PLASMA GFXFILLSCREEN
|
||||
LOOKUP PENMOVE PLASMA GFXPENMOVE
|
||||
LOOKUP PLOT PLASMA GFXPLOT
|
||||
LOOKUP LINE PLASMA GFXLINE
|
||||
LOOKUP LINETO PLASMA GFXLINETO
|
||||
LOOKUP RECT PLASMA GFXRECT
|
||||
LOOKUP FILLRECT PLASMA GFXFILLRECT
|
||||
LOOKUP BITBLT PLASMA GFXBITBLT
|
||||
LOOKUP DRAWMODE PLASMA GFXDRAWMODE
|
||||
LOOKUP SETMODE PLASMA GFXSETMODE
|
||||
20
src/scripts/grlib.4th
Normal file
20
src/scripts/grlib.4th
Normal file
@@ -0,0 +1,20 @@
|
||||
' GRMODE ?ENDSRC ( Avoid multiple loads )
|
||||
" GRLIB" LOADMOD" "
|
||||
" LINES" LOADMOD" "
|
||||
LOOKUP GRPLOT PLASMA GRPLOT
|
||||
LOOKUP GRHLIN PLASMA GRHLIN
|
||||
LOOKUP GRVLIN PLASMA GRVLIN
|
||||
LOOKUP GRBLT PLASMA GRBLT
|
||||
LOOKUP GRTILE PLASMA GRTILE
|
||||
LOOKUP GRTILESTR PLASMA GRTILESTR
|
||||
LOOKUP GRFILL PLASMA GRFILL
|
||||
LOOKUP DGRVLB PLASMA DGRVLB
|
||||
LOOKUP GRCLEAR PLASMA GRCLEAR
|
||||
LOOKUP GRMODE PLASMA GRMODE
|
||||
LOOKUP GRSHOW PLASMA GRSHOW
|
||||
LOOKUP GRSWAP PLASMA GRSWAP
|
||||
LOOKUP GRDRAWBUF PLASMA GRDRAWBUF
|
||||
LOOKUP GRCOLOR PLASMA GRCOLOR
|
||||
LOOKUP SETLINESPANS PLASMA SETLINESPANS
|
||||
LOOKUP LINESPANS PLASMA GRLINE
|
||||
LOOKUP GRHLIN LOOKUP GRVLIN SETLINESPANS
|
||||
86
src/scripts/hdinstall.4th
Normal file
86
src/scripts/hdinstall.4th
Normal file
@@ -0,0 +1,86 @@
|
||||
SRC" plasma.4th"
|
||||
SRC" conio.4th"
|
||||
|
||||
: [THEN] ; IMMEDIATE ( PLACE HOLDER TO RESUME EXECUTION )
|
||||
DEFER [ELSE] ( SKIP UNTIL [THEN] IF EXECUTED )
|
||||
: [IF] ( F -- )
|
||||
NOT IF ( SKIP CODE IN BETWEEN [ELSE] OR [THEN] )
|
||||
[COMPILE] [ELSE]
|
||||
THEN
|
||||
; IMMEDIATE
|
||||
:NONAME ( [ELSE] )
|
||||
1 >R
|
||||
BEGIN
|
||||
BL WORD FIND IF
|
||||
CASE
|
||||
' [ELSE] OF
|
||||
R@ 1 = IF ( RESUME EXECUTING AT MATCHING [ELSE] )
|
||||
R> DROP DROP EXIT
|
||||
THEN
|
||||
ENDOF
|
||||
' [THEN] OF
|
||||
R> 1- ?DUP 0= IF ( EXIT AT FINAL [THEN] )
|
||||
DROP EXIT
|
||||
THEN
|
||||
>R
|
||||
ENDOF
|
||||
' [IF] OF ( CHECK FOR NESTED [IF] )
|
||||
R> 1+ >R
|
||||
ENDOF
|
||||
ENDCASE
|
||||
ELSE
|
||||
DROP
|
||||
THEN
|
||||
AGAIN
|
||||
; IMMEDIATE IS [ELSE]
|
||||
|
||||
: STRINPUT ( STR -- )
|
||||
DUP 1+ 255 ACCEPT -TRAILING SWAP C!
|
||||
;
|
||||
: STRING CREATE 256 ALLOT DOES> ; ( JUST ALLOCATE THE BIGGEST STRING POSSIBLE )
|
||||
|
||||
: CONFIRM" ( -- F )
|
||||
COMPILE ."
|
||||
." (Y/N)"
|
||||
KEY CR TOUPPER CHAR Y =
|
||||
;
|
||||
|
||||
STRING DEST
|
||||
STRING FILELIST
|
||||
|
||||
0 0 40 24 VIEWPORT
|
||||
HOME
|
||||
12 SPACES INVERSETEXT
|
||||
." PLASMA HD INSTALL"
|
||||
NORMALTEXT CR CR
|
||||
0 1 40 23 VIEWPORT
|
||||
." Enter destination " DEST STRINPUT
|
||||
DEST C@ 0= ?ABORT" Destination required"
|
||||
." Copying system files to " DEST (.") CR
|
||||
FILELIST " -R EDITOR.README PL* CMD* SYS " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
|
||||
CONFIRM" Copy demos?" [IF]
|
||||
FILELIST " -R DEMOS " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
[THEN]
|
||||
|
||||
CONFIRM" Copy build tools?" [IF]
|
||||
DEST " /BLD" STRCAT DROP
|
||||
" NEWDIR" DEST LOADMOD
|
||||
FILELIST " BLD/PLASM BLD/CODEOPT " STRCPY
|
||||
DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
FILELIST " -R BLD/INC " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
|
||||
CONFIRM" Copy sample code?" [IF]
|
||||
FILELIST " -R BLD/SAMPLES " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
[THEN]
|
||||
|
||||
[THEN]
|
||||
|
||||
." Done" CR
|
||||
0 0 40 24 VIEWPORT
|
||||
BYE
|
||||
32
src/scripts/hdinstall1.4th
Normal file
32
src/scripts/hdinstall1.4th
Normal file
@@ -0,0 +1,32 @@
|
||||
SRC" plasma.4th"
|
||||
SRC" conio.4th"
|
||||
SRC" machid.4th"
|
||||
LOOKUP CMDSYS 19 + @ PLASMA EXECSYS
|
||||
|
||||
: STRINPUT ( STR -- )
|
||||
DUP 1+ 255 ACCEPT -TRAILING SWAP C!
|
||||
;
|
||||
: STRING CREATE 256 ALLOT DOES> ; ( JUST ALLOCATE THE BIGGEST STRING POSSIBLE )
|
||||
|
||||
STRING DEST
|
||||
STRING FILELIST
|
||||
|
||||
0 0 40 24 VIEWPORT
|
||||
HOME
|
||||
12 SPACES INVERSETEXT
|
||||
." PLASMA HD INSTALL"
|
||||
NORMALTEXT CR CR
|
||||
0 1 40 23 VIEWPORT
|
||||
." Enter destination " DEST STRINPUT
|
||||
DEST C@ 0= ?ABORT" Destination required"
|
||||
." Copying install files to " DEST (.") CR
|
||||
FILELIST " -R PL* CMD* SYS AUTORUN " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
FILELIST " HDINSTALL2.4TH " STRCPY DEST STRCAT " /HDINSTALL.4TH" STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
|
||||
." Stage 2..." CR
|
||||
0 0 40 24 VIEWPORT
|
||||
|
||||
DEST SETPFX DROP
|
||||
" PLASMA.SYSTEM" EXECSYS
|
||||
111
src/scripts/hdinstall2.4th
Normal file
111
src/scripts/hdinstall2.4th
Normal file
@@ -0,0 +1,111 @@
|
||||
SRC" plasma.4th"
|
||||
SRC" conio.4th"
|
||||
|
||||
: [THEN] ; IMMEDIATE ( PLACE HOLDER TO RESUME EXECUTION )
|
||||
DEFER [ELSE] ( SKIP UNTIL [THEN] IF EXECUTED )
|
||||
: [IF] ( F -- )
|
||||
NOT IF ( SKIP CODE IN BETWEEN [ELSE] OR [THEN] )
|
||||
POSTPONE [ELSE]
|
||||
THEN
|
||||
; IMMEDIATE
|
||||
:NONAME ( [ELSE] )
|
||||
1 >R
|
||||
BEGIN
|
||||
BL WORD FIND IF
|
||||
CASE
|
||||
' [ELSE] OF
|
||||
R@ 1 = IF ( RESUME EXECUTING AT MATCHING [ELSE] )
|
||||
R> DROP DROP EXIT
|
||||
THEN
|
||||
ENDOF
|
||||
' [THEN] OF
|
||||
R> 1- ?DUP 0= IF ( EXIT AT FINAL [THEN] )
|
||||
DROP EXIT
|
||||
THEN
|
||||
>R
|
||||
ENDOF
|
||||
' [IF] OF ( CHECK FOR NESTED [IF] )
|
||||
R> 1+ >R
|
||||
ENDOF
|
||||
ENDCASE
|
||||
ELSE
|
||||
DROP
|
||||
THEN
|
||||
AGAIN
|
||||
; IMMEDIATE IS [ELSE]
|
||||
: STRING CREATE 256 ALLOT DOES> ; ( JUST ALLOCATE THE BIGGEST STRING POSSIBLE )
|
||||
|
||||
: CONFIRM" ( -- F )
|
||||
POSTPONE ."
|
||||
." (Y/N)"
|
||||
KEY CR TOUPPER CHAR Y =
|
||||
;
|
||||
|
||||
: INSERT.FLOPPY"
|
||||
." Insert "
|
||||
POSTPONE ."
|
||||
." into floppy drive" CR
|
||||
." Press any key to continue" KEY DROP CR
|
||||
;
|
||||
|
||||
STRING DEST
|
||||
STRING FILELIST
|
||||
|
||||
0 0 40 24 VIEWPORT
|
||||
HOME
|
||||
8 SPACES INVERSETEXT
|
||||
." PLASMA HD INSTALL STAGE 2"
|
||||
NORMALTEXT CR CR
|
||||
0 1 40 23 VIEWPORT
|
||||
|
||||
DEST GETPFX DROP
|
||||
|
||||
INSERT.FLOPPY" PLASMA.SYS"
|
||||
FILELIST " -R /PLASMA.SYS/* " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
|
||||
CONFIRM" Copy demos?" [IF]
|
||||
INSERT.FLOPPY" PLASMA.DEMOS"
|
||||
FILELIST " -R /PLASMA.DEMOS/DEMOS " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
[THEN]
|
||||
|
||||
CONFIRM" Copy floating point libraries?" [IF]
|
||||
INSERT.FLOPPY" PLASMA.FPSOS"
|
||||
FILELIST " -R /PLASMA.FPSOS/SYS " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
[THEN]
|
||||
|
||||
CONFIRM" Copy networking libraries?" [IF]
|
||||
INSERT.FLOPPY" PLASMA.INET"
|
||||
FILELIST " -R /PLASMA.INET/* " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
[THEN]
|
||||
|
||||
CONFIRM" Copy build tools?" [IF]
|
||||
DEST " BLD" STRCAT
|
||||
" NEWDIR" SWAP LOADMOD
|
||||
INSERT.FLOPPY" PLASMA.BLD"
|
||||
FILELIST " -R /PLASMA.BLD/BLD/PLASM /PLASMA.BLD/BLD/CODEOPT " STRCPY
|
||||
" /PLASMA.BLD/BLD/INC " STRCAT DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
|
||||
CONFIRM" Copy sample PLASMA code?" [IF]
|
||||
FILELIST " -R /PLASMA.BLD/BLD/SAMPLES " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
[THEN]
|
||||
|
||||
CONFIRM" Copy sample FORTH scripts?" [IF]
|
||||
FILELIST " -R /PLASMA.BLD/BLD/SCRIPTS " STRCPY DEST STRCAT
|
||||
" COPY" SWAP LOADMOD
|
||||
[THEN]
|
||||
|
||||
[THEN]
|
||||
|
||||
FILELIST " AUTORUN HDINSTALL.4TH" STRCPY
|
||||
" DEL" SWAP LOADMOD
|
||||
|
||||
0 0 40 24 VIEWPORT
|
||||
HOME
|
||||
." Done" CR
|
||||
BYE
|
||||
37
src/scripts/hgrlib.4th
Normal file
37
src/scripts/hgrlib.4th
Normal file
@@ -0,0 +1,37 @@
|
||||
' HGRMODE ?ENDSRC
|
||||
" HGRLIB" LOADMOD" "
|
||||
" LINES" LOADMOD" "
|
||||
" HGRTILE" LOADMOD" "
|
||||
" HGRFONT" LOADMOD" "
|
||||
LOOKUP HGRPLOT PLASMA HGRPLOT
|
||||
LOOKUP HGRORPLOT PLASMA HGRORPLOT
|
||||
LOOKUP HGRXORPLOT PLASMA HGRXORPLOT
|
||||
LOOKUP HGRHLIN PLASMA HGRHLIN
|
||||
LOOKUP HGRXORHLIN PLASMA HGRXORHLIN
|
||||
LOOKUP HGRVLIN PLASMA HGRVLIN
|
||||
LOOKUP HGRXORVLIN PLASMA HGRXORVLIN
|
||||
LOOKUP HGRBLT PLASMA HGRBLT
|
||||
LOOKUP HGRRECT PLASMA HGRRECT
|
||||
LOOKUP HGRXORRECT PLASMA HGRXORRECT
|
||||
LOOKUP HGRCOPYSRC PLASMA HGRCOPYSRC
|
||||
LOOKUP HGRANDSRC PLASMA HGRANDSRC
|
||||
LOOKUP HGRXORSRC PLASMA HGRXORSRC
|
||||
LOOKUP HGRORSRC PLASMA HGRORSRC
|
||||
LOOKUP HGRCOPYDST PLASMA HGRCOPYDST
|
||||
LOOKUP HGRCLEAR PLASMA HGRCLEAR
|
||||
LOOKUP HGRMODE PLASMA HGRMODE
|
||||
LOOKUP HGRSHOW PLASMA HGRSHOW
|
||||
LOOKUP HGRSWAP PLASMA HGRSWAP
|
||||
LOOKUP HGRDRAWBUF PLASMA HGRDRAWBUF
|
||||
LOOKUP HGRCOLOR PLASMA HGRCOLOR
|
||||
LOOKUP HGRPUTSTR PLASMA HGRPUTSTR
|
||||
LOOKUP SETLINESPANS PLASMA SETLINESPANS
|
||||
LOOKUP LINESPANS PLASMA HGRLINE
|
||||
LOOKUP HGRHLIN LOOKUP HGRVLIN SETLINESPANS
|
||||
LOOKUP TILEDRAW PLASMA TILEDRAW
|
||||
LOOKUP TILEXORDRAW PLASMA TILEXORDRAW
|
||||
LOOKUP TILEORDRAW PLASMA TILEORDRAW
|
||||
LOOKUP TILEANDDRAW PLASMA TILEANDDRAW
|
||||
LOOKUP TILEDRAWSTR PLASMA TILEDRAWSTR
|
||||
LOOKUP TILEFROMTEXT PLASMA TILEFROMTEXT
|
||||
LOOKUP TILEDRAWBUF PLASMA TILEDRAWBUF
|
||||
66
src/scripts/hrbounce.4th
Normal file
66
src/scripts/hrbounce.4th
Normal file
@@ -0,0 +1,66 @@
|
||||
LOOKUP HRFORTH ( HGR page 1 reserved )
|
||||
LOOKUP HR2FORTH ( HGR page 1 and 2 reserved )
|
||||
OR NOT ?ABORT" Must run with HRFORTH."
|
||||
|
||||
SRC" PLASMA.4TH"
|
||||
SRC" CONIO.4TH"
|
||||
SRC" HGRLIB.4TH"
|
||||
|
||||
5 VARIABLE BALLCLR
|
||||
10 VARIABLE BALLX
|
||||
20 VARIABLE BALLY
|
||||
10 VARIABLE OLDX
|
||||
20 VARIABLE OLDY
|
||||
1 VARIABLE INCX
|
||||
1 VARIABLE INCY
|
||||
|
||||
: BEEP 30 10 TONE ;
|
||||
|
||||
: BOOP 10 30 TONE ;
|
||||
|
||||
: MOVEBALL
|
||||
BALLX @ 0= IF INCX @ NEGATE INCX ! BEEP THEN
|
||||
BALLX @ 279 = IF INCX @ NEGATE INCX ! BEEP THEN
|
||||
BALLY @ 0= IF INCY @ NEGATE INCY ! BOOP THEN
|
||||
BALLY @ 191 = IF INCY @ NEGATE INCY ! BOOP THEN
|
||||
INCX @ BALLX +!
|
||||
INCY @ BALLY +!
|
||||
BALLX @ BALLY @ HGRXORPLOT
|
||||
OLDX @ OLDY @ HGRXORPLOT
|
||||
BALLX @ OLDX !
|
||||
BALLY @ OLDY !
|
||||
;
|
||||
|
||||
0 VARIABLE TOP
|
||||
0 VARIABLE BOTTOM
|
||||
0 VARIABLE LEFT
|
||||
0 VARIABLE RIGHT
|
||||
: RECT ( left top right bottom -- )
|
||||
BOTTOM !
|
||||
RIGHT !
|
||||
TOP !
|
||||
LEFT !
|
||||
LEFT @ TOP @ RIGHT @ TOP @ HGRLINE
|
||||
LEFT @ BOTTOM @ RIGHT @ BOTTOM @ HGRLINE
|
||||
LEFT @ TOP @ LEFT @ BOTTOM @ HGRLINE
|
||||
RIGHT @ TOP @ RIGHT @ BOTTOM @ HGRLINE
|
||||
;
|
||||
|
||||
: BOUNCE
|
||||
0 HGRMODE DROP
|
||||
0 HGRDRAWBUF DROP
|
||||
0 TILEDRAWBUF DROP
|
||||
0 HGRSHOW DROP
|
||||
10 12 " Hello from PLFORTH!" HGRPUTSTR
|
||||
1 HGRCOLOR
|
||||
61 90 209 107 RECT
|
||||
BALLCLR @ HGRCOLOR
|
||||
BEGIN
|
||||
MOVEBALL
|
||||
KEY?
|
||||
UNTIL
|
||||
KEY DROP
|
||||
-1 HGRMODE DROP
|
||||
;
|
||||
|
||||
BOUNCE
|
||||
49
src/scripts/hrplot.4th
Normal file
49
src/scripts/hrplot.4th
Normal file
@@ -0,0 +1,49 @@
|
||||
LOOKUP HRFORTH ( HGR page 1 reserved )
|
||||
NOT ?ABORT" Must run with HRFORTH."
|
||||
|
||||
SRC" MACHID.4TH"
|
||||
MACHID MACHID.MEM AND MACHID.128K
|
||||
<> ?ABORT" 128K required."
|
||||
FORGET MACHID
|
||||
|
||||
SRC" PLASMA.4TH"
|
||||
SRC" CONIO.4TH"
|
||||
SRC" HGRLIB.4TH"
|
||||
SRC" FPU.4TH"
|
||||
|
||||
: DRAWAXIS
|
||||
0 HGRMODE HGRDRAWBUF TILEDRAWBUF DROP
|
||||
1 HGRCOLOR
|
||||
0 96 279 96 HGRLINE
|
||||
139 0 139 191 HGRLINE
|
||||
140 0 140 191 HGRLINE
|
||||
;
|
||||
|
||||
: PLOTDONE
|
||||
KEY DROP
|
||||
-1 HGRMODE DROP
|
||||
;
|
||||
|
||||
FPEXT XSCALE
|
||||
FPCONSTPI 139 >FPINT FP/ XSCALE FPEXT!
|
||||
|
||||
FPEXT YSCALE
|
||||
-95 >FPINT YSCALE FPEXT!
|
||||
|
||||
DEFER FUNC
|
||||
|
||||
: PLOTFUNC
|
||||
3 HGRCOLOR
|
||||
279 0 DO
|
||||
I DUP 139 - >FPINT XSCALE FPEXT@ FP*
|
||||
FUNC
|
||||
YSCALE FPEXT@ FP* FPINT> 95 +
|
||||
OVER 1+ OVER HGRPLOT HGRPLOT
|
||||
LOOP
|
||||
;
|
||||
|
||||
' FPSIN IS FUNC
|
||||
DRAWAXIS PLOTFUNC PLOTDONE
|
||||
|
||||
' FPCOS IS FUNC
|
||||
DRAWAXIS PLOTFUNC PLOTDONE
|
||||
44
src/scripts/int32.4th
Normal file
44
src/scripts/int32.4th
Normal file
@@ -0,0 +1,44 @@
|
||||
' DVAR ?ENDSRC
|
||||
" INT32" LOADMOD" "
|
||||
LOOKUP ZERO32 PLASMA ZERO32
|
||||
LOOKUP ZEXT16TO32 PLASMA ZEXT32
|
||||
LOOKUP NEG32 PLASMA NEG32
|
||||
LOOKUP LOAD32 PLASMA LOAD32
|
||||
LOOKUP LOADI16 PLASMA LOAD16
|
||||
LOOKUP STORE32 PLASMA STORE32
|
||||
LOOKUP ADD32 PLASMA ADD32
|
||||
LOOKUP ADDI16 PLASMA ADD16
|
||||
LOOKUP SUB32 PLASMA SUB32
|
||||
LOOKUP SUBI16 PLASMA SUB16
|
||||
LOOKUP SHL32 PLASMA SHL32
|
||||
LOOKUP SHR32 PLASMA SHR32
|
||||
LOOKUP MUL32 PLASMA MUL32
|
||||
LOOKUP MULI16 PLASMA MUL16
|
||||
LOOKUP DIV32 PLASMA DIV32
|
||||
LOOKUP DIVI16 PLASMA DIV16
|
||||
LOOKUP ISEQ32 PLASMA ISEQ32
|
||||
LOOKUP ISEQI16 PLASMA ISEQ16
|
||||
LOOKUP IDGE32 PLASMA ISGE32
|
||||
LOOKUP ISGEI16 PLASMA ISGE16
|
||||
LOOKUP ISLE32 PLASMA ISLE32
|
||||
LOOKUP ISLEI16 PLASMA ISLE16
|
||||
LOOKUP ISGT32 PLASMA ISGT32
|
||||
LOOKUP ISGTI16 PLASMA ISGT16
|
||||
LOOKUP ISLT32 PLASMA ISLT32
|
||||
LOOKUP ISLTI16 PLASMA ISLT16
|
||||
LOOKUP I32TOS PLASMA I32TOS
|
||||
LOOKUP PUTI32 PLASMA PUTI32
|
||||
: DVAR CREATE 4 ALLOT ;
|
||||
DVAR _DOP1
|
||||
DVAR _DOP2
|
||||
: D@ DUP @ SWAP 2+ @ ;
|
||||
: D! DUP ROT SWAP 2+ ! ! ;
|
||||
: D+ _DOP2 D! _DOP1 D! _DOP1 LOAD32 _DOP2 ADD32 _DOP1 STORE32 _DOP1 D@ ;
|
||||
: D- _DOP2 D! _DOP1 D! _DOP1 LOAD32 _DOP2 SUB32 _DOP1 STORE32 _DOP1 D@ ;
|
||||
: D* _DOP2 D! _DOP1 D! _DOP1 LOAD32 _DOP2 MUL32 _DOP1 STORE32 _DOP1 D@ ;
|
||||
: D/ _DOP2 D! _DOP1 D! _DOP1 LOAD32 _DOP2 DIV32 _DOP1 STORE32 _DOP1 D@ ;
|
||||
: D< _DOP2 D! _DOP1 D! _DOP1 LOAD32 _DOP2 ISLT32 ;
|
||||
: D> _DOP2 D! _DOP1 D! _DOP1 LOAD32 _DOP2 ISGT32 ;
|
||||
: D= _DOP2 D! _DOP1 D! _DOP1 LOAD32 _DOP2 ISEQ32 ;
|
||||
: D0= OR 0= ;
|
||||
: D. _DOP1 D! _DOP1 PUTI32 SPACE ;
|
||||
14
src/scripts/machid.4th
Normal file
14
src/scripts/machid.4th
Normal file
@@ -0,0 +1,14 @@
|
||||
' MACHID ?ENDSRC
|
||||
LOOKUP MACHID C@ CONSTANT MACHID
|
||||
$01 CONSTANT MACHID.CLOCK
|
||||
$02 CONSTANT MACHID.80COL
|
||||
$30 CONSTANT MACHID.MEM
|
||||
$20 CONSTANT MACHID.64K
|
||||
$30 CONSTANT MACHID.128K
|
||||
$C8 CONSTANT MACHID.MODEL
|
||||
$00 CONSTANT MACHID.II
|
||||
$40 CONSTANT MACHID.IIPLUS
|
||||
$80 CONSTANT MACHID.IIE
|
||||
$C0 CONSTANT MACHID.III
|
||||
$88 CONSTANT MACHID.IIC
|
||||
$08 CONSTANT MACHID.I
|
||||
24
src/scripts/plasma.4th
Normal file
24
src/scripts/plasma.4th
Normal file
@@ -0,0 +1,24 @@
|
||||
' IFACE ?ENDSRC
|
||||
: IFACE 2 * + @ ;
|
||||
LOOKUP CMDSYS 0 IFACE CONSTANT PLASMAVER
|
||||
LOOKUP CMDSYS 2 IFACE CONSTANT CMDLINE
|
||||
LOOKUP CMDSYS 3 IFACE PLASMA EXECMOD
|
||||
LOOKUP STRCPY PLASMA STRCPY
|
||||
LOOKUP STRCAT PLASMA STRCAT
|
||||
LOOKUP TOUPPER PLASMA TOUPPER
|
||||
LOOKUP HEAPAVAIL PLASMA FREEMEM
|
||||
: LOADMOD CMDLINE " . " STRCPY SWAP STRCAT DROP
|
||||
EXECMOD 0< ?ABORT" Failed to load module" ;
|
||||
: LOADMOD" PAD SWAP STRCPY CHAR " WORD LOADMOD ;
|
||||
: EDIT " ED" " " LOADMOD ;
|
||||
: EDIT" " ED" LOADMOD" ;
|
||||
: CAT " CAT" " " LOADMOD ;
|
||||
: CAT" " CAT" LOADMOD" ;
|
||||
: DEL" " DEL" LOADMOD" ;
|
||||
: REN" " REN" LOADMOD" ;
|
||||
: COPY" " COPY" LOADMOD" ;
|
||||
: NEWDIR" " NEWDIR" LOADMOD" ;
|
||||
LOOKUP FILEIO 0 IFACE PLASMA GETPFX
|
||||
LOOKUP FILEIO 1 IFACE PLASMA SETPFX
|
||||
: PFX. HERE GETPFX DROP HERE (.") ;
|
||||
: PFX" 34 WORD SETPFX DROP ;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user