Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: SirCmpwn on March 22, 2010, 10:25:06 am

Title: Mosaic
Post by: SirCmpwn on March 22, 2010, 10:25:06 am
I have discussed this for a while at Cemetech, but I figured I would put it here, too.
I am working on an IDE/Assembler that runs on-calc for z80 development.  In the past, projects like Tasm On-Calc and OTBP Assembler have done similar things, but both in BASIC.  This assembler is written in pure z80 assembly, so it should assemble at 10-20 times the speed of BASIC counterparts.  It also features on-calc debugging, a project management system, and, using usb8x, it can import/export to a flash drive as .z80 code files.

Feature requests/questions/comments/whatever goes here, or in the corresponding thread on Cemetech.
Title: Re: Mosaic
Post by: Eeems on March 22, 2010, 10:48:19 am
hmm, interesting, another attempt at pure ASM was made, but it was dropped during it's alpha and was extremely buggy. I'm excited for this for when I get my calc back and I get a mini USB to USB converter.
Title: Re: Mosaic
Post by: SirCmpwn on March 22, 2010, 11:07:00 am
mini USB to USB converter.

Just make one by hand, thats what I did and it works great.  You just need the right ends.
Title: Re: Mosaic
Post by: DJ Omnimaga on March 22, 2010, 02:15:55 pm
and good hands at manipulating electronics x.x

At work I always end up having to get the boss to repair the cart caddy pusher remote control cuz I always accidentally get the small wires unsoldered when changing the battery x.x
Title: Re: Mosaic
Post by: Geekboy1011 on March 22, 2010, 07:19:52 pm
ouch also this seems inteesting i cant wait to see what it turns into XD
Title: Re: Mosaic
Post by: Hot_Dog on March 22, 2010, 09:11:29 pm
Fascinating!  What do you hope that the debugger is going to do, actually run the program or test it safely so the calculator doesn't crash?
Title: Re: Mosaic
Post by: SirCmpwn on March 22, 2010, 09:45:01 pm
I'm not entirely sure what you're asking, but it will modify the code at every breakpoint, re-assemble, and run.
Title: Re: Mosaic
Post by: DJ Omnimaga on March 23, 2010, 12:13:55 am
I think he meant the ability to test a program with error checking enabled. I assume this would be hard to do with pure assembly, though, right?
Title: Re: Mosaic
Post by: SirCmpwn on March 23, 2010, 12:34:45 am
Very hard, but several people are working together on a soulution.
Also, as an update, the assembler has support for every one-byte opcode now.
Title: Re: Mosaic
Post by: Eeems on March 23, 2010, 12:50:51 am
Yay! Are you going to post alpha's/betas soon? Or are they not for a while?
Title: Re: Mosaic
Post by: SirCmpwn on March 23, 2010, 12:24:01 pm
Well, I will probably post the assembler later tonight, right now it only supports one-byte commands.
However, I promise to get an alpha out as soon as possible.
Title: Re: Mosaic
Post by: Quigibo on March 23, 2010, 12:52:11 pm
Cool!  I can't wait to see this.  Will macros eventually be supported, because those are really useful!

I'm just wondering, is there really enough memory on the calculator to write decently sized assembly source code?  It would probably have to be saved as groups or on USB since even a small project often takes more room than the entire free ram.  Although this is probably for simpler things I assume, like writing tools, routines, and maybe even small games since large projects are far easier to write on the computer.  And when you take into account the time for scrolling though the program, typing things out, and assembling, you'll definitely have to come up with some type of efficient system.

Good luck, hope this gets completed :)
Title: Re: Mosaic
Post by: SirCmpwn on March 23, 2010, 12:57:02 pm
Cool!  I can't wait to see this.  Will macros eventually be supported, because those are really useful!

Done.

I'm just wondering, is there really enough memory on the calculator to write decently sized assembly source code?  It would probably have to be saved as groups or on USB since even a small project often takes more room than the entire free ram.

Yes, there is enough room.  Plus, the way that I am doing it, all the code will be in the archive.  I also plan on supporting assembling straight from the flash drive, so you can keep your files on a flash drive.

And when you take into account the time for scrolling though the program, typing things out, and assembling, you'll definitely have to come up with some type of efficient system.

Right now, it assembles fast.  The following example code:
Code: [Select]
inc b
dec b
inc bc
dec bc
xor a
ret z
ret
assembles instantly.  You can't tell that anything happened unless you look at the output code.
Title: Re: Mosaic
Post by: DJ Omnimaga on March 23, 2010, 01:34:30 pm
Sounds nice. The BASIC ones always had the limitation of programs not being larger than the calc RAM minus the RAM taken by the assembler/IDE. Basically, you couldn't do ASM games larger than 11-12 KB for example, because in hex form, they took twice as much RAM

Back in 2003, there was another similar project in the works by Detacheds Solution called TitanASM but it died in August 2003. Another one by Keith Pierce was ChASM 2, but the author vanished completly in 2004. ChASM is avaliable on ticalc.org but it's incomplete and not fully functional :/
Title: Re: Mosaic
Post by: SirCmpwn on March 23, 2010, 01:55:57 pm
Well, for some projects that require a more inclusive include file (haha), it will pretty much be usb8x or bust.  However, on-calc include files work fine as well.
Title: Re: Mosaic
Post by: Galandros on March 26, 2010, 12:10:40 pm
You ought using 4x4 font like in BBC Basic and store as ASCII, not TI tokens.

One idea of mine is an oncalc debugger. No kidding, it is possible to a certain extent.

Features that I have though:
- disassembler (already done in Calcsys but I suggest using 4x4 font for displaying more code)
- hex editor and memory viewer (again implement 4x4 font)
- view registers upon On+otherkey token (I have seen this done)
- breakpoints (just do a call to the debugger)
- call the debugger with a odd key combo

Good luck with the project. The main problem is memory issues on source code and labels, memory will be a limitation... Macros would be though and I only suggest implementing simple ones in later stage.
Title: Re: Mosaic
Post by: SirCmpwn on March 26, 2010, 12:41:14 pm
I'm thinking of adding a modified version of CalcSys in the application, and a debugger has been in the works since day one.
I'm also using ASCII so that there is support between files on-calc and files exported to a flash drive, there is no question about it.
Title: Re: Mosaic
Post by: DJ Omnimaga on March 26, 2010, 05:58:57 pm
that would be nice. Just make sure to add the CalcSys author permission (or check the license if it's required) to include code from it, though.
Title: Re: Mosaic
Post by: SirCmpwn on March 26, 2010, 06:09:51 pm
Yeah, I think that dev has abandoned the community, but I'll give credit if needed.
Title: Re: Mosaic
Post by: DJ Omnimaga on March 26, 2010, 07:05:23 pm
he still pops in in #ti sometimes, though. I saw him sometimes. He's a math teacher now (like Critor and Mic on TI-BANK). However idk if he still checks his ticalc e-mail address anymore.
Title: Re: Mosaic
Post by: _player1537 on March 26, 2010, 07:10:03 pm
Could there be a feature where it puts the unsquished hex code into a string so you can use it in Axe programs?
Title: Re: Mosaic
Post by: SirCmpwn on March 26, 2010, 07:13:21 pm
You could always use CalcSys to do this, but I don't think I will natively support it.
Title: Re: Mosaic
Post by: _player1537 on March 26, 2010, 07:14:53 pm
I'm sorry, could someone explain how to do that?
Title: Re: Mosaic
Post by: SirCmpwn on March 26, 2010, 07:18:55 pm
Sure!
Make sure you have CalcSys installed (duh ;)) and run it.
Press 6, then 1 to open the VAT menu.
Press 1 again to get the program list.
Choose the program you want to look and push the corresponding number.
Press Alpha+D to disassemble, Alpha+H to view the hex.
Title: Re: Mosaic
Post by: _player1537 on March 26, 2010, 07:39:03 pm
then do I have to hand copy the Hex?
Title: Re: Mosaic
Post by: SirCmpwn on March 26, 2010, 07:42:55 pm
Yes.
Title: Re: Mosaic
Post by: _player1537 on March 26, 2010, 07:43:41 pm
oh, I thought there was a way to let the calc take care of copying the hex
Title: Re: Mosaic
Post by: SirCmpwn on March 26, 2010, 07:44:30 pm
Nope, not unless you write a customized program in assembly.
Title: Re: Mosaic
Post by: _player1537 on March 26, 2010, 07:45:40 pm
I think I will make that
Title: Re: Mosaic
Post by: SirCmpwn on March 26, 2010, 07:46:42 pm
Don't forget that you don't need BB6D or ret from Axe.
Title: Re: Mosaic
Post by: _player1537 on March 26, 2010, 07:50:25 pm
it will probably be a stand alone program, though I might try fixing something up to copy data from external programs
Title: Re: Mosaic
Post by: SirCmpwn on March 26, 2010, 07:54:20 pm
I mean you shouldn't export the data from the programs you are editing.
Title: Re: Mosaic
Post by: _player1537 on March 26, 2010, 08:05:44 pm
ahh ok
Title: Re: Mosaic
Post by: SirCmpwn on March 28, 2010, 12:14:03 pm
Update
I added support for all two-byte commands that do not have arguments, and began working on wildcards so arguments can be supported.  This means that any command that does not take arguments can be assembled.
Title: Re: Mosaic
Post by: DJ Omnimaga on March 28, 2010, 12:36:17 pm
nice to hear
Title: Re: Mosaic
Post by: DJ Omnimaga on May 21, 2010, 10:59:29 pm
since he cannot post here, I'll relay you the update:

Quote from: Mr_Coding_Knight
[size=18]Update[/size]

http://i855.photobucket.com/albums/ab120/our dear friend/MosaicAssembling.gif (this URL needs to be changed to you know what)
I have been working a little today, and did some speed tests.  The image above is of Mosaic assembling the following code at 8Mhz:
Code: [Select]
or a
ret z\dec          a
ret
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h

You may think, why rst 38h?  Well, because that is the last entry in the command table, and takes the longest to assemble.  The empty space between dec and a consists of a few spaces and a tab.  So, with these specs, Mosaic will assemble 83 lines of the worst-case scenario code (meaning code that takes the longest to assemble) in about 4.5 seconds.  The same code takes 47 seconds with OTBP Assembler.
Title: Re: Mosaic
Post by: meishe91 on May 22, 2010, 02:32:19 am
Sweet. Glad to hear some progress. What is the correct URL?
Title: Re: Mosaic
Post by: Builderboy on May 22, 2010, 02:22:27 pm
The correct Url is to replace 'our dear friend' with the actual creator of this program.
Title: Re: Mosaic
Post by: DJ Omnimaga on May 22, 2010, 05:49:17 pm
what BBoy said. It's because of a forum censor filter (the only occasion where we ever used the anti-profanity filter lol... I guess that filter can be used for different purposes than its original one :P)
Title: Re: Mosaic
Post by: meishe91 on May 22, 2010, 11:42:07 pm
For what ever reason I still can't get it to work...dang it...I have no idea what I'm doing wrong lol.
Title: Re: Mosaic
Post by: DJ Omnimaga on May 23, 2010, 12:02:18 am
you might be typing the original name wrong x.x
Title: Re: Mosaic
Post by: meishe91 on May 23, 2010, 12:04:28 am
I don't think so, but I don't know. Oh well.
Title: Re: Mosaic
Post by: _player1537 on May 23, 2010, 12:07:13 am
its posted on cemetech with the correct name, and it shows it already, without having to type it in the url
Title: Re: Mosaic
Post by: DJ Omnimaga on May 23, 2010, 12:07:43 am
Btw I think the link is case sensitive
Title: Re: Mosaic
Post by: Deep Toaster on May 30, 2010, 12:24:45 am
Just to clarify: Does the app assemble a program built in the TI-OS editor, or does it have its own editor?

Also, how many flash pages are you planning for this to take up? The only reason I'm wondering is that with MirageOS, CalcSys, and a larger app on my calculator, as well as the dozen or so groups of programs I keep indefinitely in development, my calculator's flash ROM's going to be pretty crammed. :(
Title: Re: Mosaic
Post by: meishe91 on May 30, 2010, 12:37:03 am
I'm pretty sure it will have it's own editor, because if I understand this correctly, it is a direct assembly editor, not a compiler like Axe Parser is. I could be wrong though.

For the space issue. You can always store those things on the computer.
Title: Re: Mosaic
Post by: DJ Omnimaga on May 30, 2010, 01:45:39 am
it will have its own editor I am sure. I swear I read somewhere that it will.
Title: Re: Mosaic
Post by: SirCmpwn on May 31, 2010, 01:29:37 pm
Just to clarify: Does the app assemble a program built in the TI-OS editor, or does it have its own editor?

Well, considering the screenshots that are in the wild, yes ;)

Also, how many flash pages are you planning for this to take up? The only reason I'm wondering is that with MirageOS, CalcSys, and a larger app on my calculator, as well as the dozen or so groups of programs I keep indefinitely in development, my calculator's flash ROM's going to be pretty crammed. :(

The current build is one page, and I intend to keep it that way.
Title: Re: Mosaic
Post by: ztrumpet on May 31, 2010, 01:39:40 pm
Mosaic sounds really cool!  I'm sure I'll use it when I get better at Asm.  This is an awesome project.  Good luck on it! :D
Title: Re: Mosaic
Post by: SirCmpwn on June 19, 2010, 12:23:52 pm
Good morning!
Last night, Mosaic outputted the following hex:
01CDEF
Title: Re: Mosaic
Post by: DJ Omnimaga on June 19, 2010, 12:25:01 pm
Mhmm what would that code do?

Do you also mean Mosaic can now compile stuff successfully?
Title: Re: Mosaic
Post by: SirCmpwn on June 19, 2010, 12:34:55 pm
01CDEF = ld bc, $CDEF
This means that I got wildcards working, which is something I've been struggling with for the past few months.
Title: Re: Mosaic
Post by: DJ Omnimaga on June 19, 2010, 12:36:16 pm
well I have no clue what the code above and what are wildcards in terms of mosaic and ASM, but I'm glad to see some progress regardless
Title: Re: Mosaic
Post by: SirCmpwn on June 19, 2010, 12:36:47 pm
Thanks.
Title: Re: Mosaic
Post by: meishe91 on June 19, 2010, 12:44:23 pm
Ya, congrats on the progress. Would you mind sharing what wildcards are? That in turn would maybe tell us none assembly people what the code does, or a better idea.
Title: Re: Mosaic
Post by: Galandros on June 19, 2010, 12:50:15 pm
well I have no clue what the code above and what are wildcards in terms of mosaic and ASM, but I'm glad to see some progress regardless
Yes, it is assembly and assembler thing. I was confused with the therm wildcard at first.

In ld bc,xxxx any number your put into xxxx will have to be put on the resulting code.
Ya, congrats on the progress. Would you mind sharing what wildcards are? That in turn would maybe tell us none assembly people what the code does, or a better idea.
ld bc,number only loads the number you specified into the 8-bit pair register bc (there is b and c registers, used together you get 16-bits instead of 8-bit). Registers are variables and you do many sorts of operations with registers (variables).



That is progress. The assembler until know only assembled some mnemonics and data. Maybe a tabled of mnemonics and opcodes will help?
Title: Re: Mosaic
Post by: SirCmpwn on June 19, 2010, 12:52:05 pm
It already uses a command table.  The problem was the disconnect between code, command table, and output.  It was hard to move data straight from code to output.
Title: Re: Mosaic
Post by: Quigibo on June 19, 2010, 12:55:19 pm
01CDEF = ld bc, $CDEF
This means that I got wildcards working, which is something I've been struggling with for the past few months.

Wouldn't that be ld bc,$EFCD because of little endian?
Title: Re: Mosaic
Post by: SirCmpwn on June 19, 2010, 12:58:46 pm
Crap.  I should fix that.
Title: Re: Mosaic
Post by: quasi_Phthalo on June 19, 2010, 03:35:56 pm
I assume it will support giving names to labels for jumping? And maybe stuff like this?:
Code: [Select]
$$:
  ;...code...
 jr $B
  ;...code...
 jr $F
  ;...code...
$$:
Title: Re: Mosaic
Post by: SirCmpwn on June 19, 2010, 03:36:41 pm
It will have support for labels, yes.  I don't quite understand what you are talking about there, though.
Title: Re: Mosaic
Post by: qazz42 on June 19, 2010, 03:37:32 pm
Did you look at the AXE parser code at all? It could help, maybe.
Title: Re: Mosaic
Post by: calc84maniac on June 19, 2010, 04:24:10 pm
It will have support for labels, yes.  I don't quite understand what you are talking about there, though.
If you're going with SPASM syntax, it should support local labels, using "_" as the label.

"jr _" or "jr +_" will jump forward to the next local label, "jr ++_" will jump forward two local labels, etc.
"jr -_" will jump back to the previous local label, "jr --_" will jump back two, etc.
Title: Re: Mosaic
Post by: Quigibo on June 19, 2010, 04:49:01 pm
You can't even type an underscore on the calculator, nor a dollar sign very easily.  I'm curious how you're going to support that.  I saw you were designing a DCS editor for it, but can that support the extra ascii characters?

I doubt you'll need to look at the Axe Parser source becasue the global labels are fairly easy to implement and I don't use local labels.  But if you need something in particular, I can always share some source with you.
Title: Re: Mosaic
Post by: DJ Omnimaga on June 19, 2010, 05:02:24 pm
I think he's writing a custom editor, so he will most likely allow the usage of special characters in an easier and faster way (at least the most used ones)
Title: Re: Mosaic
Post by: SirCmpwn on June 19, 2010, 05:10:55 pm
^
Title: Re: Mosaic
Post by: ztrumpet on June 21, 2010, 03:31:23 pm
Would these help?
[Alpha] [Mode]
[Alpha] [Del]
[Alpha] [XTthetaN]
[Alpha] [Stat]

Anyway, it's nice to see more progress! ;D
Title: Re: Mosaic
Post by: SirCmpwn on June 21, 2010, 03:33:40 pm
I'm still finishing up the assembler, so I'll take a look at the GUI when I'm done.  [Alpha]+_____ is already proposed.
Title: Re: Mosaic
Post by: Galandros on July 23, 2010, 09:48:30 am
I am hoping to see assembling a small practical program. ;D
Title: Re: Mosaic
Post by: calcdude84se on July 23, 2010, 11:25:13 am
Will Alpha and 2nd act like Shift on a computer or like on the TI-OS?
How many shifting combinations will there be? Shift, Alpha, and Normal, or also Shift-Alpha?
Title: Re: Mosaic
Post by: SirCmpwn on July 25, 2010, 02:35:37 pm
I haven't done too much with the GUI yet, and that has yet to be determined.  I will let you guys know as soon as I have something to go off of.
As for assembling a simple program, I will show that soon.
Title: Re: Mosaic
Post by: qazz42 on August 20, 2010, 08:37:27 am
Coolio SirCmpwn, I cant wait ;D
Title: Re: Mosaic
Post by: ztrumpet on August 20, 2010, 09:38:19 am
I agree.  This is a project that I'm looking forward to immensely.  I can't wait to use it! ;D
Title: Re: Mosaic
Post by: SirCmpwn on November 26, 2010, 01:33:55 am
I'm afraid I am discontinuing Mosaic.  I no longer have the motivation to work on it, and I suggest that you use Mimas (http://www.ticalc.org/archives/files/fileinfo/431/43140.html) as an alternative.
Title: Re: Mosaic
Post by: DJ Omnimaga on November 26, 2010, 02:01:48 am
I was sad to hear when you told me, since it was a promising project, especially the multiple syntax support and some other features. I could understand, though, since Mimas kinda took the community by surprise and came out earlier. You still did a good job on this. Are you planning to release the source if there are routines that might be useful?
Title: Re: Mosaic
Post by: SirCmpwn on November 26, 2010, 03:47:22 am
No, the assembler could be useful, but it is unfinished and confusing.  You guys should look out for Mosaic on KnightOS, though.
Title: Re: Mosaic
Post by: DJ Omnimaga on November 26, 2010, 03:48:41 am
Oh! Should I just keep this board intact, then? I mean if you're gonna continue the project but for KOS it should remain with a sub-forum, right? Or will it be built-in KOS? (In the later case, I'll just merge both boards)
Title: Re: Mosaic
Post by: SirCmpwn on November 26, 2010, 03:56:01 am
I guess we can leave the board here, but it will be dead for a while, until well into the KnightOS release.
Title: Re: Mosaic
Post by: DJ Omnimaga on November 26, 2010, 03:57:53 am
Ah ok. It's fine then.
Title: Re: Mosaic
Post by: GB on March 13, 2011, 10:09:14 am
Does this Mosaic program go on the Web?
Title: Re: Mosaic
Post by: SirCmpwn on March 13, 2011, 11:45:22 am
What do you mean?  Mosaic is on hold pending the completion of KnightOS.
Title: Re: Mosaic
Post by: Deep Toaster on March 13, 2011, 11:57:00 am
Does this Mosaic program go on the Web?

It's an on-calc assembler for KnightOS, if that's what you meant.
Title: Re: Mosaic
Post by: SirCmpwn on March 13, 2011, 05:41:32 pm
It's also a partially done TIOS app IDE, but I'm going to gut it and make it run on KnightOS.
Title: Re: Mosaic
Post by: DJ Omnimaga on March 13, 2011, 06:36:08 pm
Yeah I think it was discontinued due to the unexpected Mimas release, but then revived as KOS project.
Title: Re: Mosaic
Post by: calcdude84se on March 15, 2011, 05:17:28 pm
I almost forgot about this O.o
Anyway, I can't wait to see how this goes after KOS comes out! :)
Edit: 1 >:Dth (1666 ;D) post!
Title: Re: Mosaic
Post by: annoyingcalc on August 19, 2011, 12:13:11 am
why is this stickied?
Title: Re: Mosaic
Post by: ztrumpet on August 19, 2011, 12:17:39 am
why is this stickied?
Because I forgot to unsticky it.  Thanks for the heads up. :)