Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Cette catégorie traite de développements récents destinés à 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

Avatar de l’utilisateur
Dominique
Messages : 833
Inscription : 09 mars 2010 13:37
Localisation : Limoges
Contact :

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par Dominique »

Bonjour,
Un immense Bravo pour cette magnifique réalisation!
Pour ce qui est de la mémoire, tu peux facilement en économiser. Pour cela il te faudra aussi desassembler ton programme. Pour info je joins le FORTH Bandini désassemblé :
SOURCE FORTHMO5.zip
(24.7 Kio) Téléchargé 26 fois
Si je peux me permettre des suggestions :

1 - Sur le FORTH Bandini désassemblé, tu peux éliminer des mots inutiles et dont tu ne te sers pas :
EX le mot MOTOR dont il est fort peu probable que tu te serves :

Code : Tout sélectionner

;****************
;* LE MOT INKG
;****************
w_inkg
	FCB $84 
	FCC "INK"
	FCB $80+'G
	FDB w_get
cf_inkg
	FDB c_inkg
c_inkg
	PULU   A,B                
	STB    $2029              
	JMP    NEXT
;****************
;* LE MOT MOTOR
;****************
w_motor  
	FCB $85             
	FCC "MOTO"
	FCB $80+'R
	FDB w_inkg 
cf_motor
	FDB c_motor
c_motor
	PULU   A,B                
	TFR    B,A                
	SWI    
	FCB $22               
	JMP    NEXT               
	FCB $00 

;****************
;* LE MOT IMMEDIATE
;****************
w_immediate

	FCB $89 
	FCC "IMMEDIAT"
	FCB $80+'E
	FDB w_motor
cf_immediate
	FDB c_docol 
	FDB cf_latest 
	FDB cf_lit 
	FDB $0040 
	FDB cf_toggle 
	FDB cf_semis  
Tu peux éliminer entierement MOTOR, mais il ne faut pas oublier de mettre à jour le LIEN du Vocabulaire dans IMMEDIATE :
FDB w_motor de IMMEDIATE deviendra FDB w_inkg

Code : Tout sélectionner

;****************
;* LE MOT INKG
;****************
w_inkg
	FCB $84 
	FCC "INK"
	FCB $80+'G
	FDB w_get
cf_inkg
	FDB c_inkg
c_inkg
	PULU   A,B                
	STB    $2029              
	JMP    NEXT
;****************
;* LE MOT MOTOR
;****************
;w_motor  
;	FCB $85             
;	FCC "MOTO"
;	FCB $80+'R
;	FDB w_inkg 
;cf_motor
;	FDB c_motor
;c_motor
;	PULU   A,B                
;	TFR    B,A                
;	SWI    
;	FCB $22               
;	JMP    NEXT               
;	FCB $00 

;****************
;* LE MOT IMMEDIATE
;****************
w_immediate

	FCB $89 
	FCC "IMMEDIAT"
	FCB $80+'E
	FDB w_inkg
cf_immediate
	FDB c_docol 
	FDB cf_latest 
	FDB cf_lit 
	FDB $0040 
	FDB cf_toggle 
	FDB cf_semis  
Tu en as pas mal comme ça (à commencer par INKG )...

2 Il y a des mots indispensables mais que tu ne mettras dans aucune de tes définitions :
Par exemple le mot (DO)

Code : Tout sélectionner

;****************
;* LE MOT (DO)
;****************
w_parentdo
	FCB $84 
	FCC "(DO"
	FCB $80+')
	FDB w_type
cf_parentdo
	FDB c_parentdo
c_parentdo
	PULU   A,B                
	PULU   X                  
	PSHS   X,B,A              
	JMP    NEXT 

Je doute que tu mettes un (DO) dans tes définitions. Mais comme tu as certainement un DO et un LOOP, on peut éliminer l'entête (DO), seulement l'entête.

Code : Tout sélectionner

;****************
;* LE MOT TYPE
;****************
w_type
	FCB $84 
	FCC "TYP"
	FCB $80+'E
	FDB w_emit
cf_type
	FDB c_type
c_type
	etc .....    

;****************
;* LE MOT (DO)
;****************
;w_parentdo
;	FCB $84 
;	FCC "(DO"
;	FCB $80+')
;	FDB w_type
cf_parentdo
	FDB c_parentdo
c_parentdo
	PULU   A,B                
	PULU   X                  
	PSHS   X,B,A              
	JMP    NEXT               

;****************
;* LE MOT (+LOOP)
;****************
w_parentploop
	FCB $87 
	FCC "(+LOOP"
	FCB $80+')
;	FDB w_parentdo
	FDB w_type
cf_parentploop
	FDB c_parentploop
c_parentploop
etc....
et ainsi de suite, tu en as des dizaines.
Fait méticuleusement tu gagneras pas mal de RAM.
Tu le recompiles ensuite et tu as un FORTH réduit à minima.

3 - Ce qui vaut pour le source du FORTH, vaut pour ton programme si tu le décompiles.

En tout cas, Bravo

EDIT 21/11/2023 19H17 : Je ne m'étais apperçu que le fichier contenait aussi le programme MO4PAINT

Pour retrouver le Forth Original, supprimez depuis

Code : Tout sélectionner

;****************
;* LE MOT TASK
;****************

jusqu'à la fin
Mais CONSERVEZ -> 'v_dp'
Iapetus
Messages : 155
Inscription : 22 nov. 2012 15:36

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par Iapetus »

Thank you all for your comments and Dominique for the excellent MO5 Forth info, I will look that later.

Meanwhile here you are a new update. I have added some effects, one to show when Zezito appears in the level and another when he dies. There is also now information about which level you are about to enter and info about time bonus when passing the level.

I forgot to mention that I also added before some animation to the background tiles, trying to mimic glittering but it is not perfect I will have to revise it, it is too slow to notice.

MO5 - MO6 - TO8D - C64C - Timex TC2048 - Acorn Electron - Amiga 500
Fool-DupleX
Messages : 2367
Inscription : 06 avr. 2009 12:07

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par Fool-DupleX »

How much RAM does it take ?
Iapetus
Messages : 155
Inscription : 22 nov. 2012 15:36

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par Iapetus »

I have 10K free now but there are somethings I can change that will give me 15kb free. I still need to implement a lot of levels, I have only 10 designed at the moment.
It takes 21590 bytes now.
MO5 - MO6 - TO8D - C64C - Timex TC2048 - Acorn Electron - Amiga 500
Fool-DupleX
Messages : 2367
Inscription : 06 avr. 2009 12:07

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par Fool-DupleX »

OK, this is reasonable for a cassette tape version and it would even run on a TO7 with 16K extension (total = 24 KB). Good news !

21 KB is about 4 minutes of loading time with the standard MO5 format. This is acceptable. Mandragore takes much much more, for example.

With compression and a special format, it could probably be reduced to just one minute or less. That would make a really nice experiment. 8)
__sam__
Messages : 7989
Inscription : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par __sam__ »

Compression of tape BINaries has been done with EXOmizer2: 30kb where reduced down to 6kb.

(I need to do the same experiment with the ZX0 algorithm one day...)
Samuel.
A500 Vampire V2+ ^8^, A1200 (030@50mhz/fpu/64mb/cf 8go),
A500 GVP530(MMU/FPU) h.s., R-Pi, TO9, TO8D, TO8.Démos
Fool-DupleX
Messages : 2367
Inscription : 06 avr. 2009 12:07

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par Fool-DupleX »

I based my rough calculation on a 50% compression ratio, but this is a 80% ratio, remains to be seen if it's achievable with the code of Zezito. But that would make it around 4.5 KB, so something like 20 standard blocks. I roughly estimate this around 40 seconds. So even with a standard block but at 2400 bauds, it seems we could easily go down to less than 20 seconds ? Interesting. Maybe faster than a quick disc ! :lol:
__sam__
Messages : 7989
Inscription : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par __sam__ »

It all depends on the level of redundancy/self-similarity in the data.
Samuel.
A500 Vampire V2+ ^8^, A1200 (030@50mhz/fpu/64mb/cf 8go),
A500 GVP530(MMU/FPU) h.s., R-Pi, TO9, TO8D, TO8.Démos
Iapetus
Messages : 155
Inscription : 22 nov. 2012 15:36

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par Iapetus »

Compressed with exomizer, I am getting 8331 bytes :D
The uncompressed file is 17249 bytes long.

This means that most likely I will have the possibility of also have the game in cartridge format 8)
MO5 - MO6 - TO8D - C64C - Timex TC2048 - Acorn Electron - Amiga 500
Iapetus
Messages : 155
Inscription : 22 nov. 2012 15:36

Re: Zezito in The Glittering Caves - MO5 Forth (Bandini) and 6809 Assembly

Message par Iapetus »

I have been thinking about what to do regarding music and sound effects.

In 2015 (wow how time flies by) I converted a simple 1bit music player(no drums) from the zx spectrum to 6809. There was just this version, I am sure it can be improved on.

MO5 - MO6 - TO8D - C64C - Timex TC2048 - Acorn Electron - Amiga 500
Répondre