tschak909 Posted October 7, 2019 Share Posted October 7, 2019 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: 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 9 Quote Link to comment Share on other sites More sharing options...
Rybags Posted October 7, 2019 Share Posted October 7, 2019 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. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 7, 2019 Author Share Posted October 7, 2019 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 2 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 7, 2019 Author Share Posted October 7, 2019 (edited) In the arena of stupid pet tricks, I was able to quickly convert this to an 8K cartridge. It will load, for example, into an XEGS ROM or BASIC ROM slot on an Ultimate 1MB... robotfmt-8KCart.bin Edited October 7, 2019 by tschak909 1 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 8, 2019 Author Share Posted October 8, 2019 looks like the bin didn't make it.. reposting. -Thom robotfmt-8KCart.bin Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 8, 2019 Author Share Posted October 8, 2019 wait it did, whoops. -Thom Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted October 8, 2019 Share Posted October 8, 2019 (edited) 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 October 8, 2019 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
Mr Robot Posted October 8, 2019 Share Posted October 8, 2019 Isn't there an updated version now Thom? Here's the .car of the first version for anyone who want's it RobotFMT (2019)(Thomas Cherryhomes).car Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 8, 2019 Author Share Posted October 8, 2019 Yup. See attached. * Changed the font * Added a boot sector message. Unless somebody makes another boot sector, this program is complete. -Thom robotfmt.bin robotfmt.com mr-robot-disk-formatter-1_1.tar.gz mr-robot-disk-formatter-1_1.zip Quote Link to comment Share on other sites More sharing options...
Mr Robot Posted October 8, 2019 Share Posted October 8, 2019 The bin file just goes to self test on this version, the com works OK Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 8, 2019 Author Share Posted October 8, 2019 Oops. I think the version I was attempting to make into a diagnostic cart made it in, one sec. Yup this one works fine. sorry about that robotfmt.bin 1 Quote Link to comment Share on other sites More sharing options...
Mr Robot Posted October 8, 2019 Share Posted October 8, 2019 Cheers Thom! And here's the .car for anyone that wants it RobotFMT (2019)(Thomas Cherryhomes)[Final].car Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.