• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

DoomAddict

Assembler Causes Crashes

13 posts in this topic

Yup thats a really big problem you should punch the computer several times in rapid succession in order to get the thing to work. If it does not work, punch the monitor several times in rapid sucession. It that still doesnt work, send it all back to the computer sotre to get it repaired from the punching and popefully by then it should work.

FAGary http://fagary.cjb.net

0

Share this post


Link to post
Share on other sites
what type of app are you buliding? if you are building a win32-type (even if it's console style) app then it most likely won't work at all since windows won't let you call 'em interrupts.

however, if you compile as some sort of dos executable, then it should work fine (provided your interrupt calls are correct [i didn't check those.... i assume they're right ])

hope that helps!

~Queasy.

0

Share this post


Link to post
Share on other sites
Hey! I wrote that article.
Now here is the problem:
In win32 or DPMI applications you can't call real-mode interrupts.

Try searching in the helpfile for something like int86x or dpmi_int.
Or use an MS-DOS realmode compiler.

0

Share this post


Link to post
Share on other sites
Queasy is on the right track. Except ... VC6 does not do DOS apps at all. You will need to get an older compiler, or go grab a free one.

No Interrupts in Win32. There are some minor exceptions ... but that is way beyond what you are trying to do.

My advice ... if you want to program for Windows ... follow my article series here on GameDev. Part 2 should be up in a few days. However, if you still want to do DOS go get the A86 assembler (freeware), or find an old version of MASM or even TASM.

- Chris

0

Share this post


Link to post
Share on other sites
You're kidding???

VC6 does NOT do dos apps??? WHAT!?

So is it strictly a win32 compiler? It does nt right?

//i use wc11.0 which compiles for many platforms...

0

Share this post


Link to post
Share on other sites
Thaks a lot for all your help, I think I figured it out though. First VC6 on my computer can only make Win 32 progs, I think there are addons that can make it make pure dos progs, somewhere on the microsoft website. I was looking through the help file, and I could not find those registers anywhere. What has happened I think, is that they changed the registers to work with Win 32. With all due respect to the person who wrote the assembler tutorial, I think it is a little outdated. From what I can make of it, the new registers are the same as the old ones except with an E in front of them EAX, EAH and so on...

Thanx for all of your help

0

Share this post


Link to post
Share on other sites
I've just started DPMI programming (already quite experienced), that's because it's so outdated.

I will update my article then.

0

Share this post


Link to post
Share on other sites
bosjoh, you mention you can't call realmode interrupts in DPMI applications. does this mean that the extender handles interrupts transparently to the application? even if you use a software interrupt called via asm file?

it's because i'm having problems with a 32bit dos app, when calling an interrupt to set the video mode (vbe 2.0). my instinct tells me it's a segment register assumed wrongly or something, which causes the interrupt to execute garbage code and soon after, crash.

the weird thing is, sometimes it works, sometimes it doesn't (a successful compile & link produces and executable that always works or always crashes). i've traced the crash to "int 10h" in the function that sets the video mode. and yes, the video mode is valid at the point where the interrupt is called. as i said, my instinct says it's wrongly assumed segment registers (since the interrupt executes in v86 mode, it relies on CS, DS, SS and stuff...) but how the hell do you fix this? (or even detect it)

i can send the source files if someone thinks they might know the solution or wants to investigate further (at this point, it's all or nothing, so i don't care if some of these files have code that i otherwise wouldn't give out). the compiler is watcom v11.0 and the assembler is TASM 4.1 (could just use WASM if you want). one file, vgovbe20.asm is not written by me (and it contains the mode setting code and crash, go figure)

(crash on line 593 of vgovbe20.asm)

0

Share this post


Link to post
Share on other sites
I think there is a 'simulate real-mode call' function for dpmi.
[oops forgot to tell you the interrupt! 0x31 is the int]

ax=0x300
bl=interrupt number you want to call
cx=words to copy from pm stack to rm stack... so i guess you pass params that way.
es:edi -> is the call structure with all your params...
byte desc
===========
0x0 edi
0x4 esi
ox8 ebp
oxc reserved
ox10 ebx
ox14 edx
.. ecx
.. eax
0x20 flags
0x22 es
0x24 ds
0x26 fs
ox28 gs
ox2a ip
ox2c cs
ox2e sp
ox30 ss

after you call.. .this struct will be filled with return values too.

*I THINK* so i may be (might be, mostly likely am?) wrong

[This message has been edited by Queasy (edited September 20, 1999).]

0

Share this post


Link to post
Share on other sites
To make things clear:
You can't call real-mode interrupts directly with DPMI. But there is a 'simulate real mode interrupt' function (search the compiler's help file).

Using registers in DPMI is also different.
ax, bx, cx and dx becomes eax, ebx, ecx and edx.
These are 32 bit instead of 16 bit.

The memory mode is flat so realmode programmers: forget about the segment offset.

You can't write for example directly to adres 0xA0000 (0xA000:0=0xA0000). You must first map the memory and add the segment base offset.

Hope this will help out all DPMI programmers.

Foofightr: I've sent an E-mail to you.

[This message has been edited by bosjoh (edited September 21, 1999).]

[This message has been edited by bosjoh (edited September 21, 1999).]

0

Share this post


Link to post
Share on other sites
I am having this problem with assembler code. I am following an assembler tutorial from http://skyscraper.fortunecity.com/compiler/379/assemble.html, and my computer keeps locking up(the computer does not actually lock up, but the screen goes black, and stays that way), when trying to display a white pixel at (100,100) under 320 X 200 X 256. I know that this probably is not the place where to post this, but it's the only place that I can think of.
I am using VisualC++6, and this is the code:

int main()
{
__asm {
MOV AH, 0
MOV AX, 19
INT 10h

MOV AH, Ch
MOV CX, 100
MOV DX, 100
MOV AL, 15
INT 10h

MOV AH, 0
MOV AX, 3
INT 10h

}

return 0;
}

Any ideas about what's happening?
Thanx

------------------
DoomAddict
WHAT CAN I SAY, DOOM STARTED IT!!!!
:o

0

Share this post


Link to post
Share on other sites
Here is the file containing all the source of the program in question:

Mapedit ... hmm, click this link, it will tell you page not available. enter the same url again and it'll work.

for watcom 11. buildmap.bat is for building the release version, and debugmap.bat to build the debug version.

FYI on my computer, it crashes on line 593 of vgovbe20.asm (not written by me!)

thanks for any help (i still say it's a problem with segment registers for when it executes realmode code for the INT 10H)

[This message has been edited by foofightr (edited September 21, 1999).]

0

Share this post


Link to post
Share on other sites