[Coco] [Color Computer] Java for the m6809

James Diffendaffer jdiffendaffer at yahoo.com
Thu Apr 10 00:46:39 EDT 2008


--- In ColorComputer at yahoogroups.com, "John W. Linville"
<linville at ...> wrote:
>

> This mis-quote is so disingenuous as to be flatly dishonest.
> The relevant passage:
> 
> 	Might you be able to write something new? Using a modern language and
> 	development tools? To ultimately run something on your coco or similar
> 	hardware? I don't see why not, other than laziness or disinterest...

Looks like you said coco to me... maybe I don't know how to spell it.
And I didn't quote you, I posted the # of the post.
 
> What part of "write something new" equates to "port existing Java
> code"?  How does "ultimately" equate to "start using it today"?

If they aren't updating it... it won't get any better.
You might as well start now.

> And this is some great hardship?  Compared to how easy you claim the
> bytecode translation to be, making ROM calls for I/O is trivial.

Are you even a programmer?  You haven't given the slightest hint as to
your knowledge on the topic yet you are willing to try to say what is
or isn't easy.  Feel free to do it if you think it's so trivial.
The biggest problem with GCC is lack of native APIs.  And that is
still the case a year after Tim created a working release.
I'm not sure how Java is even going to do that well given the
limitations you'd have even when you were done.

As for the conversion...
Java byte codes are just that.  Instructions are a single byte and the
bytes that follow depend on what the instruction is.

The conversion program is NOT complicated.
It's like an assembler but you don't need a complex parser to deal
with strings, whitespace and comments.  I'm not even sure you need a
symbol table.  

You need a table of pointers that correspond to the bytecodes and the
pointers point to individual routines to handle each bytecode.  That's
why I said it was more time consuming than complicated and probably
why that project supports a Java subset.  

You also need a table of pointers that point to the strings containing
the corresponding 6809 assembly instructions that perform the
equivalent operation.  

Post bytes following the bytecode are extracted by the bytecode
handling routines and converted to strings.  A search and replace for
placeholders in the string is used to insert the pieces of the post
bytes into the 6809 assembly string before you output it.  If you want
to get fancy you can create a peephole optimizer to replace groups of
instructions with faster sequences of instructions.
Elimination of redundant stack operations would probably speed code up
by at least 25%.  That's what a peephole optimizer I wrote did for a
free Pascal compiler for the Amiga.  If I remember right that compiler
only used a couple registers and a lot of stack operations so results
would be similar. 

BTW, I'm not saying that's how they did it, I'm saying that's how I
would approach it.
 
> Ah, we are getting somewhere...this is all I ever implied.

That's fine... but keeping within it's limits would be tough after
programming under full Java.  If you are just learning you might not
be bothered because you wouldn't know what you are missing.

Just using some of the cross compilers for the Z80 about drove me nuts
because they were a C subset.

> > And I expressed my opinion but of coarse it was "irrelevant" and
> > "uninformed" because it didn't match yours.  
> 
> It was "irrelevant" because it devalued a project for not being able
> to do something which it never claimed to do anyway.  My dog doesn't
> speak Latin, but he is still pretty smart...

An opinion is not irrelevant just because it devalues a project you
think is cool.  In YOUR mind I'm sure anything you disagree with is
irrelevant.

> As for "uninformed", that was your accusation against me.

Well, if the shoe fits.

> You erupted into this because I suggested that you missed the
> point...perhaps you shouldn't be too quick to call someone else
> "so sensitive".

Or perhaps I should since you seem to be so defensive of someone
else's project.

> > You haven't address ANY technical detail at all but try to paint me as
> > a hater, uninformed, mean and nasty so I must be wrong.
> 
> Your own words portray you as a mean, nasty hater.

Actually, they probably portray me as irritated.

Your's haven't offered a single technical discussion and obviously
never will.  Are you even a programmer?
 
> If you've got something that is beyond "pipe dream" stage, then I'm
> sure we would all love to hear about it.  And if you post a link to
> it, I'm sure you'll be none too happy to hear someone dismiss it out
> of hand simply because it is impractical or incomplete.

Well... lets see...

I seem to remember passing on a build of MESS with source that
included the speech and sound cartridge code of Tim Lindners but
expanded to support the CoCo3.  The speech still doesn't work due to a
bug in the MESS CPU emulation but I don't think Tim ever tracked it
down and my promise to help him (has it been a year already?) hasn't
amounted to much.

There was a simple bit banger serial port for the VZ200/300 based on a
couple chips hanging off of the printer port along with Z80 assembler
driver code.  If you search the vz group you should find the info.
You'll also find a trade simulation I ported from BASIC to C just to
play with the Z80 cross compilers.  

I have the last version of the Amiga exec.library disassembled,
commented as to the functionality of the assembly code
and it's set up so you can reassemble it to rebuild the exec back to a
duplicate of the original.  I can't publish the source since Amiga is
still defending intellectual property but I could publish a diff file
between it and the disassembler output.  I did pass it on to the
Fredrick Requine (I think that's how it's spelled) so he could modify
it to run on his Coldfire development board (which he did).  He still
posts to the Amiga forums if you want to verify this.  He provided me
with the disassember btw.  If he were to provide the disassembler, a
script and a diff of my file anyone could legally reproduce this *if*
they had the same ROM.  I have no idea where the code is but Frederick
should still have a copy.

I was working on a replacement for the Amiga narrator.device that was
intended to run on AROS.  It uses real sampled phonemes instead of
synthesized ones.  It isn't past the proof of concept stage.  (I
*think* I was working on the voice file format and loader when I last
saw it)  Playing the phonemes was pretty easy since I just used the
code from my Amiga developer days.  When I asked how much interest
there was on the AROS forums I got all of 3 replies, then I got busy
at work so I just let it die.  Well... there was that and the fact
that AROS didn't have any audio drivers yet.  It was based on a speech
synthesis project from some university in France if I remember right.
 I chose that because it had samples of a lot of different voices. 
I'm sure the source is still on my A3000 but I haven't even plugged it
in for over 6 years.  I don't even know if the drive will spin up.  I
could resurrect the project if there was interest from the AROS
community.  

I need to finish my 6809 code generator for SDCC (much easier to
install and use than GCC).  Now if I can just remember what machine
the code is on.  I had register models for the 6809, 6803, 68HC11,
68HC12 and 6309.  I had parts of the code generation completed for the
6809 but there was a nasty section that was a total rewrite from the
6808(?) cpu code I started with. (The 08 is an oddball) One nice thing
about the code generator was that most of the code would be shared
between all the CPUs.  Just set which target cpu you want to support
when you build it and presto... a compiler for that CPU.  That was the
eventual goal but right now I'd better settle for finishing one cpu.

Frankly, I don't worry about whether someone criticizes a project. 
It's not personal.  If it's incomplete, it's incomplete.  If you show
me a programmer that is defensive of their code I'll show you a
programmer that never improves their skills.

And your projects?

> > Why do I feel like I'm having a political discussion with a liberal?
> 
> I have no idea, since I don't recall a discussion of politics.
> Paranoia perhaps?  Besides, if I were a liberal I would have called
> you a rich white Nazi by now. :-)

You weren't in on a discussion on a certain Atari forum so you
wouldn't understand.  Sort of a private joke.  
I was just experiencing a flashback.  
The topic is now banned forever btw.  LOL




More information about the Coco mailing list