Author Topic: Balltrix - z80 ASM Remake  (Read 8667 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Balltrix - z80 ASM Remake
« on: January 09, 2016, 11:22:08 pm »
Updated Here

I've remade DJ Omnimaga's Balltrix in z80 Assembly. As requested in an older port, I've kept the original title screen.

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

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Balltrix - z80 ASM Remake
« Reply #1 on: January 10, 2016, 04:36:20 am »
Wait.....so you optimized this game for battery life? O.o

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Balltrix - z80 ASM Remake
« Reply #2 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
-German Kuznetsov
The impossible chemical compound.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Balltrix - z80 ASM Remake
« Reply #3 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.
/e

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Balltrix - z80 ASM Remake
« Reply #4 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.
-German Kuznetsov
The impossible chemical compound.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Balltrix - z80 ASM Remake
« Reply #5 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.
/e

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Balltrix - z80 ASM Remake
« Reply #6 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.
-German Kuznetsov
The impossible chemical compound.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Balltrix - z80 ASM Remake
« Reply #7 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.
/e

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Balltrix - z80 ASM Remake
« Reply #8 on: January 10, 2016, 08:22:08 pm »
Hey, cool to see you working on a project again Xeda! :D

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Balltrix - z80 ASM Remake
« Reply #9 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.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Balltrix - z80 ASM Remake
« Reply #10 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.