Black screen, no errors

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
lspci
DCEmu Newbie
DCEmu Newbie
Posts: 2
Joined: Tue Feb 14, 2012 2:45 pm

Black screen, no errors

Post by lspci » Tue Feb 14, 2012 3:08 pm

Hi folks :)

I installed DDEr4 and navigated to the hello example in KOS:

Code: Select all

C:\cygwin\usr\local\dc\kos\kos\examples\dreamcast\hello
Entered the command:

Code: Select all

make
... which generated "hello.elf" "from hello.c"

Then typed:

Code: Select all

sh-elf-objcopy -O binary -R .stack hello.elf 1st_read.bin
This created an unscrambled file called "1st_read.bin". Its size is 262 KB, so it seems that something was converted. (Previously it was going through as 0KB when I used a gui utility called "DCTool")

I opened BootDreams and navigated to the same directory (hello). A window popped up asking if I wish to scramble "1st_read.bin", I clicked "yes", and then another one appeared asking if I would like to make an "ip.bin" and I chose "yes" again.

BootDreams created a DiscJuggler (.cdi) image successfully. I attempted to open this file both in Makaron and nullDC. Makaron just disappears somewhere and crashes after a while, NullDC stops and displays:

Code: Select all

TI , invalidating *TLB
Block 0C00E09C : disabling read-const @ 19/29
not implemented opcode : 8C00 : unknown opcode @ 8C00E0A2
Press Any key to continue
Pressing any key just gives the same error over and over (with a different "opcode").

I tried to open the .elf, unscrambled and scrambled .bin through "File -> Open bin/elf". The screen in NullDC just goes black with no errors.

I understand that running an emulator is not a good way of testing homebrew and people normally do it through the serial port. But shouldn’t a simple “hello world” work?

hello.c -> hello.elf -> 1st_read.bin (unscrambled) -> 1st_read.bin (scrambled) -> ip.bin boot file -> 1 second audio track -> hello.cdi (last 4 steps done through BootDreams)

Am I overlooking something important? Maybe the elf is compiled incorrectly, but there are no errors... Thanks.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5273
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Contact:

Re: Black screen, no errors

Post by BlueCrab » Tue Feb 14, 2012 3:16 pm

That example doesn't do anything on the screen. It prints a message to the dbglog and exits.
User avatar
lspci
DCEmu Newbie
DCEmu Newbie
Posts: 2
Joined: Tue Feb 14, 2012 2:45 pm

Re: Black screen, no errors

Post by lspci » Wed Feb 15, 2012 8:44 am

Problem solved. Thanks!

I compiled the PNG example instead and it worked perfectly. NullDC loaded it straight from the .elf file.

Also BootDreams can create a .cdi directly from .elf so there's no need to convert it to .bin manually.
User avatar
RyoDC
Mental DCEmu
Mental DCEmu
Posts: 351
Joined: Wed Mar 30, 2011 12:13 pm

Re: Black screen, no errors

Post by RyoDC » Thu Feb 16, 2012 7:43 am

lscpi, I met the same problems when started my way on developing dreamcast app's. And I'm strongly recommend you not to use NullDc or any other emulator, apart from lxdream, which has good and true hardware emulation. It's that, because other emulators, like nullDC and rest, do not seems to do emulation of hardware at all - looks like that they just seek for the pattern, and run it, not to do any correct graphic or sound chip emulation.
How do I try to build a Dreamcast toolchain:
Image
Ayla
Insane DCEmu
Insane DCEmu
Posts: 131
Joined: Thu Apr 03, 2008 7:01 am

Re: Black screen, no errors

Post by Ayla » Thu Feb 16, 2012 12:53 pm

Bullshit. Lxdream is not good for homebrew either. I never got it to run my apps.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5273
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Contact:

Re: Black screen, no errors

Post by BlueCrab » Thu Feb 16, 2012 1:26 pm

You shouldn't be using emulators to test your homebrew period. If something happens, its hard to tell who's bug it is, yours or the emulator's.

Not only that, but frequently emulators let you do things that would break on the actual hardware.
User avatar
RyoDC
Mental DCEmu
Mental DCEmu
Posts: 351
Joined: Wed Mar 30, 2011 12:13 pm

Re: Black screen, no errors

Post by RyoDC » Thu Feb 16, 2012 2:02 pm

Bullshit. Lxdream is not good for homebrew either. I never got it to run my apps.
I only tell from the words of SWAT. I think he's experienced enought and respected here to be reliable on his words.
How do I try to build a Dreamcast toolchain:
Image
Post Reply