Floppy Partionning system

All discussions related to the DCPU and in game hardware (equipment, vehicles)

Floppy Partionning system

Postby lamogui » Sun Nov 03, 2013 2:01 pm

Hello guys :P

I wanted to answer the question :
How the cpu get suddenly a program inside his ram ?


I wanted to implement a kind of bios inside the cpu, the goal of this bios is to found Floppy Drives (or other drives) and boot from it.
So for this we need a solid partionning sytem of the floppy.

I wanted to make something similar to the master boot record of a hard drive (my expermentations are visibles here : https://github.com/Zardoz89/dcpu_vm ). But the sector of a floppy in 0x10c "official specs" size 1024 bytes (512 word). So the systems are completely imcompatibles ! (real floppy have sectors which size 512 bytes !)

Then i think we need to completely re-invent the partionning sytem...
It must provide :
1 partition that contains the boot program (if the floppy have one)
1 partition that contains the table of the files
1 partition that contains the datas of the files

The sector 0 will contains all informations abouts the partitions

To be simple : 1 cluster = 1 sector = 512 words = 1024 bytes

Boot partition :
The sectors of this partition are copied into the address 0x0 (for maximum compatibility) by the bios at startup

Table partition :
I'm thinking about something as simple as possible each sector of this partition represent a folder, a folder or a file are described by 32 words (64bytes) :

Code: Select all
| 0x0 - 0x28 : File/folder name null terminated | 0x29 real size of the file in words | 0x30 first sector of the file | 0x31 last sector of the file|


if 0x0 = 0 then the file/folder is not allocated (the space is free)
0x29 = 0 if it's a folder
If its a folder 0x30 = 0x31
A folder sector will contains maximum : 16 files or folders
The first item will be the parent folder, so the real maximum will be 15 files or folders

Data partition :
Will just contains the datas described by the table partition


I have also an other idea to fix the size of a file (it's much simple for the programmer), so a file will always size X sectors on the disc whatever that's real size
But the problem is : which size given to the file ? -> make 3 types of files : big X sectors, medium, Y sectors, Z sectors but at this point we return to the original problem...

I have never created partion system before so may be i'm wrong :D so i wait your remarks !
please correct my english errors
lamogui
 
Posts: 42
Joined: Mon Aug 19, 2013 5:33 pm

Re: Floppy Partionning system

Postby VladVP » Sun Nov 03, 2013 2:11 pm

Couldn't we just have an obligatory ROM drive with every cpu, which contains a BIOS that copies everything from the first non-empty storage unit into RAM? (And a boot screen where you can hit F12 to select a specific storage unit connected to the CPU.)
VladVP
 
Posts: 95
Joined: Fri Nov 01, 2013 8:31 pm

Re: Floppy Partionning system

Postby DarkSpartan » Mon Nov 04, 2013 2:55 am

VladVP wrote:Couldn't we just have an obligatory ROM drive with every cpu, which contains a BIOS that copies everything from the first non-empty storage unit into RAM? (And a boot screen where you can hit F12 to select a specific storage unit connected to the CPU.)


Because that would make sense, and mimic the way a real computer would operate. As for the DCPU spec...
DarkSpartan
Lead Designer
 
Posts: 100
Joined: Mon Aug 12, 2013 10:45 pm

Re: Floppy Partionning system

Postby VladVP » Mon Nov 04, 2013 6:23 am

DarkSpartan wrote:
VladVP wrote:Couldn't we just have an obligatory ROM drive with every cpu, which contains a BIOS that copies everything from the first non-empty storage unit into RAM? (And a boot screen where you can hit F12 to select a specific storage unit connected to the CPU.)


Because that would make sense, and mimic the way a real computer would operate. As for the DCPU spec...


According to Wikipedia the BIOS was invented in 1975, and has become de facto standard in the 80's... and as far as I'm aware, 0x10ᶜ was supposed to use 80's technology, right?
VladVP
 
Posts: 95
Joined: Fri Nov 01, 2013 8:31 pm

Re: Floppy Partionning system

Postby Zardoz » Mon Nov 04, 2013 3:09 pm

In Amiga computer (80's computer), like in the Atari ST, the BIOS contains a a partial or full OS, so the y bots at lighting speed (boots more faster that any modern computer!)

If you take a look to the RC3200 based computer, it haves a 64KiB for BIOS and basic OS and/or BASIC interpreter.
Yep, I have a blog : http://zardoz.es
Emulator DCPU-16 VM
User avatar
Zardoz
 
Posts: 359
Joined: Mon Aug 12, 2013 8:54 pm
Location: Spain

Re: Floppy Partionning system

Postby lamogui » Mon Nov 04, 2013 5:19 pm

VladVP wrote:Couldn't we just have an obligatory ROM drive with every cpu, which contains a BIOS that copies everything from the first non-empty storage unit into RAM? (And a boot screen where you can hit F12 to select a specific storage unit connected to the CPU.)


That's the actual idea !
but the question concern how the informations will be organized inside the floppy... And this question is not specific to the boot but also with filemanagement with the floppy...
please correct my english errors
lamogui
 
Posts: 42
Joined: Mon Aug 19, 2013 5:33 pm

Re: Floppy Partionning system

Postby Krarl » Mon Nov 04, 2013 5:25 pm

Can't we just have it so it just starts running the first bytes, and let the OS handle file systems etc?
Krarl
 
Posts: 86
Joined: Tue Aug 13, 2013 5:39 pm
Location: Sweden

Re: Floppy Partionning system

Postby VladVP » Mon Nov 04, 2013 7:21 pm

Yeah! What's wrong with just assuming that the programmer put a bootloader in the first sector, and copy that entire sector into RAM? It's as simple as that! Why does the BIOS suddenly have to handle file systems?
VladVP
 
Posts: 95
Joined: Fri Nov 01, 2013 8:31 pm

Re: Floppy Partionning system

Postby Zardoz » Mon Nov 04, 2013 9:17 pm

Dont have to handle filesystems. Actually a PC BIOS search for a boot sector in a hard disk or floppy, in addition of doing a lot more things. But If you get a ROM chip, why not fill it with useful routines and some more advanced boot code that simply search the boot sector of a floppy that can or can't be plugged.
Yep, I have a blog : http://zardoz.es
Emulator DCPU-16 VM
User avatar
Zardoz
 
Posts: 359
Joined: Mon Aug 12, 2013 8:54 pm
Location: Spain

Re: Floppy Partionning system

Postby lamogui » Tue Nov 05, 2013 5:09 pm

VladVP wrote:Yeah! What's wrong with just assuming that the programmer put a bootloader in the first sector, and copy that entire sector into RAM? It's as simple as that! Why does the BIOS suddenly have to handle file systems?


This is limiting the size of the program to 512 words !
please correct my english errors
lamogui
 
Posts: 42
Joined: Mon Aug 19, 2013 5:33 pm

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 2 guests

cron