Author Topic: FutureOS corner  (Read 84608 times)

0 Members and 1 Guest are viewing this topic.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: FutureOS corner
« Reply #200 on: 00:28, 08 October 12 »
On 6128, the data read during the IN A, (C) is FF. Playing with the logic analyser threshold, you can observe that the bus is floating and as weakly pulled up quickly goes from 0x78 to 0xFF. Z80 reads 0xFF
In case the Z80 reads &FF the routine should exit (recognizes, that there is no mouse) and the system should run fine (no lock up).
 
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline 00WReX

  • 6128 Plus
  • ******
  • Posts: 687
  • Country: au
  • The time you enjoy wasting is not wasted time.
    • index.php?action=treasury
    • CPCwiki
  • Liked: 394
  • Likes Given: 902
Re: FutureOS corner
« Reply #201 on: 00:32, 08 October 12 »
Hi TFM,
 
I am happy to perform any testing you require, but Gerald is the man for the Logic Analyser stuff  ;)
 
Cheers,
Shane
The CPC in Australia...
Awa - CPCWiki

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: FutureOS corner
« Reply #202 on: 00:34, 08 October 12 »
Great. I intend to upload on update of the OS soon, but asselbling always take hours, because I have to adapt a lot of direct addresses.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Online robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.279
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1015
  • Likes Given: 2384
Re: FutureOS corner
« Reply #203 on: 01:46, 08 October 12 »
Nice team work!


And on top of that we learnt something new about or beloved CPC, hehe  8)

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.335
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2261
  • Likes Given: 3478
Re: FutureOS corner
« Reply #204 on: 11:12, 08 October 12 »
In case the Z80 reads &FF the routine should exit (recognizes, that there is no mouse) and the system should run fine (no lock up).
assumptions are not good ;)

But, I am really happy the answer was found :)
« Last Edit: 11:38, 08 October 12 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: FutureOS corner
« Reply #205 on: 19:35, 08 October 12 »
Maybe I understand where you driving at. However if you get a CPC, check its ports, see the unused are ususally &FF. Then you repeat it with some other CPCs - then you have a strong point for an assumption.
The problem is, once a while you have to assume some things. How could you run a program without assuming basic functionality of the system? The question is more where to draw the border. But that's getting philosophic now...  ;)
 
Well, yesterday I added some smaller OS functions to FutureOS. Now I intend to get the SPARtan bit working. Then I assemble and update the homepage (if there is no trouble).
 
« Last Edit: 19:38, 08 October 12 by TFM/FS »
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Online gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.452
  • Liked: 1013
  • Likes Given: 255
Re: FutureOS corner
« Reply #206 on: 21:20, 08 October 12 »
Well, a good practice is to assume that non driven port is unknown, even if hundred read always return the same value. The exception is when the official specification says it shall return 0xFF.

In fact it would be better to find a way to be sure an interface we intend to use is present, store this info and then use it when needed.
I know this is not trivial if the interface has not been designed that way. ::)

For this specific issue we can use the fact that read value is the last byte of the IN instruction. Follow it with and INI or IN with a different register target at the same port and check that the value is the last instruction byte or not.
If you get twice 0xFF you may assume the interface is not present (ok, except if the interface should return 0xff, but then the chosen port is not suitable for the test  :laugh: )
If you get last  byte of instruction, you also can conclude that the expected interface is not present.

Side note : if on all CPC  a non driven data bus is going to 0xFF after a motherboard specific time, we are just f....d-up as we may still get one exception where it would not be 0xFF nor the last instruction byte, but something between  :P

EDIT : typo
« Last Edit: 21:28, 08 October 12 by gerald »

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.335
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2261
  • Likes Given: 3478
Re: FutureOS corner
« Reply #207 on: 21:25, 08 October 12 »
@Gerald: You have told me how I can now detect cpcs with this type of bus :)
I will write a test soon.

in theory, if interrupt mode 2 was used, the value on the bus is the last byte of the instruction read?

is it more possible that the 8255 is the one which controls the floating bus?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Online gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.452
  • Liked: 1013
  • Likes Given: 255
Re: FutureOS corner
« Reply #208 on: 21:38, 08 October 12 »
@Gerald: You have told me how I can now detect cpcs with this type of bus :)
I will write a test soon.
If you do that,  you will save me some time  :D (Yes,I know I am lazy  :laugh: )

in theory, if interrupt mode 2 was used, the value on the bus is the last byte of the instruction read?
Only if the bus is not pulled up, like for the IN. In fact interrupt acknowledge is issuing some kind of IN when in mode 2 (M1 is low instead of high).

is it more possible that the 8255 is the one which controls the floating bus?
I cannot tell for sure. There is nothing on the schematic that can explain the pull-up on data bus.
A possible explanation is the TTL input pad leakage from all IC connected to that data bus. From one revision to an other, this may change.
Also, on plus, the ASIC may have bus keeper in its data pad. This would prevent the bus to change when not driven. Unfortunatly I do not have a scope to check this.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: FutureOS corner
« Reply #209 on: 23:04, 08 October 12 »
Well, a good practice is to assume that non driven port is unknown, even if hundred read always return the same value. The exception is when the official specification says it shall return 0xFF.
Well, IIRC then the specificatin does tell this :-D But I'm not 100% sure, because I can't remember exactly where I did read it. Amstrad Firmware manual?

In fact it would be better to find a way to be sure an interface we intend to use is present, store this info and then use it when needed.
I know this is not trivial if the interface has not been designed that way. ::)
What I do is to write the Millenium byte to the SF2 RTC and read it again, this can be done very quick. After that, a bit get's set (or reset) in the FutureOS configuraton bytes. So later on the application / OS must just check this bit. Shall work (now) that way.
 
EDIT: I'm not into hardware - period ;-) But the AY is connected to the PIO, which is connected to the Z80, which (for me) may could be a reason for the floating/nonfloating bus. ???
« Last Edit: 23:08, 08 October 12 by TFM/FS »
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Online Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.325
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 4008
  • Likes Given: 419
Re: FutureOS corner
« Reply #210 on: 23:50, 08 October 12 »
Which bus exactly is supposedly floating? I'd like to check the hardware, it seems very unlikely.

Bryce.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: FutureOS corner
« Reply #211 on: 04:03, 09 October 12 »
Carpe noctem.... I used the night and here it is: The update - And I really hope the bug in now corrected. Please let me know :)
 
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline 00WReX

  • 6128 Plus
  • ******
  • Posts: 687
  • Country: au
  • The time you enjoy wasting is not wasted time.
    • index.php?action=treasury
    • CPCwiki
  • Liked: 394
  • Likes Given: 902
Re: FutureOS corner
« Reply #212 on: 05:13, 09 October 12 »
YES...It works, excellent work TFM very nice indeed...well done.
 
So it now works on the MC0020I main board....probably just needs a + user to confirm, but looking very good so far.
 
Cheers,
Shane
The CPC in Australia...
Awa - CPCWiki

Offline 00WReX

  • 6128 Plus
  • ******
  • Posts: 687
  • Country: au
  • The time you enjoy wasting is not wasted time.
    • index.php?action=treasury
    • CPCwiki
  • Liked: 394
  • Likes Given: 902
Re: FutureOS corner
« Reply #213 on: 10:56, 09 October 12 »
Forgot to mention, great work by gerald with the logic analyser  :)
 
Cheers,
Shane
The CPC in Australia...
Awa - CPCWiki

Online gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.452
  • Liked: 1013
  • Likes Given: 255
Re: FutureOS corner
« Reply #214 on: 11:01, 09 October 12 »
New version is OK as well on my plus (MC0122C).


Online gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.452
  • Liked: 1013
  • Likes Given: 255
Re: FutureOS corner
« Reply #215 on: 11:02, 09 October 12 »
Which bus exactly is supposedly floating? I'd like to check the hardware, it seems very unlikely.

Z80 data bus when no IC is driving it

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: FutureOS corner
« Reply #216 on: 22:46, 09 October 12 »
Thank you all soooo much!!! I'm glad to hear that it runs. Let's see I try to assemble the Plus Version during the coming days, but today I started another experiment in the lab, which needs me to sit at the microscope 7-9 hours a day, so computing will get less effective. But your great help here is a strong source of motivation  :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 391
  • Likes Given: 60
Re: FutureOS corner
« Reply #217 on: 04:02, 10 October 12 »
in theory, if interrupt mode 2 was used, the value on the bus is the last byte of the instruction read?

What places data on the bus depends on which chips are selected at the time. The Z80 sets /M1 low and /IORQ, but it doesn't set the /RD line low, so, depending on the decoding logic in the hardware, so long as no device drives the data bus without the /RD signal low, the data present should be #FF. The Z80 actually waits for 4 complete cycles before reading the value on the data bus, so if there was any residual voltages from the previous device/memory access they should be well and truly gone.

Online gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.452
  • Liked: 1013
  • Likes Given: 255
Re: FutureOS corner
« Reply #218 on: 16:35, 11 October 12 »
What places data on the bus depends on which chips are selected at the time. The Z80 sets /M1 low and /IORQ, but it doesn't set the /RD line low, so, depending on the decoding logic in the hardware, so long as no device drives the data bus without the /RD signal low, the data present should be #FF. The Z80 actually waits for 4 complete cycles before reading the value on the data bus, so if there was any residual voltages from the previous device/memory access they should be well and truly gone.
Well, if no device is driving the bus, we are in the same situation as the IN : I would expect #FF only if the bus is pulled up.

Online Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.325
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 4008
  • Likes Given: 419
Re: FutureOS corner
« Reply #219 on: 17:13, 11 October 12 »
That's a bit of a design flaw. I would have expected at least a row of weak pull-ups somewhere on the board if no IC offers this internally, but it seems that the bus really could float in certain situations.

Bryce.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: FutureOS corner
« Reply #220 on: 19:13, 12 October 12 »
The work on the SPARtan idea continues fine. I hope to finish it today, so with some luck I will be able to post a new update soon, to show how it works. As usual a lot of things must be done to see small differences on the screen  ???
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: FutureOS corner
« Reply #221 on: 05:15, 13 October 12 »
Made it  :D

See attached file, new update of the OS (English only, nights are short ;-))

Now the SPARtan bit is working. To activate it:

- Install the new ROMs (at 10, 11, 12 and 13 dezimal)
- Go to the MON Icon
- Press D
- Enter &B96E
- Press E, then Copy, then enter "10"
- Press ESC and X, and you are back in the Desktop

Now you see. .... few icons only :P

By activating a drive (and press little Enter of Fire 2) the DIR Icon pops up, by activating the DIR icon (and press little Enter of Fire 2) the file icons pop up.
OK, Info, and Time/Date Icons are only shown when needed.
 

EDIT: I made a crappy Youtube-Video. GFX are much better on a real CPC.
Using the SPARtan Bit under FutureOS on Amstrad/Schneider CPC - YouTube
 
« Last Edit: 05:30, 13 October 12 by TFM/FS »
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 391
  • Likes Given: 60
Re: FutureOS corner
« Reply #222 on: 08:46, 16 October 12 »
Well, if no device is driving the bus, we are in the same situation as the IN : I would expect #FF only if the bus is pulled up.

Well, something pulls it up since the normal CPC/Z80 always provides #FF for an IN when no device is driving the bus. I was under the impression the Z80 ifself must have an internal pull-up on the buffer for the data bus, but I can't see any mention of it in the documentation. It may be possible to test the voltages on a Z80 simply connected to GND/+5V to determine their levels.

Online gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.452
  • Liked: 1013
  • Likes Given: 255
Re: FutureOS corner
« Reply #223 on: 10:33, 16 October 12 »
Well, something pulls it up since the normal CPC/Z80 always provides #FF for an IN when no device is driving the bus. I was under the impression the Z80 ifself must have an internal pull-up on the buffer for the data bus, but I can't see any mention of it in the documentation. It may be possible to test the voltages on a Z80 simply connected to GND/+5V to determine their levels.

You may not have read the full thead then :
Most CPC will return 0xFF, not all : FutureOS corner
At least some 6128 and 6128+ are not  ;)

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: FutureOS corner
« Reply #224 on: 22:47, 17 October 12 »
After 3 days only 1 download of that new FutureOS with the SPARtan bit... well, guess I wasted my time. First people suggest things, then they are probably not that much interrested. But so is life.
Now I guess it would be a good idea to change the arrangement of some icons, to reduce the chaos on screen when no drives is tagged, or no DIR is read(=buffered).
 
I already updated the Config-OS utility to be able to set / reset the SPARtan bit. The release will follow soon. I may change/update some smaller things too.
 
 
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus