Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ACE is a BASIC compiler for Amiga. It compiles BASIC source code (.b files) into

**Build Pipeline:**
```
Source (.b) → Preprocess (app) → Compile (ace) → Assemble (vasm) → Link (vlink) → Executable
Source (.b) → Preprocess (yap) → Compile (ace) → Assemble (vasmm68k_mot) → Link (vlink) → Executable
```

The `bas` wrapper script in `bin/` orchestrates this full pipeline.
Expand Down Expand Up @@ -201,7 +201,7 @@ bas myprogram # Compile myprogram.b to executable

# To debug compilation issues, run phases separately:
ace myprogram.b # Just compile to .s
vasm -Fhunk -o myprogram.o myprogram.s # Assemble
vasmm68k_mot -Fhunk -o myprogram.o myprogram.s # Assemble
vlink -o myprogram myprogram.o ACElib:db.lib ACElib:startup.lib # Link
```

Expand Down
1 change: 1 addition & 0 deletions examples/mui/FileViewer.b
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
REM #using ACE:submods/mui/mui.o
{*
** FileViewer.b - File Browser with Text Editor
** =============================================
Expand Down
28 changes: 28 additions & 0 deletions include/submods/Arne.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef ARNE_H
#define ARNE_H 1

{* Arne.h - Vampire SAGA Arne 16-bit audio submod for ACE BASIC *}

CONST ARNE_PAL_CLOCK = 3546895
CONST ARNE_8BIT = 0
CONST ARNE_16BIT = 1
CONST ARNE_ONESHOT = 2
CONST ARNE_STEREO = 4
CONST ARNE_LOOP16S = 5
CONST ARNE_PLAY16S = 7
CONST ARNE_LOOP8 = 0
CONST ARNE_PLAY8 = 2
CONST ARNE_MAX_CH = 16

DECLARE SUB ArnePlay(SHORTINT ch, LONGINT buf, LONGINT sz, ~
SHORTINT per, SHORTINT vl, SHORTINT vr, ~
SHORTINT md) EXTERNAL
DECLARE SUB ArneStop(SHORTINT ch) EXTERNAL
DECLARE SUB ArneStart(SHORTINT ch) EXTERNAL
DECLARE SUB ArneVolume(SHORTINT ch, SHORTINT vl, SHORTINT vr) EXTERNAL
DECLARE SUB SHORTINT ArneIsFree(SHORTINT ch) EXTERNAL
DECLARE SUB SHORTINT ArneFindFree EXTERNAL
DECLARE SUB ArneStopAll EXTERNAL
DECLARE SUB SHORTINT ArnePeriod(LONGINT rate) EXTERNAL

#endif
Empty file modified lib/db.lib
100644 → 100755
Empty file.
30 changes: 30 additions & 0 deletions specs/arne-audio-state.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Arne Audio Submodule - Implementation State
============================================
Branch: arne-audio-submod
Spec: specs/arne-audio-submod.txt

Files created:
submods/arne/arne.b - Module source (8 SUBs)
include/submods/Arne.h - Header with DECLARE SUBs + constants
submods/arne/test_arne.b - Sine wave tone test
submods/arne/test_arne_aiff.b - Raw PCM file playback test

Implementation status:
[x] arne.b: ArnePlay, ArneStop, ArneStart, ArneVolume
[x] arne.b: ArneIsFree, ArneFindFree, ArneStopAll, ArnePeriod
[x] Arne.h: constants + DECLARE SUBs
[x] test_arne.b: sine wave generator + play on ch 0
[x] test_arne_aiff.b: raw PCM file loader + play via _Read

Testing status:
[x] Compile arne.b as module (bas -m arne) - OK, 3.0 KB .o
[x] Compile test_arne.b (bas test_arne arne.o) - OK, 32.8 KB executable
[x] Compile test_arne_aiff.b (bas test_arne_aiff arne.o) - OK, 37 KB executable
[ ] Check generated .s assembly for correct register addresses
[ ] Functional test on Vampire hardware (future)

Notes:
- Option A for alignment (user manages raw vs aligned addr)
- No ASSEM used, pure POKEW/POKEL/PEEKW
- dos _Read used for fast file loading in test_arne_aiff.b
- ACE uses ARG$(n) not COMMAND$(n)
Loading