Jump to content
IGNORED

Disk Formatter for Mr. Robot and his Robot Factory Level Disks


tschak909

Recommended Posts

My daughter loves Mr. Robot and his Robot factory.

 

She'll be receiving a disk drive soon for her XEGS, so she can save levels that she makes in it (as well as save BASIC programs etc.)

 

I decided to play a little bit with the Mr. Robot factory, and save stuff to disk, and I took a look at what was happening under the covers.

 

Basically, it's just writing raw disk sectors to an already formatted disk, which correspond to a snapshot of the video memory, but the point is that it's just writing those sectors to a disk. It's not blocking those sectors out on the VTOC, not putting any directory entries, it's just writing sectors based on the selected screen offset by 8 sectors each.

 

This to me, is a recipe for disaster if you forget to label a disk as a set of levels, you'll most definitely think that it's a DOS disk of some sort, and write files onto it.

 

So I thought, why not make a little tool that:

 

* Formats a disk using DSKINV

* writes a little boot sector (TBD: make a nice little boot message/logo, anyone wanna help?)

* writes a VTOC that blocks out the first 214 sectors of the disk.

* Writes a directory with a label that says, "THIS IS A MR. ROBOT DISK"

 

A couple hours in CC65, and this is the result:

SN044nB.gif

 

The source code is here:

https://github.com/tschak909/mr-robot-disk-formatter

 

As you can see, the resulting disk can have DOS or other files written to it, can boot DOS just fine, and still have Mr. Robot levels written to it without one disturbing the other.

 

It's a good example of:

 

* Direct SIO calls for disk (through DSKINV)

* Formatting a DOS 2 disk without CIO calls (so this works even when there is no DOS loaded)

* Loading custom charsets in CC65

* A dirt simple printing mechanism for Atari systems without all the complexity of conio or stdio.

* A little bit of display list manipulation

* keeping programs nice and modular.

* how sometimes goto can be a good thing in UI code.

 

The one thing I would like to add, would be a simple boot message/menu by default, if somebody would like to contribute one? ;)

 

-Thom

robotfmt.com

  • Like 9
Link to comment
Share on other sites

Why not just put a normal DOS + DUP since it's using under a third of an SD disk?

 

Maybe someone could develop a program in Basic that allows viewing and backing up generated levels to normal Dos files.

 

Otherwise, suggestion for an intro - with one sector that'd be sufficient to just load to low memory and have a self-contained DList + screen that could fit into 128 bytes, so might fit 2 lines of Gr. 0 text.

Link to comment
Share on other sites

I didn't put a DOS/DUP in the program because I wanted to keep this program as small as possible. It's actually small enough to cram into an 8K cartridge. (or into an Ultimate 1MB cart slot) ;)

 

One of the big sources of code expansion in CC65 is literally using the portable and easy functions for things like screen or keyboard I/O. 

 

If you're making something that will never be cross platform, literally leverage the OS ROM for everything you can, and that will keep the object size down.

 

-Thom

  • Like 2
Link to comment
Share on other sites

yeah the forum does weird stuff like that... sometimes I refresh or leave and come back... then the stuff finally and magically appears...

 

for instance like just now,

I typed the message and saved.... it wasn't there.... like I never wrote any of it... I refreshed and this time I was logged out... signed back in an it's still missing... then I click the empty reply box and my old post was restored and I could submit it...   if you don't double check... your edit or post might not happen and then you can have a bad post that's not fixed up or wrong... by the time you know it didn't take... world war 3 could happen because of a mistake or incorrect tone ...

 

You must then ask for privs or help to right the ship... sometimes nothing at all happens and you see that the next day... either someone else answered in your stead... or your like, I answered that... why isn't it here!  it may longer be in the recovery buffer either...

Edited by _The Doctor__
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...