Jump to content
IGNORED

Looking for Tetris for the Model 1????


DistantStar001

Recommended Posts

Just what the title says.  I like Tetris and I have several TRS-80 Model 1s (as well as a Model III) and I'd like to enjoy the combination someday.  After all, if this thing can do Zaxxon, tetris shouldn't be that hard. However, the only version I've found is for the Model 4...  So not so helpful.  I know it's out for the Coco and other platforms.  I was able to get a version for my Apple IIs, Atari 8-bits, C64s, C128s, VIC-20s, BBC Micro, 5160, Macintosh Plus, 80 column PET (fixed 40 column version but it owrks), ZX Spectrum, and even my stock 1K ZX81!?!?  But not my TRS-80.  And if the ZX81 can do it on 1K of RAM, surly my TRS-80s can do it with 16K (or even just 4).  

 

Anyone know where this might be floating around?  

Link to comment
Share on other sites

  • 3 weeks later...

That's an interesting challenge @DistantStar001

 

Please let me know if this works in real hardware. I only have tested on emulation.

 

BTW, this would be my first game programmed for TRS-80. :grin:

 

CapturadePantalla2023-08-31ala(s)12_57_13.thumb.png.0650f9f2e807eec19b00f43fc7b43cbe.png

CapturadePantalla2023-08-31ala(s)12_57_26.thumb.png.8cd677778bc7b4661b622ca68fbff018.png

CapturadePantalla2023-08-31ala(s)12_56_59.thumb.png.24ed93e8543a05336eecc24caa3bd669.png

 

 

WASD control. Assembled at $4a00

ttris.cmd

 

Arrows control. Assembled at $5200 for TRS-DOS

ttris2.cmd

 

Enhanced title screen. Lowercase messages. Cleans correctly the screen for Model 1. Assembled at $5200 for TRS-DOS

ttris3.cmd

 

Solved game over bug on Model 1.

ttris4.cmd

  • Like 3
Link to comment
Share on other sites

4 hours ago, George Phillips said:

Nicely done.

 

Change the ORG from $4A00 to $5200 so it'll run under TRS-DOS and it'll work fine on a real machine.

 

TRS-80 users are likely to expect the arrow keys for control rather than WASD.

Oh my! Never noticed there were arrows on the keyboard, and the right address for TRS-DOS.

 

I've attached the new CMD to my first post.

 

Thanks a lot!

 

  • Like 1
Link to comment
Share on other sites

Thanks; works nicely now under TRS-DOS.

 

You can use lower-case in messages which will work fine on the Model III and most Model I's.  However, earlier Model I's did not have lower-case and need a little bit of code to handle the conversion.  Their video memory only had 7 bits per byte!

 

Here's a little code fragment that will write a character to the screen and automatically uppercase it if necessary:

 

; HL pointing to screen memory, A is character to display
    ld  (hl),a
    cp  (hl)
    jr  z,ok
    res 5,(hl)
ok:

 

Of course, you could do a single test at the start of the program and uppercase all messages if the machine doesn't support lower-case.

  • Thanks 1
Link to comment
Share on other sites

On 8/31/2023 at 11:59 AM, nanochess said:

That's an interesting challenge @DistantStar001

 

Please let me know if this works in real hardware. I only have tested on emulation.

 

BTW, this would be my first game programmed for TRS-80. :grin:

 

CapturadePantalla2023-08-31ala(s)12_57_13.thumb.png.0650f9f2e807eec19b00f43fc7b43cbe.png

CapturadePantalla2023-08-31ala(s)12_57_26.thumb.png.8cd677778bc7b4661b622ca68fbff018.png

CapturadePantalla2023-08-31ala(s)12_56_59.thumb.png.24ed93e8543a05336eecc24caa3bd669.png

 

 

WASD control. Assembled at $4a00

ttris.cmd 1.49 kB · 10 downloads

 

Arrows control. Assembled at $5200 for TRS-DOS

ttris2.cmd 1.49 kB · 3 downloads

Can you covert this to a .cas or .wav file (or tell me how to)? I'm having issues with the floppy controller on my expansion interface.  

Link to comment
Share on other sites

Here you go.  I used trld ttrs2a.cmd ttrs2a.lcas to do the conversion http://48k.ca/trld.html

 

The name for SYSTEM is TTRIS2 but, as always, you can just give the first letter T to the ?* prompt.

 

Running it on the Model 1 I noticed a small bug in that the screen is cleared with 0's which end up displaying as @ signs.  I didn't think to try it on a Model 1.  As penance I patched the code to clear with character 128 hence the ttris2a name.

 

ttris2a.cas ttris2a.cmd

  • Like 1
Link to comment
Share on other sites

10 hours ago, George Phillips said:

One tiny bug left.  The "Press Space" message that appears at the end of the game is scrambled if lower case isn't available.  Tested it with trs80gp -m1 -nlc ttris3.cmd

I've corrected it and attached the file ttris4.cmd to my original post. Thanks for the report!

 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
On 9/20/2023 at 3:06 PM, nanochess said:

Now with source code available at Github https://github.com/nanochess/Ttris/

 

I know it's been a while, and sorry about that.  Life's been getting away from me.  But I really wanted to say thank you for this!  I can't wait until I have a chance top try it.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...