Monochrome low res demo [message #379549] |
Wed, 09 January 2019 16:49 |
|
Originally posted by: Charles Mangin
I've been having some fun with various lo-fi media lately, including the low resolution mode on the Apple II.
My goal was displaying images as clearly as is possible in low res on the Apple II screen, in monochrome color.
This meant:
- converting an image (or animation) into 16 grays, then reordering the bytes of the image to match the low/high nibble order for displaying on the II
- loading the image data from disk into memory
- moving the chunks of image data into the low res page
- transcribing the 16 low res colors into order by brightness
- looping over each 960 byte region to animate the frames
Between myself, Dagen Brock and Peter Ferrie (@qkumba) it's now running at 46FPS and displays a frame in about 22200 cycles. Without any optimization to how the data is stored (RLE, etc) I can store up to 41 frames of animation in memory before clobbering parts of ProDOS.
The best results are on Virtual II, which emulates the screen in solid monochrome pixels, rather than the raster lines of NTSC monochrome mode (as in Open Emulator). Virtual II's display, however, doesn't match the brightness order of NTSC monochrome, so there's a routine that detects whether the program is running on Virtual II or another environment, and switches the lookup table for the transcription step. Additional modes can be added this way, given a means of detecting the environment.
You can see a video example of the results here:
https://www.youtube.com/watch?v=uejBb3Na7lc
Source, scripts for converting your own animations, and other information (still in progress and updating) here:
https://github.com/option8/greenscale
|
|
|
|
|
Re: Monochrome low res demo [message #379565 is a reply to message #379549] |
Thu, 10 January 2019 15:47 |
Michael J. Mahon
Messages: 1767 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
Charles Mangin <option8@option8.com> wrote:
> I've been having some fun with various lo-fi media lately, including the
> low resolution mode on the Apple II.
>
> My goal was displaying images as clearly as is possible in low res on the
> Apple II screen, in monochrome color.
>
> This meant:
> - converting an image (or animation) into 16 grays, then reordering the
> bytes of the image to match the low/high nibble order for displaying on the II
> - loading the image data from disk into memory
> - moving the chunks of image data into the low res page
> - transcribing the 16 low res colors into order by brightness
> - looping over each 960 byte region to animate the frames
>
> Between myself, Dagen Brock and Peter Ferrie (@qkumba) it's now running
> at 46FPS and displays a frame in about 22200 cycles. Without any
> optimization to how the data is stored (RLE, etc) I can store up to 41
> frames of animation in memory before clobbering parts of ProDOS.
>
> The best results are on Virtual II, which emulates the screen in solid
> monochrome pixels, rather than the raster lines of NTSC monochrome mode
> (as in Open Emulator). Virtual II's display, however, doesn't match the
> brightness order of NTSC monochrome, so there's a routine that detects
> whether the program is running on Virtual II or another environment, and
> switches the lookup table for the transcription step. Additional modes
> can be added this way, given a means of detecting the environment.
>
> You can see a video example of the results here:
> https://www.youtube.com/watch?v=uejBb3Na7lc
>
> Source, scripts for converting your own animations, and other information
> (still in progress and updating) here:
> https://github.com/option8/greenscale
>
I thought that there were only five monochrome shades available, including
white and black. In other words, the population of the 4-bit lo-res pixels
is 0 to 4 bits.
--
-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
|
|
|
Re: Monochrome low res demo [message #379566 is a reply to message #379565] |
Thu, 10 January 2019 17:36 |
sicklittlemonkey
Messages: 570 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
On Friday, 11 January 2019 09:47:36 UTC+13, Michael J. Mahon wrote:
> I thought that there were only five monochrome shades available, including
> white and black. In other words, the population of the 4-bit lo-res pixels
> is 0 to 4 bits.
Yeah, something is not right here.
Cheers,
Nick.
|
|
|
Re: Monochrome low res demo [message #379567 is a reply to message #379566] |
Thu, 10 January 2019 17:38 |
sicklittlemonkey
Messages: 570 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
On Friday, 11 January 2019 11:36:27 UTC+13, Nick Westgate wrote:
> Yeah, something is not right here.
Not meaning to be negative, though.
Very cool to see Nyan Cat - I'd like to see it in colour. : - )
Cheers,
Nick.
|
|
|
Re: Monochrome low res demo [message #379569 is a reply to message #379566] |
Thu, 10 January 2019 18:16 |
sicklittlemonkey
Messages: 570 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
On Friday, 11 January 2019 11:36:27 UTC+13, Nick Westgate wrote:
> Yeah, something is not right here.
I notice the code touches the confusingly named SETAN3.
The IIgs hardware guide "clears" up the naming on page 289:
CO5E: SETAN3 ;Clear annunciator 3
C05F: CLRAN3 ;Set annunciator 3
Anyway, this enables what Sather calls 7M LORES which greatly reduces the number of colour displayed. (Except perhaps in Virtual II? If so this is a bug in Virtual II.)
Do you really want to do that?
Cheers,
Nick.
|
|
|
Re: Monochrome low res demo [message #379570 is a reply to message #379565] |
Thu, 10 January 2019 19:21 |
|
Originally posted by: Charles Mangin
You're right, when looking at real hardware. With emulators like Virtual II and MicroM8 that do tricks with monochrome, I can define each color by its brightness, and have 16 shades of "gray" for those emulators.
For real hardware, I redefine that down to the actual white, black and 3 grays. Hence the emulator detection code.
|
|
|
|
|
|
|