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


Groups > comp.sys.apple2.programmer > #1059 > unrolled thread

Displaying Brooks Format Images - How do I chnage palettes that quickly?

Started by"Bill Buckels" <bbuckels@mts.net>
First post2014-01-05 18:22 -0600
Last post2014-01-07 04:03 -0800
Articles 8 — 3 participants

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


Contents

  Displaying Brooks Format Images - How do I chnage palettes that quickly? "Bill Buckels" <bbuckels@mts.net> - 2014-01-05 18:22 -0600
    Displaying Brooks Format Images - How do I chnage palettes that quickly? Antoine Vignau <antoine.vignau@laposte.net> - 2014-01-07 01:04 -0800
      Re: Displaying Brooks Format Images - How do I chnage palettes that quickly? "Bill Buckels" <bbuckels@mts.net> - 2014-01-07 05:16 -0600
        Re: Displaying Brooks Format Images - How do I chnage palettes that quickly? Antoine Vignau <antoine.vignau@laposte.net> - 2014-01-07 04:02 -0800
        Re: Displaying Brooks Format Images - How do I chnage palettes that quickly? gids.rs@sasktel.net - 2014-01-07 07:41 -0800
          Re: Displaying Brooks Format Images - How do I chnage palettes that quickly? "Bill Buckels" <bbuckels@mts.net> - 2014-01-09 21:02 -0600
      Re: Displaying Brooks Format Images - How do I chnage palettes that quickly? "Bill Buckels" <bbuckels@mts.net> - 2014-01-07 06:02 -0600
        Re: Displaying Brooks Format Images - How do I chnage palettes that quickly? Antoine Vignau <antoine.vignau@laposte.net> - 2014-01-07 04:03 -0800

#1059 — Displaying Brooks Format Images - How do I chnage palettes that quickly?

From"Bill Buckels" <bbuckels@mts.net>
Date2014-01-05 18:22 -0600
SubjectDisplaying Brooks Format Images - How do I chnage palettes that quickly?
Message-ID<lacsve$a0l$1@speranza.aioe.org>
Am I correct in the following?

Assuming that I have preset my scbs for a dynamic palette for 200 scanlines 
and assuming that the retrace starts at scanline 191 and proceeds to 199 
then resumes at scanline 0 and proceeds until scanline 190, and assuming 
that my loading of palettes needs to stay ahead of the lines being drawn, I 
have divided my brooks palettes into 25 subpalette sets corresponding to my 
scbs:

Interleafed sets - 25 sets of 8 - corresponding to scb's for the Brooks 
Image:

8 palettes 0 - 7 - correspond to scanlines 191 to 199 - loaded into place at 
0x9e00
8 palettes 8-15 - correspond to scanlines 0 to 7 - loaded into place at 
0x9f00

8 palettes 0 - 7 - correspond to scanlines 8 to 15 - loaded into place at 
0x9e00
8 palettes 8-15 - correspond to scanlines 16 to 23 - loaded into place at 
0x9f00

Etc.

So assuming that I have the first complete palette in place when the retrace 
starts, and assuming that I load the sub-palette for lines 8-15 when lines 
0-7 start drawing, and that I load the sub-palette for lines 16-23 when 
lines 8-15 start drawing, by polling the Mega II Vertical Counter at 0xc02e, 
I have afew questions:

If my understanding is correct I need to do this extremely quickly (The 
vertical
count changes at 63.7 microsecond intervals) and replace palettes 
continually staying ahead of the retrace during the display of a 3200 color 
image.

Using MainToAux Memory Moves (jsr  $c311) to load these 25 sets of 8 
palettes into place each cycle, will I move slower than the retrace?

Do I also have time to check the keyboard buffer when the gun moves to the 
top again as well as load the subpalette for lines 8-15?

I am at the point in my Brooks Loader Program that I am just getting to 
this. But I know I am not the first to do this, so the other question is:

Is my strategy stupid? Only those of you who have actually programmed a 
brooks loader should probably answer that one:)

Bill 

[toc] | [next] | [standalone]


#1064

FromAntoine Vignau <antoine.vignau@laposte.net>
Date2014-01-07 01:04 -0800
Message-ID<14d27d52-f912-4bb3-90d7-77ee927814d4@googlegroups.com>
In reply to#1059
Bill,
Get the Tinies source code and analyze the 3200-col display routine.

I'm afraid c311 will not be fast enough but if you have access to bank 1, copy palette data at 1/1000.

In our routine, we were able to read mouse button and keyboard status, so there is room for some cycles...

Antoine

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


#1065

From"Bill Buckels" <bbuckels@mts.net>
Date2014-01-07 05:16 -0600
Message-ID<lagnmj$kic$1@speranza.aioe.org>
In reply to#1064
"Antoine Vignau" <antoine.vignau@laposte.net> wrote:
>I'm afraid c311 will not be fast enough but if you have access to bank 1, 
>copy palette data at 1/1000.

I am using c311 to access bank 1.

Since this is an 8 bit program running in ProDOS 8,  I am a little lost now, 
and will think on it. Have I reached the end of what I can do with Aztec C 
on this? Or am I just not thinking clearly? Is this simply not possible in 
an 8 bit SYS program written in C? This would mean that Charlie's 
Carte-Blanche mods would not work on an Apple //e for 3200 color image 
loaders.

>In our routine, we were able to read mouse button and keyboard status, so 
>there is room for some cycles...

That's encouraging. So assuming I can find some way of keeping my program 
running and access the upper bank doing palette switching in ML perhaps I 
can get this to work.

I will look at the source for the tinies loader routines.

I appreciate very much the time you have taken to let me have fun with this 
whole SHR thing. While my BMP2SHR converter is not a full blown application 
like Convert3200, the output is already rivaling your own, which should make 
us all proud, since everything I have learned about SHR is from you and 
Charlie, and from Andy's Ciderpress code for unpackbytes, and from the csa2 
list. Also the material that David Finnigan made available was informative 
on the VOC but if I do use APDA and OPUS I will buy those from Tony Diaz... 
so no harm was done... since I have only reviewed this information and not 
done anything material with the VOC. We are not yet Pirates, and I hope I 
never will be.

I spent some hours yesterday finally going through the kegs32 code, which 
also made me wiser.

I want to finish this SHR stuff sometime in January to some reasonable 
level.

Bill 

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


#1067

FromAntoine Vignau <antoine.vignau@laposte.net>
Date2014-01-07 04:02 -0800
Message-ID<92d10da0-7eaa-4693-9a18-3351b14d7689@googlegroups.com>
In reply to#1065
You may use alternate solutions:
- use C314 and execute code from bank 1
- play with C00x softswitches and write to aux RAM, the code being in main RAM

av

-----------------


do3200	tax

	sep	#$20	; A= pointeur source image compressee
	lda	#$1e
	stal	$e0c035
	rep	#$20

	stz	Debut
	stz	Debut+2
	stx	Debut+1

	ldx	#$7ffe
	lda	#0
]lp	stal	$012000,x
	stal	$e12000,x
	dex
	dex
	bpl	]lp

	ldy	#$7d00
	ldx	#0
]lp	lda	[Debut],y
	stal	$012000,x
	iny
	iny
	inx
	inx
	cpx	#$1900
	bne	]lp

* The SCBs

	sep	#$20
	ldx	#$00
do32001	lda	#$0f
]lp	stal	$019d00,x
	stal	$e19d00,x
	inx
	cpx	#$c8
	beq	do32002
	dec
	bpl	]lp
	bra	do32001

do32002	lda	#0
	stal	$e0c035

	rep	#$20

	ldy	#$7cfe
]lp	tyx
	lda	[Debut],y
	stal	$e12000,x
	dey
	dey
	bpl	]lp

	phd
	tsc
	sta	mySTACK

	sei

*--- Main routine 3200

	ldal	$e0c068
	ora	#$30
	stal	$e0c068

do32003	ldy	#0
	lda	#$1f00
	tcd

do32004	ldal	$e0c02e
	and	#$ff
	cmp	affTBL,y
	bne	do32004

	iny
	iny

	lda	#$9fff
	tcs
	tdc
	clc
	adc	#$0100
	tcd

]affPOS1	=	$00
	lup	$80
	pei	]affPOS1
]affPOS1	=	]affPOS1+2
	--^

	tdc
	clc
	adc	#$0100
	tcd

]affPOS1	=	$00
	lup	$80
	pei	]affPOS1
]affPOS1	=	]affPOS1+2
	--^

	cpy	#$1a
	beq	do32005
	brl	do32004

do32005	ldal	$e0bfff
	bmi	do32007
	ldal	$e0c026
	bmi	do32006
	brl	do32003
do32006	ldal	$e0c023
	ldal	$e0c023
	and	#%10000000_00000000
	beq	do32007
	brl	do32003

do32007	stal	$e0c010
	ldal	$e0c068
	and	#$cf
	stal	$e0c068

*--- End of routine

	cli

	lda	mySTACK
	tcs
	pld
	phk
	plb

	ldx	#$7ffe
	lda	#0
]lp	stal	$012000,x
	stal	$e12000,x
	dex
	dex
	bpl	]lp

	rts

affTBL	dw	$e4,$84,$8c,$94,$9c,$a4,$ac
	dw	$b4,$bc,$c4,$cc,$d4,$dc

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


#1069

Fromgids.rs@sasktel.net
Date2014-01-07 07:41 -0800
Message-ID<51ebec47-cddd-4528-bd75-eb3b8bec7232@googlegroups.com>
In reply to#1065
> Since this is an 8 bit program running in ProDOS 8,  I am a little lost now, 
> and will think on it. Have I reached the end of what I can do with Aztec C 
> on this? Or am I just not thinking clearly? Is this simply not possible in 
> an 8 bit SYS program written in C? This would mean that Charlie's 
> Carte-Blanche mods would not work on an Apple //e for 3200 color image 
> loaders.


I have a Prodos8 3200 color SHR viewer, Bill.  Drop me a PM so I can send you the disk image.

Rob

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


#1094

From"Bill Buckels" <bbuckels@mts.net>
Date2014-01-09 21:02 -0600
Message-ID<lanns5$6ej$1@speranza.aioe.org>
In reply to#1069
<gids.rs@sasktel.net> wrote:
>I have a Prodos8 3200 color SHR viewer, Bill.

Thanks for forwarding this Rob. It works fine in Kegs32. Antoine's program 
called the Tinies didn't load a full screen properly so I thought perhaps 
Kegs32 couldn't manage 3200 color images. I was wrong (not the first time 
I've been wrong either:)

Then the fun began when I slowed the emulator down to 1MHZ to see what this 
might be like on a Carte Blanche on an Apple //e. There is likely no way the 
palette routines could likely keep-up on a stock //e. I have a 10 MHZ Zip 
Chip in my //e (as well as a GS) so this is no personal hardship, but I do 
see clearly that a guy really needs to boogie to make this work.

Also I've had considerable success with adding features to my BMP2SHR 
conversion program so all is not lost.

I am still going to munch on this stuff for a bit and see if I come-up with 
some new ideas. But I know full well that the cycles probably aren't there 
for an 8 bit program to do much more than what the one you forwarded does.

Thanks again.

Bill



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


#1066

From"Bill Buckels" <bbuckels@mts.net>
Date2014-01-07 06:02 -0600
Message-ID<lagqbn$rr2$1@speranza.aioe.org>
In reply to#1064
"Antoine Vignau" <antoine.vignau@laposte.net> wrote:
>Get the Tinies source code and analyze the 3200-col display routine.

I'll need to look for that.

I downloaded the Tinies but it does not display properly in kegs32. So doing 
a Brooks loader seems pointless for emulator users.

Bill 

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


#1068

FromAntoine Vignau <antoine.vignau@laposte.net>
Date2014-01-07 04:03 -0800
Message-ID<9cabcbfc-db35-4a52-b59b-d36220592626@googlegroups.com>
In reply to#1066
On Tuesday, January 7, 2014 1:02:00 PM UTC+1, Bill Buckels wrote:
> I downloaded the Tinies but it does not display properly in kegs32. So doing 
> a Brooks loader seems pointless for emulator users.
> 
> Bill

Right. Emulators are not 100% accurate...
av

[toc] | [prev] | [standalone]


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


csiph-web