mirror of
https://github.com/Pixinn/Rgb2Hires.git
synced 2025-02-09 02:31:37 +00:00
Correct the Display project
This commit is contained in:
parent
493144390e
commit
83656a797a
Binary file not shown.
@ -10,16 +10,16 @@ if (( $# != 4 )); then
|
||||
exit
|
||||
fi
|
||||
|
||||
echo " . revoving previous instance of DISPLAY form the disk"
|
||||
echo " . removing previous instance of DISPLAY form the disk"
|
||||
java -jar ${1} -d ${4} DISPLAY
|
||||
|
||||
echo " .. adding DISPLAY to the disk"
|
||||
java -jar ${1} -cc65 ${4} DISPLAY BIN < ${2}
|
||||
|
||||
echo " . revoving previous instance of PICTURE form the disk"
|
||||
echo " . removing previous instance of PICTURE form the disk"
|
||||
java -jar ${1} -d ${4} PICTURE
|
||||
|
||||
# echo " .. adding PICTURE to the disk"
|
||||
java -jar ${1} -cc65 ${4} PICTURE BIN < ${3}
|
||||
echo " .. adding PICTURE to the disk"
|
||||
java -jar ${1} -p ${4} PICTURE BIN < ${3}
|
||||
|
||||
echo "DONE."
|
||||
|
@ -25,36 +25,42 @@
|
||||
/* My headers */
|
||||
#include "file_io.h"
|
||||
|
||||
#define HIRES_PAGE1 0x2000
|
||||
/****** HIRES SCREEN DEFINITIONS ***********/
|
||||
#define HIRES_PAGE1 (char*)0x2000
|
||||
#define HIRES_PAGE2 (char*)0x4000
|
||||
#define HIRES_PAGE_SIZE 0x2000
|
||||
#define SWITCH_TEXT *((uint8_t*)0xC050)=0
|
||||
#define SWITCH_GRAPHICS *((uint8_t*)0xC050)=1
|
||||
#define SWITCH_FULLSCREEN *((uint8_t*)0xC052)=1
|
||||
#define SWITCH_PAGE1 *((uint8_t*)0xC054)=1
|
||||
#define SWITCH_PAGE1 *((uint8_t*)0xC055)=0
|
||||
#define SWITCH_PAGE2 *((uint8_t*)0xC055)=1
|
||||
#define SWITCH_HIRES *((uint8_t*)0xC057)=1
|
||||
|
||||
|
||||
void __fastcall__ error(const uint8_t err) {
|
||||
printf("\n ERROR: %u", err);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
// static char Filename[64] = "test.picture";
|
||||
int main( int argc, char* argv[] )
|
||||
void main( )
|
||||
{
|
||||
// uint8_t handle;
|
||||
// (void)argc;
|
||||
// (void)argv;
|
||||
uint8_t handle;
|
||||
int size_read;
|
||||
|
||||
// file_open(Filename, &handle);
|
||||
// if( file_read( handle, (uint8_t*)HIRES_PAGE1, HIRES_PAGE_SIZE ) != HIRES_PAGE_SIZE ) {
|
||||
// error(file_error());
|
||||
// }
|
||||
// file_close(handle);
|
||||
|
||||
// SWITCH_GRAPHICS;
|
||||
// SWITCH_FULLSCREEN;
|
||||
// SWITCH_PAGE1;
|
||||
// SWITCH_HIRES;
|
||||
|
||||
return 0;
|
||||
file_open("PICTURE", &handle);
|
||||
size_read = file_read( handle, (uint8_t*)HIRES_PAGE2, HIRES_PAGE_SIZE );
|
||||
if( file_error() != NO_ERROR ) {
|
||||
printf("\nERROR, CANNOT READ PICTURE\nERRNO: %x\nn", file_error());
|
||||
file_close(handle);
|
||||
exit(-1);
|
||||
}
|
||||
file_close(handle);
|
||||
|
||||
SWITCH_GRAPHICS;
|
||||
SWITCH_FULLSCREEN;
|
||||
SWITCH_PAGE2;
|
||||
SWITCH_HIRES;
|
||||
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
17
Readme.md
17
Readme.md
@ -2,15 +2,15 @@
|
||||
|
||||
This repository contains three "PC" projects:
|
||||
* **libRgb2Hires**: a library to convert RGB image to the Apple II's HIRES format
|
||||
* **Picture**: a program to convert a RGB png to a binary or an ASM that can be loaded to the HIRES memory pages of an Apple II.
|
||||
* Source image must be 140x192. Pixels are anamorphic: twice wider than tall.
|
||||
* **Picture**: a program to convert a RGB png to a binary or an ASM excerpt, that can be loaded to the HIRES memory pages of an Apple II.
|
||||
* Source image must be 140x192. Pixels are anamorphic: they will be displayed twice wider than tall.
|
||||
* Source image must contains six colors : BLACK, WHITE, ORANGE, GREEN, BLUE and PURPLE. The color may be approximation of the Apple II 6 colors. Please refer to the provided pic.
|
||||
* **Tile**: given a RGB png tile sheet that satifies the same requirements as above, it extracts a 14x16 tile and converts it to ASM data. This data is not interleaved.
|
||||
* **Tile**: given a RGB png tile sheet that satisfies the same requirements as above, it extracts a 14x16 tile and converts it to ASM data. This data **is not interleaved**.
|
||||
|
||||
And one Apple II project:
|
||||
* **Loader**: a program that will load and display a picture generated by the *Picture* program. A bash scripts is provided as an exemple to load the picture and the loader on an image disk. [AppleCommander](https://applecommander.github.io/) is required to do so.
|
||||
* **Loader**: a program that will load and display a picture generated by the *Picture* program. A bash scripts is provided as an exemple to load the picture and the loader on an image disk. [AppleCommander](https://applecommander.github.io/) is required to do so. Once in ProDOS, just type *-DISPLAY*.
|
||||
|
||||
For more information about the "Hires" format and its limitations, you can refer to my [website](https://www.xtof.info/blog/?p=768).
|
||||
For more information about the "Hires" format and its limitations, you can refer to my [website](https://www.xtof.info/hires-graphics-apple-ii.html).
|
||||
|
||||
__Note:__
|
||||
|
||||
@ -41,7 +41,8 @@ __Note:__
|
||||
|
||||
### Build
|
||||
|
||||
Use the makefile
|
||||
> make
|
||||
|
||||
# Running
|
||||
A correct source image, *test.png*, is provided as an example. Convert it using Picture, then copy it on a dsk image along with the Apple II loader. You can use or refer to the provided script.
|
||||
## Test
|
||||
|
||||
A correct source image, *test.png*, is provided as an example. Convert it using Picture, then copy it on a dsk image along with the Apple II loader. You can use or refer to the provided script in the *Loader_Apple2* folder.
|
||||
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerCommandArguments>-i e:\Chris.ARES\Temp\Player.png -o player.asm -a</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerCommandArguments>-a -i "C:\Users\chris\Temp\StairDown.png" -o "C:\Users\chris\Temp\Stair.asm"</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user