Java Emulator
-
- RWAP Master
- Posts: 2892
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: Java Emulator
Best to keep the project on here, but maybe direct people to this topic!
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
Re: Java Emulator
Hi all,
Yesterday I have been looking at the source of some QL emulators, including JZX (Java) for the Spectrum. Screen and keyboard handling is relatively straightforward to do in Java (based on what I saw in JZX and qlay sources), but I have some questions about some io registers (mdv handling, the comm protocol between 68008 and 8049, ser). I couldn't find good references on the internet, so I am looking for somebody to explain these topics. When I look at the code of Qlay for example the io handling is sometimes difficult to follow as it is written in C by Jan Venema ten years ago. My aim is to write a clean new implementation in Java, also inspired by the extreme clean and nice object oriented implementation of JZX. I certainly do not want to belittle the job Jan did, it's a great achievement, but a direct translation of C code into Java code will not result in a clean object oriented implementation in general. Who can help me out?
Yesterday I have been looking at the source of some QL emulators, including JZX (Java) for the Spectrum. Screen and keyboard handling is relatively straightforward to do in Java (based on what I saw in JZX and qlay sources), but I have some questions about some io registers (mdv handling, the comm protocol between 68008 and 8049, ser). I couldn't find good references on the internet, so I am looking for somebody to explain these topics. When I look at the code of Qlay for example the io handling is sometimes difficult to follow as it is written in C by Jan Venema ten years ago. My aim is to write a clean new implementation in Java, also inspired by the extreme clean and nice object oriented implementation of JZX. I certainly do not want to belittle the job Jan did, it's a great achievement, but a direct translation of C code into Java code will not result in a clean object oriented implementation in general. Who can help me out?
Re: Java Emulator
Probably the most expert people on the operating will be the emulator and ROM authors - people like Marcel Kilgus (QPC2), Daniele Terdina (QemuLator), Jimmy Montesinos (QL2K), Mark Swift (QDOS for Amiga) and Laurence Reeves (Minerva).
In case they are not on this Forum I'll put a message on the ql-users email mailing list asking people to meet you on this Forum to see if they can help you.
Dilwyn
In case they are not on this Forum I'll put a message on the ql-users email mailing list asking people to meet you on this Forum to see if they can help you.
Dilwyn
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com
Re: Java Emulator
Hi all,
In the last week I have been working on the emulator, or to be more precise, working on resolving a particular bug/feature
in the M68008 emulation code of m68k. It turns out that the exception/trap handling did not work as it should as is mentioned in the source code. I tried to repair it (and that part works now), but now I have some weird bug somewhat after the stopping of the microdrives in the boot sequence which I just cannot solve. When looking at the different source codes, everybody seems to solve it a bit differently. Anyway, I have been looking for alternatives like the 68008 code in Genesis/Jemu2 but that also did not solve it. A couple of days ago I found a TI89 emulator for Android (also a 68000 system), but after some reverse engineering I found out that they used some clever native calls to a shared (so) file, so it is not a platform independent solution either. That, however, triggered another possibility of making a Java Web start solution with a native emulator embedded. The trouble with this is that it is almost the same as downloading some existing emulator for a particular platform. The final thing I tried was a conversion tool that translates C in Java, but this is not satisfactory as well.
The big challenge is that the M68000 is a very complex and errorprone processor to emulate, especially considering the fact that Java does not provide unsigned ints and pointers, so it is a quite mundane job to circumvent these problems. And debugging is a real tough job in this case
It just seems that there isn't a good 68000 emulator for Java. And to be honest, my primary interest is not building a M68000 emulator.
I am not saying I give up, but if there are people out there willing to participate in this project, please join in making this project happen.
In the last week I have been working on the emulator, or to be more precise, working on resolving a particular bug/feature

The big challenge is that the M68000 is a very complex and errorprone processor to emulate, especially considering the fact that Java does not provide unsigned ints and pointers, so it is a quite mundane job to circumvent these problems. And debugging is a real tough job in this case

I am not saying I give up, but if there are people out there willing to participate in this project, please join in making this project happen.
Re: Java Emulator
This is a great pity. If I had knowledge of Java and enough knowledge of the OS I would volunteer. We have put out requests for help but got no direct reply unless they contacted you direct.zeccie wrote:Hi all,
In the last week I have been working on the emulator, or to be more precise, working on resolving a particular bug/featurein the M68008 emulation code of m68k. It turns out that the exception/trap handling did not work as it should as is mentioned in the source code. I tried to repair it (and that part works now), but now I have some weird bug somewhat after the stopping of the microdrives in the boot sequence which I just cannot solve. When looking at the different source codes, everybody seems to solve it a bit differently. Anyway, I have been looking for alternatives like the 68008 code in Genesis/Jemu2 but that also did not solve it. A couple of days ago I found a TI89 emulator for Android (also a 68000 system), but after some reverse engineering I found out that they used some clever native calls to a shared (so) file, so it is not a platform independent solution either. That, however, triggered another possibility of making a Java Web start solution with a native emulator embedded. The trouble with this is that it is almost the same as downloading some existing emulator for a particular platform. The final thing I tried was a conversion tool that translates C in Java, but this is not satisfactory as well.
The big challenge is that the M68000 is a very complex and errorprone processor to emulate, especially considering the fact that Java does not provide unsigned ints and pointers, so it is a quite mundane job to circumvent these problems. And debugging is a real tough job in this caseIt just seems that there isn't a good 68000 emulator for Java. And to be honest, my primary interest is not building a M68000 emulator.
I am not saying I give up, but if there are people out there willing to participate in this project, please join in making this project happen.
Dilwyn
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com
Re: Java Emulator
I discussed some bugs/omissions in the emulatorcode of m68k with the author. He was happy that actually somebody was digging into his code and suggesting improvements
He is writing an Amiga emulator, and will do the bugfixing, albeit not on short notice. In the meantime, I'll look for more errors. So, I'll be back...

-
- RWAP Master
- Posts: 2892
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: Java Emulator
Keep up the excellent work - I can offer my assistance in any way I can
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
Re: Java Emulator
I have extensive Java experience and /some/ QL emulation experience - If you need help for a specific problem, please go ahead and contact me - However, I'm lacking another important factor, which is time - So I can't promise immediate help in each and every case.
Cheers
tofro
Cheers
tofro
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Java Emulator
I have no experience of Java, but if I can help in any other way such as trying to find help on a particular topic or QL documentation, I am very happy to try to help.zeccie wrote:I discussed some bugs/omissions in the emulatorcode of m68k with the author. He was happy that actually somebody was digging into his code and suggesting improvementsHe is writing an Amiga emulator, and will do the bugfixing, albeit not on short notice. In the meantime, I'll look for more errors. So, I'll be back...
Please keep in touch and let us know how you are getting on. Several people have expressed an interest in this project!
Dilwyn
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com
Re: Java Emulator
Thanks for the support! I will be away on holiday in August, so I won't be back before September. By then, I think it would be worthwhile to make a kind of work breakdown structure with the focus first on the M68000 and then on the specific QL stuff