flat assembler
Message board for the users of flat assembler.

Index > OS Construction > OS-like game in development, FASM MBR examples appreciated

Goto page Previous  1, 2
Thread Post new topic Reply to topic

Joined: 01 Feb 2008
Posts: 93
Location: Silver Spring, MD
edfed wrote:
video ram = 1MB ==> if pixels are 32 bits leng, then, up to 256K pixels, then, 256*1000, it's more than the PS resolution, so, you can memorise more than one screen. to increase the speed. triple buffer???

sound ram = 512KB if the sound is CD quality, then, it will contain up to 6 seconds of sounds.

then, see the MEGADRIVE spec, the CPU runs at 19 MHZ, the GPU is very hard to progamm cause of the sprite model, only sprites are allowed, and see the result, sonic & knuckles 3, the better game on this console.

now, we have machines with 1GHz CPU, 512MB ram, and it's very slow... why??? ask it to the LAYERS constructors, as SUN, M$, BORLAND, ADOBE etc...
all these layers slow down the machines.

then, only one abstraction layer and directlly the asm layer will improve the performances of current machines.

Right, OSes Like Windows are designed for multi-tasking and other things that slow everything down dramatically, where as the PSX OS was designed just to run a game and do nothing else...so whatever game you're making, if the OS is designed just for the game itself, it should run very fast without much memory requirements...
Post 26 Mar 2008, 20:17
View user's profile Send private message Reply with quote

Joined: 20 Feb 2006
Posts: 4240
Location: 2018
i'm pretty sure that OS will die one day

why os if the boot lets place to a good application?
Post 26 Mar 2008, 21:15
View user's profile Send private message Visit poster's website Reply with quote

Joined: 16 Dec 2008
Posts: 1159
For multi-tasking, apparently. But then again, hypervisors fill that role more efficiently.
Post 01 Aug 2009, 02:06
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote

Joined: 03 Apr 2011
Posts: 4903
Make a Germ chase Row Col Flee/Chase balls to Get in DNA Kode http://www.members.tripod.com/cpu_bios/OUTPUT.WPP Make it in WackyPlusPlus W++ WALCULUS
Post 23 Aug 2012, 13:28
View user's profile Send private message Reply with quote

Joined: 19 Oct 2011
Posts: 117
Location: Germany Hamburg
It is not a problem to use the (E)SP register as a placeholder for temporarly values.
Beginning with to store the value of the (E)SP register into a specified ram location,
using the (E)SP-register for to temporarly place some values inside and if we done,
then we have to reload the (E)SP-register with our stored value from our specified ram location.
While we using the (E)SP-register for other things we canĀ“t use our stack, example for to push/pop values or for to calljump into a subroutine.
(For to prevent of uncalculating behaviors if the stackpointer let push values far outside of our stack.)
Additional we can use temporary unused segment registers in the same wise and the first 4 debug registers can also be used as a placeholder for values (and/or for to prevent to debug the code).


It is possible to write a bresenham line routine without to store interim results of our calculation into the lazy ram using only cpu registers at runtime instead.
(It is not the first posting, please scroll down this page.)

This routine is written for to use the linear framebuffer with an 8 Bit color mode using 255 colors and for using the 16 bit Unrealmode/Big-Realmode.
And this line routine use a table of startadresses of each horizontal line of the screen and this table starts at the beginning of our data segment.
With this table we can use the Y-corrdinate (exacly a muliple of this value related of the addresssize of each entry/record in this table) as an index inside of the table to get the line address of the framebuffer.

Additional we have only to add the X coordinate
(or a mutilple of this value ralated on how many bits per pixel we are using, if we modify the code for to use 16 bits or 24/32 bits per pixel.
Note for to modifying this code: There are more than only one mov-operation to write a pixel to the framebuffer).

Post 24 Aug 2012, 06:42
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.