EgonOlsen71 / basicv2

A Commodore (CBM) BASIC V2 interpreter/compiler written in Java
https://egonolsen71.github.io/basicv2/
The Unlicense
84 stars 15 forks source link

How to use for the Vic20? How to select unexpanded vs +3k vs +8k? #32

Closed Fabrizio-Caruso closed 4 years ago

Fabrizio-Caruso commented 5 years ago

Hi I have read the doc "MOSPEED native compiler.txt", which only mentions the C64. I would like to use it for the unexpanded Vic 20 and possibly use it from any directory.

How can I select the Vic20 binary format: unexpanded vs +3k vs +8k/16k/24k/32k ?

EgonOlsen71 commented 4 years ago

I've added an additional parameter to the command line compiler which only applies to the VIC20 as a target platform. You can now specify a /memconfig with can either by 0, 3 or 8 (with 8 being the default). All this does is to change that start of the program to the corresponding start of the BASIC memory and modify the BASIC header accordingly.

Example: mospeed -platform=vic20 -memconfig=0 ..\src\test\resources\transform\vic20\beer_transform20.bas /compactlevel=3

This will compile the "beer" example for an unexpanded VIC20.