Oriculator (WIP)

Comments, problems, suggestions about Oric emulators (Euphoric, Mess, Amoric, etc...) it's the right place to ask. And don't hesitate to give your tips and tricks that help using these emulations in the best possible way on your favorite operating system.
User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Oriculator (WIP)

Post by Xeron » Mon Mar 23, 2009 12:45 pm

I decided to write a new Oric emulator entirely from scratch, simply to give me something to do on the train to work :-)

It is written purely in C, and uses SDL, so it will be possible to port it to loads of operating systems and devices.

Every part of the emulation is written from scratch, including 6502/AY/VIA, just because I always wanted to write a complete emulation.

It includes a very cool debugger/monitor, which will seriously kick ass when i've finished with it.

Current status:
6502: 100% done
VIA: Everything except shift register (don't worry, SR *will* be emulated)
AY: IO Port. No sound yet.
Tape: Not yet...
Disk: Not yet...


Some screenshots:
Image

Image
Last edited by Xeron on Thu Mar 26, 2009 7:49 am, edited 1 time in total.

Yicker
Pilot Officer
Posts: 86
Joined: Thu Jan 26, 2006 11:27 pm
Location: St. Helens, Merseyside, UK

Post by Yicker » Mon Mar 23, 2009 2:24 pm

Hi Xeron,

I definately like the idea of the debugger/monitor. Will be a great help with the M/C programs that I'm writing :-)

Will I be able to drag the screen to any size?

Well done.

Scott

User avatar
Dbug
Site Admin
Posts: 2370
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug » Mon Mar 23, 2009 7:31 pm

It looks very promising :)

For the debugger, I have a lot of ideas :D

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Wed Mar 25, 2009 11:52 am

I'm looking forward to this greatly too. The screenshot (if they are not just a mockup) look great.
What i'd love to see is..
The Debugger to (optionally) show a breakdown of AY registers(Unlike Caloric and Euphoric)
The Debugger to (optionally) show a matrix for the keyboard and give some visual flag for the currently selected column/row.
Complete emulation of the VIA.
Memory Dump facility to allow potentially 64K to be saved or loaded as a file(could be useful for testing emu without tape and disk)
Option to close tape file once loaded. Euphoric always held onto Tape file in order to support multi-loads but for development this is a pain.

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Post by Xeron » Wed Mar 25, 2009 1:53 pm

Twilighte wrote:I'm looking forward to this greatly too. The screenshot (if they are not just a mockup) look great.
Actual screenshots, not mockups :-)
The Debugger to (optionally) show a breakdown of AY registers(Unlike Caloric and Euphoric)
Already done (although sound is still not actually emulated).
The Debugger to (optionally) show a matrix for the keyboard and give some visual flag for the currently selected column/row.
Consider it on my todo list.
Complete emulation of the VIA.
Only the SR is missing, and I fully intend to put that in.
Memory Dump facility to allow potentially 64K to be saved or loaded as a file(could be useful for testing emu without tape and disk)
On my todo list.
Option to close tape file once loaded. Euphoric always held onto Tape file in order to support multi-loads but for development this is a pain.
I'm doing the tape stuff now. My emulator loads the whole tape image into RAM (for .TAP files).

If WAV files are large, i might read them in chunks, but i could easily close the file when the tape motor is off.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Wed Mar 25, 2009 6:38 pm

Xeron wrote:Actual screenshots, not mockups
Wow, do you have HIRES working too?

Other wish list items
1)Emulate the blur and oblong pixels found on real orics when used on a TV set.

1.1)Emulate the 60/50Hz switch used on some old games for visual effects of explosions.

2)Another idea is to have a status bar at the bottom of the window to reflect hardware currently attached to the virtual machine like Tape file, Disk drives(with lights to show activity), lightpen, Joysticks(moving to show activity),Sync to Cas In mod(This is emulated in Euphoric) etc. For graphics i can possibly provide these :)

3)Fabrice added a second AY chip using that spare bit in 6522 port B to enable it. And other Oricians have also done this. It would be great if this was supported.

4)Realistic tape handling like TZX files on Spectrum. So that actual loading sound is provided and allows games like loneraider to sound the loading tune. If added as part of wish list item 2) could have a Cassette player style Play, Rewind, Previous Track, Next Track gfx.

5)A facility similar to Dosbox that allowed a session to be captured to an AVI but this time something a bit more standard.
Xeron wrote:If WAV files are large, i might read them in chunks, but i could easily close the file when the tape motor is off.
That reminds me, some visual indication of the cassette motor relay position would be cool. Not sure how many people used the remote on cassette recorders but i guess a must for multiloads?

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Post by Xeron » Wed Mar 25, 2009 11:33 pm

:-)
Image

Image

User avatar
Dbug
Site Admin
Posts: 2370
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug » Wed Mar 25, 2009 11:39 pm

Very nice :)

Do you think it would be easy to implement a "pal emulator" like in Caloric: http://caloric.anarcho.fr/screenshots.html ? (the effect with the dark horizontal lines and the slight horizontal bluring)

Would also be nice if you do that, to take the opportunity to implement an horizontal scaling, to have the 5:4 ratio of the real oric (pixels are not square on the oric, which is why the CIRCLE instruction gives elipses).

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Post by Xeron » Thu Mar 26, 2009 9:50 am

PAL emulation: Should be possible

Scaling: Sure, but only after i've added an OpenGL rendering mode, since scaling pixels 1/5th bigger would look terrible with simple scaling, and bicubic interpolation will add quite an overhead if i'm using the CPU ;-)

Both things are waaaaaay down the list. First of all I want to get the emulation working properly.

I'm having some weird problems with my tape emulation, though. I'm having to insert about 6 sync pulses per byte instead of 4 (tuning the timings seems to make no difference), also i have to insert an extra $16 byte at the start of the TAP file. But i'm confused how TAP files could ever work withoug that; stepping over the ROM code, it seems to find the first $16, THEN try and read 3 more!

I want to get tape emulation tied up before tackling sound and disk.

User avatar
Symoon
Archivist
Posts: 1169
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Post by Symoon » Thu Mar 26, 2009 6:48 pm

Xeron wrote:also i have to insert an extra $16 byte at the start of the TAP file. But i'm confused how TAP files could ever work withoug that; stepping over the ROM code, it seems to find the first $16, THEN try and read 3 more!
Yes indeed, see
http://forum.defence-force.org/viewtopic.php?t=63

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Post by Xeron » Thu Mar 26, 2009 7:32 pm

Well, i found a workaround for the inadequacies of the .TAP format when using "real" tape emulation. I insert an extra $16 at the start of the file when loading it.

Then, when the motor is switched off, if the next byte is a $16, i send a load of dummy $16s when the motor is re-started. This allows the Atmos welcome tape image to work, for example. Without my extra $16s, the second part is way past the measly 3 synchro bytes when the second part tries to load.

Of course, I *am* going to do a rom patch for faster .TAP loading, but i wanted an "authentic" mode, which now works great :-)

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Post by Xeron » Fri Mar 27, 2009 10:34 am

I started the ground work for sound emulation.

I put the basics in required to output sound, but since the AY emulation wasn't ready yet, I decided to mix in the (cycle exact) tape input. Result: Authentic tape noise from .TAP files :-)

Not really useful, but fun :-)

Of course, authentic tape noise from .WAV files (when i get around to wav support) will be even easier.

Obviously you'll have to disable turbotape to get tape noise with TAP files.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Fri Mar 27, 2009 10:37 pm

I know Dbug is aware of this engine, but it may assist you in developing more accurate AY emulation and remove the hastle of rendering it on Windows XP onwards which (in Euphoric) has caused no end of hastle trying to get it to sound reasonable..

http://leonard.oxg.free.fr/

This Leonard guy developed a YM emulator which was the Yamaha version of the AY chipset afaik.

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Post by Xeron » Tue Mar 31, 2009 7:44 pm

Even though its way to early, I decided to put a build of Oriculator online with some (minimal) documentation.

Please, don't report bugs or incompatibilities yet. Its too early for that :-) Just play with it and have fun...

Oriculator preview.

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

0.0.2

Post by Xeron » Mon Apr 06, 2009 7:52 pm

Just uploaded an update (0.0.2).

Made a first try at AY sound. Its rubbish, but all 3 voices are emulated. Consider sound a work in progress :-)

Other changes include a reduction in CPU usage, working blink attribute

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests