Z80 Emulation on 68K Calculators
|
Posted on 8 September 1998
The following text was written by Michael Bryan
Cook: I just got a TI-89 the other day and was thinking about the fate of my
trusty 83 and 85 when I though of this idea. The 92, 92+, and 89 are all 10mhz 68k
processors. The rest of the 8x line (except for the 80) are 6mhz Z80s. So it seems to me
that the 68k calcs would be fully capable of running some program to emulate the 80x line
so that we could run the ASM games for them. This would not only make an easier way to put
programs on multiple calcs because there is no need to program in both Z80 and 68k but
also this means even on the just released 89 and the fairly new there would be a HUGE
library of games. Because they are 4mhz faster they should be able to handle it and the
+500k of mem on the 89 and 92+ would easily allow you to hold a program like this no matter
how big and still have space for games. This would be a great idea and I'd love it if one
of you TI experts could do this. The screens on the 89 and 92(+) are bigger than any other
so this would work too. Now I know that this would be hard but look at what we've done!
We've put ASM games on the 'impossible' TI-92 and TI-82, hacked the TI-85, made memory
expanders, changed the font on the TI-85, and done so many other things that I don't think
that it's fair to say we couldn't do it if we set our mind to it!
|
|
Reply to this item
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
JimmyPop
|
66% more power does NOT mean you have enough speed to emulate. In z80 assembly it takes 1 command to perform 1 action. Emulation, however, has to take extra steps. You have to decide which 68K command to substitute for the foreign Z80 command. That can take a few commands in itself. There are also other issues like screen size. You may need to double up pixels, which take more processing time. Therefore, you need a processor 400-500% faster than the original. Of course, there is the possibility of dynamic or static recompilation, but that is very complex and unlikely on a calculator.
|
Reply to this comment
|
9 September 1998, 02:01 GMT
|
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
Nathan Ernst
|
I think that this could be very promising. First, we need someone (or some people) willing (and skillful enough) to work on this project.
For size and speed, this will obviously have to be an ASM project. What I would suggest is a library of general z80 commands that go across all the 8x minus the 89) series of calculators, translating the z80 commands to the 68k equivalent(s). From there, I would suggest having an individual library for each calc that is wanted to be emulated. That way, people could choose which calculators they want to emulate, saving on what could become very valuable space. Of course, there should be an (on calc?) converter to change the 8x calc programs into transferable programs (or strings?), and maybe an assembly program to send/receive programs to 8x calculators.
|
Reply to this comment
|
9 September 1998, 02:08 GMT
|
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
|
Sounds like a great idea! However, as stated previously, it would be rather difficult. Especially when converting processor commands and various screen sizes. Libraries DO sound like the best way to emulate. Better yet, why not try to convert an existing emulator (i.e. ASE)?
|
Reply to this comment
|
9 September 1998, 03:51 GMT
|
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
Dan
|
I think that this is a great idea. However, it would have to be a program that ran on the computer. This is because you can not send an 86 game to a 92 or 89 by using the calc to calc cable. This could only be done if you sent the program to the computer (unless it was already on there) then convert it to the 89 asm. I would like to see this done. It is a great idea for any of you who have no ideas what to do.
|
Reply to this comment
|
9 September 1998, 03:59 GMT
|
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
Arioch
|
I just got my TI-89, my first graphing calculator ever. I feel that everyone should go ahead and do whatever it takes to make games, but forget about emulation, etc. If it will take that long and slow the game down that much, don't even bother! You could probably code the whole game over in the time it takes for you to make an emulator, etc. Anyway, I heard that the TI-89 came with a built-in assembler, so whatever that means, it should help you program better and faster (I think) :P. Anyway, I am just anxious to get some games. All I have so far ...stickman, Icons89, Identity, and TI Point. These programs are not exactly impressive compared to some other games. I can run FF7 for the TI-92 on my TI-89, but only to a certain extent. It cuts off everything but the upper left corner of the screen, and crashes if you try moving. Anyway, please just make some games and post web addresses for all to share :)
-Arioch <M. Pieczynski>
|
Reply to this comment
|
9 September 1998, 04:39 GMT
|
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
Paul DeLeeuw
|
I would say that this is , in theory, a good idea. However, there is a problem with speed. As stated before, fully emulating an z80 processor would be doggedly slow. Also, for Rom calls, you would need a ROM of the z80 calc you wanted to emulate. What would be better would be to convert all ROM calls straight to native, optimized code and use this as a library on the 89/92/92+. What would be best is straight conversion of all the z80 code to native code on a computer, which has also been stated before. But, in theory, you could emulate the full calculator, TI-OS and all, impress all you teachers and friends for about a day and, while emulating, be able to do 82/83/85/86->89/92/92+ exchanges.
|
Reply to this comment
|
9 September 1998, 04:53 GMT
|
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
Sh0gunZ
(Web Page)
|
It is theoretically possible though very unlikely. The size of the emulator would probably eat up most of the available space. However if a process such as Dynamic Recompilation (Converting the code as is necessary) or Static recompilation (converting the ASM file before execution) could be implimented it is likely that you could play 8X games on a 89/92(+). Such processes though would be extremely hard to duplicate due to processor timings, different registers, etc...
|
Reply to this comment
|
9 September 1998, 05:28 GMT
|
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
Dark Ryder
|
Unfortunately, 82-86 programs will probably never be emulated on the 89 or 92+. There are far too many programming problems to overcome, in my opinion:
-Screen size (obviously)
Almost all programs (certainly all the ones I've written) are _very_ dependant on the screen width for any kind of graphics. Particularly on the 85 and 86, with memory-mapped screens, filling a series of, say, 48 bytes with $FF will fill in three lines on the screen. On the 89, that's two and a half.
-Paged ROM (and RAM)
Because the z80 can only access 64k at a time, 8x calcs used a paged ROM system (and RAM, on the 86). Emulation for programs that directly manipulate the pages would be almost impossible.
-Ports (I may be wrong on this one...)
To my knowledge, the 68k doesn't implement anything similar to z80 ports, which are used to access a variety of hardware features (including the screen on the 82 and 83).
-Register width
Many programs make use of the "two's complement" method of handling negative numbers. When converting these numbers to 32 bits, the emulator would be unable to determine if, say, $C000 refers to positive $C000 or negative $4000.
|
Reply to this comment
|
9 September 1998, 05:46 GMT
|
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
Kitsune
|
Effors would be much better spent towards porting and writing new software over emulating old ones. Here's why:
1) The emulation thing just won't work. "Hey," you say, "What about ASE and emulators on the 86?"
They are only covering for the minor differences between the Z-80 calculators, not really emulating at all. The processor is the same, the assembly code for it is essentially unchanged. Trying to pull a similar stunt on a 68k may work, but likely not to anyone's satisfaction. (If you have a video game console emulator on your computer, you know what I mean. "Why is this @#$% 1985 nintendo game so slow on my Pentium 133?")
2) The 92/89 are so much better than the old calcs, why blow your time in emulating the old games when you can have new and hugely better ones? Higher resolution, greyscale, bigger levels, more options, smoother running... What isn't to love? Just give it some time, once the 89s really hit the market, the flood of cool stuff for them will begin.
|
Reply to this comment
|
9 September 1998, 06:45 GMT
|
|
Don''t emulated, translate!
|
Nathan Cassano
|
What we need to do if we want to "emulate" Z80 code is to design a computer program that translates Z80 binaries into M68K binaries. The Z80 and M68K are not complex processors and translator betweem the two would not be impossible. Real time interpative emulation (like what was suggested above) is very slow. Z80 interpative emulation on the M68K would run at about half speed or even less. But if we could translate the binaries and then run them it would most likely run at full speed on the M68K. The translator would have to mix and match op codes between them and switch calculator addressing. Not an easy job but if it was made the 92 and 89 asm archieves could be filled with 82-86 programs. I say do it.
|
Reply to this comment
|
9 September 1998, 21:55 GMT
|
|
Re: Article: "Z80 Emulation on 68K Calculators"
|
billybobiv
|
hey, ya know when you compile a program, it takes the commands you have programed in in assembly and converts them to machine code. The info in the include files tells all the equates to machine code.
Now can someone tell me why it would be difficult to have a type of assember compiler that you take the 86.asm file and compile it as a 68k file.
just write up quick routines to replace any calls to the include files. Not rom calls..we would write routines to replace them that aren't relient upon any rom
basiclly this would be an efficient alternative to looking through yer 86asm file and rewriting it for 68k
Opinions???
|
Reply to this comment
|
9 September 1998, 23:29 GMT
|
|
1 2 3
You can change the number of comments per page in Account Preferences.
|