Erratum: Loader's mli.asm was not committed

This commit is contained in:
Christophe Meneboeuf 2016-12-08 22:20:09 +01:00
parent f6d7230c0d
commit 3250e57da5
4 changed files with 70 additions and 10 deletions

1
.gitignore vendored
View File

@ -4,7 +4,6 @@ RgbToHiRes.vcxproj.user
RgbToHiRes.VC.*
*.sln
*.bin
*.asm
**/.vs
**/Debug
**/Release

View File

@ -3,7 +3,7 @@ APPLE2_CC := $(CC65_HOME)/bin/cc65
APPLE2_SRC := src/file_io.c src/mli.asm src/main.c
APPLE2_MAP := hires.map
APPLE2_CFLAGS := -Oirs -v -t apple2
APPLE2_OUT := bin/hires.a2
APPLE2_OUT := bin/loader.a2
all: directories apple2

53
Loader_Apple2/src/mli.asm Normal file
View File

@ -0,0 +1,53 @@
; Rgb2Hires
; Copyright (C) 2016 Christophe Meneboeuf <christophe@xtof.info>
;
; 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
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
;
; Handling calls to Apple ProDOS 8 MLI
;
.import __dos_type
.import popa
.export _call_to_mli
.code
_call_to_mli:
; Store parameters
STA Mli_Param
STX Mli_Param+1
; Store call number
JSR popa
STA Mli_Call
;+ DEBUG
; CMP #$CE
; BNE continue
;debug: JMP debug
;continue:
;- DEBUG
; Call MLI and return
JSR $BF00 ; MLI call entry point
Mli_Call:
.byte $00
Mli_Param:
.addr $00
RTS
.code

View File

@ -1,5 +1,5 @@
#Rgb2Hires
This program coverts an RGB image to the Apple II's "HiRes" format. Provided it complies with its constraints:
This program converts an RGB image to the Apple II's "HiRes" format. Provided it complies with this format's constraints:
* Source image must be 140x280. Pixels are anamorphic: twice wider than tall.
* Source image must contains six colors : BLACK, WHITE, ORANGE, GREEN, BLUE and PURPLE
@ -8,17 +8,25 @@ For more information about the "Hires" format and its limitations, please refer
## Compiling
This repository contains two projects:
* Rgb2Hires, the conversion programm running on a PC
* Loader, for testing purposes. This program runs on Apple II hardware and displays an HiRes binary file named *test.picture* and located on the same disk.
### Rgb2Hires
The source is provided as a Visual Studio project. It's standard C++11 without any Windows dependency so it should compile on Linux and macOs without any modification.
The source is provided as a Visual Studio project. Howerver, it is standard C++11 without any Windows dependency, so it should compile on Linux and macOs without any modification.
#### Dependencies
* Magick++ : On Windows, you have provide an environment variable called *MAGICK_HOME* and pointing to the ImageMagick folder.
* Magick++
* On Windows, you have provide an environment variable called *MAGICK_HOME* and pointing to the ImageMagick folder.
* On Linux, install libmagick++-dev
### Loader (for Apple II)
This program will compile as an Apple II executable that you can run on the actual hardware.
It is a Makefile project and must be crosscompiled using **[CC65](https://cc65.github.io/cc65/)**
#### Dependencies
* CC65: Please provide an environment variable, *CC65_HOME*, pointing to your CC65 folder.
* CC65: The crosscompiler suit. Please provide an environment variable, *CC65_HOME* pointing to your CC65 folder.
# Running
A correct source image, *test.png*, is provided as an example. Convert it into a file named *test.picture* as the Apple II Loader will try to load and display a file called like that.
A correct source image, *test.png*, is provided as an example. Convert it into a file named *test.picture* and copy it along the Apple II *Loader*, then execute on the actual hardware ;)