Jump to content
IGNORED

4K Short'n'Sweet game contest


Asmusr

Recommended Posts

I'd argue there actually are tricks with VDP addressing, but that they are very rarely useful. However, I have used setting a write address and then reading to save code space in the past. You just have to remember that all VDP data passes through an intermediate register. Setting >4000 in an address means "don't prefetch this address" and nothing more. In very rare instances that's been useful for me to save space, for instance, when it was smaller to read a dummy byte to get to the right address and force a prefetch than to OR in >4000. Also remember that writes do not cause a prefetch, so the first read after a write is essentially garbage data, but still increments the address.

 

For the VDP data move, your loop has a requirement that length must be a multiple of 8. If you change your JNE to JGT you can get around that (as long as you don't mind it will still COPY a multiple of 8, but it won't crash otherwise).

  • Like 1
Link to comment
Share on other sites

I am sad to announce that after much effort I could not fit my program within the 780 bytes limit of the LBLA :( , at least to get what I wanted from it. So it's time to regroup: either I forge on using the EA and the full 4K available to me (that seems like such a luxury!!!) or come up with a simpler idea.

All the game elements are in place, and I probably just needed an additional 2-3 hundred bytes to finish it. Bummer...

  • Like 1
Link to comment
Share on other sites

A couple hundred bytes starts to feel like a luxury very quickly, yes. :)

 

I've got my title done with lots of time to fiddle with it till the release thread opens up - even have 26 bytes free ;). Unfortunately, I wanted it to work with the MiniMemory, and the MM's "load and run" option needs your program to start at >7118, meaning you only get 4k - 280 bytes if you want to use that option.

 

What's it take to make a Playground assembly loader? ;)

  • Like 1
Link to comment
Share on other sites

What's it take to make a Playground assembly loader? ;)

Here's a question about the rules: Lets say you have an assembly program that is exactly 4K long and embed that in a TI BASIC loader. Now the loader program is going to take some number of bytes; as an educated guess let's say 200 more bytes. With 4K of embedded code the length of the TI BASIC program is 4.2K long but it puts only 4K program into the minimemory. Is this acceptable under the rules?

Link to comment
Share on other sites

Here's a question about the rules: Lets say you have an assembly program that is exactly 4K long and embed that in a TI BASIC loader. Now the loader program is going to take some number of bytes; as an educated guess let's say 200 more bytes. With 4K of embedded code the length of the TI BASIC program is 4.2K long but it puts only 4K program into the minimemory. Is this acceptable under the rules?

Yep, that's exactly right. I was suspecting that it might be possible to store the full copy loop in the exploit code (ie: no paging), but after spending a little time reading the documentation I was still not quite clear how to create the BASIC program.

 

I guess there'd be one more caveat that I hadn't thought about -- since the exploit messes up scratchpad, we'd need to restore a default scratchpad (E/A environment would suffice) to ensure that the ISR keeps working correctly (unless, of course, the ISR isn't affected by the exploit code). But that could just be another 256 bytes copied from VDP at worst.

 

I don't mean to set you off to work on it! It was just a thought I had. :)

Link to comment
Share on other sites

It's an easy enough thing to copy 4K of code from the minimemory (>7000 to >7FFF) and embed it into a TI BASIC program. After loading the TI BASIC program the embedded code can be copied back into the minimemory. But the resulting BASIC program will be more than 4K long. If the rules permit this I could put together a loader. If it is not permitted then that's OK too.

 

Don't worry about the ISR. A few things are modified but they are easy to undo.

  • Like 1
Link to comment
Share on other sites

It's an easy enough thing to copy 4K of code from the minimemory (>7000 to >7FFF) and embed it into a TI BASIC program. After loading the TI BASIC program the embedded code can be copied back into the minimemory. But the resulting BASIC program will be more than 4K long. If the rules permit this I could put together a loader. If it is not permitted then that's OK too.

 

Don't worry about the ISR. A few things are modified but they are easy to undo.

 

I have no problems with allowing that, and I would even use it myself. ;-) My game is slightly bigger than what you can load into the Minimem as an object file.

  • Like 2
Link to comment
Share on other sites

A couple hundred bytes starts to feel like a luxury very quickly, yes. :)

 

I've got my title done with lots of time to fiddle with it till the release thread opens up - even have 26 bytes free ;). Unfortunately, I wanted it to work with the MiniMemory, and the MM's "load and run" option needs your program to start at >7118, meaning you only get 4k - 280 bytes if you want to use that option.

 

What's it take to make a Playground assembly loader? ;)

 

I think I'm just going to expand my game using the EA, and it will likely fit in the MM with room to spare although I will have to ward off feature creep :D . I want the game to load from tape into the MM without any other support. Currently standing at 874 bytes :)

  • Like 1
Link to comment
Share on other sites

 

I think I'm just going to expand my game using the EA, and it will likely fit in the MM with room to spare although I will have to ward off feature creep :D . I want the game to load from tape into the MM without any other support.

This makes a TI BASIC program with embedded code. As with any BASIC program, it can be loaded via disk or cassette.

Link to comment
Share on other sites

It's an easy enough thing to copy 4K of code from the minimemory (>7000 to >7FFF) and embed it into a TI BASIC program. After loading the TI BASIC program the embedded code can be copied back into the minimemory. But the resulting BASIC program will be more than 4K long. If the rules permit this I could put together a loader. If it is not permitted then that's OK too.

 

Don't worry about the ISR. A few things are modified but they are easy to undo.

 

oooh, yeah, I wasn't even considering it as my main entry, but just as a distribution method so cassette MiniMem users could load it easily. ;) But that would be awesome! (I was going to provide Cart, EA#5, and MiniMem versions -- the latter cause I got hung up on that requirement from the first post and liked that idea. ;) )

  • Like 1
Link to comment
Share on other sites

Excellent. :thumbsup:

 

Of course I'll have to try it out (IRL), - but are there any recommended, small, quick and dirty Windows or Java LZ4 programs to use when compressing ? - Just to quickly see how well my present 4K ROM binaries will compress. ;)

I put links to all the information and homepage in the readme... I just used the default (Windows) tool from the main page. They've got a number of ready-to-go ports. :)

  • Like 1
Link to comment
Share on other sites

I have come up with a TI BASIC loader that can load up to a full 4096 bytes into the MiniMemory cartridge. It copies the program from >7000 and embeds it in a TI BASIC program. When you load and run the program it copies the program back into the cartridge ram at >7000 and then does a B @>7000, pretty much the way an EA5 program runs. I tried to duplicate the environment you get when running an EA5 program, but there is not enough room to do it all. Right now it copies the character definitions from V0400 to V0900 and sets two vdp registers so that they match the EA values when an EA5 program starts. There is no room to change the color table at V0380 to the EA5 values. The screen is not cleared, although a CALL HCHAR(1,1,192,768) in the loader program will do that.

 

Is that close enough to be useful? Is clearing the screen and setting the color table more useful than having the characters defined? Once there is a consensus I will post the loader.

  • Like 2
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...