View Full Version : Virtual Jaguar ported to GCC/SDL!
nwagenaar
June 28th, 2003, 18:29
The author(s) from Virtual Jaguar Project (http://potato.emu-france.com/sys/index.php?op=edito) stopped working on the Atari Jaguar emulator and released the sources under the GPL license. Unfortunately they developed the emulator using MS Visual C++ with SDL (<- this is a good thing ;) ) but the difference between VC++ and the GCC (GNU C/C++ compiler) are enormous. So, we from sdlemu have tried to convert the sources from VC++ to GCC so we can enjoy Virtual Jaguar on other platforms as well. Well, within 2 hours we got it compiled on GCC (it took some heavy changes in the asm sourcecode) and I got it running on WIN32 (using mingw) and Linux (RH7 on i386). Caz got it succesfully running on BeOS :)
The current sources are a straight port from the original sources but only some debug stuff was disabled to boot the emulator much faster. Here are some screens to enjoy you with :
http://sdlemu.ngemu.com/images/virtualjaguar1.jpg http://sdlemu.ngemu.com/images/virtualjaguar2.jpg
Here we have it running with Kusami Ninja and 2nd one is running Alien vs Predator. The 2nd screenshot is garbled but could be because of a bad dump I used.
More info soon ;)
Adam Green
June 28th, 2003, 23:28
Looks great. Did you rewrite the asm into gcc-syntax x86 asm or C? I'm interested in the source for an OS X port when you're done.
nwagenaar
June 28th, 2003, 23:41
The asm syntax was ported to gcc x86 asm. But I reccon it's easy to port to PowerPC CPU's. An other thing is, the video blitting isn't very well written and it doesn't see if it uses SDL_LIL_ENDIAN.
The video blitting is so integrated in the entire sourcetree, that I'm not able to use OpenGL or scaling without breaking up much portions of the code.
Adam Green
June 30th, 2003, 00:09
I've begun rewriting the opcodes into PowerPC asm, since there's really no reason to write it in C. The conditional flags were a bit tricky because we don't have setc, setz, etc. on the PowerPC side, but I figured it out eventually. I haven't even looked at hooking up a 68k core, but I assume m68k will work fine in place of Starscream.
nwagenaar
June 30th, 2003, 09:51
Hello Adam,
it's cool to see you're working on a PowerPC port of Virtual Jaguar GCC/SDL. The current sourcebase is based upon the Starscream core but it's possible to hook it up on an other core but will take some serious hacking in the sources ;)
If possible, could you use #ifdef __GCCMAC__ definition in conjunction with the #ifdef __PORT__ definition? So we could integrate it in one sourcebase.
I'm trying to get a SF account as we speak so we can make use of CVS. This works a lot better with developers everywhere over the Internet ;)
Feel free to say if you don't want to use SF or that the code to be seperate from Virtual Jaguar GCC/SDL!
Adam Green
July 1st, 2003, 06:36
Sounds fine to me. I think __GCCPPC__ is more appropriate though, since the core is not going to be tied down to just Mac OS X.
nwagenaar
July 3rd, 2003, 14:08
That's fair enough :) There are indeed many PPC platforms besides MacOS (X).
Atm, we have a working CVS repository over at icculus.org. But I first need to commit something before people can use the CVS. If you want, I could e-mail you the last changes directly through e-mail.
BTW, we now have an other M68K which is much more portable (Musashi 68K core). Also, much of the assembly is now being rewritten in standard C so that we can enjoy more portability. Many thanks to James L. Hammons for this!
I'm currently working to filter out the SDLptc.h from the sources works and started with "normal" SDL coding. The SDLptc.h is a utter mess and hard to understand. If I've filtered out the console.crap then I'm going to implent some OpenGL code in it to ;)
Adam Green
July 4th, 2003, 02:02
Sounds nice. adam at victoly dot com, if you want to send over the latest until CVS is set up.
Edit: Just grabbed it off CVS at icculus, no need to e-mail it.
Shamus
July 5th, 2003, 09:47
You might want to grab the sources again once the 1.0.3 source tree is up on icculus--last time I checked, they were still 1.0.2-ish.
I would post the sources myself, but I don't yet have CVS access there... :)
Adam Green
July 5th, 2003, 18:13
The CVS seems to be updating rather slowly (have the changes been committed yet?). Can someone upload a tar of the 1.0.3 source somewhere so I can work on this?
Shamus
July 6th, 2003, 08:35
Check your mail... ;)
Last time I checked, 1.0.3 still wasn't up on icculus. I'd bet that Niels hasn't had the time yet to update it, but I could be wrong about that... :)
I should note also that this is only *my* contributions to 1.0.3--I'm very interested in seeing what Niels has done with it myself!
nwagenaar
July 8th, 2003, 11:56
This is entirely correct. I got the sources on thursday/friday and I was unable to update the cvs since I was at a LAN Party this weekend (Drome @ Hengelo/NLD with 2000+ people ruled!) so I was unable to code or do anything.
I'm planning to update the CVS with Shamus' contributions tonight. My contributions will be available somewhere this week (my sources are currently broken) which will hopefully compile correctly ;)
Oh btw, my contributions. I'm ripping out all SDLptc.h and I'm rewriting Jagem.cpp (removing all Visual Crap++ stuff) and start over with new SDL core. This way I'm sure I can incorperate other stuff like OpenGL, (mmx) scaling, filters, etc. I want the sources be clean as possible to which is related to SDL.
Shamus
July 8th, 2003, 22:01
I'm looking forward to see what you've done with it--I agree that SDLptc.h was a really, really bad hack. ;)
I'm still trying to track down some bugs in the GPU/blitter code that are causing Rayman to show an offset screen as well as bad collision detection... Hopefully I'll have something available soon.
Stay tuned! ;)
nwagenaar
July 8th, 2003, 22:34
I will stay tuned ;)
BTW, I've updated the source branche with the new v1.0.3 sourcebase. Still no patches from me, I need to debug some more :(
Stay tuned for the SDL rewrite. I hope to update it tomorrow night!
Shamus
July 12th, 2003, 03:21
Hmm... This bug seems to be more elusive than ever. I've traced through the GPU code and even tried two other GPU cores but the problem remains.
Either the problem doesn't lie with the GPU or the functioning of the GPU isn't fully understood.
More later...
Shamus
July 15th, 2003, 08:22
I'm still looking at Rayman, though I'm still not getting anywhere with it. I fixed a problem with Tempest 2000 (bad blits) that I thought would clear up the Rayman problem, but it only fixed Tempest 2000.
BTW, how about write access for CVS? :)
Shamus
July 16th, 2003, 00:02
Now after looking at the Tempest 2000 code I'm not sure that my fix is a real fix. It's going to be awfully difficult to make things work without the official Jaguar documentation...
Apparently this guy (http://www.starcat-dev.de/products.php) is selling it, but I'm sure that it's on the web somewhere. As I've just spent the last four hours searching in vain for it, I'm going to take a break for the moment.
In short, if real development (instead of making blind guesses) is to continue at all, we need the real docs! :mad:
Update: I've found something that may be of use... It's already cleared up the T2K problem (it seems there is a bug in the blitter which ties a bit in A1 to A2). There may be more bugs in the GPU & DSP that we're not yet aware of (cf. Rayman).
BTW, how about that CVS write access Niels? :D Or do you prefer to do diffs from my source? ;) I'm about to go through and remove all the !__PORT__ stuff, since it isn't necessary anymore (as well as a bunch of other miscellaneous updates/goodies :))...
Shamus
July 17th, 2003, 21:04
Ok, I've made more headway into the Rayman problem. It seems to be undocumented behavior as far as I can tell from my information, but it makes sense and it doesn't seem to screw any other games up (as far as I know). What it doesn't do is clear up the collision detection problems. :mad:
Assuming I can fold Niels' changes into my codebase, it looks like 1.0.4 should be coming soon. ;) How are those changes coming Niels? :)
nwagenaar
July 17th, 2003, 21:47
Slow, very slow. I'm in my last week before I have a 3 week holiday. And the company I work for have filled up my entire week making a 70 hour workweek :(
I hope to do some heavy coding in the weekend. And I hope to have CVS writing for you ;)
hoyoyo80
July 20th, 2003, 11:13
oh,yes btw last time how many jaguar game r publish?I think is not so many,isnt it?
neo_rg
July 26th, 2003, 00:12
hi all, i've got that starcat cd, do you want a copy of the jaguar tech docs and stuff, i'll email it to whoever wants it, file is quite large though.. 4.5 megs in size. or you could send me details and i will upload it somewhere for all to see
mattsmith@zetnet.co.uk
use message header "atari jaguar" or my junk email killer will destroy your email
Shamus
August 1st, 2003, 20:13
Just a quick post to let you guys know what's happening. So far, I've managed to do the following:
- Fixed a few GPU bugs
- Fixed some blitter bugs
- Possibly fixed an OP bug or two
- Cleaned up the source/moved some functions to better places
- Added ZIP support
- BIOS now works when booting up a cartridge (there are still some issues with the BIOS, but I'm not sure if it's GPU or blitter related)
- Added support for detecting and running PD style "ROMs" (e.g., JagMania works)
AvP is getting better, and Missile Command 3D is now showing its text correctly. There's still lots of work to do, though... Neils, I hate to keep harping on this, but I still don't have CVS write access... Should I just send 1.0.4 to you? ;)
cemist
August 5th, 2003, 21:52
Hi Shamus,
I've just emailed Niels as i haven't contacted him for a while, i have mentioned to him about giving you cvs write access as your code enhancements are much needed. He must be busy as he is usually very good at getting these kinds of things in order.
I was involved in originally doing the gnu asm conversions to get Virtual Jaguar working with gcc/sdl. I'm not really involved in the Virtual Jaguar project and the gnu asm conversion is my only contrib.
Caz
cemist
August 6th, 2003, 22:44
I've just uploaded some docs here http://www.beoscaz.worldonline.co.uk , these are courtesy of Matt. These docs are an interesting read and may be of help for working out some of those tricky jaguar traits, the docs are in pdf format and are a must download unless you already have them.
Shamus
August 8th, 2003, 01:05
Thanks much cemist! I just finished downloading 'em. The Jaguar bugs section is very interesting...
Stay tuned!
Still haven't heard from Niels... Niels! Where the heck are you? :)
nwagenaar
August 9th, 2003, 15:16
I'm back in the Netherlands :) I had a vacation for a couple of weeks. And now I'm back, it's 25 ~ 30 degrees Celcius and way to hot for using the computer :(
Anyway, icculus is very busy atm so he didn't had a chance to make a new account for you. I'm going to e-mail you my CVS account so you can make changes to the CVS.
Plz send me your e-mail address. I first need to remove 1000+ SPAM messages first :)
Shamus
August 11th, 2003, 22:29
1.0.4 is up on icculus. :)
Check out the WHATSNEW and TODO files for the changes. I'm hoping to remove the zbmpop*.h files soon. ;)
BTW, the UNIX makefile stills needs to be synced up with the Win32 makefile...
Chrono Archangel
August 11th, 2003, 23:32
hmmm i dont if you have these docs...i found this on the net. you might want to check it
http://www.atari-jaguar64.de/prog_info/devtools.php
(note: if some stuff is against the NGEmu rules,please delete the link. i think its ok)
Gaenya
August 12th, 2003, 17:39
Where do i get the last version??? because the last time i tried to get it with cvs it toldme that anonymous connections arent allowed.
cemist
August 13th, 2003, 01:11
Very Nice work indeed Shamus, the modifications you have made are impressive to say the least and the code mods have made Trevor mc fur for example and of course Tempest 2000 work much better, i don't have Rayman to test.
To download from cvs use the following, password is anonymous,
cvs -d:pserver:anonymous@cvs.icculus.org:/cvs/cvsroot login
cvs -z3 -d:pserver:anonymous@cvs.icculus.org:/cvs/cvsroot co virtualjaguar
Niels will have to update the makefile.unix for a clean build on unix type systems.
The url that Chrono Archange posted is useful, i've visited that site a long while ago but did not look very hard at what was there, but some stuff could be of use from there, some docs are the same as the ones i posted courtesy of Matt.
Chrono Archangel
August 13th, 2003, 01:54
some docs are the same as the ones i posted courtesy of Matt.
yeah i saw that but it was just easier to put that main link then all the other ones one-by-one lol
glad i could help
Gaenya
August 13th, 2003, 04:30
Thanks cemist, i was doing it without password :p
Shamus
August 15th, 2003, 05:31
Hi all, I just updated CVS with some changes (the comment is 1.0.5, though there is no official bump in the release number--yet).
Changes:
- Rewrote the jaguar core to execute more like a real Jaguar console
- Finally got around to rewriting the scaled bitmap handling in the object processor. No more zbmpop*.h! There is an issue with clipping--I'll get to it one of these days... ;)
- Various fixes to the GPU core (mainly in IRQ handling/reporting)
- There's probably more, but I can't think of anything at the moment. :)
I think I'm probably going to simply commit my changes to CVS on a more or less regular basis (as long as my codebase is stable). For those of you who like to live on the bleeding edge, this is your chance to live dangerously!
It seems that a few more PD ROMs work now, they just require the -dspon switch (and -nobios!). I finally got Native to work with this trick.
Stay tuned! :)
Shamus
August 16th, 2003, 21:05
I just updated the sources to use SDL sound. :) Though at the moment, it sounds pretty terrible. Also of note is that SDLptc.h is gone! :) :) :) I've added files to support an elementary GUI, so hopefully the days of having to type long ROM filenames will soon come to a close...
Shamus
August 20th, 2003, 06:56
I've finally got my own account on icculus. :) I'll be throwing up a simple page on the website--once it's up I'll post the URL...
Shamus
August 22nd, 2003, 22:46
OK, it's up. The URL is:
http://icculus.org/virtualjaguar
Niels, you might want to check the page for accuracy before we go announcing it to the world... ;)
BTW, sound is working properly. :) You just have to have a very fast machine to hear it without choppiness... Oh yeah, you have to use the -dspon option as well. ;)
The latest with working sound code is up on CVS now...
One other thing, I changed the OPTION button from TAB to '. This is because TAB now toggles the fledgling GUI on and off. :thumb:
nwagenaar
August 23rd, 2003, 13:30
Hya James,
*very* nice work you have done! Damn, that looks really promising. I'm gonna test the new CVS tonight since my mobo was dead for weeks now. I'm using a P2 350 and that's not good for compiling and testing ;)
I saw the website. Nifty colours and logo! Only, why do people have trouble writing my name correct? It's Niels and not Niels ;)
If all goes well, we might freeze the code and release this version next monday!
Niels
Shamus
August 23rd, 2003, 19:25
A Monday freeze would be good. I have a few other tricks to slip into CVS before then. ;)
Right now I have the code set up to stop whenever there is an "unknown" memory location accessed. DSP code in Rayman and AvP is causing this to happen currently--I'm having a hard time believing that the coders at Atari could be so sloppy with their memory writes... Which leads me to believe that there is still something wrong with the DSP code. :(
BTW, I've fixed the website. ;) I think it's not bad for a quick and dirty job, eh?
Shamus
August 23rd, 2003, 19:37
Check out CVS--now there's a little GUI ROM selector. ;) To use it, simply specify the directory where your ROMs are... In other words use the directory name instead of a ROM name. For example:
vj [ROM directory] [-switches]
Also, I took out the bad memory stoppage in preparation for the Monday freeze. It's bad that these accesses happen, but it would be worse for an end user to have the emu stop because of them! :cool:
nwagenaar
August 23rd, 2003, 19:45
I will when I got my system up and running ;)
And yes, the website is simple but it gives the information provided. There for it's good ;)
Shamus
August 25th, 2003, 21:49
So, Niels, how's it working for you? ;) I think CVS is in a good state now to do a 1.0.5 release. I can create the source and Win32 binary tarballs.
What do you think? :) I can have tarballs made and the web page updated in short order...
Shamus
August 27th, 2003, 23:45
Well, I finally figured out why Rayman has bad collision detection... :) It turns out to be a blitter problem. However, the fix breaks T2K. :( Obviously, I don't understand the problem. ;) Once I do, I'll be updating CVS since this is an important breakthough--at least to me. :thumb:
Shamus
August 28th, 2003, 08:52
Now I understand the blitter problem. :thumb: The problem was a phrase alignment issue with the A1/2_BASE addresses.
Anyway, just for the hell of it, I decided to see if I could get VJ to compile and run on my linux partition, and found a whole bunch of stuff that was broken. ;) The changes both to the main source and the makefiles (both of 'em!) are now in CVS...
If it's OK by you, Niels, I'm going to make a tarball and call it 1.0.5 and tag CVS with VJ_1_0_5 before making any more improvements. And post it to the webpage as well. :)
nwagenaar
August 28th, 2003, 22:05
Now I understand the blitter problem. :thumb: The problem was a phrase alignment issue with the A1/2_BASE addresses.
Anyway, just for the hell of it, I decided to see if I could get VJ to compile and run on my linux partition, and found a whole bunch of stuff that was broken. ;) The changes both to the main source and the makefiles (both of 'em!) are now in CVS...
If it's OK by you, Niels, I'm going to make a tarball and call it 1.0.5 and tag CVS with VJ_1_0_5 before making any more improvements. And post it to the webpage as well. :)
Uhm.. Damn! I was just busy with all kind of patches for VJ on my freshly installed FreeBSD 5.1 system ;) I had some troubles with my new mobo and CPU. It seemed that my memory was broken so I had to wait for some new memory. But atleast I now have 1GB of DDR-400 in my system ;)
It's ok to release v1.0.5 to the public. I'll post the news on the SDLemu website. BTW, did you heard anything from Adam Green? I'm very interested in the MacOS port :D
BTW, would you please e-mail me to my private e-mail address? I want to talk about something. Or please join #ngemu of efnet for a faster chat ;) I'm available till 21:30 hours CET!
Regards,
Niels Wagenaar
Adam Green
August 28th, 2003, 22:39
I'm still here. Looks like you've been doing some fantastic work Shamus. VJ compiles fine here on OS X, but I haven't had time to do a proper gui or anything. I can provide a binary for users who want to run it through a terminal, but I can't really do a real release without some work on the interface (substandard interfaces aren't accepted on Mac OS X ;) ).
nwagenaar
August 28th, 2003, 22:47
I would advice to send that binary version to me and Shamus. A terminal version is always better then no Jaguar emulation on MacOS X ;)
Shamus
August 28th, 2003, 22:59
OK, the page has been updated and CVS has been tagged ;)
BTW, Adam, I've put the first tentative steps towards an in emulator GUI into VJ. I don't know if anyone else agrees or not, but I think it would be nice for it to have its own GUI in the vein of ZSNES. If you're so inclined, you could do some work towards that goal. ;)
nwagenaar
August 28th, 2003, 23:01
Shamus, I'm still online :) Please go to efnet and join #ngemu ;) I'll update the sdlemu website later on!
Adam Green
August 29th, 2003, 03:25
Mac OS X binary here: http://victoly.com/~adam/virtualjaguar-1.0.5-macosx-bin.tgz
Pretty much the same as the Unix version.
Shamus
August 29th, 2003, 08:34
Ok, the MacOS binary is up on the web page... ;)
retroK
August 29th, 2003, 13:00
The Source archive on http://www.icculus.org/virtualjaguar/ should be renamed.
I donīt think: http://www.icculus.org/virtualjaguar/tarballs/virtualjaguar-1.0.5-src.tbz is correct ;)
Shamus
August 29th, 2003, 19:19
It's a tarred, bzip2'ed file, so what's wrong with the tbz extension? :)
nwagenaar
August 29th, 2003, 20:18
Well, the "standard" for these kind of files is tar.bz2 or tar.gz ;)
Shamus
August 29th, 2003, 22:29
Hmm. It seems that there isn't much consensus on the issue. For example, at http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/getting-started-guide/s1-managing-compressing-archiving.html, they say that .tbz is OK for a tarred, bzip2'ed file:
"Remember, the tar command does not compress the files by default. To create a tarred and bzipped compressed file, use the -j option:
tar -cjvf filename.tbz
tar files compressed with bzip2 are conventionally given the extension .tbz."
Just adding more fuel to the fire... ;)
URherenow
August 30th, 2003, 18:53
Am I just failing to read instructions correctly or is the -? flag broken in the 1.0.5 or whatever? I don't know any options I can use and There isn't any info in the readme about it. Can it be loaded with a bigger screen or even full screen?
Shamus
August 30th, 2003, 21:08
Are you using Windows? Then you have to look in the stdout.txt file that it generates (in the same directory that you ran vj.exe). Sorry, I wish I knew how to override that behavior, but I don't... :(
BTW, moderators: This belongs in the 1.0.5 support thread...
nwagenaar
August 30th, 2003, 22:12
Indeed. Since this thread is being flogged with other items I'm closing this thread down :)
All support items should *now* go to the Virtual Jaguar v1.0.5 support thread!
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.