News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

3d moonlander w scrolling possible?

Started by daydreamer, April 16, 2025, 05:30:04 PM

Previous topic - Next topic

daydreamer

Hi
Inspired by old 8bit moonlander game I wonder if reading in real moon map and scroll it, while drawing a moonlander sprite+ old way of have shadow below sprite so player can see height over moon
But I have no knowledge of reading in a big bitmap 320 pixel wide and several hundred pixels height,because it's supposed to be scrolled thru

Gonna modify moon map with Mark landing places where you don't crash when touch the ground

I already have code,where I achieve copying 64k (scrolling) from almost 1MB memory

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

TimoVJL

Quote from: daydreamer on April 16, 2025, 05:30:04 PMI already have code,where I achieve copying 64k (scrolling) from almost 1MB memory
Without any code, just an empty talk ?
May the source be with you

bugthis

You would also need to write what graphics hardware you are aiming for.

If it's CGA, forget it.
If it's EGA, look at how scrolling was done in Commander Keen.
If it's standard VGA, look at Mode-X.
If it's VESA VBE (SVGA), then version 1.2 or better is mandatory.
And if you want 32 bit in Protected Mode, check out VESA VBE 2.0, which allows linear memory access and removes the 64 KiB window limitation.

daydreamer

I most need advice on reading in bitmap in dos
The current code is based on realise that segmented mode not necessarily need to be use it like bank switching,but 320 bytes line in mode 13h is evenly divided by 16, so decrease / increase a segment register from ram I copy landscape from = scroll up /down
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

bugthis

Quote from: daydreamer on April 17, 2025, 04:34:47 PMI most need advice on reading in bitmap in dos
Could you be more specific on this? What do you need, how the format looks like?
It's easy to figure out how the BMP file format is structured. There are plenty of resources online.

QuoteThe current code is based on realise that segmented mode not necessarily need to be use it like bank switching,but 320 bytes line in mode 13h is evenly divided by 16, so decrease / increase a segment register from ram I copy landscape from = scroll up /down
I'm not sure if I understood you correctly. But in mode 13h, the 64 KiB VRAM window has a fixed address, starting at 0xA000:0000. This address cannot be moved. Thus you can't move the 64 KiB VRAM window in mode 13h.

Take a look at this book. This might interest you:
Michael Abrash's Graphics Programming Black Book

To flexibly move a bank window to any 64 KB block you need VESA VBE 2.0

FORTRANS

Hi,

Quote from: daydreamer on April 17, 2025, 04:34:47 PMThe current code is based on realise that segmented mode not necessarily need to be use it like bank switching,but 320 bytes line in mode 13h is evenly divided by 16, so decrease / increase a segment register from ram I copy landscape from = scroll up /down

   As bugthis implied, since the Mode 13 video memory is less than 64kb,
you can address the entire screen without modifying a segment register.
If you use the string copy instructions, it is probably simpler to have
the segment register(s) point to the start of the video memory and just
use differing offsets in DI and SI.

Cheers,

Steve N.

daydreamer

Nobody looked at code it seems 
I use several 64kb ram below a000h where I write graphics to
I copy it from there to a000h simulate scrolling 
Source I use si register together with a segment register which I change segment register add ds,20h, Sub ds,20h, 20h = 320 pixels 
Example code to load data would be nice, so i get some nice moon surface instead of limited to draw graphics with code
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding