VOGONS


First post, by llm

User metadata
Rank Member
Rank
Member

i just want to ask before starting reversing the UniVBE startup code myself

Do anyone know how UniVBE detects that its already loaded?

Reply 2 of 20, by llm

User metadata
Rank Member
Rank
Member

so i think i understand how it is done and started to develop a small VESA info utility that should also detect UniVBE in the end
im using VESA BIOS int 10h/4F00h https://github.com/cirosantilli/ralf-brown-in … NTERRUP.A#L5031

but i get strange VESA Information for some test-cases

1. this is the result of a vesa.exe run in dosbox-svn

dosbox-svn.png
Filename
dosbox-svn.png
File size
38.39 KiB
Views
1495 views
File license
Public domain

the above output is the result of asking for VESA Information using the signature "VESA"
that should give VBE 1.x information - according to the docs i've read

https://wiki.osdev.org/User:Omarrx024/VESA_Tutorial

Things that might be of interest to you from the above structure: "signature" will be changed from "VBE2" to "VESA". It must be "VBE2" on entry to indicate software support for VBE 2.0. If it contains "VBE2", the BIOS will return the 512 bytes of data for VBE 2.0+. If it contains "VESA", the BIOS will return 256 bytes of data for VBE 1.x. If it is not "VESA" after the call, you should assume that VESA BIOS Extensions are not available.

dosbox-svn points the OemStringPtr to some unitialized memory (red color)

but it works using "VBE2" as initial signature (green color)

2. this is the result of a vesa.exe run in VMWare FreeDOS

vmware_freedos.png
Filename
vmware_freedos.png
File size
39.11 KiB
Views
1495 views
File license
Public domain

as you can see the Memory size and versions seems to be correct
but the String are total crap

3. this a run with a installed UniVBE 5.3a + vesa.exe in dosbox-svn

dosbox-svn-univbe.png
Filename
dosbox-svn-univbe.png
File size
60.55 KiB
Views
1495 views
File license
Public domain

the strings are also total crap

i don't understand why it works for plain dosbox-svn but not for VMWare
or dosbox with UniVBE installed

any ideas?

this is my Borland C++ 3.1 Source code - maybe something is wrong with my ES:DI pointer

// Borland C++ 3.1
// build: path=C:\BORLANDC\BIN
// bcc -ms vesa.c

// based on:
// https://github.com/open-watcom/open-watcom-v2/blob/master/contrib/extender/dos32a/examples/c_5/vesa.c
// https://github.com/cirosantilli/ralf-brown-interrupt-list/blob/fde1a5ac1b7e8a45ff4255ee275ee77c7fe7e256/inter61a/INTERRUP.A#L5031

#include <dos.h>
#include <stdio.h>
#include <string.h>

#define STATIC_ASSERT(COND) {char static_assertion[(COND)?1:-1];}
#define OFFSETOF(type, field)((unsigned long) &(((type *) 0)->field))

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;

enum AskFor { VBE1, VBE2AndAbove };

#pragma pack(1)

struct vbeinfoblock {
char VbeSignature[4];
uint16_t VbeVersion;
char far* OemStringPtr;
uint32_t Capabilities;
uint16_t far* VideoModePtr;
uint16_t TotalMemory;
// VBE 2.x
uint16_t OemSoftwareRev;
char far* OemVendorNamePtr;
char far* OemProductNamePtr;
char far* OemProductRevPtr;
uint8_t Reserved1[222];
//22h WORD (if capabilities bit 3 set) VBE/AF version (BCD)
// 0100h for v1.0P
//24h DWORD (if capabilities bit 3 set) pointer to list of supported
// accelerated video modes (list of words terminated with FFFFh)
uint8_t OemData[256];
};

#pragma pack()

void print_vbe_info(struct vbeinfoblock* vib, enum AskFor ask_for)
{
printf(" VbeVersion: %.4s\n", vib->VbeSignature);
printf(" VbeVersion: 0x%04X\n", vib->VbeVersion);
printf(" OemStringPtr: %s\n", vib->OemStringPtr);
printf(" Capabilities: 0x%08X\n", vib->Capabilities);
printf(" VideoModePtr: 0x%08X\n", vib->VideoModePtr);
printf(" TotalMemory: %4d KB\n", vib->TotalMemory*64);
if( ask_for == VBE2AndAbove )
{
printf("VBE 2.x info\n");
printf(" OemSoftwareRev: 0x%04X\n", vib->OemSoftwareRev);
printf(" OemVendorNamePtr: %s\n", vib->OemVendorNamePtr);
printf(" OemProductNamePtr: %s\n", vib->OemProductNamePtr);
printf(" OemProductRevPtr: %s\n", vib->OemProductRevPtr);
Show last 80 lines
  }  
}

int get_vesa_info(enum AskFor ask_for)
{
struct vbeinfoblock VIB;
union REGS inregs;
union REGS outregs;
struct SREGS sregs;
int ax = 0;

const char* VESA_signature = "VESA";
const char* VBE2_signature = "VBE2";
const char* signature = 0;

memset(&VIB, 0, sizeof(VIB));
memset(&inregs, 0, sizeof(inregs));
memset(&outregs, 0, sizeof(outregs));
memset(&sregs, 0, sizeof(sregs));

switch(ask_for)
{
case VBE1: signature = VESA_signature; break;
case VBE2AndAbove: signature = VBE2_signature; break;
}
memcpy(&VIB.VbeSignature, signature, 4);

inregs.x.ax = 0x4F00;
inregs.x.di = FP_OFF(&VIB);
sregs.es = FP_SEG(&VIB);
ax = int86x(0x10, &inregs, &outregs, &sregs);
if(ax != 0x004F)
{
printf("no VESA #1\n");
return 1;
}

if(memcmp(VIB.VbeSignature, VESA_signature, 4) != 0)
{
printf("no VESA #2\n");
return 1;
}

print_vbe_info(&VIB, ask_for);

return 0;
}

int main(void)
{
int res = 0;
{
STATIC_ASSERT(sizeof(uint8_t)==1);
STATIC_ASSERT(sizeof(uint16_t)==2);
STATIC_ASSERT(sizeof(uint32_t)==4);

STATIC_ASSERT(sizeof(struct vbeinfoblock)==512);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, VbeSignature)==0x00);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, VbeVersion)==0x04);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemStringPtr)==0x06);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, Capabilities)==0x0A);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, VideoModePtr)==0x0E);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, TotalMemory)==0x12);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemSoftwareRev)==0x14);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemVendorNamePtr)==0x16);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemProductNamePtr)==0x1A);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemProductRevPtr)==0x1E);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, Reserved1)==0x22);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemData)==0x100);
}

printf(">>>>>>>>>> ask for VBE1 info <<<<<<<<<<<<\n");
res = get_vesa_info(VBE1);
printf(">>>>>>>>>> res: %i\n", res);
printf(">>>>>>>>>> ask for VBE2+ info <<<<<<<<<<<<\n");
res = get_vesa_info(VBE2AndAbove);
printf(">>>>>>>>>> res: %i\n", res);

return 0;
}

Attachments

  • Filename
    VESA.EXE
    File size
    7.63 KiB
    Downloads
    44 downloads
    File license
    Public domain
  • Filename
    VESA.C
    File size
    4.33 KiB
    Downloads
    43 downloads
    File license
    Public domain
Last edited by llm on 2021-10-18, 08:27. Edited 2 times in total.

Reply 6 of 20, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
llm wrote on 2021-10-18, 13:40:

https://anttipeltola.eu/misc/vbe2

...VBE services may be called directly from 32-bit protected mode only.

it seems that VBE functions can only be called from protected mode - is that correct?

No. VBE functions can be used perfectly from DOS real mode. Your problem seems to be that you handle 'vbeFarPtr' as valid C far pointer. But as can be read in the documentation:

When functions are called via the real mode INT 10h software interrupt, a ‘vbeFarPtr’ will be a
real mode segment:offset style pointer to a memory location below the 1Mb system memory
boundary.

So you should handle vbeFarPtr members as structs with a separate 16-bit segment and offset fields.
And thus you should use MK_FP() or similar to make a valid far pointer from the segment:offset pairs.
https://users.pja.edu.pl/~jms/qnx/help/watcom … /src/mk_fp.html

@Edit:
I have attached my Borland Pascal unit that I use. It's in Pascal but you can get the idea easily.

Filename
VESAINF.zip
File size
6.8 KiB
Downloads
41 downloads
File license
Public domain

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 7 of 20, by retardware

User metadata
Rank Oldbie
Rank
Oldbie

As falcosoft said, the problem is that you mistake the segmented address given by the TSR as a flat address.
Ex: 1000:EEEE segmented address. Ofc you get random garbage when you mistake this as a flat address 1000EEEE.
The FP segmented to flat address conversion macros (every compiler/dos extender had its own macros back then) basically does SEG<<8+OFF, returning you the flat address 1EEEE.

Reply 8 of 20, by llm

User metadata
Rank Member
Rank
Member

a "char far*" in Memory Model: Small IS a Segment:Offset Pointer - there is no "linear" Address available in Realmode
splitting the "char far*" into a struct with segment and offset and combining that with MK_FP gives the same string results

// Borland C++ 3.1
// build: path=C:\BORLANDC\BIN
// bcc -ms vesa.c

// based on:
// https://github.com/open-watcom/open-watcom-v2/blob/master/contrib/extender/dos32a/examples/c_5/vesa.c
// https://github.com/cirosantilli/ralf-brown-interrupt-list/blob/fde1a5ac1b7e8a45ff4255ee275ee77c7fe7e256/inter61a/INTERRUP.A#L5031

#include <stdio.h>
#include <string.h>
#include <dos.h>

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;

#pragma pack(1)

struct FarPointer
{
uint16_t offset;
uint16_t segment;
};

struct vbeinfoblock {
char VbeSignature[4];
uint16_t VbeVersion;
struct FarPointer OemStringPtr;
uint32_t Capabilities;
struct FarPointer VideoModePtr;
uint16_t TotalMemory;
// VBE 2.x
uint16_t OemSoftwareRev;
struct FarPointer OemVendorNamePtr;
struct FarPointer OemProductNamePtr;
struct FarPointer OemProductRevPtr;
uint8_t Reserved1[222];
//22h WORD (if capabilities bit 3 set) VBE/AF version (BCD)
// 0100h for v1.0P
//24h DWORD (if capabilities bit 3 set) pointer to list of supported
// accelerated video modes (list of words terminated with FFFFh)
uint8_t OemData[256];
};

#pragma pack()

void check_size_and_offsets();

int main()
{
struct vbeinfoblock VIB;
union REGS inregs;
union REGS outregs;
struct SREGS sregs;
unsigned ax_reg = 0;
char far* ptr1 = 0;
char far* ptr2 = 0;

check_size_and_offsets();

Show last 58 lines
  memset(&VIB, 0, sizeof(VIB));
memset(&inregs, 0, sizeof(inregs));
memset(&outregs, 0, sizeof(outregs));
memset(&sregs, 0, sizeof(sregs));

memcpy(VIB.VbeSignature, "VBE2", 4);
printf("Init signature: %.4s\n", VIB.VbeSignature);

inregs.x.ax = 0x4F00;
inregs.x.di = FP_OFF(&VIB);
sregs.es = FP_SEG(&VIB);
ax_reg = int86x(0x10, &inregs, &outregs, &sregs);

if(ax_reg != 0x004F)
{
printf("no VESA #1\n");
return 1;
}

if(memcmp(VIB.VbeSignature, "VESA", 4) != 0)
{
printf("no VESA #2\n");
return 1;
}

// this is identical to "char far*"
ptr1 = MK_FP(VIB.OemVendorNamePtr.segment, VIB.OemVendorNamePtr.offset);
printf(" OemVendorNamePtr: %s\n", ptr1);

ptr2 = MK_FP(VIB.OemVendorNamePtr.offset, VIB.OemVendorNamePtr.segment);
printf(" OemVendorNamePtr: %s\n", ptr2);

return 0;
}

void check_size_and_offsets()
{
#define STATIC_ASSERT(COND) {char static_assertion[(COND)?1:-1];}
#define OFFSETOF(type, field)((unsigned long) &(((type *) 0)->field))

STATIC_ASSERT(sizeof(uint8_t)==1);
STATIC_ASSERT(sizeof(uint16_t)==2);
STATIC_ASSERT(sizeof(uint32_t)==4);

STATIC_ASSERT(sizeof(struct vbeinfoblock)==512);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, VbeSignature)==0x00);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, VbeVersion)==0x04);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemStringPtr)==0x06);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, Capabilities)==0x0A);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, VideoModePtr)==0x0E);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, TotalMemory)==0x12);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemSoftwareRev)==0x14);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemVendorNamePtr)==0x16);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemProductNamePtr)==0x1A);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemProductRevPtr)==0x1E);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, Reserved1)==0x22);
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemData)==0x100);
}

@Falcosoft
I'll first need to install Borland Pascal to test your code

Reply 9 of 20, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
llm wrote on 2021-10-18, 19:33:

@Falcosoft
I'll first need to install Borland Pascal to test your code

Since I do not have Borland C++ I have tried your code with Turbo C 2.01. With some minor modifications I could compile it and in compact/large/huge memory models it gave me correct results. So it seems in order VESA functions to work you have to use a memory model that supports multiple data segments/ uses far data pointers. In tiny/small memory models you have no real far data pointers. Turbo/Borland Pascal used large model by default that's why it always worked with my Pascal programs.

test1.png
Filename
test1.png
File size
27.29 KiB
Views
1199 views
File license
Public domain
test2.png
Filename
test2.png
File size
29.39 KiB
Views
1186 views
File license
Public domain
Filename
VESA.zip
File size
7.19 KiB
Downloads
44 downloads
File license
Public domain

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 10 of 20, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Hello,
This isn't a forum for dosbox-staging so if you intend for a patch for dosbox-staging then best to discuss this over there.
If the intent is for a patch for dosbox-svn then it can be discussed here.

Thanks

How To Ask Questions The Smart Way
Make your games work offline

Reply 11 of 20, by retardware

User metadata
Rank Oldbie
Rank
Oldbie

Never used borland c++.
Didn't see any reason to do so, always worked with MSC back then.
Maybe BCC has some keywords like _near, _far, _huge etc, that make it behave like you expected? (See this, search for "_far")

Reply 12 of 20, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

I noticed that this is posted in old hardware. Is this main intent for this program for DOSBox? If so then we'll need to move it to the appropriate forum.

How To Ask Questions The Smart Way
Make your games work offline

Reply 13 of 20, by llm

User metadata
Rank Member
Rank
Member
Falcosoft wrote on 2021-10-18, 22:34:

Since I do not have Borland C++ I have tried your code with Turbo C 2.01. With some minor modifications I could compile it and in compact/large/huge memory models it gave me correct results. So it seems in order VESA functions to work you have to use a memory model that supports multiple data segments/ uses far data pointers.

thank you Falcosoft
i totaly forgot that Small Memory model got only Near-Data Pointers and Far Code-pointers, Legacy-20Bit-Facepalm for me!

and your example works out of the box

Reply 14 of 20, by llm

User metadata
Rank Member
Rank
Member

@DosFreak

This isn't a forum for dosbox-staging so if you intend for a patch for dosbox-staging then best to discuss this over there.
If the intent is for a patch for dosbox-svn then it can be discussed here.

i started the discussion with dosbox-staging developers but i also use Dosbox-SVN and DosBox-X for my private researches because each of
them got its own advantages - i see absolutly no need for pre decide what projects will "maybe" use this code in the end because there is no technical
constrain that this findings can not work in all of them - for me Dosbox-SVN is the mother of all - buts its not a religion and the forks are way more interessted in
trying out strange ideas/things - my hope is that all common features always land in Dosbox-SVN (which is still the pull base for Staging and X)

I noticed that this is posted in old hardware. Is this main intent for this program for DOSBox? If so then we'll need to move it to the appropriate forum.

its a 16bit DOS Program which should help me to understand how/what UniVBE helps and how it works and i also thought it would be good to test my findings with real hardware (which i don't own)

but first i need to use the programing tools correct - thanks again Falcosoft 😀

Reply 15 of 20, by llm

User metadata
Rank Member
Rank
Member

added your findings to my example and also made my STATIC_ASSERT into a real static assert 😀 and added the UniVBE detection (equal to the UniVBE implementation)

thanks for the help

// build with Borland C++ 3.1: BCC.EXE -mc vesatc.c
// BEWARE: needs to be build with a FAR-Data-Pointer memory model (compact or large) to work correct
// or else the far pointers get crippled - mostly wrong OEM-Strings etc. will be the result
// Thanks to FalcoSoft/Vogons-Forum

#define LIKE_UNIVBE_DETECTION

#include <stdio.h>
#include <string.h>
#include <dos.h>

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;

#pragma pack(1)

struct FarPointer
{
uint16_t offset;
uint16_t segment;
};

char far* to_str(struct FarPointer* ptr)
{
char far* str_ptr = 0;
str_ptr = MK_FP(ptr->segment, ptr->offset);
return str_ptr;
}

struct vbeinfoblock {
char VbeSignature[4];
uint16_t VbeVersion;
struct FarPointer OemStringPtr;
uint32_t Capabilities;
struct FarPointer VideoModePtr;
uint16_t TotalMemory;
uint16_t OemSoftwareRev;
struct FarPointer OemVendorNamePtr;
struct FarPointer OemProductNamePtr;
struct FarPointer OemProductRevPtr;
uint8_t Reserved1[222];
uint8_t OemData[256];
};

#pragma pack()

int main()
{
struct vbeinfoblock VIB;
union REGS inregs;
union REGS outregs;
struct SREGS sregs;
uint16_t ax_reg = 0;
uint16_t drv_ofs = 0;
uint16_t drv_seg = 0;
char far* oem_str = 0;
const char* starts_with = "Universal VESA VBE";

memset(&VIB, 0, sizeof(VIB));
Show last 100 lines
  memset(&inregs, 0, sizeof(inregs));
memset(&outregs, 0, sizeof(outregs));
memset(&sregs, 0, sizeof(sregs));

memcpy(VIB.VbeSignature, "VBE2", 4);
//memcpy(VIB.VbeSignature, "VESA", 4);

printf("Init signature: %.4s\n", VIB.VbeSignature);

inregs.x.ax = 0x4F00;
#ifdef LIKE_UNIVBE_DETECTION
// seem not relevant but maybe for older UniVBE versions detection needed
inregs.x.bx = 0x1234;
inregs.x.cx = 0x4321;
#endif
inregs.x.di = FP_OFF(&VIB);
sregs.es = FP_SEG(&VIB);

printf("int 10h/ax=4F00h\n");
ax_reg = int86x(0x10, &inregs, &outregs, &sregs);
printf("ax_reg: 0x%04X\n", ax_reg);
if(ax_reg != 0x004F)
{
printf("no VESA #1\n");
return 1;
}

if(memcmp(VIB.VbeSignature, "VESA", 4) != 0)
{
printf("no VESA #2\n");
return 1;
}

oem_str = to_str(&VIB.OemStringPtr);

printf(" Signature: %.4s\n", VIB.VbeSignature);
printf(" VbeVersion: 0x%04X\n", VIB.VbeVersion);
printf(" OemStringPtr: %s\n", oem_str);
printf(" Capabilities: 0x%08X\n", VIB.Capabilities);
printf(" VideoModePtr: 0x%08X\n", VIB.VideoModePtr);
printf(" TotalMemory: %4d KB\n", VIB.TotalMemory*64);
printf("---VBE2---\n");
printf(" OemSoftwareRev: 0x%04X\n", VIB.OemSoftwareRev);
printf(" OemVendorNamePtr: %s\n", to_str(&VIB.OemVendorNamePtr));
printf(" OemProductNamePtr: %s\n", to_str(&VIB.OemProductNamePtr));
printf(" OemProductRevPtr: %s\n", to_str(&VIB.OemProductRevPtr));

#ifdef LIKE_UNIVBE_DETECTION
if( strncmp(oem_str, starts_with, strlen(starts_with)) == 0 )
{
printf("Found UniVBE #1\n");

printf("int 10h/ax=4F0Fh\n");
inregs.x.ax = 0x4F0F;
inregs.x.bx = 0x1234; // seems not relevant but maybe for older UniVBE versions detection needed
ax_reg = int86x(0x10, &inregs, &outregs, &sregs);
printf("ax_reg: 0x%04X\n", ax_reg);
if(ax_reg == 0x004F)
{
printf("Found UniVBE #2\n");

drv_ofs = outregs.x.bx;
drv_seg = outregs.x.dx;

if( (drv_ofs != 0) && (drv_seg != 0))
{
printf("Found UniVBE #3\n");

printf("UniVBE is installed at 0x%04X:0x%04X\n", drv_seg, drv_ofs);
return 0;
}
}
}
printf("UniVBE is not installed\n");
#endif

return 0;
}

#define STATIC_ASSERT(COND) struct{char static_assertion[(COND)?1:-1];};
#define OFFSETOF(type, field)((unsigned long) (&(((type*)0)->field)))

STATIC_ASSERT(sizeof(uint8_t)==1)
STATIC_ASSERT(sizeof(uint16_t)==2)
STATIC_ASSERT(sizeof(uint32_t)==4)

STATIC_ASSERT(sizeof(struct vbeinfoblock)==512)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, VbeSignature)==0x00)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, VbeVersion)==0x04)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemStringPtr)==0x06)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, Capabilities)==0x0A)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, VideoModePtr)==0x0E)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, TotalMemory)==0x12)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemSoftwareRev)==0x14)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemVendorNamePtr)==0x16)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemProductNamePtr)==0x1A)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemProductRevPtr)==0x1E)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, Reserved1)==0x22)
STATIC_ASSERT(OFFSETOF(struct vbeinfoblock, OemData)==0x100)

Reply 16 of 20, by Zup

User metadata
Rank Oldbie
Rank
Oldbie
llm wrote on 2021-10-17, 17:30:

i just want to ask before starting reversing the UniVBE startup code myself

Do anyone know how UniVBE detects that its already loaded?

The multiplex interrupt (0x2F) was intended to provide a means to check if a TSR is present, maybe UniVBE uses it... have you tried to debug and put a breackpoint there?

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!

Reply 19 of 20, by DosFreak

User metadata
Rank l33t++
Rank
l33t++
llm wrote on 2021-10-19, 06:25:
@DosFreak […]
Show full quote

@DosFreak

This isn't a forum for dosbox-staging so if you intend for a patch for dosbox-staging then best to discuss this over there.
If the intent is for a patch for dosbox-svn then it can be discussed here.

i started the discussion with dosbox-staging developers but i also use Dosbox-SVN and DosBox-X for my private researches because each of
them got its own advantages - i see absolutly no need for pre decide what projects will "maybe" use this code in the end because there is no technical
constrain that this findings can not work in all of them - for me Dosbox-SVN is the mother of all - buts its not a religion and the forks are way more interessted in
trying out strange ideas/things - my hope is that all common features always land in Dosbox-SVN (which is still the pull base for Staging and X)

I noticed that this is posted in old hardware. Is this main intent for this program for DOSBox? If so then we'll need to move it to the appropriate forum.

its a 16bit DOS Program which should help me to understand how/what UniVBE helps and how it works and i also thought it would be good to test my findings with real hardware (which i don't own)

but first i need to use the programing tools correct - thanks again Falcosoft 😀

Just make sure that this thread isn't used for development for staging (they have their own site) but not official dosbox and we will be good otherwise I'll have to close it.

Also now there are two threads.....

How To Ask Questions The Smart Way
Make your games work offline