CoolFace
Datasetpublic

hschumann2/TempleOS-Source-Code

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes838downloads
StdTempleOSPC.txt209 linesDownload Raw Back to Doc
1 2                            The Standard TempleOS PC3 4All desktop PCs will have 8-channel OCTART super-simple high speed serial ports5to replace USB.  They are simpler because the driver is as simple as old school6RS232 Serial, they have no USB end-points and they have no USB human interface7device reports.  Computer mice will all have exactly two bttns and one wheel.8Game controllers will all be the standard deluxe game console controllers that9are popular today.  It will have 8 big TX and 8 big RX fifos that allow flow10control characters to jump the queue.  It should be locked-down to as few11options as possible, like 8-1-N only, although hardware may use a USB frame, not12an RS232, so stop bits might not be relevant.  Perhaps, just two baud rates --13high and low speed are needed.  Low speed is good for slow microcontrollers and14allows longer cable length.  Keyboard, mouse and game controller can be low15speed.16 17The USB creators banned generic devices, requiring a signed, certified driver18for everything!  That's no good.  We allow any device and will communicate,19generically, using a serial terminal program like the old school HyperTerminal,20XTalk or Telnet.21 22A mouse packet interface should be similar to this:23 24     TX:        <ENTER>25     RX:        X:+3 Y:+0 Wheel:+0 LB:OFF RB:OFF26     TX:        <ENTER>27     RX:        X:+0 Y:-1 Wheel:+0 LB:ON  RB:OFF28 29We aspire to be as simple as a Commodore 64 joystick driver:30 31     VAL=PEEK(56321)32     if VAL AND 1 THEN y=y-133     if VAL AND 2 THEN y=y+134     if VAL AND 4 THEN x=x-135     if VAL AND 8 THEN x=x+136 37The game controller will be more complicated, but much simpler than USB.  It38will use a standard text packet of some kind.39 40On the other end, you might hook-up a thermostat microcontroller and interface41as a generic serial device.  The microcontroller in the thermostat would have42something simple, not a crazy overkill ethernet connection.43 44     U8 b;45     while (TRUE) {46       b=ReadU8(2); //Read byte from high speed serial channel 2.47     //(Has been configured for low baud because thermostat should be slow.)48       if (b==CMD_UP)49         temperature++;50       else if (b==CMD_DOWN)51         temperature--;52     }53 54Super-simple block devices will replace ATA/ATAPI hard drives and55CD/DVD/BlueRays.  Today, the industry is in flux with nonvolitile memory just56invented.  We want a super-simple block device interface for non-volitile memory57and for what is currently USB memory sticks, but only if they can be made58without bad blocks.  I don't think we want to deal with bad block memory, so59maybe we will not do NV-memory.  The standard TempleOS desktop will require a60hard disk.61 62There will be minimal commands:  READ_BLOCK, WRITE_BLOCK, GET_CAPACITY,63GET_MODEL, GET_SERIAL_NUM, and EJECT.64 65We want a CPU mode with virtual IO port addresses similar to how paging creates66virtual memory addresses.  We want a 65536 word look-up table that converts67virtual IO port numbers to physical IO port numbers.  There will be a standard68IO port configuration, so port numbers can be fixed in the code.  We want the69primary hard drive on one set of ports and the primary CD/DVD/Blu-ray on another70set of ports.  Choose a contiguous set of IO ports.71 72Meanwhile, a complicated PCI interface can be designed along-side the TempleOS73interface for Windows and Linux.  It would almost be possible to carry-on74separate lives, however, the super-simple serial requires getting rid of USB75since super-simple serial is a new hardware standard.  People can add USB ports76with a PCI device card.77 78God said He wants single-voice 8-bit signed MIDI-like sample for the sound.  God79does not want death screams, perhaps, because God has PTSD or soldiers have80PTSD.  (Imagine wounded on battlefields.)81 82The video will be a linear frame buffer 640x480 16 color with one-byte-per-pixel83even though it is only 16 color with is 4-bit.  Perhaps, we have a interrupt to84sync with the refresh.85 86I am tmpted to help amateur hardware device designers by making the hardware87interface for the PC simple.  I have fond memories of 1993, when I made a88wire-wrapped ISA data acquisition card which plugged into my 486 and had some89analog-to-digital and digital-to-analog convertors.  I am not designing a bus.90Earlier, I said the super-simple high speed serial port replacement could be91USB-like in hardware as long as the software driver interface was simple like92old school RS232 serial ports.  Requiring a complicated hardware handshake93raises the bar, slightly, for the lowest level hardware designers.  Most people94will be connecting a microcontroller or something that already has a serial95communication design, but if it's not a problem, maybe we should keep it simple96at all stages.  It was nice putting an oscilloscope on my serial port wires.97 98The original PC had general purpose digital IO through the parallel port.  That99was fun.  I have enough battles to fight, so I'll leave being a savior to100hobbiest hardware engineers to somebody else.101 102Digital cameras will be super-simple high speed serial, but TempleOS is forever103limited to 16 colors and multimedia is banned because large files being loaded104into memory fragments memory, so cameras are somewhat unwelcome.  I have enough105problems without making the Brits anxious about autonomous gun turrets and106killer robots.  The reason I say cameras will be super-simple serial is because107we are replacing USB ports with super-simple serial.  Windows/Linux will have108only super-simple serial ports unless people buy a USB PCI expansion card.  So,109the digital cameras will be super-simple serial.110 111 112                                  Version 1.0113 114We will make a spec for a $8,000, perfectly standardized, cryogenically-cooled,115monster desktop PC.  It will have 16 cores, integrated 4K graphics, and,116hopefully, 6 Ghz continuous operation.  Perhaps, 64 Gig of RAM will be standard?117God said to help to poor buy them.  It is pointless to have a high powered118machine if other people have wimpy machines and cannot run programs you write.119Therefore, everybody in the developed world will buy a Standard TempleOS IBM PC120over the next ten years, so that will be a quantity of 400 million, perhaps.121God said to pay the US national debt with the revenue.  We will standardize122everything, not just the TempleOS related items.  The display will be 4K (and of123course 640x480 16 color) and no others.  Everybody gets just one monitor, unless124you buy special PCI cards.  Everybody gets two speakers, a headphone, a mic, a125webcam and touch scrn.  We make the audio one sample rate and one sample size,126but TempleOS still gets just a square wave.  (HD Audio is really screwed-up and127requires complicated artificial intelligence, just to route output to speakers.)128 129The Standard Temple IBM PC will be a full-sized tower.  Perhaps, stain-glass130will decorate the case because God is sentimentally attached to stained-glass.131We should set the size at exactly 2.5 feet by 1.5 feet by 1.5 feet as in the132Exodus,25:10-10 for all time.  If there is extra room, make a storage shelf for133DVDs.  We do not want a race-to-the-bottom, shrinking the size.  Instead of134making it smaller, make it more powerful.  We want to remove all cost pressure135from making things small.  It must have a CD/DVD/Blu-ray drive.  The vision is136CD/DVDs used for a library of games, not installed on the hard-drive.  We need a137network connection, possibly implemented as a super-simple high speed serial138device.  What about standard monitor and speakers?  The C64's success was139partially due to wide spread, completely standard, hardware.  I think TempleOS140will not do bad block devices, so we need a hard drive, not just NV-memory or141SSD.142 143TempleOS will have the priority over Windows or Linux on hardware decisions.  We144could make it heterogenious multicore.  I think we want 16 non-hyperthreaded145cores.  Core#0 is the only full-featured core needed.  The other cores will have146long mode, but not some of these: real mode, protected mode, ring-3, paging,147interrupts, in/out port instructions, SSE instructions,  MMX instructions.  This148Graphics Job is what to optimize for.149 150God said Intel should do a simulation of heat produced by gates and try151spreading-out the heat producing gate circuits on the chip.152 153God said Linux's Wine should replace Windows.  We will install a standard154software set-up on all Standard Temple IBM PC's.155 156 157                                     Usage158 159TempleOS is primarily for user developers, like the Commodore 64 was.  I created160a total of 50 Meg of content over ten years, so you shouldn't need much room,161either.  The installed hard drive space should stay small because the resolution162is low, multimedia is banned, 3rd party libraries are banned, and applications163can be distributed with ISO files or DVDs.164 165The ROM will have a command that copies the ROM onto the hard drive, creating166identical C and D partitions, so you can have fun modifying TempleOS.  You will167have confidence you can fix it easily if you break it.  It should be able to run168everything from just the ROM, too.  You will need to specify a /Home directory169that is not in the ROM, but on the hard drive.170 171The standard set-up will be a C primary drive and a D back-up drive.  Keep the172size on each hard drive under 512 Meg and periodically copy all of C to D, so173they stay mirrored.  The file manager and other programs read the entire174directory structures, so too many files causes problems (unbearably slow).175Third party software should be distributed as ISO files or DVDs, like176TextAdventure.ISO.  No 3rd party libraries are permitted because they circumvent177the intent of the 100,000 line of code limit which is keeping it cognatively178small enough to see the light at the end of the tunnel and easily master179everything.  Therefore, 3rd party ISO files must bring all required software180components with them, except what is found in the TempleOS ROM.181 182Having all your 3rd party software on separate DVDs or ISO files and TempleOS183running from a ROM, keeps it delightfully simple so you have complete184understanding of what is going on.  You will have complete confidence and it185will be a joy to use.  3rd party applications can store saved data files into186your /Home hard drive directory.187 188The Temple PC will stay unchanged for seven years at a time.  The Bible speaks189of a seven year release in Deuteronomy,15:1.  The Commodore stayed unchanged for190many years and people became intimately familiar with every aspect.191 192 193 194I thought 2.5' x 1.5' x 1.5' was ridiculously big, but it looks like it is195reasonable for super-cooled refrigeration systems!196 197 198                                  Version 2.0199 200 201 202The Standard Temple IBM PC V2.0 will be released seven years after V1.0.  Each203unit will have a full, uncut, silicon wafer.  V2.0 will be sold, unchanged, for204seven more years, like a Commodore 64.205 206* "Commodore 64" is a trademark owned by Polabe Holding NV.207* "Linux" is a trademark owned by Linus Torvalds.208* "Windows" is a trademark owned by MicroSoft Corp.209