From e12820746e064f366f8d10488941fdaee0f40e12 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 11 Apr 2024 21:34:12 +0100 Subject: Turns out you do need the BASIC stub in a PRG. Updated docs and headers. --- doc/casm.html | 23 ++++++++++++++++------- src/example/vic20.asm | 6 ++++++ src/prgout.c | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/doc/casm.html b/doc/casm.html index 89a2fe0..aba9611 100644 --- a/doc/casm.html +++ b/doc/casm.html @@ -134,7 +134,7 @@ h2

casm is a simple, portable multi-pass assembler

-

Copyright (C) 2003-2015 Ian Cowburn

+

Copyright (C) 2003-2024 Ian Cowburn

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1027,7 +1027,7 @@ An Amstrad CPC CDT file. prg -A Commodore 64 PRG file. +A Commodore 64 or VIC-20 PRG file. @@ -1554,7 +1554,7 @@ code. -

C64 PRG Output Format

+

C64/VIC-20 PRG Output Format

Generates a PRG file for an emulator or real hardware.

@@ -1567,18 +1567,18 @@ have been used, in which case then each entry in the tape file will use the

All banks will have a small BASIC program inserted as part of the generated file. For this reason the bank should start near the BASIC -area (0x820 should be a safe place to start) unless you have a great +area (0x820 should be a safe place to start for the C64) unless you have a great desire for a PRG full of zero bytes. This BASIC will simply hold a SYS command to start the machine code, e.g.

-10 SYS 2080
+10 SYS2080
 
-

C64 PRG Output Format options

+

C64/VIC-20 PRG Output Format options

-

The C64 PRG output driver supports the following settings that can be +

The PRG output driver supports the following settings that can be set via an option command.

@@ -1595,6 +1595,15 @@ The start address for the generated BASIC loader. If left undefined defaults to the start of written memory in the bank. + +option prg-system, <c64|vic20|vic20+8k> + + +The system to generate the PRG file for, either a Commodore 64 (c64), +VIC-20 either unexpanded or with 3K expansion (vic20) or a VIC-20 with +an 8K or 16K expansion (vic20+8k). + + diff --git a/src/example/vic20.asm b/src/example/vic20.asm index 8bb222d..2da53a2 100644 --- a/src/example/vic20.asm +++ b/src/example/vic20.asm @@ -18,6 +18,12 @@ main: loop: sta 36879 adc #1 + pha + jsr $ffe4 + beq nokey + rts +nokey: + pla jmp loop start: diff --git a/src/prgout.c b/src/prgout.c index da14cae..39b70e1 100644 --- a/src/prgout.c +++ b/src/prgout.c @@ -19,7 +19,7 @@ ------------------------------------------------------------------------- - Commodore T64 tape output handler. + Commodore PRG output handler. */ #include -- cgit v1.2.3