"Shut down the computer" freezes and "Reboot the computer" returns to the...
A lightweight 16-bit operating system
Brought to you by:
michalprochazka
"Shut down the computer" freezes and "Reboot the computer" returns to the initial "three tests" screen, at least if they have been skipped by "Backspace"
I tried to fix the reboot funcrion, but exactly is displayed when the shut down option crashes?
I just tested at your latest build and reboot function works okay, but "Shut down the computer" is simply stuck at the same screen after I press Enter - nothing changes, except that I can't exit this menu and do anything
Edited a bit of the shutdown code (and added a few debug prints), but after reading OSDev's opinion on APM (which is the shutdown interface that MichalOS uses), I am slowly starting to think about implementing ACPI, even if I know it's going to be a nightmare...
Here's the new build: https://drive.google.com/open?id=1pWeZejn9AUGLMYnTSDtGJCC6gxNk05qW
I have also replaced FONTEDIT.APP with a previous version, please see if it still works (the current FONTEDIT.APP (the one with the apply feature) was moved to FONTOLD.APP)
"Soft reboot the computer" is working! :) But "Shut down the computer" is not, and I'm seeing the following messages:
FONTEDIT.APP still could not save my changes :P And when I choose "Save as..." at its' menu, it seems to crash because I find myself at the main menu and could launch other apps
So your BIOS (coreboot) is telling MichalOS that it supports APM (all of the computers I've tested MichalOS on straight up say 'APM is not supported'), but then it crashes (the crash happens inside the BIOS code, because MichalOS has a failsafe when the BIOS returns from its shudown function (which should NEVER happen), it displays 'Error shutting down the computer.')
Not that it's coreboot's fault, APM on newer computers is either really buggy or it just doesn't work at all, so I'm working on an ACPI solution (which should work much better, and even supports things like telling the battery life, useful on laptops)
About the FONTEDIT issue: have you tried 'FONTOLD.APP' (on a USB stick)? (I know it's confusing, but FONTOLD is the new FONTEDIT that you have problems with)
It is strange that soft reboot is working while shutdown isn't ; I don't know if you are trying to do these things in two different ways, but could reboot's approach work for shutdown?
Sorry for late replies, I just tested FONTOLD.APP on a USB stick and it is not working properly there also: my imported symbol changes aren't applied to system font or saved. I think your first version was the most successful: despite it didn't apply the changes at system font at least it could save them. Right now even the FONTEDIT.APP (where you tried to revert the changes) could not save a symbol properly, regardless from where I load it (BIOS or USB)
It's OK, I'm also sometimes late with replies ;)
Yes, I'm using 2 different methods for reboot/shutdown. It's simple to do a reboot on an x86 system: when the CPU starts up, it starts executing code from memory location 0xFFFF:0x0000, which is the location of the BIOS's code for initializing the system. But nothing prevents you from jumping to the memory address manually, which triggers a system reinitialization (a reboot). However, with shutdown, it's not that simple. ACPI is the way to go nowadays, but that's very difficult to implement in an OS (I'm trying my best, hopefully can get it working for the 2.0 release).
Here's the thing: FONTEDIT.APP, the one that is currently on your flash drive, **is ** the first version. I think I somehow broke everything when trying to fix the memory issues. Let's try something else: open Text Editor, write some text, save it and see if the file actually saves, maybe the disk write function is broken?
Your Text Editor app successfully passes: the file is saved successfully and if I exit from Text Editor and launch it again I could open this file and see its' contents. Editing this file and saving it also works.
By the way I noticed the new .DRO files :) Although I don't know how to open them. It would be nice if you could announce the new files/programs so that I would notice them and could test.
Computers are very interesting :) Reboot and shutdown are quite similar things, but so different approach is needed
Alright, I did a little digging in my MichalOS backups and found the exact FONTEDIT.APP source file that you called "working", so I included it in this build.
About the DRO files: those are produced by DOSBox when you want to record AdLib music from DOS software. Music Player can play them.
Here's the current changelog that I tried to keep up with my progress since the 2.0 Beta 3 release:
Here's the image: https://drive.google.com/open?id=1fTdTQiqNtmlTp_l_bkEinS4GEQ85MGwR
Hope you have fun playing around :)
Hi Michal, very interesting but even this FONTEDIT.APP version could not save the changes - I don't know why. Also I opened a new ticket https://sourceforge.net/p/michalos/tickets/33/ - PLAYER.APP couldn't play the new MMF files with instruments
By the way, please could you upload the source code of MichalOS Beta 4 , like you did for the previous versions of MichalOS ? I just prefer that all the components attached to my bios are open source also :D
Last edit: Ivan Ivanov 2019-02-17
I have replied to ticket 33, I don't know if you run QEMU with AdLib enabled ("-soundhw adlib")...
MichalOS is (and will always be) open source, I usually release the source code when I officially release the OS (not for debug builds, I think it's unnecessary), but if it makes you feel better, I included it here as a zip file :)
https://drive.google.com/open?id=1w1oVecK4oyHnKo4BE97mTYxnvSlf6K8Z
Thank you very much ;) I just noticed you are calling it as Beta 4 already , so I thought maybe it's time to create a new " MichalOS 2.0 Beta 4 " folder with MichalOS.zip inside , here - https://sourceforge.net/projects/michalos/files/ . Also replied to you at ticket #33
Michal, please tell, is it okay to suggest to another OS author to take a look and maybe use the fragments of your mouse code? I know a couple of other hobby OS : TachyonOS and SnowdropOS, in TachyonOS it is working partially while at SnowdropOS it does not work at all - at least with my laptop's touchpad. But you managed to get it working perfectly ;-)
That's interesing, the mouse code in MichalOS is basically untouched (or I might have changed something a long time ago, I've worked on MichalOS for over 2 years now...), it just may be the way that MichalOS initializes (???)
Another interesing thing is that the mouse code works on my laptop's touchpad on the third time I launch MOUSE.APP. The first and second time, it just recognizes gibberish.
It's perfectly OK to recommend this to others, that why it's open source :-)
Just a small question: you tried shutdown the same way as they tried for MikeOS ? - https://groups.google.com/forum/#!msg/mikeos/6TIfE19eDi0/wduautGZCAAJ . If not, maybe we could try their way also, or it wouldn't work?
I'm using almost the same way, except that my code has some extra security checks and the code snippet you sent includes an extra command for setting the APM version to 1.2, so I added that to my code.
https://drive.google.com/open?id=1uW9kEOs67g0iENleNB7RExYxNnF_7Z7V
Sadly nothing changed :P
KolibriOS shuts down using ACPI, which is the thing I'm currently working on (please try running ACPI.APP and post the results, it should be 6 or more lines). Also, it's a full 32-bit protected mode OS and has very different memory layout than MichalOS, so a simple copy-paste wouldn't work.
Hehe, you forget to say when the new stuff appears ;-) I test ACPI.APP now and see these lines:
core means coreboot bios
Hi Ivan, sorry for the loooooong pause, it seems like I have been a bit distracted by other projects (learning AVR microcontrollers, one went up in smoke... whatever), but I finally started to work on MichalOS again ;)
I have modified the ACPI.APP program just a bit (it now shows the ACPI revision). Also, I'm starting to suspect the 32-bit memory access... again. Please go into MEMEDIT.APP, then type "ah0" and then "ah100000", and compare the results. They should not be identical.
If they are identical, then I'm sorry, but... this ticket will be impossible to resolve.
https://drive.google.com/open?id=16XFFpz9M0jcq6UiivlhrWknB7RK55kC1
Hi Michal, sorry it also took me so long to reply. Here is the new ACPI.APP output :
MEMEDIT.APP results:
ah0
00000000 62 C7 00 10 53 FF 00 F0 C3 E2 00 F0 53 FF 00 F0
ah100000
00000000 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
They are different, so it seems all good with 32-bit memory access,
and this ticket should be possible to resolve ;-)
Last edit: Ivan Ivanov 2019-03-31
MEMEDIT should show the memory address in the left column (ah0 is correct, but ah100000 should say 00100000 11 00 ...), so not everything is correct.
The first 3 ACPI reports seem real (segment 0xFxxx is a common location for ACPI, OEM ID makes sense and ACPI revision 2 exists), but the rest (pointer to RSDT could be real, but 16519 entries!? It should say 3-30...) is total garbage. There is also no reason MichalOS should crash in this application, it just reads stuff from RAM.
Let's try something: open MEMEDIT and type ahf5af0. You should see "RSD PTR" and "COREv4" in the right column. If it's there, please post a screenshot. I'll look into your ACPI table maybe figure out what's wrong.
Yes, I could see RSD PTR at this address - here is a screenshot (at the attachments)
Thank you for the screenshot. I just found out that when the ACPI version is 2 (which you have), the OS should use another pointer (which is located in the RSDP table) to continue. I've modified the ACPI.APP program to take care of this and hopefully, it will work.
https://drive.google.com/open?id=1vYYVF8XjYzglUZvQW5_P9Ka9xpUHLykZ
Now ACPI.APP gives really a lot of "Checking RSDT entry" lines. The last lines before it is stuck with a blinking _ :
("Checking RSDT entry" before each line)
...
000F073C
000007C0
00000000
00000000
00010000
0202F000
00000000
00000000
000F4E33
000EE08E
00006FE8
000EE303
00000000
00000000
00000000
00000055
000000FF
00005555
000055FF
0000AA55
0000AAFF
0000FF55
0000FFFF
_ <- blinking _