Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
at67
Site Admin
Posts: 654 Joined: 14 May 2018, 08:29
Post
by at67 » 23 Jan 2023, 03:05
Looks good and is fun to play! Congrats on creating your own assembler as well!
I had a quick look at the source code and it's neat and tidy. One quick area you can improve on though is on your CALL thunk, instead of using this:
Code: Select all
LDWI #32816
STW @J
CALL @J ; show tiles
You can shorten it to:
Code: Select all
LDWI #32816
CALL vAC ; show tiles, (vAC is the symbol for the 16bit vCPU accumulator).
Phibrizzo
Posts: 100 Joined: 09 Nov 2022, 22:46
Post
by Phibrizzo » 23 Jan 2023, 06:20
"CALL vAC" has own opcode? Or it is notation shortening?
at67
Site Admin
Posts: 654 Joined: 14 May 2018, 08:29
Post
by at67 » 23 Jan 2023, 07:31
vAC is hardcoded to RAM address 0x0018-0x0019, LDWI for example loads a 16bit immediate value and stores it into these RAM addresses. In your assembler just setup a symbol, (e.g. vAC), that represents the RAM addresse 0x18 and then you can use it as I showed above.
CALL can use any zero page RAM address, e.g. CALL 0x18, which conceptually is CALL vAC.
Phibrizzo
Posts: 100 Joined: 09 Nov 2022, 22:46
Post
by Phibrizzo » 23 Jan 2023, 07:58
This is great idea. Thanks for this tip. I must implemented to my compiler.
Hans61
Posts: 105 Joined: 29 Dec 2020, 16:15
Location: Saxonia
Contact:
Post
by Hans61 » 23 Jan 2023, 13:59
Thanks for a new game. Very nice. What is the difference between the 32k and 64k version?
Phibrizzo
Posts: 100 Joined: 09 Nov 2022, 22:46
Post
by Phibrizzo » 23 Jan 2023, 14:38
What is the difference between the 32k and 64k version?
Only allocation for code.
In 32K code is allocated in first 32kB, in 64K above 32kB. I did my first test on emulator with 64kB and it was easer for me.
Data for graphics is allocated in the same palce.
Phibrizzo
Posts: 100 Joined: 09 Nov 2022, 22:46
Post
by Phibrizzo » 29 Sep 2024, 19:22
Hello
This is latest version of the 2048 game.
What new:
- rebuild all graphics routinies. Now is faster.
- fix input handler.
This version is based on 32kB sources but this time game running only on 64kB Gigatrons.
Sources:
http://www.changeit.ppa.pl/ftp/2048v2.lha
Phibrizzo
Posts: 100 Joined: 09 Nov 2022, 22:46
Post
by Phibrizzo » 03 Oct 2024, 15:27
Little update.
I did some optimizations and i found one stupid old bug in shifting routinie.
Now game is more responsible.