Skip to main content
gamedev.net
🔒 Locked

Loading to memory problem...

Started by LinkOfTime Jan 20, 2005 at 5:19 PM 3 replies 1k views
Original Post
LinkOfTime
LinkOfTime
Hi all I am trying to build an emulator and so, I have to load a ROM to the memory. I tried loading 32KB into an array of bytes in Visual-Basic 6.0, but it gave me a compilation error: "Too many local, nonstatic variables". I defined my ROM memory location this way: Public Type ROM_Type ROM(32767) As Byte End Type 'ROM_Type Anyway, when I tried to write: "Dim A as ROM_Type" it gave me that mistake... If anyone knows how to fix it or load the ROM to memory in a different way than I would really appriciate the help. Thanks in advanced :)
Don''t have one, sorry.
iMalc
iMalc
You simply could not successfully write an emulator in Visual Basic, period!
Trying to emulate unsigned maths alone, in VB, is unthinkably slow.
At most you could have the guts of it in a C DLL, and the interface in VB, but I still wouldn't recommend it.

What other programming languages do you know?
Tac-Tics
Tac-Tics
I don't know squat about VB, but my guess is that the language doesn't allow such large arrays. Try using a dynamicly allocated array instead.
RobertPaulson
RobertPaulson
Not starting a fight, but there are some emulators written in VB.
Some off the top of Google's head:
GameBoy
Spectrum
NES

Now, some of them may contain what you're looking for, I don't particulary know.

Hope there's something useful in there, if there isn't, write back!
iMalc
iMalc
Quote:
Original post by RobertPaulson
Not starting a fight, but there are some emulators written in VB.
Some off the top of Google's head:
GameBoy
Spectrum
NES

Now, some of them may contain what you're looking for, I don't particulary know.

Hope there's something useful in there, if there isn't, write back!
Holy S**t, those guys are nuts! OMG they can emmulate something that is 100 times slower than the platform emmulating it - Woop-de-doo!
It would be better to run fast C code and Sleep between frames, especially for laptops.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.