DCEmulation

dreamcast development • homebrew software • hardware hacking • indie games • emulators • and more!
Back to main site
It is currently Sat Nov 22, 2014 7:04 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Black screen, no errors
PostPosted: Tue Feb 14, 2012 2:08 pm 
Offline
DCEmu Newbie
DCEmu Newbie
User avatar

Joined: Tue Feb 14, 2012 1:45 pm
Posts: 2
Hi folks :)

I installed DDEr4 and navigated to the hello example in KOS:
Code:
C:\cygwin\usr\local\dc\kos\kos\examples\dreamcast\hello


Entered the command:
Code:
make

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

Then typed:
Code:
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:
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.


Top
 Profile  
 
PostPosted: Tue Feb 14, 2012 2:16 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4303
That example doesn't do anything on the screen. It prints a message to the dbglog and exits.


Top
 Profile  
 
PostPosted: Wed Feb 15, 2012 7:44 am 
Offline
DCEmu Newbie
DCEmu Newbie
User avatar

Joined: Tue Feb 14, 2012 1:45 pm
Posts: 2
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.


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 6:43 am 
Offline
Mental DCEmu
Mental DCEmu
User avatar

Joined: Wed Mar 30, 2011 10:13 am
Posts: 310
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


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 11:53 am 
Offline
Insane DCEmu
Insane DCEmu

Joined: Thu Apr 03, 2008 5:01 am
Posts: 129
Bullshit. Lxdream is not good for homebrew either. I never got it to run my apps.


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 12:26 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4303
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.


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 1:02 pm 
Offline
Mental DCEmu
Mental DCEmu
User avatar

Joined: Wed Mar 30, 2011 10:13 am
Posts: 310
Quote:
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group