Loci - my Oric storage emulation project

This is the right place to discuss on how to implement hardware vsync, adding a VIA or AY chipset, puting multiple roms, or how to design a new flash expansion card.
User avatar
Sodiumlightbaby
Flight Lieutenant
Posts: 481
Joined: Thu Feb 22, 2024 11:38 am

Re: Loci - my Oric storage emulation project

Post by Sodiumlightbaby »

Mustangus wrote: Fri Nov 01, 2024 6:08 pm Yep that was the xosc64 firmware
Ok, so if I assume it never booted before but did once with the xosc64, we might be on a possible track - let's try 128
https://github.com/sodiumlb/loci-firmwa ... osc128.uf2

For the spectators, this is just delaying the time before the clock circutry on the MCU starts using the clock.
User avatar
Chema
Game master
Posts: 3111
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Loci - my Oric storage emulation project

Post by Chema »

Just for the record, I just tested Loci with my Oric clone. As it has an EPROM, I simply removed it. Pressing the button booted into the Loci ROM with no issues and accessed the USB files, but I could not adjust RV1 to any valid value. Unfortunately, This board does not fit well in the Oric-1 case, and I kept on having hangs (probably shortcuts as I tried to flip the board to access the keys. I will give it a second try, but once I have it properly mounted.

The voltage regulator quickly became very hot, which is coherent with what I experienced before. Will try on my Atmos again with the new firmware.

EDIT: My Atmos does not like the new firmware. The action button does nothing. The reset button works.

EDIT2: Old version worked on my oric-clone perfectly when powered externally. No noticeable heat. Just removed the EPROM and there you go. No problems with RV1 whatsoever. It seemed a problem with the current draw.
Last edited by Chema on Fri Nov 01, 2024 8:26 pm, edited 1 time in total.
User avatar
Chema
Game master
Posts: 3111
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Loci - my Oric storage emulation project

Post by Chema »

More tests. I can confirm that, without the usb hub plugged in, the Oric does not get hot. Or not as hot as the other way round. It also seemed to me that, if powering Loci through the USB Hub, the Oric also kept warmer. Probably my old USB stick (with lights) draws too much current?

Isn't it possible to upload another rom to Loci? Such as the diagnose ROM or custom ROMs? I did not find the way to do so. I could install (i) dsk files in the internal memory, though.

Remember I am with firmware 0.1.25, but I noticed looooong delays when accessing the disk for reading after a write operation. This is quite noticeable in Blake's 7, as it saves the progress automatically and, just after that, the loading of data stalls for a couple of seconds or so, before going flawlessly again.

I also noticed the mounted disk image is not persistent, so if you do a reset it gets back to the oric ROM, instead of rebooting from disk. Not an issue, of course, but something that seemed a bit strange to me.
User avatar
Sodiumlightbaby
Flight Lieutenant
Posts: 481
Joined: Thu Feb 22, 2024 11:38 am

Re: Loci - my Oric storage emulation project

Post by Sodiumlightbaby »

Chema wrote: Fri Nov 01, 2024 8:19 pm More tests. I can confirm that, without the usb hub plugged in, the Oric does not get hot. Or not as hot as the other way round. It also seemed to me that, if powering Loci through the USB Hub, the Oric also kept warmer. Probably my old USB stick (with lights) draws too much current?
I belive you are on Rev 1.2 hardware with a bodge wire to override the broken USB power switch. If you turn on the Oric before the Hub, the EXT power switch will not detect the conflict and you may be runnnig the two power sources bridged. Things getting too warm would suggest this could be happening. Seeing this now, I would propose you only run one power source - the coolest one.
Chema wrote: Fri Nov 01, 2024 8:19 pm Isn't it possible to upload another rom to Loci? Such as the diagnose ROM or custom ROMs? I did not find the way to do so. I could install (i) dsk files in the internal memory, though.
We don't have random arbitrary support yet, but the latest firmware come with the Loci ROM and have the diagnostic ROM included - thanks to Mike Brown! Long press the action button should boot it instead of the Loci ROM.
The firmware will look for some ROM files on the USB drive, so if you want to try another Loci ROM just get the locirom.rp6502 file from the loci-rom github release.
Chema wrote: Fri Nov 01, 2024 8:19 pm Remember I am with firmware 0.1.25, but I noticed looooong delays when accessing the disk for reading after a write operation. This is quite noticeable in Blake's 7, as it saves the progress automatically and, just after that, the loading of data stalls for a couple of seconds or so, before going flawlessly again.
If this is with dsk on internal flash, yes it is incredible slow to write blocks to the LFS system. At the moment we keep current track accessed in RAM, flag it dirty when written to, then write the whole thing back. It will need some thinking on either the FS or the DSK side.
Chema wrote: Fri Nov 01, 2024 8:19 pm I also noticed the mounted disk image is not persistent, so if you do a reset it gets back to the oric ROM, instead of rebooting from disk. Not an issue, of course, but something that seemed a bit strange to me.
Not sure I understand what persistence you are looking for. There should be good persitence now for all situation except power cycling. Try upgrading to firmware 0.1.28.
User avatar
Chema
Game master
Posts: 3111
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Loci - my Oric storage emulation project

Post by Chema »

Thanks for your answers! I will follow your advice and power Loci externally before the Oric.

I am not sure if you read the first of my two posts: my Atmos did not like the new firmware. The action button did not have any effect. Of you want me to test anything else...

About the kind of persistence I expected, maybe it is a stupid thing. I loaded a game from a disk that contains several programs, then pressed the reset button and it booted to the Oric BASIC rom, not to the disk system (and the Dos). Had to enter the Loci rom and press ESc again, which was a bit weird.
User avatar
Sodiumlightbaby
Flight Lieutenant
Posts: 481
Joined: Thu Feb 22, 2024 11:38 am

Re: Loci - my Oric storage emulation project

Post by Sodiumlightbaby »

Chema wrote: Fri Nov 01, 2024 9:49 pm I am not sure if you read the first of my two posts: my Atmos did not like the new firmware. The action button did not have any effect. Of you want me to test anything else...
Ah, ok so that is with 0.1.28 - and similar behaviour as Mustangus has with his Oric-1. Very interesting.

Edit: What do you get on the OLED display when you push the action button first time after power-on? "IRQ trap on"?

Chema wrote: Fri Nov 01, 2024 9:49 pm About the kind of persistence I expected, maybe it is a stupid thing. I loaded a game from a disk that contains several programs, then pressed the reset button and it booted to the Oric BASIC rom, not to the disk system (and the Dos). Had to enter the Loci rom and press ESc again, which was a bit weird.
The reset button (not the action button) is a pure old-fashion Oric reset button with no modern magic behind it. Loci doesn't even see it. I guess you are expecting a reset button that also resets the disk system which maps in everything else for a fresh disk boot. Yeah, that's currently not possible unless we come up with some snooping or trapping magic.
User avatar
Chema
Game master
Posts: 3111
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Loci - my Oric storage emulation project

Post by Chema »

Sodiumlightbaby wrote: Fri Nov 01, 2024 9:58 pm
Ah, ok so that is with 0.1.28 - and similar behaviour as Mustangus has with his Oric-1. Very interesting.

Edit: What do you get on the OLED display when you push the action button first time after power-on? "IRQ trap on"?
Oh, unfortunately I put everything back in boxes. I will check as soon as possible. But yes, it seems the same behaviour. Remember my Oric is also one of those who needed some extra care to make the keyboard responsive.

The reset button (not the action button) is a pure old-fashion Oric reset button with no modern magic behind it. Loci doesn't even see it. I guess you are expecting a reset button that also resets the disk system which maps in everything else for a fresh disk boot. Yeah, that's currently not possible unless we come up with some snooping or trapping magic.
I see. It is not important at all. It was only that I am used to the "real" thing, where you press the reset and you get back to the disc system. Doing the same action and getting to BASIC, was something unexpected :) you could try to trap calls to vector fffc ... oh, never mind.

What could be cool is to be able to install custom roms. I would love to get e.g. dflat rom, put it in the Loci somehow and be able to select it from the rom menu. Do you think that would be feasible?
User avatar
Sodiumlightbaby
Flight Lieutenant
Posts: 481
Joined: Thu Feb 22, 2024 11:38 am

Re: Loci - my Oric storage emulation project

Post by Sodiumlightbaby »

Working a little blind with the issue seen by Mustangus and Chema on FW 0.1.27 & 28, but here is a release with some attemtps to increase robustness in related areas of the firmware.

https://github.com/sodiumlb/loci-firmwa ... ag/v0.1.29

Various experimental robustness improvement
main_state initialisation
I2C slew rate adjustment
I2C IO expander setup check
Extend XOSC delay multiplier to 64
Mustangus
Pilot Officer
Posts: 77
Joined: Wed Jun 22, 2016 5:37 pm

Re: Loci - my Oric storage emulation project

Post by Mustangus »

Still no luck :(. Works fine on Atmos but not the Oric 1.
User avatar
Sodiumlightbaby
Flight Lieutenant
Posts: 481
Joined: Thu Feb 22, 2024 11:38 am

Re: Loci - my Oric storage emulation project

Post by Sodiumlightbaby »

Mustangus wrote: Sat Nov 02, 2024 12:02 pm Still no luck :(. Works fine on Atmos but not the Oric 1.
Quite puzzling :? I may try adding some more debug output around this area to see if we can lock this down.

Meanwhile user manual work has started over on github.
https://github.com/sodiumlb/loci-hardwa ... ser-Manual
User avatar
Vyper68
Flying Officer
Posts: 183
Joined: Mon Sep 22, 2014 4:18 pm
Location: Hurworth, UK
Contact:

Re: Loci - my Oric storage emulation project

Post by Vyper68 »

Mustangus wrote: Sat Nov 02, 2024 12:02 pm Still no luck :(. Works fine on Atmos but not the Oric 1.
Is there any value looking at what make your CPU and VIA are on the problem Oric?
Oric Extended Basic V1.1
(C) 1983 Tangerine
37631 Bytes Free
User avatar
Sodiumlightbaby
Flight Lieutenant
Posts: 481
Joined: Thu Feb 22, 2024 11:38 am

Re: Loci - my Oric storage emulation project

Post by Sodiumlightbaby »

Vyper68 wrote: Sat Nov 02, 2024 2:25 pm Is there any value looking at what make your CPU and VIA are on the problem Oric?
I don't think so. The problem Oric was working with firmware v0.1.26 so while triggered by the hardware/BasicROM, I assume there is something iffy on the LOCI side we need to find.
Mustangus
Pilot Officer
Posts: 77
Joined: Wed Jun 22, 2016 5:37 pm

Re: Loci - my Oric storage emulation project

Post by Mustangus »

Ok i have had sort of some luck with getting the Loci to work with the Oric 1 16 and 48k. If i press the action button about half a second from switching the oric on i can mostly get it to goto the menu. From there i can select a game. I tried the tap version of scuba dive and the first time i tried it loaded slowly. But it did load. The second time it loaded fine but still had to press the action button after switching on the oric (Basicly before the basic screen came up). That was on the 48k oric 1. Now on the 16k Oric 1 timing was an issue, but i did get it to the menu screen. Loading scuba dive sometimes worked and sometimes didn't. Hope that helps abit. That was with version 1.27, 1.28 and 1.29.
User avatar
Sodiumlightbaby
Flight Lieutenant
Posts: 481
Joined: Thu Feb 22, 2024 11:38 am

Re: Loci - my Oric storage emulation project

Post by Sodiumlightbaby »

Oh, very interesting. Yes that helps a lot actually.
Mustangus
Pilot Officer
Posts: 77
Joined: Wed Jun 22, 2016 5:37 pm

Re: Loci - my Oric storage emulation project

Post by Mustangus »

Also. If i load a game and then press the reset button (the one under the action button) and then press the action button after the oric has reset the loci acts as normal.Untill you power down the oric via the plug/switch.
Post Reply