瀏覽代碼

recipes: add "make emul" targets where appropriate

pull/85/head
Virgil Dupras 4 年之前
父節點
當前提交
c7ef8bf915
共有 7 個檔案被更改,包括 51 行新增25 行删除
  1. +12
    -3
      emul/hw/rc2014/Makefile
  2. +12
    -3
      emul/hw/ti/Makefile
  3. +0
    -4
      emul/hw/ti/ti84.c
  4. +9
    -0
      recipes/rc2014/Makefile
  5. +5
    -0
      recipes/rc2014/README.md
  6. +8
    -0
      recipes/ti84/Makefile
  7. +5
    -15
      recipes/ti84/README.md

+ 12
- 3
emul/hw/rc2014/Makefile 查看文件

@@ -1,4 +1,13 @@
OBJS = acia.o classic.o ../../emul.o ../../libz80/libz80.o
EXTOBJS = ../../emul.o ../../libz80/libz80.o
OBJS = acia.o classic.o
TARGET = classic

classic: $(OBJS)
$(CC) $(OBJS) -o $@
.PHONY: all
all: $(TARGET)

$(TARGET): $(OBJS) $(EXTOBJS)
$(CC) $(OBJS) $(EXTOBJS) -o $@

.PHONY: clean
clean:
rm -f $(TARGET) $(OBJS)

+ 12
- 3
emul/hw/ti/Makefile 查看文件

@@ -1,6 +1,15 @@
OBJS = ti84.o t6a04.o kbd.o ../../emul.o ../../libz80/libz80.o
EXTOBJS = ../../emul.o ../../libz80/libz80.o
OBJS = ti84.o t6a04.o kbd.o
TARGET = ti84
CFLAGS += `pkg-config --cflags xcb`

ti84: $(OBJS)
$(CC) `pkg-config --libs xcb` $(OBJS) -o $@
.PHONY: all
all: $(TARGET)

$(TARGET): $(OBJS) $(EXTOBJS)
$(CC) `pkg-config --libs xcb` $(OBJS) $(EXTOBJS) -o $@

.PHONY: clean
clean:
rm -f $(TARGET) $(OBJS)

+ 0
- 4
emul/hw/ti/ti84.c 查看文件

@@ -223,10 +223,6 @@ void draw_pixels()

void event_loop()
{
if (!emul_step()) {
// We're done
return;
}
while (1) {
emul_step();
if (lcd_changed) {


+ 9
- 0
recipes/rc2014/Makefile 查看文件

@@ -3,8 +3,17 @@ BASEDIR = ../..
ZASM = $(BASEDIR)/emul/zasm/zasm
KERNEL = $(BASEDIR)/kernel
APPS = $(BASEDIR)/apps
EMUL = $(BASEDIR)/emul/hw/rc2014/classic

.PHONY: all
all: $(TARGET)
$(TARGET): glue.asm
$(ZASM) $(KERNEL) $(APPS) < glue.asm > $@

$(EMUL):
$(MAKE) -C ${@:%/classic=%}

.PHONY: emul
emul: $(EMUL) $(TARGET)
$(EMUL) $(TARGET)

+ 5
- 0
recipes/rc2014/README.md 查看文件

@@ -81,6 +81,11 @@ We only have the shell to build, so it's rather straightforward:

Running `make` will also work.

### Emulate

The Collapse OS project includes a RC2014 emulator suitable for this image.
You can invoke it with `make emul`. See `emul/hw/rc2014/README.md` for details.

### Write to the ROM

Plug your romwrite atmega328 to your computer and identify the tty bound to it.


+ 8
- 0
recipes/ti84/Makefile 查看文件

@@ -3,6 +3,7 @@ BASEDIR = ../..
ZASM = $(BASEDIR)/emul/zasm/zasm
KERNEL = $(BASEDIR)/kernel
APPS = $(BASEDIR)/apps
EMUL = $(BASEDIR)/emul/hw/ti/ti84
MKTIUPGRADE = mktiupgrade

.PHONY: all
@@ -10,6 +11,13 @@ all: $(TARGET)
$(TARGET): glue.asm
$(ZASM) $(KERNEL) $(APPS) < glue.asm > $@

$(EMUL):
$(MAKE) -C ${@:%/ti84=%}

.PHONY: emul
emul: $(EMUL) $(TARGET)
$(EMUL) $(TARGET)
os.rom: $(TARGET)
cp $(TARGET) $@
truncate -s 1M $@


+ 5
- 15
recipes/ti84/README.md 查看文件

@@ -22,27 +22,19 @@ screen as output and its builtin keyboard as input.
* A USB cable
* [tilp][tilp]
* [mktiupgrade][mktiupgrade]
* Optional: [z80e][z80e] to emulate

## Build the ROM

Running `make` will result in `os.rom` being created.

## Emulate through z80e
## Emulate

[KnightOS][knightos] has a handy emulator, [z80e][z80e] for TI calculators and
it also emulates the screen. It is recommended to use this tool.

Once z80e is installed (build it with SDL support) and `os.rom` is created,
you can run the emulator with:

z80e-sdl -d TI84p --no-rom-check os.rom
Collapse OS has a builtin TI-84+ emulator using XCB for display in `emul/hw/ti`.
You can invoke it with `make emul`.

You will start with a blank screen, it's normal, you haven't pressed the "ON"
key yet. This key is mapped to F12 in the emulator. Once you press it, the
Collapse OS prompt will appear.

See z80e's `KEYBINDINGS.md` file for details.
key yet. This key is mapped to tilde (~) in the emulator. Once you press it, the
Collapse OS prompt will appear. See `emul/hw/ti/README.md` for details.

## Upload to the calculator

@@ -102,7 +94,5 @@ Keys that aren't a digit, a letter, a symbol that is part of 7-bit ASCII or one
of the two mode key have no effect.

[zasm]: ../../tools/emul
[knightos]: https://knightos.org/
[z80e]: https://github.com/KnightOS/z80e
[mktiupgrade]: https://github.com/KnightOS/mktiupgrade
[tilp]: http://lpg.ticalc.org/prj_tilp/

Loading…
取消
儲存