Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » Cycle Counting Megademo (64k)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Cycle Counting Megademo (64k) [message #375405] Sat, 03 November 2018 20:04 Go to next message
Vince Weaver is currently offline  Vince Weaver
Messages: 136
Registered: April 2013
Karma: 0
Senior Member
Hello,

so people here have seen many of the components before, but I'm announcing
my cycle-counting Megademo.

Video, notes, and link to disk image here:
http://www.deater.net/weave/vmwprod/megademo/

The most important thing to note is I finally got my vapor lock code
to reliably start at the right place, at least on an Apple IIe.

You need at least 64k to run this, and a Mockingboard helps. I wanted
it to run on a 48k II+ but ran out of time to make the sound code
smaller. In theory you can run without a Language card but it might
do weird stuff like play your ROM as music. I haven't tested on my II+
as my disk II drive is having issues.

Many thanks to Qkumba who repeatedly fixed his RTS DOS3.3 loading code
as I found all kinds of weird cornercases.

Also thanks to Dascon who wrote some music for me at the last minute and
wasn't too sad when his nice Amiga MOD file lost some in the translation to
the AY-3-8910.

Finally thanks to Bill Buckels for the BMP2DHR code which I used when
converting many of the HIRES images.

Vince
Re: Cycle Counting Megademo (64k) [message #375459 is a reply to message #375405] Mon, 05 November 2018 05:16 Go to previous messageGo to next message
TomCh is currently offline  TomCh
Messages: 242
Registered: November 2012
Karma: 0
Senior Member
On Sunday, November 4, 2018 at 12:04:30 AM UTC, vi...@pianoman.cluster.toy wrote:
> Hello,
>
> so people here have seen many of the components before, but I'm announcing
> my cycle-counting Megademo.
>
> Video, notes, and link to disk image here:
> http://www.deater.net/weave/vmwprod/megademo/
>
> The most important thing to note is I finally got my vapor lock code
> to reliably start at the right place, at least on an Apple IIe.
>
> You need at least 64k to run this, and a Mockingboard helps. I wanted
> it to run on a 48k II+ but ran out of time to make the sound code
> smaller. In theory you can run without a Language card but it might
> do weird stuff like play your ROM as music. I haven't tested on my II+
> as my disk II drive is having issues.
>
> Many thanks to Qkumba who repeatedly fixed his RTS DOS3.3 loading code
> as I found all kinds of weird cornercases.
>
> Also thanks to Dascon who wrote some music for me at the last minute and
> wasn't too sad when his nice Amiga MOD file lost some in the translation to
> the AY-3-8910.
>
> Finally thanks to Bill Buckels for the BMP2DHR code which I used when
> converting many of the HIRES images.
>
> Vince

Hi Vince,

That's an impressive feat to pull all this off!

A few questions:

1) How was the video (on YouTube) recorded?
Is it a direct NTSC recording? Or through some h/w converters?
I'm just curious about the blue background on the C64 troll screen.

2) Could any of these mini-demos have been accomplished more easily without screen splitting / cycle-counting?
EG. The static 40x96 Apple II picture, could just be rendered as DHGR (but then you lose the Apple II+ compatibility).

I guess in theory it's all possible in DHGR, but you'd probably need a faster CPU.

Tom
Re: Cycle Counting Megademo (64k) [message #375471 is a reply to message #375405] Mon, 05 November 2018 09:43 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: frank_o_rama

Like it! Glad to see you got the vapor lock figured out.
f
Re: Cycle Counting Megademo (64k) [message #375472 is a reply to message #375459] Mon, 05 November 2018 09:55 Go to previous messageGo to next message
Vince Weaver is currently offline  Vince Weaver
Messages: 136
Registered: April 2013
Karma: 0
Senior Member
On 2018-11-05, TomCh <tomcharlesworth26@gmail.com> wrote:
> 1) How was the video (on YouTube) recorded?
> Is it a direct NTSC recording? Or through some h/w converters?
> I'm just curious about the blue background on the C64 troll screen.

I have a low-end NTSC USB video capture device I use to record things.
It's not the best, but other devices I have tried have issues with the
weird NTSC composite that Apple II puts out.

So the blue background is actually alternating horizontal lines of blue
and purple, but the combination of the capture card and the video compression
of the Linux program I use to record the video turn it into a solid color.
It doesn't actually look like a solid color on a real CRT, it looks more like
what it looks like in an emulator.

> 2) Could any of these mini-demos have been accomplished more easily
> without screen splitting / cycle-counting? EG. The static 40x96 Apple
> II picture, could just be rendered as DHGR (but then you lose the
> Apple II+ compatibility).

yes, the weird enhanced lores modes, as well as the split-screen lores/hires,
could all be done in DHGR. But as you say you can't do that on older
II/II+. Also they take a lot more RAM. The 40x96 LORES mode takes
PAGE1+PAGE2 so 2k total, wheras using double-hires to do the same thing
would take 16k of RAM.

Also, as you note, updating 2k of RAM with lores sprites is a lot faster than
trying to draw the equivelant with hires sprites.

Vince
Re: Cycle Counting Megademo (64k) [message #375486 is a reply to message #375471] Mon, 05 November 2018 13:18 Go to previous messageGo to next message
Vince Weaver is currently offline  Vince Weaver
Messages: 136
Registered: April 2013
Karma: 0
Senior Member
On 2018-11-05, frank_o_rama@hotmail.com <frank_o_rama@hotmail.com> wrote:
> Like it! Glad to see you got the vapor lock figured out.

It turns out it's still one cycle off, and I think that's due to
Applewin being a cycle off compared to real hardware. I'm going
to try to sort that out today.

The II+ might be an additional cycle off from that, but it's harder
to see because it glitches a bit more than the IIe on mid-screen
mode switches. I feel like Lancaster might have mentioned this in his
article so I should go re-read that.

A general vapor lock question for anyone that knows. At my talk someone
asked if this would work on a IIgs, and I feel like once I heard that
the HBLANK timing is different on the IIgs than on earlier models, but
I've gone back and can't quickly find anything to back this up. Am
I mis-remembering things?

Vince
Re: Cycle Counting Megademo (64k) [message #375488 is a reply to message #375486] Mon, 05 November 2018 13:55 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: frank_o_rama

Someone correct me if I'm wrong, but wouldn't you only need to use the 'vapor lock' technique to find VBL on a ][ or ][+ (though it would work on any ][)?

On a //e and //gs you can just poll the high bit of $C019 to find VBL.

On a //c you can also read $C019, but only after setting a couple softswitches first... (otherwise you have to use an interrupt handler)
sta clrioudis ($C07F)
sta envbl ($C05B)
sta setioudis ($C07E)


I'd be curious to know, as writing a true monochrome slideshow viewer that switches from graphics mode to text mode momentarily during the colorburst signal is on my list. (ie. graphics mode is shown during the raster scan, but switched to text mode ONLY during the generation of the colorburst signal that creates the purple-green fringing on mono images).

f
Re: Cycle Counting Megademo (64k) [message #375490 is a reply to message #375488] Mon, 05 November 2018 14:34 Go to previous messageGo to next message
Michael J. Mahon is currently offline  Michael J. Mahon
Messages: 1767
Registered: October 2012
Karma: 0
Senior Member
<frank_o_rama@hotmail.com> wrote:
> Someone correct me if I'm wrong, but wouldn't you only need to use the
> 'vapor lock' technique to find VBL on a ][ or ][+ (though it would work on any ][)?
>
> On a //e and //gs you can just poll the high bit of $C019 to find VBL.
>
> On a //c you can also read $C019, but only after setting a couple
> softswitches first... (otherwise you have to use an interrupt handler)
> sta clrioudis ($C07F)
> sta envbl ($C05B)
> sta setioudis ($C07E)
>
>
> I'd be curious to know, as writing a true monochrome slideshow viewer
> that switches from graphics mode to text mode momentarily during the
> colorburst signal is on my list. (ie. graphics mode is shown during the
> raster scan, but switched to text mode ONLY during the generation of the
> colorburst signal that creates the purple-green fringing on mono images).
>
> f
>

That’s a nice idea! A great cycle-counting exercise!

--
-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
Re: Cycle Counting Megademo (64k) [message #375504 is a reply to message #375490] Mon, 05 November 2018 15:40 Go to previous message
Michael J. Mahon is currently offline  Michael J. Mahon
Messages: 1767
Registered: October 2012
Karma: 0
Senior Member
On 11/5/2018 11:34 AM, Michael J. Mahon wrote:
> <frank_o_rama@hotmail.com> wrote:
>> Someone correct me if I'm wrong, but wouldn't you only need to use the
>> 'vapor lock' technique to find VBL on a ][ or ][+ (though it would work on any ][)?
>>
>> On a //e and //gs you can just poll the high bit of $C019 to find VBL.
>>
>> On a //c you can also read $C019, but only after setting a couple
>> softswitches first... (otherwise you have to use an interrupt handler)
>> sta clrioudis ($C07F)
>> sta envbl ($C05B)
>> sta setioudis ($C07E)
>>
>>
>> I'd be curious to know, as writing a true monochrome slideshow viewer
>> that switches from graphics mode to text mode momentarily during the
>> colorburst signal is on my list. (ie. graphics mode is shown during the
>> raster scan, but switched to text mode ONLY during the generation of the
>> colorburst signal that creates the purple-green fringing on mono images).
>>
>> f
>>
>
> That’s a nice idea! A great cycle-counting exercise!
>
And I should have noted that since the horizontal blanking and sync
pulses are identical for text and graphics modes, the timing for
switching to text mode is not as critical as the length of the burst
would suggest. Triggering text mode anywhere after the start of
horizontal blanking and the start of the burst and switching back to
graphics mode after the burst but before the end of horizontal blanking
will do the job.

The tightest tolerance is between the end of the burst and the end of
horizontal blanking--which *is* pretty tight...

--

-michael

NadaNet 3.1 for Apple II parallel computing!
Home page: http://michaeljmahon.com

"The wastebasket is our most important design
tool--and it's seriously underused."
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Prototype cards
Next Topic: AppleII Adventure Construction Set
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Mar 28 22:04:53 EDT 2024

Total time taken to generate the page: 0.00575 seconds