Page 1 of 1

MT86 v0.11.9.11 floppy image

Posted: Sun Sep 11, 2011 5:00 pm
by miker00lz
EDIT: i forgot to mention how to switch between terminals, although it's explained in the help "feature" of the shell. it's ctrl-alt-F# just like in linux. this of course makes it a problem to use if using an emulator under linux. in QEMU, you can use the "sendkey" command in the QEMU monitor.

if anybody wants to try what i've got done of my real-mode multi-tasking OS, here's a 1.44 MB floppy image:

http://rubbermallet.org/mt86-0.11.9.11.img

it has a shell, and supports FAT12 and FAT16 filesystems. there are a few binaries that can be executed. it automatically runs shells on terminals 1 to 4. the shell is very basic, run help for info. it can't even list a directory yet.

Image



you can run "exec plasma.bin" to see the animated plasma demo...

Image

i have some kind of bug when i fork processes though, it seems to kinda break the parent shell after you execute a couple new forks. MT86 will work on real hardware but it reads files slow because i'm not caching the FAT yet. :?

Re: MT86 v0.11.9.11 floppy image

Posted: Sun Sep 11, 2011 5:34 pm
by piranha
I get this when I try to kill process 4:
qemu: fatal: Trying to execute code outside RAM or ROM at 0x000a0000

EAX=00008617 EBX=00000002 ECX=0000006a EDX=00009375
ESI=000001a2 EDI=00000000 EBP=0000ffda ESP=0000fede
EIP=00018713 EFL=00002002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =7327 00073270 0000ffff 00009300
CS =878a 000878a0 0000ffff 00009b00
SS =2000 00020000 0000ffff 00009300
DS =1000 00010000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT= 000fce38 00000037
IDT= 00000000 000003ff
CR0=00000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000
DR6=ffff0ff0 DR7=00000400
CCS=00008617 CCD=000086dd CCO=ADDB
EFER=0000000000000000
FCW=037f FSW=3800 [ST=7] FTW=80 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=c0dbce0000000000 bfc2
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
Aborted
When I try to kill process 3 it works, but when I kill 1 or 2, it just freezes. If I kill process 0, the textmode cursor returns to 0,0 and then it freezes. If I pass kill a non-numeric argument it freezes. If I try to execute a program that doesn't exist, it displays "File fd0:/file not found" or something, and then freezes. I'm using Qemu 0.14.1 (oh, I should update...)

It looks nice, some bugs to clear up, but its a good start. The plasma program looks cool.

-JL

Re: MT86 v0.11.9.11 floppy image

Posted: Sun Sep 11, 2011 8:32 pm
by miker00lz
strange bug, i am able to reproduce it too. thanks. yes, it's just getting started as an OS. i probably released this floppy image way too early. but i was eager to get a little feedback.

i have a feeling my memory management might be a bit messed up.

Re: MT86 v0.11.9.11 floppy image

Posted: Tue Sep 13, 2011 11:41 pm
by miker00lz
interestingly, in the emulator i wrote myself (fake86, where i do almost all of my testing) and on real hardware (have tried an 8088, a 286, a 386, a 486, and a pentium -- am i strange for owning all of those??) i have no problems killing any process at all. it all functions properly. working on real hardware, i suspect it's a QEMU peculiarily.

killing process 0, i expect to cause goofiness since its the kernel. i need to just not allow killing PID 0 from the shell. and passing a non-numeric argument causes the same behavior since i'm simply using atoi() and it'll parse as "0" :wink:

the does not recognize a string as a parameter. (yet)

MT86 will get way more interesting once i drop in my TCP/IP stack, and have some kind of networking software. i think i will start with an IRC client. my friend wrote a nice one for DOS in C that should be pretty easy to port to MT86.

Re: MT86 v0.11.9.11 floppy image

Posted: Tue Sep 13, 2011 11:53 pm
by miker00lz
i guess what i can take away from the QEMU error is that on killing one of the processes, it is temporarily executing some code up in VGA RAM. it's probably all opcode 0's (one of the ADD instructions) up there, but that's definitely not good. i need to look at my process clean-up code i suppose. if there happens to be something other than 0's where it executes, something bad could happen.

you've gotta be extra careful with what's executed in real mode of course, since any process could totally lock the system and the kernel can't do a thing about it.

i could make a process that just runs CLI, HLT for example. :wink:

Re: MT86 v0.11.9.11 floppy image

Posted: Wed Sep 14, 2011 1:36 am
by Chandra
Hey, is your OS supposed to run under your own emulator? That's cool. Is the emulator(Fake86) self hosted?

Re: MT86 v0.11.9.11 floppy image

Posted: Wed Sep 14, 2011 11:46 am
by miker00lz
Chandra wrote:Hey, is your OS supposed to run under your own emulator? That's cool. Is the emulator(Fake86) self hosted?
yeah, it runs great under my emulator. :)

no it's not self-hosted though. the emulator is real-mode only for the guest environment, and needs a 32-bit host. i haven't taken the protected-mode plunge yet. it runs Wolf3D great though, so i am happy for the moment! http://www.youtube.com/watch?v=GIgcIgz-EQ4
ignore the sound, youtube made it sound extremely "wobbly".

i have actually made a very stripped down 16-bit version of the emulator, and that runs on my IBM XT and it runs inside fake86 (and compiles inside of using Turbo C++ 3.0!) but of course that's very different from the real version.

Re: MT86 v0.11.9.11 floppy image

Posted: Thu Nov 03, 2011 9:46 am
by JuEeHa
Pretty cool. I would like to see the source code. Is it available anywhere?