??? 09/09/04 15:41 Read: times |
#77141 - RE: Efficiency Responding to: ???'s previous message |
Craig Steiner wrote:
------------------------------- Yes, but I should imagine the OS (can we really call it an OS?) would be fully aware of what hardware it was connected to and read/write to it as efficiently as possible. Each of the chips should include an "ID" command so you don't need OS to tell what hardware you're working with. But OS should know that anyway. It seems that what we had gotten to was an OS API on the central 8052 that application programs would access. The actual OS would then do the work of farming out the operation to the appropriate external hardware I'd see the OS less like a "father over all the programs" and more like a bunch of library routines that make your life easier but can be thoroughly ignored if you wish so. Plus some kind of shell to allow loading software and can be disposed of when the program is loaded. I don't see this device being used outside of our little 8052 community so I don't think we're going to see some huge "game programmer" industry springing up. I for one would write some games for it, for sure :) I also don't think the programmer would gain much by ignoring the OS and doing it himself since the OS would, in the case of external hardware, mostly exist just to save the programmer the hassle of performing the off-chip communication himself. General solution is on average 3 times more complex than a specific solution. That applies to efficiency too. Instead of calling a routine scrolling a piece of screen from X to Y I scroll it from 0 to FF and save some 20 cycles which the routine wastes on boundary checks, and it just lets me fit within 1 vblank instead of 2, making the animation smooth. Circumventing the OS routines was about the most commonly used method of speeding things up. That's a valid point. But considering the old machines were 1.79 MHz and we could conceivably use a, what, 33-50 MIPS 8052 we'd have to do some insane code bloat to slow things down that much. You underestimate the speed at which bloat grows if you don't pay close attention. And, yes, I think we need to call it an OS. It needs to contain functionality to address some external storage, be it IDE hard drive or SD cards, and load/unload programs on demand. Load. Let the programs handle unloading themselves, just without making it any harder than it really needs to be. (and it's really easy.) :) I don't really understand how the flexibility to use different display devices will make it seem more like a computer. All it's got to do is plug into the telly and display 320*200 in 16 colours and it'll seem exactly like a computer. *256? Pleeeeze? :) |