ToToTEK.COM Forum Index ToToTEK.COM
Help & Support Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I kilt my image.

 
Post new topic   Reply to topic    ToToTEK.COM Forum Index -> MD-PRO Flash Cart
View previous topic :: View next topic  
Author Message
McGuirk



Joined: 09 Feb 2009
Posts: 5
Location: Texas, USA

PostPosted: Mon Feb 16, 2009 5:39 am    Post subject: I kilt my image. Reply with quote

Alright. I bought a new MD-PRO and tested it on my Genesis, and it ran fine with the pre-loaded games.

I finally got the program running on 64-bit Linux with ucon64. I then tried to load a ROM onto the cartridge, but loaded it directly onto the cart instead of into one of the game banks. (I was still learning ucon64)

Now the cart doesn't do anything except load a black screen when put in the genesis. I believe I've overwritten the loader ROM. How do I fix my cart? Is there an image of the loader somewhere that I can load back onto the cartridge?
Back to top
View user's profile Send private message AIM Address
Chilly Willy



Joined: 08 Feb 2009
Posts: 174

PostPosted: Mon Feb 16, 2009 9:12 am    Post subject: Re: I kilt my image. Reply with quote

McGuirk wrote:
Alright. I bought a new MD-PRO and tested it on my Genesis, and it ran fine with the pre-loaded games.

I finally got the program running on 64-bit Linux with ucon64. I then tried to load a ROM onto the cartridge, but loaded it directly onto the cart instead of into one of the game banks. (I was still learning ucon64)

Now the cart doesn't do anything except load a black screen when put in the genesis. I believe I've overwritten the loader ROM. How do I fix my cart? Is there an image of the loader somewhere that I can load back onto the cartridge?


When you tell it a single game, it puts JUST that game on the cart... which should work fine. You just boot straight into that one game. If it doesn't boot, it's probably a bad image or something (wrong region perhaps).

If you want the loader, you have to specify the --multi option and give it a list of files, the first one being the loader from the ucon64 web page link. Ucon64 will then overwrite parts of the loader image with the info about the other files you include and burn the whole shebang to the cart.

By the way, I'm using the frontend, uf. It's considerably easier to deal with ucon64 using the GUI. Very Happy

Here's that link (just so you don't have to hunt around for it):
http://prdownloads.sourceforge.net/ucon64/mdpacku4.zip?download
Back to top
View user's profile Send private message
Chilly Willy



Joined: 08 Feb 2009
Posts: 174

PostPosted: Tue Feb 17, 2009 11:35 am    Post subject: Reply with quote

Found a bug in ucon64 as regards multi-game support. It makes the names look screwy as they're not null terminated. If you're compiling ucon64 from the cvs, here's my two bug reports so you can make the changes yourself.

Quote:
I got my MD-Pro 64 today and I'm using ucon64 in Ubuntu 8.04 AMD64
version to transfer data to/from the cart. With the frontend, it's
really nice and fast. However, I did quickly discover a bug. I dumped
the contents of the flash cart the way it came and noticed the data
was byte swapped on words. A quick look at the code (I'm using the
latest checkout of the cvs) revealed the ttt_read_rom_w function has
the byte swapping backwards. It swaps when it shouldn't, and doesn't
when it should. In src/backup/tototek.c, lines 260 to 264 should be

#ifdef WORDS_BIGENDIAN
((unsigned short int *) buf)[count] = inportw (port_c); // read_dataw ()
#else
((unsigned short int *) buf)[count] = bswap_16 (inportw (port_c));
// read_dataw ()
#endif

Once it's changed to the above, the cart dump has the proper byte
order. It's very easy to see - just look at the dump in a hex editor
(set to view bytes to be sure the hex editor isn't swapping the data),
and see if you can read the strings in the cart header.

Other than that issue, I've not had any trouble.

Thanks!


Quote:
Found another bug in ucon64, this one as regards the multi-game
support on the MD-Pro. The code seems to think that the entry offset
0x1d is unused by the loader and puts the rom size in it. It later
uses that rom size somewhere I haven't located yet. The problem is
that 0x1d is NOT unused - it's the null terminator for the name
string! I've made a temporary fix by changing it to write out the name
with a length of 0x1b instead of 0x1c and then writing a
null-terminator. The code is in src/console/genesis.c, and start at
line 1078.

fwrite (name, 1, 0x1b, destfile); // 0x1 - 0x1c = name
fputc(0,destfile); // 0x1d is NULL TERMINATOR!!!
fputc (size / MBIT, destfile); // 0x1d = ROM size
(not used by loader)


This means the names are 1 shorter than they can be, but at least it works. Smile


Here's a multi-game image I made with uf/ucon64 using the changes. This is a two-pack of my recent 32X programming experiments: Wolf3D and Spear of Destiny Shareware for the 32X. This is just the MD-Pro 64 image to burn.

Id-Multi-SW-b1.zip

This archive is the source and individual games. The source is included to satisfy the GPL the games are licensed under. The individual games can be burned onto the cart alone, or run in an emulator such as Gens or Kega Fusion.

w3d-sod-sw-b1.zip
Back to top
View user's profile Send private message
McGuirk



Joined: 09 Feb 2009
Posts: 5
Location: Texas, USA

PostPosted: Thu Feb 19, 2009 5:46 am    Post subject: Reply with quote

Thanks for the good replies, Chilly Willy.

I'll try them here as soon as I get a little more time on my hands and then post an update.

Minor question:

Quote:
When you tell it a single game, it puts JUST that game on the cart... which should work fine. You just boot straight into that one game. If it doesn't boot, it's probably a bad image or something (wrong region perhaps).


It runs fine in an emulator with my region settings. Hrm. Is the ROM supposed to be byte-swapped or anything? I loaded it as a standard .bin file.
Back to top
View user's profile Send private message AIM Address
Chilly Willy



Joined: 08 Feb 2009
Posts: 174

PostPosted: Thu Feb 19, 2009 9:34 am    Post subject: Reply with quote

McGuirk wrote:
Thanks for the good replies, Chilly Willy.

I'll try them here as soon as I get a little more time on my hands and then post an update.

Minor question:

Quote:
When you tell it a single game, it puts JUST that game on the cart... which should work fine. You just boot straight into that one game. If it doesn't boot, it's probably a bad image or something (wrong region perhaps).


It runs fine in an emulator with my region settings. Hrm. Is the ROM supposed to be byte-swapped or anything? I loaded it as a standard .bin file.


I just got through sending the ucon64 maintainer a patch file of my two fixes (he requested a patch file to be sure what he applied was correct), so they should be corrected in the cvs soon. Good to see he's updating it at a decent pace.

Ucon64 should be able to handle the file in just about any format, as well as just byte swapped. What is the output log when you write the image to the cart? Another thing you can try is to read the cart after you've written it, then try an emulator on that image and see what it has to say about the image (bad checksum, etc).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ToToTEK.COM Forum Index -> MD-PRO Flash Cart All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group