Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2 > #20635 > unrolled thread

SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download

Started by"Bill Buckels" <bbuckels@mts.net>
First post2014-07-12 20:52 -0500
Last post2014-07-13 20:08 +0000
Articles 12 — 4 participants

Back to article view | Back to comp.sys.apple2


Contents

  SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download "Bill Buckels" <bbuckels@mts.net> - 2014-07-12 20:52 -0500
    Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download STYNX <Jonas.Groenhagen@gmx.de> - 2014-07-13 04:06 -0700
      Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download "Bill Buckels" <bbuckels@mts.net> - 2014-07-13 06:49 -0500
        Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download Charlie <charlieDOTd@verEYEzon.net> - 2014-07-14 10:33 -0400
          Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download Charlie <charlieDOTd@verEYEzon.net> - 2014-07-14 11:22 -0400
            Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download "Bill Buckels" <bbuckels@mts.net> - 2014-07-14 17:28 -0500
          Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download "Bill Buckels" <bbuckels@mts.net> - 2014-07-14 17:16 -0500
      Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download "Bill Buckels" <bbuckels@mts.net> - 2014-07-13 07:09 -0500
        Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download STYNX <Jonas.Groenhagen@gmx.de> - 2014-07-13 09:39 -0700
    Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download Bob Hilden <bobjetzet@sogetthis.com> - 2014-07-13 17:21 +0000
      Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download "Bill Buckels" <bbuckels@mts.net> - 2014-07-13 12:54 -0500
        Re: SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download Bob Hilden <bobjetzet@sogetthis.com> - 2014-07-13 20:08 +0000

#20635 — SHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download

From"Bill Buckels" <bbuckels@mts.net>
Date2014-07-12 20:52 -0500
SubjectSHR in cc65 - Super Hi-Res Image Loader - Proof of Concept Available for Download
Message-ID<lpsoog$4vv$1@speranza.aioe.org>
Download it here:

http://www.appleoldies.ca/cc65/programs/shr/piclode.zip

Complete with source code and disk image. You will need to run this on an 
Apple IIgs or on a VOC or on a CB with Charlie's SHR mods, or on a IIgs 
emulator. It works in kegs32.

This is a gutted proof of concept and is utterly featureless. It contains 
only the necessary code to load an SHR PIC file. It is also very easy to 
understand simply because it is so featureless.

I only meant to accomplish one thing with this loader and that was to make 
sure that I wouldn't have any issues working with cc65 in SHR mode.

As it turns out there are apparently no issues.

This should compile everywhere that cc65 runs. A MAKEFILE is included.

I must of course warn you all again that I am not attempting to optimize 
cc65 since apparently cc65 is working pretty optimally already.

This compiled to a mere 6642 bytes and seems to work quite quickly. The disk 
image contains 3 SHR PIC files so you can easily try it out for yourself.

I will need to leave cc65 optimizations to those who think they can do such 
things and instead concentrate on writing some stuff that's more fun for 
this compiler.

I'll get some routines together over the next few days to load PIC and PNT 
files, and do some documentation again (which takes forever of course).

I will also be interested to see if I can write a BROOKS loader in cc65. 
Aztec C65 wouldn't have been quick enough but I think cc65 is quick enough.

I rather think that a VOC loader for interlaced mode might be relatively 
straight-forward in cc65 as well. The fact that this code is 8 bit 6502 code 
means that it will run on an Apple IIe with a VOC.

Bill 

[toc] | [next] | [standalone]


#20637

FromSTYNX <Jonas.Groenhagen@gmx.de>
Date2014-07-13 04:06 -0700
Message-ID<6bd5ad2a-1681-45c4-8ac4-4c04f32ad1e7@googlegroups.com>
In reply to#20635
On Sunday, July 13, 2014 3:52:11 AM UTC+2, Bill Buckels wrote:
> ... The fact that this code is 8 bit 6502 code
> means that it will run on an Apple IIe with a VOC.
> ...
> Bill

I tested the program with my 2e with VOC, Zip8000 and CFFA3k. It takes about 6 seconds to load and view the picture. The screen of the VOC does not return back to the menu to view another picture. The menu is usable on the composite out of the 2e though. If another picture is loaded, the VOC shows it without problem. There might be a problem with the mode switching of the pic load program.

-Jonas

[toc] | [prev] | [next] | [standalone]


#20638

From"Bill Buckels" <bbuckels@mts.net>
Date2014-07-13 06:49 -0500
Message-ID<lptrnt$d8e$1@speranza.aioe.org>
In reply to#20637
"STYNX" <Jonas.Groenhagen@gmx.de> wrote:
>There might be a problem with the mode switching of the pic load program.

Thanks Jonas.

I'll add an explicit text-mode initialization and update the proof of 
concept and let you know when I have done so.

This works fine in kegs32 as it is now, but the explict text mode change to 
support the VOC can do no harm. My IIgs is still in storage, so perhaps I 
can persuade Charlie to test this on both the CB on a real IIe, and on a 
real IIgs without the CB. Anyone else that can take the time can feel free 
to do some tests also.

The benefit of a gutted version of this loader seems to be a good idea.

Bill
 

[toc] | [prev] | [next] | [standalone]


#20645

FromCharlie <charlieDOTd@verEYEzon.net>
Date2014-07-14 10:33 -0400
Message-ID<lq0pmk$ems$1@dont-email.me>
In reply to#20638
On 7/13/2014 7:49 AM, Bill Buckels wrote:
> "STYNX"<Jonas.Groenhagen@gmx.de>  wrote:
>> There might be a problem with the mode switching of the pic load program.
>
> Thanks Jonas.
>
> I'll add an explicit text-mode initialization and update the proof of
> concept and let you know when I have done so.
>
> This works fine in kegs32 as it is now, but the explict text mode change to
> support the VOC can do no harm. My IIgs is still in storage, so perhaps I
> can persuade Charlie to test this on both the CB on a real IIe, and on a
> real IIgs without the CB. Anyone else that can take the time can feel free
> to do some tests also.
>
> The benefit of a gutted version of this loader seems to be a good idea.
>
> Bill
>

I tested it on my ROM 01 IIgs (ZipGS 8MHz) and it worked fine with the 
native RGB output and with the Carte Blanche 12 bit output.
Running it from the hard drive (CFFA3000) it took less than 1 second to 
load a picture.

Nice work,

Charlie



[toc] | [prev] | [next] | [standalone]


#20646

FromCharlie <charlieDOTd@verEYEzon.net>
Date2014-07-14 11:22 -0400
Message-ID<lq0sis$3bk$1@dont-email.me>
In reply to#20645
On 7/14/2014 10:33 AM, Charlie wrote:
> On 7/13/2014 7:49 AM, Bill Buckels wrote:
>> "STYNX"<Jonas.Groenhagen@gmx.de> wrote:
>>> There might be a problem with the mode switching of the pic load
>>> program.
>>
>> Thanks Jonas.
>>
>> I'll add an explicit text-mode initialization and update the proof of
>> concept and let you know when I have done so.
>>
>> This works fine in kegs32 as it is now, but the explict text mode
>> change to
>> support the VOC can do no harm. My IIgs is still in storage, so perhaps I
>> can persuade Charlie to test this on both the CB on a real IIe, and on a
>> real IIgs without the CB. Anyone else that can take the time can feel
>> free
>> to do some tests also.
>>
>> The benefit of a gutted version of this loader seems to be a good idea.
>>
>> Bill
>>
>
> I tested it on my ROM 01 IIgs (ZipGS 8MHz) and it worked fine with the
> native RGB output and with the Carte Blanche 12 bit output.
> Running it from the hard drive (CFFA3000) it took less than 1 second to
> load a picture.
>
> Nice work,
>
> Charlie
>

It also works fine with my //e enhanced with the Carte Blanche.  It 
takes about 2 seconds to load a picture from my CFFA.
Interestingly the menu screen came back properly unlike the problem 
Jonas experienced with the VOC. On a whim I tried running the CB with 
the IIgs bitstream (not recommended) and I got the blank menu problem.

Charlie

[toc] | [prev] | [next] | [standalone]


#20649

From"Bill Buckels" <bbuckels@mts.net>
Date2014-07-14 17:28 -0500
Message-ID<lq1lj5$v6l$1@speranza.aioe.org>
In reply to#20646
"Charlie" <charlieDOTd@verEYEzon.net> wrote:
>On a whim I tried running the CB with the IIgs bitstream (not recommended) 
>and I got the blank menu problem.

I wonder why the Aztec C65 version worked on the VOC and this doesn't... is 
there some area of memory that the VOC is checking? I wonder if I'll find 
the answer in the VideoMix code?

Without having a VOC on my IIe it is difficult to zero-in on this. I 
suspected the shadow register at first... but why would that be?

I also think it is something more fundamental like expecting a IIgs even 
though the VOC is on the IIe. This may also be a matter of turning-off the 
VOC somehow when SHR is not in use... which doesn't make sense if Aztec C65 
works but cc65 doesn't... obviously I am clue-less...

Perhaps someone else will have some thoughts. Or maybe the 3 of us will 
figger it out... who knows:)

Bill





[toc] | [prev] | [next] | [standalone]


#20648

From"Bill Buckels" <bbuckels@mts.net>
Date2014-07-14 17:16 -0500
Message-ID<lq1kru$tqp$1@speranza.aioe.org>
In reply to#20645
"Charlie" <charlieDOTd@verEYEzon.net> wrote:
>Nice work,
Hi Charlie,

It's not my fault:) If I can't blame you, I will blame Oliver. This SHR 
pre-occupation of mine really belongs to csa2 of course. Thanks for 
continuing to indulge me.

I have the docs half-done and a slideshow ready as well, but before I write 
the brooks loader, and add mode3200 support to cc65, I want to get some 
mode320 and mode640 SHR pixel graphics routines together.

Perhaps a little cursor key drawing program might be a cute demo, with some 
drop-down menus and stuff.

Riccardo is prompting me about adding floating point support to cc65 
already. I am not necessarily in alignmnet with their direction and may take 
another look at sfloat24 instead. This would be very beneficial especially 
with a compiler that produces code so small and fast. The graphics stuff 
would benefit with fp support for all the Apple II modes however I decide to 
do fp. Reserving a ZP register area like Aztec C65 did still weighs heavily 
in my thoughts.

But the SHR stuff needs to be finished first at least in a library of some 
kind, if not as a tgi driver.

It's really too bad that I wasn't into this a decade ago. I guess one needs 
to earn a living at some point in their lives, so that wasn't possible.

Bill

 

[toc] | [prev] | [next] | [standalone]


#20639

From"Bill Buckels" <bbuckels@mts.net>
Date2014-07-13 07:09 -0500
Message-ID<lptsu8$g0c$1@speranza.aioe.org>
In reply to#20637
"STYNX" <Jonas.Groenhagen@gmx.de> wrote:
>I tested the program with my 2e with VOC, Zip8000 and CFFA3k. It takes 
>about 6 seconds to load and view the picture.

Hi again Jonas,

How does this load-time compare with the Aztec C65 loader?

The cc65 loader uses a buffered read. The Aztec C65 loader uses a RAW read.

I will strip-out the screen clearing and create a separate proof of concept 
in cc65 which loads only, so we can get some idea of the actual load time 
without clearing the screen.

Give me a few hours to get some additional coding done.

Bill 

[toc] | [prev] | [next] | [standalone]


#20640

FromSTYNX <Jonas.Groenhagen@gmx.de>
Date2014-07-13 09:39 -0700
Message-ID<ef59b8a7-75d3-4d9b-8e72-bdc25b9939db@googlegroups.com>
In reply to#20639
On Sunday, July 13, 2014 2:09:39 PM UTC+2, Bill Buckels wrote:
> "STYNX" <Jxxxx.Gxxxx@gmx.de> wrote:
> >about 6 seconds to load and view the picture.
> How does this load-time compare with the Aztec C65 loader?
> Bill

Hard to tell... without actually measuring the process. I had the _impression_ that the CC65-loader is a bit quicker. But that is hard to compare as the Aztec-loader shows its process on the screen since it does not use buffering (as you explained). You could add a start-end time measurement if you are really interested ;-). My //e has a NoSlot-Clock btw. I could test the cc65-loader in one of my Rom3 in the coming week, as well as the CB in the //e and IIgs ... but its a little tough to do so because i have a tight schedule until August.

-Jonas

[toc] | [prev] | [next] | [standalone]


#20641

FromBob Hilden <bobjetzet@sogetthis.com>
Date2014-07-13 17:21 +0000
Message-ID<jetzet-1405272089@macgui.com>
In reply to#20635
Bill Buckels wrote:
> Download it here:
> 
> http://www.appleoldies.ca/cc65/programs/shr/piclode.zip
> 
> Complete with source code and disk image. You will need to run this on an 
> Apple IIgs or on a VOC or on a CB with Charlie's SHR mods, or on a IIgs 
> emulator. It works in kegs32.
> 
> This is a gutted proof of concept and is utterly featureless. It contains 
> only the necessary code to load an SHR PIC file. It is also very easy to 
> understand simply because it is so featureless.
> 
> I only meant to accomplish one thing with this loader and that was to make
>
> sure that I wouldn't have any issues working with cc65 in SHR mode.
> 
> As it turns out there are apparently no issues.
> 
> This should compile everywhere that cc65 runs. A MAKEFILE is included.
> 
> I must of course warn you all again that I am not attempting to optimize 
> cc65 since apparently cc65 is working pretty optimally already.
> 
> This compiled to a mere 6642 bytes and seems to work quite quickly. The
> disk 
> image contains 3 SHR PIC files so you can easily try it out for yourself.
> 
> I will need to leave cc65 optimizations to those who think they can do
> such
> 
> things and instead concentrate on writing some stuff that's more fun for 
> this compiler.
> 
> I'll get some routines together over the next few days to load PIC and PNT
>
> files, and do some documentation again (which takes forever of course).
> 
> I will also be interested to see if I can write a BROOKS loader in cc65. 
> Aztec C65 wouldn't have been quick enough but I think cc65 is quick
> enough.
> 
> I rather think that a VOC loader for interlaced mode might be relatively 
> straight-forward in cc65 as well. The fact that this code is 8 bit 6502
> code 
> means that it will run on an Apple IIe with a VOC.
> 
> Bill
>

Nice work!

[toc] | [prev] | [next] | [standalone]


#20642

From"Bill Buckels" <bbuckels@mts.net>
Date2014-07-13 12:54 -0500
Message-ID<lpuh5k$2m8$1@speranza.aioe.org>
In reply to#20641
"Bob Hilden" <bobjetzet@sogetthis.com> wrote:
>Nice work!

Thanks Bob. Are you able to try this on IIgs to make sure it really does 
work:)  My IIgs is moth-balled at the moment...

This is faithfully ported from the Aztec C65 version but works differently 
on a VOC than the Aztec C65 version.

I updated this a little and it probably works a little quicker. If anyone's 
got a GS handy could you give it a try? It works fine in kegs32.

My update may also have solved the VOC problem. I suppose I'll know soon:)

Bill 

[toc] | [prev] | [next] | [standalone]


#20643

FromBob Hilden <bobjetzet@sogetthis.com>
Date2014-07-13 20:08 +0000
Message-ID<jetzet-1405282113@macgui.com>
In reply to#20642
Bill Buckels wrote:
> "Bob Hilden" <bobjetzet@sogetthis.com> wrote:
>>Nice work!
> 
> Thanks Bob. Are you able to try this on IIgs to make sure it really does 
> work:)  My IIgs is moth-balled at the moment...
> 
> This is faithfully ported from the Aztec C65 version but works differently
>
> on a VOC than the Aztec C65 version.
> 
> I updated this a little and it probably works a little quicker. If
> anyone's
> 
> got a GS handy could you give it a try? It works fine in kegs32.
> 
> My update may also have solved the VOC problem. I suppose I'll know soon:)
> 
> Bill
>

Sure thing! I'll get back to you when I can.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.apple2


csiph-web