Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Xeda112358 on January 09, 2016, 11:22:08 pm

Title: Balltrix - z80 ASM Remake
Post by: Xeda112358 on January 09, 2016, 11:22:08 pm
Updated Here (https://www.omnimaga.org/ti-z80-calculator-projects/balltrix-z80-asm-remake/msg404066/#msg404066)

I've remade DJ Omnimaga's Balltrix in z80 Assembly. As requested in an older port, I've kept the original title screen. (https://www.omnimaga.org/other-calculator-discussion-and-news/balltrix-(ported-by-xeda)/msg196961/#msg196961)

The biggest issue that needs fixing is the name entry menu for highscores. It works, but it is super ugly and tedious. Some quirks/features are:
-The highscore info is saved directly to the program, so no external save file.
-Only 48 bytes of RAM are used to store the graphics data and none of the 768-byte buffers are modified by this program.
-This program spends a lot of it's time in a low-power halt state and operates at 6MHz.

I'm still in the process of tweaking and modifying the program, but I think I've got the control sensitivity almost perfect as well as the gradual increase in speed. My highest score so far is 87 ;D
Title: Re: Balltrix - z80 ASM Remake
Post by: Sorunome on January 10, 2016, 04:36:20 am
Wait.....so you optimized this game for battery life? O.o
Title: Re: Balltrix - z80 ASM Remake
Post by: c4ooo on January 10, 2016, 10:54:01 am
-The highscore info is saved directly to the program, so no external save file.
SMC boooo.  :P
-Only 48 bytes of RAM are used to store the graphics data and none of the 768-byte buffers are modified by this program.
Must have been hard to make! ^.^ (but unnecessary?)
-This program spends a lot of it's time in a low-power halt state and operates at 6MHz.
What sorunome said.

GJ, and GL with the highscore table thing! :D
Title: Re: Balltrix - z80 ASM Remake
Post by: Eeems on January 10, 2016, 01:57:32 pm


-The highscore info is saved directly to the program, so no external save file.
SMC boooo. 
Nothing wrong with SMC, it means you save space/time/complexity on having to store externally.
Title: Re: Balltrix - z80 ASM Remake
Post by: c4ooo on January 10, 2016, 04:34:04 pm


-The highscore info is saved directly to the program, so no external save file.
SMC boooo. 
Nothing wrong with SMC, it means you save space/time/complexity on having to store externally.
Wuuut is up with that smiley face O.O
IMO, SMC adds complexity because you must write the program back. So if you are running the program from archive, that program must be re-archived which causes extra lag when exiting.
Title: Re: Balltrix - z80 ASM Remake
Post by: Eeems on January 10, 2016, 04:53:34 pm


-The highscore info is saved directly to the program, so no external save file.
SMC boooo. 
Nothing wrong with SMC, it means you save space/time/complexity on having to store externally.
Wuuut is up with that smiley face O.O
IMO, SMC adds complexity because you must write the program back. So if you are running the program from archive, that program must be re-archived which causes extra lag when exiting.
I don't know, its in your post.

It adds no extra complexity to the program. All that re-archiving etc happens on the shell level, which is optional.
Title: Re: Balltrix - z80 ASM Remake
Post by: c4ooo on January 10, 2016, 05:00:11 pm


-The highscore info is saved directly to the program, so no external save file.
SMC boooo. 
Nothing wrong with SMC, it means you save space/time/complexity on having to store externally.
Wuuut is up with that smiley face O.O
IMO, SMC adds complexity because you must write the program back. So if you are running the program from archive, that program must be re-archived which causes extra lag when exiting.
I don't know, its in your post.

It adds no extra complexity to the program. All that re-archiving etc happens on the shell level, which is optional.
I dont see it :P

It adds no complexity for the programmer, but the user still has to wait for it to re-archive. For example look at phenix. The game uses smc and takes time to quit.
Title: Re: Balltrix - z80 ASM Remake
Post by: Eeems on January 10, 2016, 05:02:17 pm




-The highscore info is saved directly to the program, so no external save file.
SMC boooo. 
Nothing wrong with SMC, it means you save space/time/complexity on having to store externally.
Wuuut is up with that smiley face O.O
IMO, SMC adds complexity because you must write the program back. So if you are running the program from archive, that program must be re-archived which causes extra lag when exiting.
I don't know, its in your post.

It adds no extra complexity to the program. All that re-archiving etc happens on the shell level, which is optional.
I dont see it

It adds no complexity for the programmer, but the user still has to wait for it to re-archive. For example look at phenix. The game uses smc and takes time to quit.

Blame Tapatalk.

Again, that is all optional depending on the shell and not a built in feature.
Title: Re: Balltrix - z80 ASM Remake
Post by: TIfanx1999 on January 10, 2016, 08:22:08 pm
Hey, cool to see you working on a project again Xeda! :D
Title: Re: Balltrix - z80 ASM Remake
Post by: Xeda112358 on January 11, 2016, 08:36:20 am
Writeback Worries:
-The code for doing this with the high scores is actually smaller and faster than using an external save file, not to mention that it doesn't add clutter to the VAT.
-If I did use an external save file and the user kept it archived, I would have to unarchive it, modify, then rearchive it anyway, so there would still be lag.
-If the program is in RAM, I'm directly modifying the source program, not the copy of it at $9D95. If it is archived, I'm only modifying the copy, so it won't be permanently saved.


As to the comment about the 48-byte thing being unnecessary or possibly more difficult than just using a graphics buffer, it is actually (again), smaller and faster. Like, way faster and way smaller. It takes no extra time to render than a graphics buffer, but scrolling it down and collision testing is a lot faster and the code is smaller.


At work yesterday, I started a routine for converting a keypress (0~56) to a letter character as shown above the button. It worked fairly snazztacularly, but now I have to implement it.
Title: Re: Balltrix - z80 ASM Remake
Post by: Xeda112358 on March 15, 2016, 04:41:31 pm
Okay, update time! I overhauled the highscore input menu so you can enter stuff as you would on the homescreen (pressing the sin( button prints sin(, etc.). I, and at least one other person found the score being erased and redrawn to the display to be annoying (the blink every time the screen is rerendered). I fixed that and instead replaced the top row of 6 pixels with the score and a note: "(ported by Zeda)" which I might change later.

This is probably about as much as this version will change unless there are serious bugs. For example, DJ Omnimaga reported issues with graphics emulation in WabbitEmu, but not Tilem. I also had no problems with Tilem or my physical calc.