Parcourir la source

Move RC2014 recipe in its own folder

Also, remove `parts/platforms`. It makes no sense. Only recipes make
sense.
pull/10/head
Virgil Dupras il y a 5 ans
Parent
révision
ff99062d5b
4 fichiers modifiés avec 36 ajouts et 46 suppressions
  1. +0
    -5
      parts/platforms/README.md
  2. +0
    -7
      parts/platforms/rc2014.inc
  3. +3
    -34
      recipes/rc2014/README.md
  4. +33
    -0
      recipes/rc2014/glue.asm

+ 0
- 5
parts/platforms/README.md Voir le fichier

@@ -1,5 +0,0 @@
# platforms

This is a collection of include files that set platform-specific constants
that different parts use. When assembling your own OS, pick the platform include
that is closest to yours and adapt it to your machine.

+ 0
- 7
parts/platforms/rc2014.inc Voir le fichier

@@ -1,7 +0,0 @@
; classic RC2014 setup (8K ROM + 32K RAM) and a stock Serial I/O module

; The RAM module is selected on A15, so it has the range 0x8000-0xffff
RAMSTART .equ 0x8000
RAMEND .equ 0xffff
ACIA_CTL .equ 0x80 ; Control and status. RS off.
ACIA_IO .equ 0x81 ; Transmit. RS on.

recipes/rc2014.md → recipes/rc2014/README.md Voir le fichier

@@ -37,40 +37,9 @@ device I use in this recipe.
* [GNU screen][screen]
* A FTDI-to-TTL cable to connect to the Serial I/O module of the RC2014

### Write main.asm
### Write glue.asm

This is what your glue code would look like:

```
#include "platforms/rc2014.inc"

jr init

.fill 0x38-$
jp aciaInt

init:
di

; setup stack
ld hl, RAMEND
ld sp, hl

im 1

call aciaInit
call shellInit
ei
call shellLoop

#include "core.asm"
ACIA_RAMSTART .equ RAMSTART
#include "acia.asm"
SHELL_RAMSTART .equ ACIA_RAMEND
.define SHELL_GETC call aciaGetC
.define SHELL_PUTC call aciaPutC
#include "shell.asm"
```
[This is what your glue code would look like.](glue.asm)

The `platform.inc` include is there to load all platform-specific constants
(such as `RAMSTART` and `RAMEND`).
@@ -99,7 +68,7 @@ is decoupled from the ACIA and can get its IO from anything. See

We only have the shell to build, so it's rather straightforward:

scas -I /path/to/parts -o rom.bin main.asm
scas -I /path/to/parts -o rom.bin glue.asm

### Write to the ROM


+ 33
- 0
recipes/rc2014/glue.asm Voir le fichier

@@ -0,0 +1,33 @@
; classic RC2014 setup (8K ROM + 32K RAM) and a stock Serial I/O module
; The RAM module is selected on A15, so it has the range 0x8000-0xffff
RAMSTART .equ 0x8000
RAMEND .equ 0xffff
ACIA_CTL .equ 0x80 ; Control and status. RS off.
ACIA_IO .equ 0x81 ; Transmit. RS on.

jr init

; interrupt hook
.fill 0x38-$
jp aciaInt

init:
di
; setup stack
ld hl, RAMEND
ld sp, hl
im 1
call aciaInit
call shellInit
ei
jp shellLoop

#include "core.asm"
ACIA_RAMSTART .equ RAMSTART
#include "acia.asm"
SHELL_RAMSTART .equ ACIA_RAMEND
.define SHELL_GETC call aciaGetC
.define SHELL_PUTC call aciaPutC
.define SHELL_IO_GETC call aciaGetC
SHELL_EXTRA_CMD_COUNT .equ 0
#include "shell.asm"

Chargement…
Annuler
Enregistrer