Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Emulators written in DBPro?

Author
Message
FieldDoc
23
Years of Service
User Offline
Joined: 30th May 2003
Location: London, UK
Posted: 7th Jun 2003 18:48
Just wondered if anyone was tinkering with this idea? Far too complicated for me to attempt but wondered if it is possible?

BTW, is there no search function for these forums?
Life is like a penis:
When it's soft you can't beat it, when it's hard you get screwed.
Puzzler
23
Years of Service
User Offline
Joined: 18th Jan 2003
Location: United Kingdom
Posted: 7th Jun 2003 19:05 Edited at: 7th Jun 2003 19:06
http://www.darkbasicpro.com/apollo/view.php?t=7048&b=2
This was a search page made by Kangaroo2. It's a sticky post until Rich develops a better one.

Piecing together the puzzle of Dark Basic- Puzzler

AMD Athlon 500 MHZ (393216K), NVidia TNT, Windows XP Professional Edition
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 7th Jun 2003 20:09
Writting an emulator within darkBASIC would be more complicated than working in ASM/C++ for that particular task.

Emulators are a major undertaking, probably more technically challenging than writting most commercial games.

If / When you write an emulator, you need not be worrying about the DirectX interface of DarkBASIC but interpreting graphic commands into a PC viable methodology.

Pneumatic Dryll
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 8th Jun 2003 00:48
if you wrote an emulator in DBP you'd actually need to make it a Standard Recompiler Engine, these aren't so uncommon amongst the GB Emulator scene - basically extracts all of the GB data from the Rom into more standard formats and then rebuilds the code that the ASM would be in C, oftenly the results are buggy to say the least but faster than standard emulation.

Current problem with emulator development in anything other than ASM is the fact that you can't actually access the Processor Directly, in MSVC++ you can in VS6.0 sp5 w/Processor Pack and i think that .Net also has some of these abilities ... but without the direct access of CPU instructions emulation of any decent speed is actually a far cry.

I mean look at current Playstation Emulators, Bleem! needs a P2-233Mhz Mmx w/16Mb Direct3D Card w/128Mb Ram to actually run at a decent speed - oki not much by todays standards, but when you think that a playstation runs at a Reduced Instruction 38.6Mhz w/2Mb Vid Ram and 1.5Mb Shared Audio/System Ram + a standard VGA Graphics Chip and standard 16bit Mod Sound Chip ... i mean really it should be more than playable on most 486machines.
It's that lack of being able to access the CPU which is the case though, as well as the instruction sets on these console processors are setup for certain instructions which x86 CPU's arn't

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
FieldDoc
23
Years of Service
User Offline
Joined: 30th May 2003
Location: London, UK
Posted: 8th Jun 2003 03:05
Phew! Glad i'm not gonna attempt one anytime soon. Just wondered if anyone had attempted one yet. Guess not.

Life is like a penis:
When it's soft you can't beat it, when it's hard you get screwed.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 8th Jun 2003 10:24
there was that Chip8 emulator ... i think it was an emulator anyways

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 8th Jun 2003 19:37
Well the truth is it isn't terribly difficult to do, providing you have a working knowledge of machine and it's CPU.

While building an emulator in native 'DB/Dbpro" code is mainly hindered by the lack of jump table support. Jump Tables allow to jump upon an address without falling through decision. Without them, you end up falling through a if/then or select case blocks attempting to identify each instruction opcode for the cpu. While these can be broken up, it's still a constant and big factor in terms of speed.

Once you've got a working cpu emulator/virtual machine running. The key drama is the translation of video and sounds data. You can get away with simulation the sound chip(s) but video is must. Unfortunately hardly any retro machines use 'chunky' (byte/word/long per pixel) like modern pc's do. Making the translation of the current frame a fairly cpu intensive task.

As long as your the bulk of the cpu instruction set is emulated (you'll obviously need enough for the machine to boot) and the basic display modes getting an emulator running is not out of the question for anybody.

I wrote one in DB a couple of years ago,which is built around a 'pretend' machine for Kyruss. (a virus wars game idea) Basically it allows me cheat in various areas, but it's a working emulator.

http://www.Kyruss.UnderwareDesign.com
http://www.Kyruss2.UnderwareDesign.com

l8r,
Kevin Picone
[url]www.underwaredesign.com[/url]
ConsoleBoy164
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location: United Kingdom
Posted: 9th Jun 2003 00:45
Maybe someone should start of basic, lik a NES or Atari 2600 emulator, after all, these roms are small files (2k - Atari, Nes around 32k upwards) I dont see any hasle with the 2600 as it is poor in both sound and graphics, so maybe it is possible, but only for older consoles.

We are borg... You will be assimilated - Your technological distinctiveness will be added to our own... Resistance is futile!
Current Project: Bomber Pro
Solidz Snake
23
Years of Service
User Offline
Joined: 23rd Oct 2002
Location: United Kingdom
Posted: 9th Jun 2003 04:03
There is one in progress actually, developed by a guy i know in the RGT forum. He calls it DarkBoy, but he takes his time to develop it because his wife just gave birth to a child.

So, well, err, just check it out there

Snake? What happened? Snake? Snaaaaaaaaaaaaaaaake!!! - Colonel Roy Campbell

Login to post a reply

Server time is: 2026-07-11 11:42:40
Your offset time is: 2026-07-11 11:42:40