Nicht eingeloggt.
Passwort vergessen?


Bitte erst registrieren. Danach ist es möglich Beiträge zu schreiben.



 Nach unten   Vorheriges Thema   Nächstes Thema

#1
VBDE/GCCVB issues
Geschrieben am: 28.12.2016 23:23
Virtual Freak
Dabei seit 14.04.2007
Kanada
51 Beiträge
Long Time User (12 Years)
I was experimenting in VBDE earlier today, trying to see if I could use my new FlashBoy to run my own code on actual Virtual Boy hardware. I only know the very basics of programming in C, so I started by modifying one of the more simple demo files.

I was able to get my code to compile, and it seems to run well in RealityBoy. When I flash to the FlashBoy and try to run it on the VirtualBoy, though, it's all... blinky. It looks like the mirrors aren't syncing properly with the LEDs, or something. The image is there, but it's strobing out of control, and there are vertical gaps.

I thought the problem might be with my code, so I compiled the first VBDE demo project (a static image of the PlanetVB logo) and flashed it. Same problem: I could make out the image, but it was strobing like crazy and interrupted by vertical gaps.

Just to be sure that the problem wasn't with my FlashBoy, I flashed it with a commercial rom. The commercial rom played perfectly.

Is this a common problem? Does anyone know how I might go about addressing it?
Nach oben

#2
Re: VBDE/GCCVB issues
Geschrieben am: 29.12.2016 9:57
Nintendoid!
Dabei seit 14.12.2007
169 Beiträge
CoderLong Time User (12 Years) App Coder
Test and debug your code against Mednafen. Reality Boy is old and its emulation is not very accurate.
Nach oben

#3
Re: VBDE/GCCVB issues
Geschrieben am: 29.12.2016 21:50
Virtual Freak
Dabei seit 14.04.2007
Kanada
51 Beiträge
Long Time User (12 Years)
Good advice, but I'm wondering if anyone has any insight into what's causing the underlying issue.

Even when I compile code that was written by other people (who actually know what they're doing), it still looks glitchy on my VB.

Is it possible VBDE isn't configured correctly?
Nach oben

#4
Re: VBDE/GCCVB issues
Geschrieben am: 30.12.2016 6:57
Nintendoid!
Dabei seit 14.12.2007
169 Beiträge
CoderLong Time User (12 Years) App Coder
Could you post an example of some code you've recently tried that definitely causes glitches on hardware?
Nach oben

#5
Re: VBDE/GCCVB issues
Geschrieben am: 30.12.2016 18:29
Virtual Freak
Dabei seit 14.04.2007
Kanada
51 Beiträge
Long Time User (12 Years)
Here's my code. It's a lightly modified version of one of the samples that comes packaged with VBDE. All it does is populate the displays with a bunch of red rectangles in a diagonal pattern. I made the charmap and bgmap using VIDE.

//Include library, charmap, charset
#include libgccvb.h
#include "testchmap.h"
#include "testchset.h"

int main()
{
//Initialize variables
int x = 30;
int y = 20;
int i = 30;

//Initial setup
vbDisplayOn();

//Copy tileset and tilemap into memory
copymem((void*)CharSeg0, (void*)testchset, 256*16);
copymem((void*)BGMap(0), (void*)testchmap, 450*16);

//Setup worlds
//(This uses structs to access world data, the old method using functions is commented out)
WA[31].head = (WRLD_ON|WRLD_OVR);
WA[31].w = 384;
WA[31].h = 224;
//vbSetWorld(31, (WRLD_LON|WRLD_OVR), 0, 0, 0, 0, 0, 0, 384, 224);

while(i > 20)
{
WA[i].head = (WRLD_ON|WRLD_OVR);
WA[i].w = 384;
WA[i].h = 224;
WA[i].gx = x;
WA[i].gy = y;
x = x + 30;
y = y + 20;
i--;
//vbSetWorld(30, (WRLD_RON|WRLD_OVR), 0, 0, 0, 0, 0, 224, 384, 224);
}

WA[20].head = WRLD_END;
//vbSetWorld(29, WRLD_END, 0, 0, 0, 0, 0, 0, 0, 0);

//Set brightness registers
vbDisplayShow();

//Main loop (Empty because we're done but don't want to reach the end)
for (;;){vbWaitFrame(0);}

return 0;
}
Nach oben

#6
Re: VBDE/GCCVB issues
Geschrieben am: 30.12.2016 22:09
PVB Elite
Dabei seit 28.12.2008
Slowenien
635 Beiträge
Highscore Top ScoreHighscore Top ScoreCoderContributor10+ Game RatingsLong Time User (11 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
The code looks OK. The symptoms you're describing sound like the column table is not initialized. VBDE's startup code should initialize it automatically (unless it doesn't do that anymore), but you can manually call vbSetColTable() and see whether that fixes the problem.
Nach oben

#7
Re: VBDE/GCCVB issues
Geschrieben am: 30.12.2016 22:25
Virtual Freak
Dabei seit 14.04.2007
Kanada
51 Beiträge
Long Time User (12 Years)
That was it! It totally works now. I can't believe I developed Virtual Boy software. (Well, sort of.)

Thanks.
Nach oben

 Nach oben   Vorheriges Thema   Nächstes Thema


Bitte erst registrieren. Danach ist es möglich Beiträge zu schreiben.