Double buffering sur MO6

Cette catégorie traite de développements récents pour nos vieilles machines, applications, jeux ou démos... Amis programmeurs, c'est ici que vous pourrez enfin devenir célèbres!

Modérateurs : Papy.G, fneck, Carl

Garland_Raven
Messages : 25
Enregistré le : 19 juin 2017 19:00

Re: Double buffering sur MO6

Message par Garland_Raven » 28 juin 2017 15:55

__sam__ a écrit :You mean the vertical stripes that appear after poking $A7cd hence switching to 160x200? they are normal since in 320x200 the invisible cyan foreground color in color-ram suddenly are interpreted. as chunk bits and become visible as stripes on every ram-b column in 160x200.
Then all i should do is clearing the screen on both rams, right?
Thanks 8)

__sam__
Messages : 3815
Enregistré le : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: Double buffering sur MO6

Message par __sam__ » 28 juin 2017 18:56

Yes that's it : clear both ram banks.

Notice : this is what is done automagically by the monitor when using PUTCH and escape séquence to change the screen mode.
Samuel.
Amiga 500+GVP530(MMU/FPU) (hs), A1200(030@50mhz/fpu/64mb/cf 8go), R-Pi, TO9, TO8D, TO8.
New Teo 1.8.4 8)

Garland_Raven
Messages : 25
Enregistré le : 19 juin 2017 19:00

Re: Double buffering sur MO6

Message par Garland_Raven » 29 juin 2017 17:12

I was learning about double buffering using that awesome Nyan cat source code. I already implemented this technique on other systems and i know how it works. However, when running with macro assembler cartridge, the execution freezes on this line:

Code : Tout sélectionner

  
   LDB #$00
   ANDB #$02          * page RAM no0 ou no2 utilisée dans l'espace cartouche
   ORB #$60           * espace cartouche recouvert par RAM / écriture autorisée
   STB $A7E6
Seems he doesn't like STB $A7E6, if i put a STOP before that line it stops to prompt, if i put stop after that line, it stays freezed.

$A7E6 is one of the gate mode pages but if i was wondering if its crashing because i'm executing this from the cartridge so he couldn't write on memory. Otherwise can't see the real reason.
I often use debgger to see what values are in memory, but its hard to debug such crashes, if you have suggestions i'd be grateful :)

Cheers :)

__sam__
Messages : 3815
Enregistré le : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: Double buffering sur MO6

Message par __sam__ » 29 juin 2017 17:22

I think this is because your source code in ram collides with the generated binary. You should probably relocate the generation of the binary by changing the ORG statement or by compiling to a diskfile instead of ram.

(this is just my two cents)
Samuel.
Amiga 500+GVP530(MMU/FPU) (hs), A1200(030@50mhz/fpu/64mb/cf 8go), R-Pi, TO9, TO8D, TO8.
New Teo 1.8.4 8)

Garland_Raven
Messages : 25
Enregistré le : 19 juin 2017 19:00

Re: Double buffering sur MO6

Message par Garland_Raven » 29 juin 2017 17:29

__sam__ a écrit :(...)
This is happening even using ORG like &16384, what address shoud i try? :) Thank you !! :)

PS: if i got it right, we are forced to use cartridge ram to implement double buffering because there's no other place to allocate buffers ? :D

__sam__
Messages : 3815
Enregistré le : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: Double buffering sur MO6

Message par __sam__ » 29 juin 2017 17:38

Oh after further thinking it is obvious. It freeze because when you map ram to cartridge space. You loose the assembler which also resides in cartridge space.

the first thing to do when ram overlap rom/cartridge space, You should disable all interrupts.

then before the code terminates, you should restore the value at $a7c6 . beware that i/o reg is write-only iirc. There is à backup copy in the zero-page of the monitor. but it is à bit fuzzy in my memory right now to tell more details .
Samuel.
Amiga 500+GVP530(MMU/FPU) (hs), A1200(030@50mhz/fpu/64mb/cf 8go), R-Pi, TO9, TO8D, TO8.
New Teo 1.8.4 8)

Garland_Raven
Messages : 25
Enregistré le : 19 juin 2017 19:00

Re: Double buffering sur MO6

Message par Garland_Raven » 29 juin 2017 18:09

__sam__ a écrit : the first thing to do when ram overlap rom/cartridge space, You should disable all interrupts.
Thank you, i just tried LDB #$00 STB $A7DD STB $A7E6 just before the STOP and now the prompt returns :)
To disable interrupts i have to do a ORCC #80 i guess.

So the cartridge memory is the only choice we have to store page buffers? Sounds weird :shock:

__sam__
Messages : 3815
Enregistré le : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: Double buffering sur MO6

Message par __sam__ » 29 juin 2017 18:28

On the binary TO series I know of another possible memory zone for overlapping. But I don't know the mo6 enough to tell. Fullduplex knows for sure. Daniel as well but he is away at the moment.
Samuel.
Amiga 500+GVP530(MMU/FPU) (hs), A1200(030@50mhz/fpu/64mb/cf 8go), R-Pi, TO9, TO8D, TO8.
New Teo 1.8.4 8)

Répondre