#107263 - simonjhall - Sat Oct 28, 2006 3:16 am
Back from the Debugger Wars and have been looking for something to do for a laugh...but I may have bitten off more than I can chew!
Not that I wanna show off, but check:
[Images not permitted - Click here to view it]
here's me running around a deathmatch level on my DS.
Note: I just did this for fun one weekend, and John (the guy who's doing the first Quake port) sounds like he's doing much better at this Quake lark than me and definately has the better version in the works - so wait for that!
But for those who are interested, I've got the software renderer running Quake. I've not yet decided whether I'm gonna asm-up the renderer or simply try doing GLQuake->DS.
I have no idea how I would'a done it without that debugger of mine :-)
---
As RAM usage is beyond tight with this game I've written some memory-mapped file thing - I may open this up if there's enough interest... Basically rather than freading in a file (which will take memory) then picking out the bytes you need you just 'load' a file into part of the address space then you can access it like regular memory. And yeah, you could also do some kind of virtual memory thing with it if you wanted to.
#107267 - Lazy1 - Sat Oct 28, 2006 3:36 am
Nice!
Especially since it looks like the other quake project is dead.
How is the framerate anyway? Dropping -mthumb should give a nice speedup if you haven't already done that.
#107282 - tepples - Sat Oct 28, 2006 5:43 am
simonjhall wrote: |
I've not yet decided whether I'm gonna asm-up the renderer or simply try doing GLQuake->DS. |
The latter might be a good idea, if only because that's how a commercial port would more than likely do it.
Quote: |
As RAM usage is beyond tight with this game I've written some memory-mapped file thing - I may open this up if there's enough interest... Basically rather than freading in a file (which will take memory) then picking out the bytes you need you just 'load' a file into part of the address space then you can access it like regular memory. And yeah, you could also do some kind of virtual memory thing with it if you wanted to. |
How much performance penalty does this take? If not much, it could be useful in porting SnezziDS (which assumes that the entire Super NES ROM is mmapped into GBA ROM space) to the GBA Movie Player, MAX Media Dock, and SLOT-1 cards.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#107285 - sajiimori - Sat Oct 28, 2006 6:08 am
Wait a sec... isn't memory-mapping whole files exactly the opposite of what you'd want to do when facing a memory bottleneck?
Or do you mean you're using processor exceptions to forward out-of-range memory accesses to the ROM? If so, isn't that painfully slow, like 50+ cycles per access?
#107301 - OOPMan - Sat Oct 28, 2006 10:16 am
It looks like this Quake port is better from the get-go than the other one, which didn't even have texture rendering, last time I checked...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#107306 - simonjhall - Sat Oct 28, 2006 11:58 am
Ok, gonna try and answer all the questions in one go:
Quote: |
It looks like this Quake port is better from the get-go than the other one, which didn't even have texture rendering, last time I checked... |
I think they've got texture mapping going on, but as they use hardware rendering all the textures need to fit inside the texture memory (512k - is that true?) As a result things need to be resized on the fly or done offline.
Also I hear that there's a poly limit on the DS hardware. Can anyone confirm this?
Quote: |
Especially since it looks like the other quake project is dead. |
I've been assured that it's not, he's just not updated the blog. I think he has been busy with other things though.
Quote: |
How is the framerate anyway? Dropping -mthumb should give a nice speedup if you haven't already done that. |
Again, I've done zero work in terms of making it fast as speed isn't my concern yet so I'm gonna hold off on talking about framerates! (it is real-time though) One thing which I think may be an issue is that Quake requires an FPU - something the DS doesn't have. I think I'm gonna have to write a profiler...
Actually, I've tried profiling it running on other machines but I'd like to compile with --soft-float to get useful info but I always get linker errors.
Oh and I don't think I ever finished thumb support in the debugger...or did I?
And regarding memory mapped files, the biggest problem with Quake is obviously the memory usage. For example, when loading the necropolis level it'll allocate 1.5 megs, fread the file in then go though each chunk of the model (vertices, textures, nodes, etc) and allocate memory for them. So by the end of loading the model you've allocated 3 megs of RAM - 3 megs I don't have. It'll then free the original 1.5 megs. I can either rewrite the code to fread tiny kilobyte chunks or I can just be lazy and memory map files. I may end up just rewriting the code to get the speed...
I am having this weird-ass bug though - there's no friction with the floor! I ported it to another platform first just to see potential issues and I had no friction problem...
#107316 - OOPMan - Sat Oct 28, 2006 1:48 pm
Hmmmm, yeah, the DS does have about 600kb of VRAM, but it's organised in a rather different fashion from your average chunk of memory...
Also, yeah, the DS has a poly-limit of about 4000 per scene (Although the HW is technically supposed to be capable of more...)
The memory-mapped files stuff sounds interesting. Does anyone know whether this kind of thing is more difficult to use than the extra memory on the SC and M3, or less difficult? Can anyone guess how it compares speed-wise?
That friction bug sounds weird. Hmmmmm, I wonder, might it not have something to do with ther maths side of things. The DS doesn't have an FPU and if the friction code uses FPU math and hasn't been updated/changed to use fixed-point math instead it might have issues...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#107424 - simonjhall - Sun Oct 29, 2006 4:24 pm
Right, for now I'm gonna try and pursue the software-rendered route. I'm a little wary of using the hardware renderer as I reckon it's gonna be such an arse to get running! It will be faster in the long run though.
So in order to improve the performance of the sw renderer I've been scouting round for a fp-less version of Quake and came across PocketQuake. I've since been merging as many of the changes as I can from their version into DSQuake, but I bet money that it won't work first time :-)
Oh and I've fixed the friction bug and it's now so much more playable...
It's yet another thing I've found in the source which isn't cross-compiler friendy!
EDIT: I've just spent several hours merging in the fixed-point code...and surprise surprise it doesn't work. The PocketQuake source code is incomplete! Several major functions are called but aren't supplied in the zip! What a waste of time...
#107568 - simonjhall - Mon Oct 30, 2006 11:34 pm
Ok, for those who want the shimmy on memory-mapped files I've just got the complicated part of the system working - putting the actual file stuff in is totally easy from here on.
BUT. Big ol' but :-) I thought I'd better check out the performance of the address-trapping system before finishing it off, and I just had to let out a groan... Inital tests said that I'd be able to get a peak of about 30k/s which is just terrible when you'd like to load a file that's larger than a megabyte!
To get this thing to work I integrated it with the debugger, and looking back over the core exception-handling functions I noticed that I'm flushing the data cache twice and the instruction cache twice! If I remove any of these calls both the debugger and mmap stuff go wonky really quickly. If however I remove all the cache calls and put a single cache flush call into my regular user-space function straight after the fake read it's all fine! And the performance increases to 60k/s!
So now I'm seeing if I can flush selected cache lines in order to make it work and get it running ten times as fast. There's still some hope of mmapped files being worthwhile.
Just for info: does anyone know what the average (read) transfer rate of a GBAMP (CF) is? How about main RAM too? (I'm too lazy to do a test)
#107571 - tepples - Tue Oct 31, 2006 12:16 am
simonjhall wrote: |
Just for info: does anyone know what the average (read) transfer rate of a GBAMP (CF) is? |
This depends heavily on the make and model of CF card. See my CF Speed Tester.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#107572 - simonjhall - Tue Oct 31, 2006 12:33 am
Ta man, I'll check that in a bit as I'll have to recompile it as an nds (but really should go to sleep)...
mmap again: I've got it up to 180k/s (though I'm pretty sure I got it to 220k/s at one point) so all is not lost. Given the massive overhead of the exception stuff (it's gotta be AT LEAST 1000 clocks) adding the file stuff ain't gonna cripple it. This also means that if you have one of those cards with the extra RAM you could totally map it in through this interface.
You'd just have to treat it like slow RAM.
#107894 - silent_code - Thu Nov 02, 2006 10:54 pm
OOPMan wrote: |
Also, yeah, the DS has a poly-limit of about 4000 per scene (Although the HW is technically supposed to be capable of more...) |
there's only memory for 2k triangles, though you can render more. using strips won't give you more triangles, because the hw isn't limited by vertex count, but triangle count (kinda both, but as i said, saving vertices by using strips won't increase triangle memory ;p ).
all you need to be careful about is your vertex count: don't use up all 6k vertices as the hw needs some free vertex memory for clipping (generates new vertices).
i think you can render up to 4k tris at 30 Hz, but i have to yet try that myself. the hw is sure capable of more and looking at those memory limitations, it's a bit sad. :C
happy coding!
#108227 - simonjhall - Mon Nov 06, 2006 9:58 pm
For those who're wondering, yes I'm still porting Quake to the DS but I've been busy at work etc...plus I've been having a go with porting Quake 2 too :-)
Anyway couldn't be bothered to open a new thread: how do I get the default libnds text console to span both the screens? I'm not doing anything graphical at this point, so I don't care about trashing what's on the second screen. At the moment I'm just using consoleDemoInit()...
Thanks guys!
#108238 - xtoc - Mon Nov 06, 2006 10:51 pm
great , quake II i still my nr1 game if it go's about fps multiplay
#108358 - simonjhall - Wed Nov 08, 2006 12:13 am
So...nobody knows how to (easily) extend the libnds console over two screens? Touche.
Anyway, I've given up with the memory-mapped files. It'll work in most circumstances but I'm pretty sure something is trashing my stack pointer once every blue moon. This occurs after the last valid instruction is run, yet before the very first instruction of my exception handler so it has to happen in some kind of bios-y code. What I really want is some kind of hardware breakpoint system where the processor itself will catch the change of $sp... (I need an emulator!)
So I've decided to bite the bullet and rewrite the Quake level-loading code instead of endlessly fixing mmapping. I'm not half as enthusiastic about this game as I used to be :-(
#108363 - sajiimori - Wed Nov 08, 2006 1:05 am
On the bright side, it'll be a lot faster when you're done. :)
#108364 - Lazy1 - Wed Nov 08, 2006 2:03 am
simonjhall wrote: |
I'm not half as enthusiastic about this game as I used to be :-(
|
I had that problem when I was working on my first port of wolf3d, after a while adding onto hack after hack just wasn't fun anymore.
All I did was start again and the interest is back again.
#108947 - Schtee - Mon Nov 13, 2006 12:06 pm
Woo to you sir. Good stuff you've got going on there. Quake/Q2 would be the pinnacle of all DS ports, I feel. Hope this all works out well.
#108951 - simonjhall - Mon Nov 13, 2006 1:45 pm
Yeah, I'm having problems with Quake 2 at the moment as I've got the demo playing, but I can't actually get into the game... The level-change message from the client to the server just doesn't seem to get through.
I'm also going on holiday tomorrow for a few weeks so don't expect me to reply if you wanna know more!
#108954 - Lazy1 - Mon Nov 13, 2006 2:21 pm
Any plans to release the latest source for people to hack around with?
#108963 - simonjhall - Mon Nov 13, 2006 4:50 pm
Lazy1 wrote: |
Any plans to release the latest source for people to hack around with? |
If/when I choose to release Quake for the DS I'll package the source as that's a required part of the license. But as for giving it out this eve...oooh...err...nah! I've not yet packed for my hols, so there's no time! Sorry!
Actually, does anyone here have any experience with the Quake engine? I've been playing Quake on the tube in the morning but upgrading the networking has somehow corrupted my save file! And I was nearing the end of the game! No fair!
#108975 - OOPMan - Mon Nov 13, 2006 6:31 pm
Did you play through on the DS version, or PSP version?
It's nice if you can actually play that far on the DS version :-)
Anyway, good luck with the project...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#108976 - Devil_Spawn - Mon Nov 13, 2006 6:42 pm
simonjhall wrote: |
Lazy1 wrote: | Any plans to release the latest source for people to hack around with? |
If/when I choose to release Quake for the DS I'll package the source as that's a required part of the license. But as for giving it out this eve...oooh...err...nah! I've not yet packed for my hols, so there's no time! Sorry!
Actually, does anyone here have any experience with the Quake engine? I've been playing Quake on the tube in the morning but upgrading the networking has somehow corrupted my save file! And I was nearing the end of the game! No fair! |
noooooo
#109005 - simonjhall - Mon Nov 13, 2006 11:45 pm
Devil_Spawn wrote: |
noooooo |
:-)
I'll let you stew on that for a while :-p
Vegas here I come!
#109032 - OOPMan - Tue Nov 14, 2006 7:31 am
Vegas? You poor poor man...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#109063 - josath - Tue Nov 14, 2006 6:06 pm
OOPMan wrote: |
Vegas? You poor poor man... |
Well...if not poor yet, he will be :P
#110050 - simonjhall - Fri Nov 24, 2006 11:00 pm
off topic: just got back from my trip and the time spent in Las Vegas was awesome! Having one of the tires on our coach blow out in the middle of the night in the middle of the Mojave Desert wasn't too much fun though... Also a bit hairy when another tire decided to blow on the way to LAX!
Time to get back to work with Quake...
#110083 - OOPMan - Sat Nov 25, 2006 8:50 am
Woot :-)
Go get 'em :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#110109 - simonjhall - Sat Nov 25, 2006 5:22 pm
Guys, just for a laugh (and I'm bored of the endless Quake 2 slog) I'm just gonna put a little vid up of Quake 1 running on my DS.
I'm too lazy to edit the Quake config file, so this is it running UNLIT AND UNTEXTURED.
http://myweb.tiscali.co.uk/simonhall/quake.avi
It's about two megabytes in size.
I'm still messing around with the model loading and networking, so I've still not bothered with changing it to fixed-point fp (so it's using software-emualted fp) nor attempted to use the DS' 3D hardware to make it run faster.
Back to Q2... (why couldn't they have put more RAM in the DS?!)
#110110 - PeterM - Sat Nov 25, 2006 5:35 pm
Thanks for the video. I'm on really crappy dial-up so it'll take a while before I can see it. :-)
Edit:
I saw the video, very neat!
Does the game load textures and just not render with them, or not load them at all? I ask because when I was porting Quake to the PSP I didn't have to fight against memory limits at all, but I could see that getting the memory usage down below 4MB may be difficult.
Did you employ any special tricks to get the memory footprint down?
BTW good luck with Q2 -- AFAIK nobody's been able to get that running decently on PSP yet so it'll be very very impressive if you get it doing on the DS (and I may just have to pinch the code!)
_________________
http://aaiiee.wordpress.com/
Last edited by PeterM on Sat Nov 25, 2006 7:50 pm; edited 1 time in total
#110119 - HyperHacker - Sat Nov 25, 2006 7:33 pm
simonjhall wrote: |
Back to Q2... (why couldn't they have put more RAM in the DS?!) |
Yeah, I thought the N64 expansion pak would have shown them that 4MB is not enough...
_________________
I'm a PSP hacker now, but I still <3 DS.
#110125 - simonjhall - Sat Nov 25, 2006 8:05 pm
HyperHacker wrote: |
Yeah, I thought the N64 expansion pak would have shown them that 4MB is not enough... |
Oh... <starts to shake a bit>
Doing a quick look online (and I'm talking quick!) seems to imply that you don't require the expansion to play. Plus didn't the N64 have 4 megs of RAM, like the DS? It would be so much easier if I could run my code out of cartridge space and allow the game to use the full 4 megs for data.
Is this possible?
Quote: |
Does the game load textures and just not render with them, or not load them at all? |
No, they're being loaded just not drawn. Just at the moment for some levels there's not enough RAM so I just normally roll without texture maps. The stuff I'm writing at the moment should allow it to run properly though.
Oh and I've seen Quake on the PSP - it's good! Did you use the software renderer? Shame there's so much lag on the LCD! The DS doesn't seem to suffer from that problem. Just a crappy framerate!
#110129 - HyperHacker - Sat Nov 25, 2006 8:23 pm
Yes, N64 had 4MB but was boosted to 8MB by the Expansion Pak. Some games just added extra features or higher resolutions, but others required it.
_________________
I'm a PSP hacker now, but I still <3 DS.
#110131 - tepples - Sat Nov 25, 2006 8:30 pm
simonjhall wrote: |
Doing a quick look online (and I'm talking quick!) seems to imply that you don't require the expansion to play. |
Some games (Donkey Kong 64; LoZ: Majora's Mask) absolutely required the expansion, and others (Perfect Dark) presented only a tutorial mode.
Quote: |
Plus didn't the N64 have 4 megs of RAM, like the DS? It would be so much easier if I could run my code out of cartridge space and allow the game to use the full 4 megs for data.
Is this possible? |
The N64 had execute-in-place like the GBA. However, the N64 didn't have the extra near-megabyte of VRAM that the DS has; it had integrated EWRAM and VRAM like the Xbox, Xbox 360, and low-end PCs.
Quote: |
Just at the moment for some levels there's not enough RAM so I just normally roll without texture maps. |
Nintendo's N64 and GameCube games use Gouraud shading on a lot of the geometry. Would it be possible to designate some polygons as solid color and not load their textures?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#110132 - PeterM - Sat Nov 25, 2006 8:31 pm
simonjhall wrote: |
Oh and I've seen Quake on the PSP - it's good! Did you use the software renderer? Shame there's so much lag on the LCD! The DS doesn't seem to suffer from that problem. Just a crappy framerate! |
Thanks :-) Chris Swindle did some great work on the networking side too. I basically just hooked up the video, input and sound.
Shame most PSP sites only link people to a really old port that Pacmanfan did which doesn't have sound...
Anyway, we just use the original Quake software renderer, although we've both done some fruitless dabbling with hardware. I think we've both been too busy to get it done properly.
The PSP's screen is big, but you're right, definitely not as good quality as the DS or DS Lite's screen.
Looks like you don't need any help with the DS version, but give me a shout if you have any questions about the how we did the PSP version.
_________________
http://aaiiee.wordpress.com/
#110135 - Lazy1 - Sat Nov 25, 2006 8:42 pm
You could probably scale all the textures by atleast half, it wouldn't be that noticable on the DS anyway.
As for memory, on some cards you can use gba rom space as 16/32 megabytes of memory as long as you don't write 8bits at a time to it.
There is a compiler patch somewhere that dslinux uses to allow 8bit writes to the gba slot but I heard that it would never make it into devkitpro.
#110138 - bear - Sat Nov 25, 2006 9:45 pm
Since Quake 2 has higher polygon counts and also probably uses more resources for pretty much everything it seems like a good idea to start with seeing if you can get that to run well first.
Quake BSP:s are constructed to minimize over draw to aid the software renderer, but to make the best use of the DS hardware it would probably be best use the 3d-hardware and to make a new map compiler (all the Quake .map sources for the original game are available now) or a tool that converts .bsp files to something more suitable. The downside of that would of course be that you can't simply run all existing maps on the DS without conversion but I think it might be worth it.
#110152 - Dood77 - Sun Nov 26, 2006 1:43 am
Problem is, this John guy is making his port to be an exact port of the quake client, so it can play on real quake servers and use real quake mods... but for your port it would be nice to initially have just single player that WORKS on the DS, that would be faster to do then a true quake client on DS.
#110158 - simonjhall - Sun Nov 26, 2006 2:28 am
At the moment, my version of Quake should be compatible with regular Quake, and mp works fine. I could go to town on it and tear it apart but I'm just too lazy!
I've been Q2ing for the last half-day now and I'm pretty skeptical that it can be done with the amount of memory available to the DS. Here's why:
This is the stock memory breakdown for Q1: (hope the text layout works...)
Code: |
code and static data 600k
stack 100-200k
graphics + etc 500-700k
heap 8192k
|
So in order to get something onto the machine you need about 1.5 megs free before any models get loaded. This leaves about 2.5 megs free for the 8 megs of heap and the huge stack! I got rid of the excessive stack and got it to work with just 2.7 megs of heap. It now runs, mostly.
Quake 2, however, does stuff differently. In Q1 all model loading is done with malloc (so if your model is 1234 bytes in size, it'll allocate something like that). With Q2 everthing (as well as model loading) is done statically, and it's geared for the worst case. If your model is 1234 bytes in size, it'll use a block thats 16 megs in size! You can reduce this size, but when you get a big model it'll obv break. It'll take some work to get rid of all this static lark...
As everything's done statically my original Q2 executable required over 9 megs of RAM (600k of which is code). I've now shrunk that to 3.9 megs, leaving just 100k for...models, texture maps, stack, lighting, frame buffer :-)
Loading the level used in the demo then required over 3 megs.
I don't see this working without some kind of RAM card or using virtual memory. Anyone wanna donate?
Oh and thanks for all the interest in this by the way!
#110159 - Lick - Sun Nov 26, 2006 2:36 am
Please release a binary? :(
_________________
http://licklick.wordpress.com
#110162 - simonjhall - Sun Nov 26, 2006 3:00 am
Lick wrote: |
Please release a binary? :( |
I guess I could just release a binary which played the Necropolis demo... just to see if your DS is good enough to play it :-)
Source code is one of the requirements of releasing a copy of Quake though, so I'd have to package it. But I'm still working on that!
Any GPL-y people out there gonna moan if I put an .nds?
#110163 - Lazy1 - Sun Nov 26, 2006 3:24 am
simonjhall wrote: |
Any GPL-y people out there gonna moan if I put an .nds?
|
I'm sure there are more than a few :(
#110171 - PeterM - Sun Nov 26, 2006 9:59 am
I would just bundle the source up in an archive, I wouldn't worry about any docs or anything. But yes, it's a pain since the .nds would be rather small compared to the source archive.
I presume it's alright by the GPL to delete unused source files.
_________________
http://aaiiee.wordpress.com/
#110178 - bear - Sun Nov 26, 2006 1:31 pm
Even if you get Quake 2 to run you also have a polycount at least 1,5-2 times that of Quake. With two passes to get the lightmaps and the hardware limits I don't see it being possible to get more than 15 FPS (I guess that's still sort of playable) most of the time.
I shouldn't sound so negative when you're doing all this hard work... maybe it's just that I prefer the original Quake :)
#110204 - shadowghost21 - Sun Nov 26, 2006 7:31 pm
I would most certianly be interested in seeing the binary and most importantly your modified source. I am *trying* to write a 'port' of perfect dark, but it would a whole lot easier if I could have some sort of engine, IE the quake engine to just port over graphics and level data, rather than writing a wholenew engine from scratch my self.
-shadow
#110247 - f3 - Mon Nov 27, 2006 7:02 am
man oh man. I would LOVE if you released a binary that demoed necropolis. I just want to see quake on me ds. I have a quake necklace and everything, I love quake to death.
_________________
fckgw
#110323 - simonjhall - Mon Nov 27, 2006 9:46 pm
So I left my card reader at work today (no I didn't do it on purpose) and I'm having this file seek bug (which I would have a chance of fixing if I had my reader) and it's left me really wondering if porting Q2 to the DS is a feasible thing to do.
I've almost made it to getting something on the screen (I'm talking about the menu here) but RAM is seriously low. After powering on and running _start() and _init() and loading in text and bss etc I've got it down to needing just 3.3 megs of RAM. That may sound terrible, but it originally took a little over 9 megs! And the only real thing I've sacrificed is (network) compatibility with the PC version of Q2... (sorry!) So that leaves 600-700k for 16-32 megs of data! Once I've got the pak file tables in memory I've got about 200k free.
Yeah you may say that the N64 version got by with 4 MB of RAM but I'm pretty sure that the maps, models and textures were read from the cartridge space - something I don't think I can do with DS homebrew. Pulling the data from files is likely to be too slow.
Anyone have any suggestions here? Blindly trooping on trying to get it to run ain't gonna work for too much longer! The only thing I can think of is if someone lends me one of those cards which has extra RAM on it and gives me a dash of code as to how to read/write data to/from it I'm pretty sure I'll be able to get Q2 to work...
How much do those cards have anyway? Isn't it like 16 megs?
Quake 1:
This can definately be fit within four megabytes of RAM. And maybe it's best to wait until I'm in a state where I can release the code... Keep the faith :-D
#110324 - simonjhall - Mon Nov 27, 2006 9:53 pm
Sorry back on Q2 again:
I was slightly wrong when I said earlier that the model loading allocates fat, static amounts of memory when it loads a model. I forgot that it didn't originally call malloc, it called some Win32/Linux/Irix functions which did some kind of virtual malloc. So if you asked for 16 MB it wouldn't really give you 16 MB, but when you started to use it it would throw some kind of exception when ran out of real memory pages.
Is there some way of doing this without an MMU? Cos that'd make fixing the model loading code a whole lot easier!
#110342 - PeterM - Mon Nov 27, 2006 11:36 pm
Not as far as I know.
If I recall correctly, Q2 allocates a big block of virtual memory (using VirtualAlloc on Windows) per model etc and allocates within that as required.
So you'd think that you could just replace the original VirtualAlloc calls with nothing, and replace the individual sub-allocations with mallocs. Unfortunately not so, as I believe when Q2 is loading files, it expects subsequent allocations to be contiguous.
Which pretty much means that if you don't have an MMU you have to allocate a big block up front, or rewrite much of the memory allocation and loading code.
Unfortunately it is id's (or just John Carmack's) coding style to statically allocate worst-case memory buffers, which is fine for PC but sucks for consoles and handhelds.
_________________
http://aaiiee.wordpress.com/
#110345 - simonjhall - Tue Nov 28, 2006 12:11 am
PeterM wrote: |
If I recall correctly, Q2 allocates a big block of virtual memory (using VirtualAlloc on Windows) per model etc and allocates within that as required.
|
Yeah, that's exactly right!
Quote: |
So you'd think that you could just replace the original VirtualAlloc calls with nothing, and replace the individual sub-allocations with mallocs. Unfortunately not so, as I believe when Q2 is loading files, it expects subsequent allocations to be contiguous.
|
That's what I thought too.
Quote: |
Which pretty much means that if you don't have an MMU you have to allocate a big block up front, or rewrite much of the memory allocation and loading code.
|
What, are you reading my mind here?!
Maybe the homebrew community should start a petition for what we'd like to see for the DS 2 :-)
I'd like more RAM, an FPU and an MMU please.
---
Anyway, I've got a little tool I wrote for another architecture which allowed me to take any piece of code and allow it to run in barely any memory by treating the RAM as a software cache. I could rewrite it for the DS just to demonstrate that Q2 will run perfectly fine (albeit massively slow) on the DS with virtual memory instead of RAM...
#110365 - Dood77 - Tue Nov 28, 2006 2:22 am
to clarify the supercard has 32 megs of ram, im not sure about the m3 or anything else, i dont know anything about accessing it, and im dead poor so as much as i would love quake on ds i cant get you one :S
#110398 - OOPMan - Tue Nov 28, 2006 8:25 am
The SC and M3 do have 32mb of RAM and it is actually apparently pretty easy for bare-metal homebrew to use it... (As opposed to DSLinux, which requires a custom toolchain...)
Still, the memory on the SC and M3 is not ultra-fast, but it may be better than nothing...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#110430 - Lazy1 - Tue Nov 28, 2006 4:11 pm
It's only useful if you can track down every 8bit write, if you have a large project it's near impossible.
#110434 - OOPMan - Tue Nov 28, 2006 5:03 pm
Actually, from what I've read on the DSLinux forums that's not the case.
That IS the case with DSLinux, which is a different kettle of fish really...
Try asking the DSL devs about this, but last time I check with them bare-metal homebrew can actually use the extra memory without too many problems...
Why?
Because with bare-metal you don't need to worry about every 8-bit write. You only need to worry about 8-bit writes to the memory area provided by the SC/M3...
With DSLinux it's different because DSL is an OS and treats the main memory + extra memory as a single unified memory area. Thus, DSL needs to handle to 8-bit write problem or else suffer complete failure...
An approach for normal DS homebrew, however, would be a bit different. You would use the main memory to store program code and immediate data while the additional memory is accessed as a special cache via a read/write wrapper that ensures only 16-bit writes occur.
This is possibly a bit of an oversimplification, but I've checked on this with the DSL devs in this thread
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#110442 - josath - Tue Nov 28, 2006 5:50 pm
Even with a read/write wrapper, you still need to track down all the 8-bit writes in order to place the wrapper. So Lazy1's statement still holds. He should know, he was trying to use the extra RAM for the mini vmac emulator thingie.
#110450 - Sausage Boy - Tue Nov 28, 2006 6:15 pm
You'd probably want to concentrate on one or more subsystem, textures for example, and rewrite those parts to use the extended memory.
_________________
"no offense, but this is the gayest game ever"
#110456 - Lazy1 - Tue Nov 28, 2006 7:05 pm
As far as I know 8bit reads are fine, so you could copy the map, all the textures, sounds, ect into GBA RAM and read them from there with no problems.
Since the actual map data won't change at runtime, there will be no need to fix the 8bit write issue.
#110494 - OOPMan - Tue Nov 28, 2006 10:22 pm
Good point lazy1...
simon, this could be useful for you, as I'd imagine the extra ram provided by the SC/M3/G6 is probably somewhat faster to access than the SD card...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#110507 - Lazy1 - Tue Nov 28, 2006 11:03 pm
If you need money I suggest opening a paypal account and asking for donations, I did that and thanks to the generous donations of a few people I bought a Supercard and was able to add flashcart support for mini vmac.
#110515 - chishm - Tue Nov 28, 2006 11:52 pm
If Q2 needs extra space for loaded data, and that data is never going to be over 32MB (including program code), and never going to be overwritten, it might be possible to simply use a GBA flash cart. This allows more devices to work (all slot 2 devices that support non-multiboot GBA ROMs) and is well established technique on the GBA (Tepples even wrote GBFS to make it simpler to do).
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com
#110730 - simonjhall - Fri Dec 01, 2006 1:02 am
Heh heh, here's a sneak preview of things to come :-)
[Images not permitted - Click here to view it]
And I've got a whole 100k free! Wooh! That was painful. And now I can't get the pad to work, so I can't test out the menu system :-(
EDIT: oops, I don't have 100k free. That was how much was free before loading the menu images. I didn't have enough to load the console background image, so I must have about 30k free. Yeah.
Last edited by simonjhall on Fri Dec 01, 2006 1:08 am; edited 1 time in total
#110732 - PeterM - Fri Dec 01, 2006 1:07 am
Please, you can't just leave us detail-hungry programmer types in the lurch! I'd love to know where you shaved the bytes off!
_________________
http://aaiiee.wordpress.com/
#110738 - josath - Fri Dec 01, 2006 2:27 am
Wait, did I miss the part where you released Q1? Please finish that one first :) (It's my favorite...I have the first few levels memorized by heart)
#110768 - simonjhall - Fri Dec 01, 2006 10:55 am
PeterM wrote: |
Please, you can't just leave us detail-hungry programmer types in the lurch! I'd love to know where you shaved the bytes off! |
In order to get it down to this amount of memory I have two versions, one of which runs on a machine with more than four megabytes of memory :-) Most of the extra memory required (remember I said that it originally required 9+ megs static data) is for rendering in the absolute worst case. So I just kept dropping all the buffers until I could fit the executable into ~3 megs, but still ensure that all the demos ran.
So no models are being loaded at the moment (as I've got so little memory free), but I do have enough memory to do the rendering. What I've gotta do now is to cook up some system of getting in the models, and it should then run file.
As this is gonna require some kind of fancy memory system I'm gonna hold off doing that for a while as I ain't got no cash for a Supercard! I'm thinking about doing a VM system in the meanwhile just to prove that it works.
Quote: |
Wait, did I miss the part where you released Q1? |
I'm working on both at the same time, but I just wanted to make that final push in order to get Q2 onto the machine. As I've gotta work a miracle if Q2's gonna get further, I'm now gonna concentrate on making Q1 for DS better.
#110769 - Schtee - Fri Dec 01, 2006 11:33 am
I love you.
#110848 - simonjhall - Sat Dec 02, 2006 6:05 am
I've fixed most of the memory related loading bugs now and I can afford to run with the full-quality textures and lightmaps on most levels now. So here's yet more pictures to tease you!
What the pictures don't show however is just how good the image looks on the top DS screen - there's a slight softeness to the LCD which makes most games look really nice, and Quake is no exception. Shame the framerate sucks :-(
[Images not permitted - Click here to view it]
[Images not permitted - Click here to view it]
[Images not permitted - Click here to view it]
I've just noticed that I got my camera so close you can see the grid structure of the screen! Sorry...
#110857 - Mrshlee - Sat Dec 02, 2006 7:29 am
Thats freaking sweet!
I can't wait to frag those bastards with my nine inch nails :D
Is multiplayer in the future? Sound getting streamed to ARM7 or are you working on the engine/alloc/FPS atm?
Full version/demo? sweet krispy jesus this is awesome :D
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia
#110862 - PeterM - Sat Dec 02, 2006 8:43 am
Looks fantastic, thanks for posting!
_________________
http://aaiiee.wordpress.com/
#110867 - Sunray - Sat Dec 02, 2006 10:56 am
Good work, but you have to use every single hardware chip on the DS to make this run nicely. I'm talking about simple things like the div/sqrt accelerator to frustum tests and 3D rendering.
#110909 - simonjhall - Sat Dec 02, 2006 7:56 pm
Mrshlee wrote: |
Thats freaking sweet! |
Thanks very much. I can't wait for this to be properly playable...
Quote: |
Is multiplayer in the future? Sound getting streamed to ARM7 or are you working on the engine/alloc/FPS atm? |
I took out the networking code last night, as I didn't have the space. I intend to put it back at some point, but having full compatibility with the PC Quake wastes lots of memory. I was considering ripping out all the sound stuff too, but's pretty integral to the game so I don't think I will. I've also never coded sound *in my life*, so it's pretty low on my todo list!
And yeah, I'm aware that I'm gonna have to really use the DS hardware in order to get some killer speed. John's already mentioned how the poly limit is a real factor for his hardware-rendered version, so I'm considering a semi-hardware-accelerated version by extending the software renderer with some hw-acc'd 2D/3D love. Doing the transformations and clipping in software isn't *that* slow, but the actual drawing bit really slows it down, as this is where all the texturing is done.
ot: here's me in Las Vegas! It was pretty cold there, so those girls must have been freezing!
[Images not permitted - Click here to view it]
#110913 - Lazy1 - Sat Dec 02, 2006 8:26 pm
Looks great so far!
Did you set the display size to 256x192 or are you scaling down from 320x200?
Also, you might save memory by reducing texture sizes by half or so. On the DS screen you wouldn't really notice anyway.
#110926 - f3 - Sat Dec 02, 2006 10:52 pm
seriously amazing work. You should show this to a DS dev house, I bet you could get a job easy.
_________________
fckgw
#110982 - xtoc - Sun Dec 03, 2006 11:24 am
Verry nice, could you post a video of the qauke with textures (if you have time)
Multiplayer would be awsome , even if it's only ds to ds (still it would be greate if it's compatible with the pc version)
But hey , first single player.
Please set a donation on your website, so you can get this supercard.
I think there will be enough people that loves to give some fee to get this quake to work
(i prefer quake2 > quake1)
#110994 - simonjhall - Sun Dec 03, 2006 1:45 pm
Lazy1 wrote: |
Did you set the display size to 256x192 or are you scaling down from 320x200? |
It's 256x192. This causes lots of problems however as Quake expects the minimum screen width to be 320, so lots of the 2D drawing functions cause memory-access faults as there are plenty of hard-coded constants... The menu doesn't fit on the screen either.
Quote: |
Also, you might save memory by reducing texture sizes by half or so |
I think this will be essential for the hardware-accelerated version as doesn't the DS require textures to be of a certain size? Dunno how that's gonna work-am I gonna have to write a tool to allow people to downsample their pak files or should I do it when I load the textures into RAM? I'm obv not gonna provide a copy of my own pak files...
I also don't think the DS supports mipmapping, so that'd save some more memory.
Quote: |
Verry nice, could you post a video of the qauke with textures (if you have time) |
I just tried to record a video with my webcam, but as it's fixed focus it looked a bit shit. I could use my regular camera as that has a macro mode, but the batteries would probably run out whilst doing it!
Multiplayer itself does not require lots of memory (lets say 20-30k, including code) but compatibility with stock versions of Quake does. If I can't make it compatible and still fit inside the memory budget I could just change a few constants and build a new DS-compatible version for the PC. How does that sound?
And I now have a donations link in my signature :-) I need to get a card which has extra RAM. I've heard that the M3 has faster RAM than the Supercard, so I'd choose that one. Do they both have the same amount of memory? Looking through the Moonshell source seems to imply that the M3 has 'only' 16 megs, but the regular Supercard has 32. Does anyone know if this is true? And for those doubters, I'll say this now: there's no way that Q2 will run without extra memory. Whether that's real extra memory, virtual memory on a disk or some kind of ROM.
AND:
I tested out my semi-hw-acc'd idea last night, and it works great! All the clipping and transformation is done in unoptimised C, but then the rasterisation and Z-testing is done by the DS' 3D hardware. It's still untextured but it's SO MUCH faster than doing it all in software! It's easily five times faster than before, in fact I've seen it go over 25 fps! (and no, I'm not staring at a wall...)
_________________
Big thanks to everyone who donated for Quake2
#110996 - Sektor - Sun Dec 03, 2006 1:55 pm
M3 and SC both have 32MB of RAM (excluding SC rumble and M3 pro). You might need to switch modes everytime you want to access FAT or RAM but it's technically possible, dslinux does it.
_________________
GTAMP.com/DS
#111008 - xtoc - Sun Dec 03, 2006 3:33 pm
Ok nice
#111022 - shadowghost21 - Sun Dec 03, 2006 6:56 pm
Didn't realize that you lived in England. I was going to send 5$ (real money lol) so I gave you a rough approximate for 5$. Any way keep up the good work, and I hope you get enough cash for that card soon. How much you got so far? and how much do they cost over there in jolly ol' England?
-shadow
#111033 - OOPMan - Sun Dec 03, 2006 7:51 pm
On a side note, I was reading the Beyond3D article about the clever fast InvSqrt() function from Quake 3 and it was mentioned that Quake 1 feature a lot of assembler code specially optimised for the x86 architecture.
Have you encountered this stuff yet? What do you plan to do about it? I'd imagine that x86 optimised asm is not much good on an ARM :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#111039 - Sunray - Sun Dec 03, 2006 8:08 pm
Original Quake had two renderers, one written in C and another in x86 assembly. The assembly version was twice as fast IIRC.
#111055 - simonjhall - Sun Dec 03, 2006 8:51 pm
Wow, strangers giving me money! Awesome! Though seriously, thanks very much - it really is appreciated. Hopefully I'll have enough to get a card by Christmas so I can kill time Q2-ing whilst hung over! Come on people, open your wallets :-D
And yeah I live in England, and no I don't have one of those awful fake-English accents that English people on TV shows in the US seem to have. Helen Baxendale on Friends, I'm looking at you!
Re: the renderer, I've not yet seen any square roots or inverse square roots. There's lots of reciprocals though, so they're hopefully candidates to optimise. I tried (quickly) to get the hardware to transform the image (instead of doing on the CPU) to remove all those divides and it was hardly faster... Hmm.
And yes, the Q1 and Q2 source that I have has three renderers, the plain C one, the x86 one and the OpenGL one. Q2 also includes glide I think... Suffice to say, there are a lot of #ifdefs! Btw 95% of the CPU time on the DS is spent in the (software) renderer.
Although the x86 assembler is no use on the DS, it does give me a hint as to where the most CPU time is spent as they've obviously optimised the slow bits. I may rewrite those bits in ARM asm but as there's no FPU or vector units there may be no point.
Also, it's been said before that the poly limit may be a problem. So far I'm nowhere near it! One of the advantages of doing all the clipping on the CPU :-D
_________________
Big thanks to everyone who donated for Quake2
#111069 - xtoc - Sun Dec 03, 2006 10:29 pm
Some people are asking about a website of this dev game.
Is there any website yet ? :)
I think it would help donating
greetz
#111082 - simonjhall - Mon Dec 04, 2006 12:29 am
No website, and I'm too lazy to make one.
I also have no DS now as the thing just died! I went to load a level and the thing just cut out. I was plugged into the mains at the time and the charging light went out too. If I unplug and replug the charger the light will stay on for like a second and then go out.
Any ideas?! I still have the receipt but it's pretty faded...
_________________
Big thanks to everyone who donated for Quake2
#111090 - FireSlash - Mon Dec 04, 2006 1:33 am
A lot of stores can do receipt lookups if you bought it with credit or debit.
As for the website, I can set something up for you; a simple blog or something + free hosting. I can even hook you up with CVS or SVN if you need, just send me a PM.
_________________
FireSlash.net
#111094 - tepples - Mon Dec 04, 2006 2:09 am
Assuming NOE's web site matches NOA's, if the DS is less than a year old, try looking up its serial number on Nintendo's web site; it should still be under warranty.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#111131 - OOPMan - Mon Dec 04, 2006 8:43 am
I'm sure I've seen the problem you're having mentioned fairly regularly in the Equipment section. If I recall, it's something to do with a blown fuse, which can be replaced...
Also, the InvSqrt() function I mentioned was in Q3, not Q2 or Q1 (As far as I know anyway...)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#111158 - simonjhall - Mon Dec 04, 2006 2:19 pm
I blagged a new phat DS by taking it back to the store with the most faded receipt in the world (I spent ages with an artist trying to enhance it to no avail).
I'll be back developing once I get it flashed...
EDIT: there's now a Quake blog (see sig). It'll be updated once my new kit gets flashed. Keep giving me money, people. Or even hardware...?
_________________
Big thanks to everyone who donated for Quake2
#111247 - Ant6n - Tue Dec 05, 2006 4:56 am
wouldnt you stuff run in an emulater?
#111254 - OOPMan - Tue Dec 05, 2006 8:44 am
Probably not, since there are still a fair number of things emus don't handle well...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#111339 - josath - Tue Dec 05, 2006 6:55 pm
Ant6n wrote: |
wouldnt you stuff run in an emulater? |
huh?? why would you want to run DS Quake, in a DS emulator, on your PC? Why not just run the original quake for PC?
#111341 - Optihut - Tue Dec 05, 2006 6:59 pm
josath wrote: |
Ant6n wrote: | wouldnt you stuff run in an emulater? |
huh?? why would you want to run DS Quake, in a DS emulator, on your PC? Why not just run the original quake for PC? |
I think he meant for development reasons, given the context of the whole "DS Phat hardware exchange and now I need to install flashme" bit.
#111350 - pas - Tue Dec 05, 2006 7:41 pm
@simonjhall:
Quote: |
I'll say this now: there's no way that Q2 will run without extra memory. Whether that's real extra memory, virtual memory on a disk or some kind of ROM. |
You say it would NOT be possible without Extra Ram ? Would it be possible on the Gbamp then, or not ? (I just ask, because I wonder why Doom is playable WITHOUT Extraram and Quake maybe not...)
Last edited by pas on Wed Dec 06, 2006 5:29 pm; edited 1 time in total
#111356 - OOPMan - Tue Dec 05, 2006 7:54 pm
As the man said, Q2 is basically impossible without using the extra RAM on the SC/M3/G6 devices.
So no, a GBAMP is not an option...
Doom is playable because it's a much older game that requires less hardware-wise to run...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#111361 - Ant6n - Tue Dec 05, 2006 9:29 pm
how about using flat shading or really low rez when no ram is avail
#111362 - simonjhall - Tue Dec 05, 2006 9:30 pm
OOPMan wrote: |
As the man said, Q2 is basically impossible without using the extra RAM on the SC/M3/G6 devices.
So no, a GBAMP is not an option...
Doom is playable because it's a much older game that requires less hardware-wise to run... |
Took the words right out my mouth! Ta man :-)
To confirm,
- Doom runs already and (I'm assuming) has the lowest memory requirements.
- Quake runs, although is right on the edge of the capability of the machine. If there's a RAM card present I may choose to use it. I'm not expecting for it to be required.
- Quake 2 will not be developed further without extra memory. It'll be a requirement for the game, sorry. Squeezing 30-50 megs into 4MB isn't really doable!
And I did consider using an emulator but I'd have to do something about the disk access. Plus I like my debugger - I'd be lost without it! More importantly I'm using the DS' hardware now so it'll be crucial to work on the target hardware as I'm already finding gotchas with the graphics hardware (which I'll talk about properly at a later date).
_________________
Big thanks to everyone who donated for Quake2
#111427 - Reppa - Wed Dec 06, 2006 12:58 pm
Quote: |
Want to see Quake2 for the DS? Then get me a Supercard/M3: Donate! |
I want to see the first quake working before donate ^^, but if quake run, i think i donate some money like ten dollars to thank you.
So have a good chance with the port of quake :D, i keep adress of this topic on my bookmark
#111445 - pas - Wed Dec 06, 2006 5:29 pm
@simonjhall:
Would streaming the data out of the CF card (FAT Reading) be to slow ?
Do you need the 32 Mb RAM Cause of this ?
#111449 - simonjhall - Wed Dec 06, 2006 5:54 pm
Reppa wrote: |
I want to see the first quake working before donate ^^, but if quake run, i think i donate some money like ten dollars to thank you. |
Of course, that makes complete sense. Lots of people start developing projects only to not finish them. You'd be pissed if I took your money and ran!
Quote: |
Would streaming the data out of the CF card (FAT Reading) be to slow ? |
It's very likely. It'll run and I'm thinking of writing it anyway to prove that it works, but it won't be playable.
I'm worried about the potential overhead of having to use these cards anyway, but at least you have the option of doing DMA or 32-bit reads (ie it's gonna be easy on the processor). But if you're using the disk reading/writing then the processor gets tied up whilst this is going on. Yes I know there are two processors.
I actually did something similar on Quake 1 back when memory was super tight and it made the thing go < 1 fps. That's doing (software) rendering and about 500k of disk access per frame. If you were doing 10-20 megs of access per frame it'd totally wail on yo' ass.
_________________
Big thanks to everyone who donated for Quake2
#111485 - Dood77 - Thu Dec 07, 2006 12:49 am
Wow im amazed at the progress your making, keep it up! Please! Anyway i have a question, are you eventually (after the first release or so) going to make the quake1 port able to use the 32 megs of ram to increase fps and overall performance? (after you get a supercard/m3 of course...) This would be usefull for online play, seeing as those can have bigger maps and can get pretty crazy with action.
#111583 - parad0x - Fri Dec 08, 2006 12:28 am
This is really exciting! (Quake 1) :D
Do you think you will get good performance if you recode everything to use the DS' 3D hardware - and is that your plan?
Do you also plan to add network compatibility at some stage? Being able to play against PC users as well other DS users would be simply amazing! :D
Keep up the awesome work!
#111585 - simonjhall - Fri Dec 08, 2006 1:06 am
I'm not currently planning on using the extra RAM with the running of Q1. What I mean by this is I may use it to improve level loading speed (by caching pre-loaded models) but I don't want to use it whilst the game is actually being played. Using this memory will be slower than using the regular stuff so it's only gonna reduce the framerate.
It is still to early to tell though.
Quote: |
This is really exciting! (Quake 1) :D |
Tbh I'm starting to feel with Q1 that the finishing line is nearly in sight, plus I'm getting really bored of seeing the necropolis demo. I'm much more excited about Q2 though as it's a much harder problem and it'll be all the more rewarding once I know people are playing it on the DS' at 60fps!
Quote: |
Do you think you will get good performance if you recode everything to use the DS' 3D hardware - and is that your plan? |
It won't look as good as the software-rendered slideshow but the performance will be way better. I'm currently in the middle of converting all the rendering to using the 3D hardware and the frame rate is much better.
Quote: |
Do you also plan to add network compatibility at some stage? |
There used the be networking code but I took it out as I needed the memory. It will be back, and yes you'll be able to play against other DS'. PC compatiblity is not guaranteed.
_________________
Big thanks to everyone who donated for Quake2
#111612 - OdEa - Fri Dec 08, 2006 10:13 am
First I want to thank you for what you are doing!
the first time I saw metroid prime hunter demo I had a dream: playing quake1 on my ds with wifi! and it will certainly become possible (thanks to you).
If you want the point of view of a big quake fan, i would like to say couple of things:
-i think playing regular levels with monsters etc..is cool, but I would prefere playing online against ds or PC with a sort of quakeworld port.
-when playing online, we don't need textures (every quaker disable them), maybe it could reduce the use of ram and help to implement network
-why is it difficult to have PC network compatibility? quake on a ds and on a PC doesn't speak the same protocol?
-is it possible to have the same control as metroid prime hunter? i mean strafe moving. And i think its difficult to find a good buttons configuration to make rocket jumps with a ds :)
maybe if we could setup our own button to an action it could be interesting. Or script rocketjumps :p
keep up the great work!
#111616 - OOPMan - Fri Dec 08, 2006 1:31 pm
Every Quaker disables textures for online play, eh? Sad...
Gah, I feel a rant coming on, but this is neither the time nor the place...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#111622 - PeterM - Fri Dec 08, 2006 2:16 pm
Me too :-)
Personally I only play single player, and I keep all the textures. So that's one vote against that (silly) suggestion!
_________________
http://aaiiee.wordpress.com/
#111636 - simonjhall - Fri Dec 08, 2006 5:21 pm
Ok, hands up who'd like texture maps? No takers, oh ok. That'll save me some effort.
_________________
Big thanks to everyone who donated for Quake2
#111640 - kusma - Fri Dec 08, 2006 5:34 pm
i like pictures of kittens...
#111697 - Dood77 - Sat Dec 09, 2006 1:31 am
uuhhh... spam?
anyway i play online ind ive never talked to people who disable the textures, ive heard of people doing that for like big competitions though.
i think for the control it would be great if we could bind them ourselves, like make aliases for the buttons, as well as a double tap and maybe add a few designated areas on the touch screen for buttons, in the corners of course. anyway that way we could use the normal bind syntax: /bind <key> <action>
#111700 - simonjhall - Sat Dec 09, 2006 2:21 am
I like the idea of being able to set certain parts of the touch pad as different buttons, eg to change weapon. And I've been thinking about how to allow people to change buttons as I don't think adding new stuff to the Q menu is as easy as you'd think...
And I've only played Metroid a few times, so I can't remember how the controls are set out. I do remember getting cramp in my hand though! Anyone wanna describe the different layouts you can select?
And I've got my new DS flashed, so we're back Quaking again. Neil, thanks again - expect a few .nds files in your mail tomorrow :-) I've messed around more with the hw rendering over the last few hours I forgot just how awful parts of the code are... (ie the Q software renderer) But here's a bit of juicy hw-rendered action, I just got capped by the bad guy in front hence the screen is rotated.
[Images not permitted - Click here to view it]
I've shaded the image here with the z-buffer as I'm trying to figure out how the texture and light maps are arranged in memory. The models are full-bright white as I've not yet managed to figure out how to get their z info.
The alias models also are really slow to render, almost as slow as the world itself. Deep huh?
_________________
Big thanks to everyone who donated for Quake2
#111716 - Lick - Sat Dec 09, 2006 10:57 am
You resisted Lite, quite a performance! ;P
_________________
http://licklick.wordpress.com
#111719 - OdEa - Sat Dec 09, 2006 11:38 am
Dood77 wrote: |
anyway i play online ind ive never talked to people who disable the textures, ive heard of people doing that for like big competitions though. |
strange, personaly i ve never talked to people who do not disable them with the picmip command, maybe because i already made some (not so big) competitions or played too much quake3.
Well to make everybody happy the solution would be to enable the picmip command, like that some ppl could play with textures and other without :)
as far as I remember i controled metroid like that:
left/right arrows = strafe
up/down = move forward/back
L = fire
stylus = change the X Y view (mouse_look)
double tap on the touch screen = jump
i think thats a good configuration to move arround someone (with strafe) but its impossible to strafe jump or rocket jump...well i don't think it would be easy with a ds :/
#111721 - OOPMan - Sat Dec 09, 2006 11:58 am
Right, [rant]
I think this disabling the textures stuff is utterly pathetic. It's partially a performance wank, but nowadays it's more of a cheap advantage wank.
I can understand why some people do it. After all, a textured model stands out very very nicely against play polygons, making it easier to target.
I suppose it's marginally acceptable if all the players in a game agree to do it, but I think it's basically a low-grade form of cheating in those cases where some players play vanilla and others disable non-model texturing to gain a cheap advantage.
Seriously, it's a game. If you're taking it so seriously that you'll disable certain textures to gain a cheap advantage then you're obviously taking it waaaaaay to seriously.
[/rant]
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#111759 - OdEa - Sat Dec 09, 2006 9:50 pm
OOPMan wrote: |
Right, [rant]
Seriously, it's a game. If you're taking it so seriously that you'll disable certain textures to gain a cheap advantage then you're obviously taking it waaaaaay to seriously.
|
sorry, maybe thats just because i love this game :(
if enabling/disabling textures is an option, thereis nothing to debate, everybody will be happy :)
#111794 - Dood77 - Sun Dec 10, 2006 6:57 am
not that oopman was suggesting simon take out the ability to disable textures, just expressing his opinion. i too think its pretty rediculus, i mean whats quake without the pentagrams on the wall? anyway odea forgot to mention the touch weapon control:
upper left button is to select normal weapon, middle for missiles, and the top left is for all the other weapons: you hold it down then all your weapons appear on the screen and everything else fades a little and you drag to the one you wanna select and let go, plus the bottom-right is for alt-form but obviously thats a specific metroid function ;)
and about adding to the quake menu, do you mean like the menu? or adding console script for new buttons? most quake source clients have custom menu features, fteqw is one of the most advanced. ever think of using the joystick support for input?
#111809 - Optihut - Sun Dec 10, 2006 1:43 pm
Taking out textures in mutliplay clearly is cheating. Funny story, though: We used to play in a LAN at someone's office and I always got shafted and had the worst computer. Fortunately in some custom made jungle level of counterstrike the textures were too much for the graphics card and so instead it displayed white walls. While everyone else had a hard time seeing me, I could pick off those terrorists quite easily. Some other time The textures of the walls shifted to the side when I was strafing, so I could see the guy behind the wall and shot him with my (virtual) assault rifle.
These were just bugs, but if it's done on purpose, I and all of my friends would consider this to be cheating.
#111813 - simonjhall - Sun Dec 10, 2006 4:20 pm
Yeah, I reckon texture-less gaming is cheating, but I don't care as long as it's not me who's getting cheated on... So I'll see what I can do about a texture-less build. What would you like to see instead? Are you talking about gaming with the r_drawflat option turned on? Cos the poly colouration used for that is a real hack. Shading with the Z like in the above picture isn't free either.
And regarding controls, at the moment I have the bottom screen controlling the view and the digital pad controlling movement (like strafing). Firing the gun is done with the left shoulder. The right side of the DS is pretty wishy washy, and I'm gonna change those button bindings soon.
I'd like to add options to change the controls to the regular quake options menu, but this is non-trivial. I might just slap in some crappy DS menu (ie not properly integrated with the quake menu system) instead.
And I think the memory problems may be over now - dropping support for software rendering has left me with an epic 3.1Mb free! Now factor in the texture memory (512k) and I'm pretty damn happy. In fact I played through episode 1 last night in one sitting with *zero* memory problems, no cache thrashing - nothing! Time to try The Next Episode...
Oh and for a laugh I rebuilt in thumb mode to see what happens - I saved another 100k! But the framerate went down, so we're back in ARM mode for now.
EDIT: no, there's still cache thrashing on e2m1 and e2m2 (haven't tried any more) so I'm still too low on RAM. Shit.
_________________
Big thanks to everyone who donated for Quake2
#111817 - kusma - Sun Dec 10, 2006 5:27 pm
simonjhall wrote: |
Oh and for a laugh I rebuilt in thumb mode to see what happens - I saved another 100k! But the framerate went down, so we're back in ARM mode for now.
|
Keep in mind that you can select instruction set on a per compilation unit basis. Consider putting the non-time-critical code in thumb mode. Another notice is that you sometime even get better performance in thumb-mode, due to better instruction-cache utilization. At work we're experiencing that in some cases (typically in tree-traversing etc).
#111856 - Dood77 - Mon Dec 11, 2006 2:15 am
sooo uhh, i dont suppose you wanna post up the bin that played episode 1 eh? cause even if the framerate is low, you can see that we're all drooling for something over here... also are you gonna have console access with a keyboard and all? cause that would be great, especially for making aliases and stuff, and binding our own keys to /say commands(rocket jumps, automatic weapon selection, that kinda thing...)
#111881 - simonjhall - Mon Dec 11, 2006 11:15 am
Keyboard access? As in over the network? Or do you want me to program an on-screen keyboard?
The more you ask for the longer it's gonna take...
off topic: yeah, I 'resisted' getting a lite. I tried to get one when I went to get my old phat replaced (and just pay the difference in price, ?10) but they said that I'd have to get the old phat replaced with a new phat then declare the new phat 'used' and I could get it upgraded to a lite for ?40! Uh, no. The screen on my new phat however is really really bright when I have the mains plugged in and in the firmware menu it allows me to change between four different brightness values - something my old phat wouldn't allow me to do.
_________________
Big thanks to everyone who donated for Quake2
#111882 - OOPMan - Mon Dec 11, 2006 11:37 am
It would be easer to set up binds, aliases, etc in various config files and then hack an extra menu that allows you to execute a custom .cfg file...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#111884 - PeterM - Mon Dec 11, 2006 11:41 am
That sounds like a pretty good idea.
If it were me (and a while ago it was!) I wouldn't bother adding any additional features at all, until the game is up and running. Lots of additional stuff can be added by editing the config file manually if desired.
Also, if the buttons are mapped to Quake "keys", people can remap the controls easily enough using the Quake options menu.
_________________
http://aaiiee.wordpress.com/
#111886 - simonjhall - Mon Dec 11, 2006 11:56 am
PeterM wrote: |
Lots of additional stuff can be added by editing the config file manually if desired. |
Yeah, why can't you just set it up the way you like on the PC and use the config file from that? That's what I'm doing...
_________________
Big thanks to everyone who donated for Quake2
#111887 - OOPMan - Mon Dec 11, 2006 12:17 pm
At the moment the problem with the custom menu idea is that libfat under dkp r19b can't list files, so you'd have to use one of the hacked gba_nds_fat libs :-(
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#111889 - simonjhall - Mon Dec 11, 2006 12:36 pm
Err...listing files? Plus I'm using gba_nds_fat rather than libfat.
_________________
Big thanks to everyone who donated for Quake2
#111890 - OOPMan - Mon Dec 11, 2006 12:47 pm
No problem then :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#111903 - simonjhall - Mon Dec 11, 2006 4:56 pm
Dood77 wrote: |
sooo uhh, i dont suppose you wanna post up the bin that played episode 1 eh? |
Ok, I give in - I've got an nds in the sent items of my inbox which pretty accurately demos where I'm at.
IF A FEW PEOPLE would like to get a copy of a pre-pre-release version then please PM me and I'll send you a version within the next few days.
By doing this you're aware that you're just getting an nds and nothing else. I'd just like to see what people think :-) I'm still not looking at the performance, I'm just trying to get the hardware-rendered version properly functional, and the current version...isn't too functional :-D
You also promise not to criticise, eg "OMG TEH FPS SUXORS!!"
_________________
Big thanks to everyone who donated for Quake2
#111907 - MelGibson - Mon Dec 11, 2006 5:24 pm
simonjhall wrote: |
please PM me and I'll send you a version within the next few days. |
I am pretty sure your inbos will explode soon :P
Anyway did you think about reducing texture size to cope with ram problems? I don't think the DS needs the same full blown texture size that you need on a PC as of the reduced screen size. This might even be a more valid option for Q2. Even thought this might destroy networkplay with PC's. Still I personally don't think that netquaking DS vs PC is a fair game and thus should not have a priority. Cause even though controls on the DS are pretty cool I don't think you have a chance against someone playing with mouse/keyboard on a PC.. DS vs DS will rock, though :D
#111911 - kusma - Mon Dec 11, 2006 5:49 pm
simonjhall wrote: |
By doing this you're aware that you're just getting an nds and nothing else. |
Keep in mind that refusing to give out the source code to anyone that obtained the binary is a GPL-violation. ;)
#111918 - Lazy1 - Mon Dec 11, 2006 6:41 pm
Before you send it to them, make them agree to not ask for the source code.
Even better yet, don't give in and let them wait for a finished product :)
#111919 - kusma - Mon Dec 11, 2006 6:56 pm
Lazy1 wrote: |
Before you send it to them, make them agree to not ask for the source code.
|
This won't legally help. The Q1 source release is released as GPL, and you cannot change that by having the users agree.
And don't get me wrong, I don't think any of this will matter the slightest bit here ;)
#111931 - simonjhall - Mon Dec 11, 2006 9:16 pm
Ok ok, the only reason I suggested it was to stop people bugging me!
You can rest assured that a proper released version will come complete with source etc, it's just that packaging everything up properly takes time. Time which could be spent coding!
Oh and most memory thrashing problems have now gone, although after I rewrite yet more of the model loader it should almost disappear. I have gotta look at rewriting the model renderer however as it is sooo slow - if I run the game without models it's easily twice as fast!
And back on the texturing thing, I'm thinking about dropping mipmaps level 0, 2, & 3 and keeping level 1. This will reduce massively the amount of texture memory required and can be easily done with no changes to the pak files. It will however mean the texture quality will go down. The other option is to preprocess the (level 0) textures in the pak file (on the PC) and compress them into the DS texture format. This would use the same amount of memory as the level 1 textures but it'd be four times the resolution. But it'd require modifying the pak files... Hmm.
And @Mel, you're right - PC vs DS - who's gonna win?!
_________________
Big thanks to everyone who donated for Quake2
#111969 - Lazy1 - Tue Dec 12, 2006 3:11 am
Here is what you could do to not modify pak files:
When it's looking to open a texture, see if that file already exists outside the pak file.
#111973 - Dood77 - Tue Dec 12, 2006 3:38 am
what i meant by keyboard was a touch screen keyboard of course :P
and no i dont expect you to put every little feature in the first release, that would take forever... as for ds 2 pc, it would be a fun feature, especially for co-op and lan with friends...
#111991 - OdEa - Tue Dec 12, 2006 9:48 am
MelGibson wrote: |
Still I personally don't think that netquaking DS vs PC is a fair game and thus should not have a priority. Cause even though controls on the DS are pretty cool I don't think you have a chance against someone playing with mouse/keyboard on a PC.. DS vs DS will rock, though :D |
after thinking a little i am agree with that too. as ds vs pc is not fair and will not be fun for the ds player (maybe for the pc player too).
#111992 - Mrshlee - Tue Dec 12, 2006 9:54 am
Patching with a PC tool is the best way - a little patching goes a long way
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia
#112002 - kusma - Tue Dec 12, 2006 11:21 am
Lazy1 wrote: |
Here is what you could do to not modify pak files:
When it's looking to open a texture, see if that file already exists outside the pak file. |
Isn't it even so that the quake resource system allows you to use both a data-dir and a pak file as the same virtual file system? If so, you could - as Lazy1 says - just look for textures in a native-format, and allow people to just add them to a data-dir. Yay, no pak-modifications needed, yet a 4x texture resolution increase. Perhaps you'll even be able to fit in more mip-map levels? (Or does the DS even support mip-maps without cpu-intervention?)
If you make mip-map levels a data-set feature (think D3D DDS file format), people can tweak this themselves. Wouldn't that be cool? ;)
#112009 - Schtee - Tue Dec 12, 2006 12:39 pm
Wouldn't that result in redundant data on the old storage device? Obviously that's not a huge issue, but if you're reducing the texture size surely it'd make more sense to get rid of the physically larger textures as well so as to save physical space as well as memory. The pak specification's fairly well known, and even if it'd mean opening the paks, taking out the textures, resizing the images, then adding them back in I think I'd do it for the space saved on my SD card. I'm nowhere near profficient enough a programmer to do this, but I'm sure it'd be plausable to knock up a command line extractor->resizer->re-pak program or whatever.
#112029 - elhobbs - Tue Dec 12, 2006 5:23 pm
textures are stored in the bsp file not as separate resources in the pak file. It is probably not a good idea to modify the pak files. I better solution would be to do something similiar to the way the pc glquake handles mdl files. it creates its own subdirectory to store gl friendly tri-strip and tri-fan command lists and is hard coded to build/look for files there.
#112061 - simonjhall - Tue Dec 12, 2006 10:16 pm
re: the texture packing problem, these are all good suggestions - I just need time to try them out!
So I've been busy making this thing faster as I thought I'd take a break from texturing. So for brush model (ie world) rendering,
- the bsp clipping is now faster than before
- the polygon clipping is now faster than before (still needs to be way faster though)
- the polygon transformations are way faster now, and more is done in hardware
All in all, the world rendering stuff is 30-50% faster than before! The bit where I submit the geometry to the DS hardware and it actually rasterises it is really fast. I'm getting 20-30 fps in a lot of places.
The entitiy (ie Alias model) rendering is still slow, that's the next thing to fix.
But whilst doing all my timings for improving the brush model rendering I noticed something else - when the game is paused and and nothing is being rendered it runs like lightning (60 fps+), but when the game isn't paused (but still nothing is being rendered) the speed shoots right down on certain levels. I just spent a little bit of time looking it up - and it's the physics system! It's often as slow or slower than the rendering.
Ah ha (I though), that'd be easy to fix with a little bit of float->int craftiness, but no I actually discovered the Quake C virtual machine :-( It's basically a simple CPU emulator (ie it decodes opcodes). As I don't have access to the original Quake C code this is gonna be really hard to float->intify, so I really don't know what to do.
I could REALLY do with an fpu!
_________________
Big thanks to everyone who donated for Quake2
#112070 - OOPMan - Tue Dec 12, 2006 11:00 pm
I'm sure you'd be able to get the QC source, as it was used in a lot of mods...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#112073 - sajiimori - Tue Dec 12, 2006 11:35 pm
If you plan on doing lightmaps using the surface cache a la VQuake, removing the mip maps would likely increase memory usage because every poly needs a unique texture.
Edit: The original QuakeC source is available...
#112092 - Joe_Sextus - Wed Dec 13, 2006 4:04 am
#112108 - xtoc - Wed Dec 13, 2006 10:27 am
Wow keep up the good work !
Do you already have enough money for this supercard/m3?
(I'm still hoping for a port of duke nukem or shadow warrior. :) )
#112110 - simonjhall - Wed Dec 13, 2006 11:13 am
Thanks for the links. Although having spent a bunch of hours with it last night I've decided that adjusting the Quake C code is gonna be kinda pointless as I'd have to adjust the compiler too (although I'm thinking about that bit). Basically the instruction set for the virtual machine is like floating-point city - there's so few things that you can do with integers!
So I'm converting the cpu emulation to fixed-point, but this is (obviously) non-trivial. Hopefully once I've done this it should run a whole lot faster - sometimes the VM takes 100ms of frame time! It's become a real performance bottleneck.
Quote: |
Do you already have enough money for this supercard/m3? |
No, I'm miles off. Although I am ensconsed in Q1 right now, doing Q2 would make a nice change!
_________________
Big thanks to everyone who donated for Quake2
#112114 - OOPMan - Wed Dec 13, 2006 11:35 am
Ouch, damn that nasty little VM...
*Googles for "fixed point quakec"
Hmmmmm, apparently the people who worked on PocketQuake did a lot of FP hacks, so you might want to take a look at their source and see if there's anything of interest...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#112119 - simonjhall - Wed Dec 13, 2006 12:04 pm
Now if only they just brought out Google Code... You could just ask it for a program and it'd go away and write it for you! The Star Trek TNG computer would be able to do it for me anyway.
And yeah I already looked at the PQ source (as I still had it on my HD) and it's not been changed, which I found really strange. But their source code archive was incomplete so maybe I've just not got the modified version.
_________________
Big thanks to everyone who donated for Quake2
#112127 - Joe_Sextus - Wed Dec 13, 2006 2:52 pm
Nobody seems to have asked this, when you have a finished version of Q1 is it going to support QC mods?
#112130 - OOPMan - Wed Dec 13, 2006 3:08 pm
I guess that'll depend on how much has to modify the QC VM and so forth.
If lots of changes to the QC engine are made, a mode might require a recompile against QDS in order to work.
Also, memory constraints might be an issue with some mods, I'd guess...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#112131 - simonjhall - Wed Dec 13, 2006 3:24 pm
I'm not planning on changing the VM in such a way as to break it. I'm planning on trying out the Malice total conversion if I have the time (as I'm sure that I still have the CD lying around) but the thing which is more likely to break mods and total conversions is the RAM limitation...
_________________
Big thanks to everyone who donated for Quake2
#112133 - Joe_Sextus - Wed Dec 13, 2006 4:09 pm
I wasn't planning anything too extensive for mods. I loved playing single player quake with some of the weapons mods, and thought it would be cool to do this in the DS version too.
Are you planning on implementing a control interface similar to PocketQuake's with the touch screen?
#112147 - OOPMan - Wed Dec 13, 2006 6:22 pm
I seem to recall simon is planning on having a Metroid: Hunters type of interface...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#112174 - Dood77 - Thu Dec 14, 2006 12:23 am
so if you modify the quake c source does that mean no pc2ds play at all? :(
#112176 - simonjhall - Thu Dec 14, 2006 12:45 am
As far as I can tell, the Quake C code is run by the server. The client just sends commands back and forth and the server tells the client where stuff is so it can render it.
In a single player setup you run both the server and the client. When you're playing a demo you just run the client and no QC is run at all.
_________________
Big thanks to everyone who donated for Quake2
#112178 - Lazy1 - Thu Dec 14, 2006 1:36 am
Maybe a cheap solution is to remove the server from the client and let the PC do all the work.
Of course that means you'd be limited to wifi range to play even single player, but it would be a lot faster.
Or maybe the QVM would run on the arm7?
#112199 - simonjhall - Thu Dec 14, 2006 8:42 am
Hi again - I've just checked my mail and everybody who's tried this (so far) with a supercard seems to have failed to get it to work...(as it can't seem to find the pak files)
I was having file access problems last night (with my gbamp) when I was getting the Malice TC to run, so maybe they're related.
So, supercard people - expect to get a bunch of debug builds at some point! We're not off to a good start are we?!
And yes, I considered putting the VM on the ARM7, but sometimes it's slow enough on the ARM9, so it'd be even worse on the '7. Still could be a good idea though.
_________________
Big thanks to everyone who donated for Quake2
#112200 - Juglak - Thu Dec 14, 2006 9:01 am
I always have issues with my supercard and NDS homebrew. Poking through IDA at a dissasembly of its firmware makes it seem like the card was more designed for pirating than homebrew.... *shrugs*
In anycase, big thing for the supercard is putting the GBA loader in the top of the nds file. (dsbuild, and rename to .sc.nds) That way you assure that the program is loaded correctly. I had a lot of problems where my ARM9 code would run and ARM7 code wouldnt, and vice versa.
Also, with gba_nds_fat, don't forget to define SUPPORT_SCSD and SUPPORT_SCCF... I think in most of the versions I've seen, they werent enabled by default.
Hope this helps. Also, I have two Supercard Lites if I can be of any assistance, just shoot me a PM.
Cheers
_________________
My goodies: 1xDS Lite - Supercard Lite, DSi, Supercard DSONEi
#112207 - simonjhall - Thu Dec 14, 2006 10:36 am
Juglak wrote: |
Also, with gba_nds_fat, don't forget to define SUPPORT_SCSD and SUPPORT_SCCF... I think in most of the versions I've seen, they werent enabled by default. |
Ah, that could be it. Where do I put these defines? I just built the files and added the header file to my app...
Still taking donations for supercards btw :-)
_________________
Big thanks to everyone who donated for Quake2
#112274 - josath - Thu Dec 14, 2006 11:17 pm
simonjhall wrote: |
Juglak wrote: | Also, with gba_nds_fat, don't forget to define SUPPORT_SCSD and SUPPORT_SCCF... I think in most of the versions I've seen, they werent enabled by default. | Ah, that could be it. Where do I put these defines? I just built the files and added the header file to my app...
Still taking donations for supercards btw :-) |
in gba_nds_fat, they are in disc_io.h, and you have to rebuild the lib after changing the header.
in libfat, everything should be enabled by default afaik (there doesn't seem to be any obvious places to enable/disable device support)
#112277 - OOPMan - Thu Dec 14, 2006 11:29 pm
I was going to PM you, but then I read that all the other SC users were having probs, so I figured it probably wasn't necessary :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#112280 - Juglak - Thu Dec 14, 2006 11:33 pm
simonjhall wrote: |
Juglak wrote: | Also, with gba_nds_fat, don't forget to define SUPPORT_SCSD and SUPPORT_SCCF... I think in most of the versions I've seen, they werent enabled by default. | Ah, that could be it. Where do I put these defines? I just built the files and added the header file to my app...
Still taking donations for supercards btw :-) |
I usually throw them in my ARM9 makefile, but thats me. I'm sure theres somewhere more cozy to put them where they would function.
_________________
My goodies: 1xDS Lite - Supercard Lite, DSi, Supercard DSONEi
#112281 - simonjhall - Thu Dec 14, 2006 11:35 pm
I found those defines, it works now - thank you very much! So yeah, it runs on the supercard now.
I was gonna use libfat but I've not yet upgraded my devkitpro. So I'm using the old fat lib so that I don't get the problems that I had with Q2. I'll use it eventually...
Oh and I've had a go with the Malice total conversion, but there's not enough RAM. The levels are up to a megabyte larger than the average level in Quake. It will probably require the RAM card in order to run. I can't be arsed to pursue Malice until then...
Oh and I've now gonna cook up a proper version which will play the game for the SC users. But I had my (second) work party today (we hit the bar at 11am) so I'm feeling exhausted from eight hours of solid drinking.
EDIT: I just made that new build and sent it out - now I'm def going to bed!
_________________
Big thanks to everyone who donated for Quake2
#112286 - Juglak - Fri Dec 15, 2006 12:19 am
Great!
I do feel I should point out that, although the supercard has the 32MB of DRAM, you can not simultaniously access the DRAM and the SD card on a supercard SD (SCSD). I *believe* this is a similar case to the SCCF, but I do not own one, so, not 100% sure.
I don't think this should pose too many problems, but, if you're loading things out of the pk3 files to your "extended" ram from the SD, you'll probably need to load it to normal ram, then to the SC ram.
When you enable the SD card bit on the supercard, the addresses from 0x09000000 to 0x09FFFFFF become SD card related. (Not 100% sure what they ALL are yet, but, its definately not the DRAM). If done only by bit, the lower 16MB of the DRAM is still accessable at 0x0800000... but I believe gba_nds_fat sets the SC directly in only SD mode, where I believe the lower portion mirrors the upper portion.
I had documented the mode bits for the supercard somewhere, but alas, I cant seem to locate them.
Also, in every mode, there are a few bytes of DRAM used for SC control, which have messed me up in some travels loading > 16MB on the SC ram. Only about 20 bytes possible to mess up, but, its still an issue. They are all in the lower 128KB of the 0x09000000 area I believe.
Hope this is useful.
-J
_________________
My goodies: 1xDS Lite - Supercard Lite, DSi, Supercard DSONEi
#112288 - Juglak - Fri Dec 15, 2006 12:36 am
Figures, a few seconds after I posted that last reply, I found the info I noted about the SC mode reg...
Code: |
SCMODE = 0 = Supercard Firmware located in entire 32MB address space (mirrored over and over)
BIT0 = 1 = DRAM enabled (all address space)
BIT1 = 1 = SD Card Address Space enabled (overrules 0x09000000 - 0x09FFFFFF)
BIT2 = 1 = DRAM Write Enabled
BIT3 = 1 = Override 0x08000000 for Rumble pack (Supercard Rumble only... which I dont think has DRAM?)
|
I think theres a bit that enables writing to the firmware, but, I'm affraid to mess with it. lol.
Heres the ASM code (from supercard_io stuff) for writing this reg:
Code: |
@----------------void sc_mode(u16 data)---------------
.ALIGN
.GLOBAL sc_mode
.CODE 32
sc_mode:
mvn r2,#0x0F6000000
sub r2,r2,#0x01
mov r1,#0x0A500
add r1,r1,#0x5A
strh r1,[r2]
strh r1,[r2]
strh r0,[r2]
strh r0,[r2]
bx r14
|
There we go. That should help.
_________________
My goodies: 1xDS Lite - Supercard Lite, DSi, Supercard DSONEi
#112289 - shadowghost21 - Fri Dec 15, 2006 12:42 am
You could just load everything into supercard ram , and use it as a disk. I assume the binary plus the application are not going to eat more that 32+4megs of RAM?
-Shadow
#112292 - Juglak - Fri Dec 15, 2006 12:48 am
Well, the full versions of Q and Q2 are much larger than 36MB, with levels, graphics, etc. So there would definately be a need for a filesystem somewhere outside normal addressable space.
_________________
My goodies: 1xDS Lite - Supercard Lite, DSi, Supercard DSONEi
#112631 - simonjhall - Mon Dec 18, 2006 10:52 pm
Yo, I've been pretty quiet with this recently as I've been trying to get the pre-release builds working - seems there are problems when using pak files with the supercard...but I can't find out properly what's going on as I've not got a SC yet. They do work however when the pak file gets extracted to the file system though :-)
So now it's back to optimising the VM and doing texturing again...
Big thanks go out to my testers!
On with the show :-D
_________________
Big thanks to everyone who donated for Quake2
#112649 - Sektor - Tue Dec 19, 2006 5:29 am
What version of GBA_NDS_FAT are you using? The one on Chishm's site has devices disabled for a reason, they don't work correctly.
I recommend the fatlib used in picodrive or use the one from REIN.
_________________
GTAMP.com/DS
#112651 - Juglak - Tue Dec 19, 2006 5:43 am
simonjhall:
Another odd issue I have using the supercard, when reading from the SD... possibly a problem with the gba_nds_fat lib...
When reading chunks of files > 512 bytes, the library (or possibly the supercard, i havent determined which yet) seems to "fumble" random bytes... throwing off checksums, and other various things. I noticed this when trying to stream mp3's from the SD card in the supercard... if I did:
Code: |
FAT_fread(blah..., 16384, blah...); // read 16384 bytes (i forget the exact syntax offhand)
|
... then sometimes the bytes would be messed up randomly. (well, not random, they were always the same for the same chunk... but not always in the same place and such in different reads... if that makes any sense).
But, oddly enough, if I use this method (much slower):
Code: |
for(i=0;i<16384;i++) { *data++ = FAT_fgetc(file); }
|
... then the bytes would be perfect.
I suspect your having a similar issue reading the larger chunks of pk3 files...
I'm assuming this problem has something to do with sector boundaries... but I'm not certain.
Hopefully this helps.
-J
Edit: Note about the disabled devices in gba_nds_fat... I believe they were disabled for lack of write support...? I could be wrong.
I've been able to add write support for my Supercard Lite to gba_nds_fat using the supercard_io stuff on their site, with some minor modifications to make it actually work. (The zip on the site is somewhat incomplete...)
_________________
My goodies: 1xDS Lite - Supercard Lite, DSi, Supercard DSONEi
#112664 - simonjhall - Tue Dec 19, 2006 8:39 am
I'm using the version from his site; the latest is dated 3/3/06. As I've not got the hardware to test, I can't be sure where the problem lies. But it seems that it's losing the occasional byte from a file and so as a result everything after is shunted by 1 byte (so it breaks).
This still seems to be an issue when using the files individually, as well as using pak files.
I'm in the process of upgrading my toolchain at the moment so I can properly use libfat.
@juglak - you could be right there. Maybe I need to try and read files a byte at a time... I should really order myself one of these things so I can properly fix these bugs.
_________________
Big thanks to everyone who donated for Quake2
#112687 - OOPMan - Tue Dec 19, 2006 1:59 pm
The new non-pak version works me me simon. Nice job :-) Good luck getting the performance up to pace :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#112693 - simonjhall - Tue Dec 19, 2006 2:22 pm
<excuses>You've got a pretty debug build there, so the VM definately chugs when you get near bad guys!</excuses>
I'm glad that it runs on your kit, though I still think there could be some file reading bugs though...
Oh and I guess you've noticed that there's no Z on the alias models, only the brush models - that's debug too! I can give you a fix for that if you like.
But yeah, gonna hafta make it faster...
_________________
Big thanks to everyone who donated for Quake2
#112782 - simonjhall - Wed Dec 20, 2006 4:36 am
I've seen some programs around here which have mp3 (or similar) playback. How much CPU juice do these sorts of decoders take on the DS?
I'd love to get the CD-audio playback going using something like this. Full CD-quality isn't essential though...
_________________
Big thanks to everyone who donated for Quake2
#112786 - Firon - Wed Dec 20, 2006 5:46 am
Most, if not all the CPU, probably. I don't have specific numbers, since I have no idea how you could even check how much CPU they're using :P
Moonshell has an MP2 decoder running on the ARM7, but that more or less uses all of the CPU power available on the ARM7. Maybe it could be improved with some optimization.
There's also the possibility of using Tremor (a fixed-point Vorbis decoder) in low accuracy mode and using relatively low bitrate files, like 64 or 80 (it sounds pretty good, actually). I don't know if you could get that running on the ARM7 though, nor do I know what kind of CPU requirements this has. I'm sure it could also be sped up with some good coding skills. If you futz around with Tremor, add -D_ARM_ASSEM_ to CFLAGS and remove -mthumb from ARCH in the makefile. You may be able to find some additional optimizations for it by examining the Tremor decoding code in Rockbox (the iPod has an ARM7), if stock Tremor is too slow.
There's just one thing to note: since the DS's sample rate is 32768, there's a little bit of hackery involved if you wanna use MP2 (Vorbis supports arbitrary sample rates, so there's no problem there).
You could also go with ADPCM, but that's icky and the files are large. :P
#112788 - tepples - Wed Dec 20, 2006 6:15 am
ADPCM at 32768 Hz mono is 131 Kbps, not too bad for encoding a whole CD soundtrack.
But with the standard IMA ADPCM supported by DS hardware, you will run into a slope overload problem on some waves, which can sound like clicking or clipping depending on the wave. I made an ADPCM codec called "8ad" with customized quantization tables to provide extra headroom at the expense of some hiss.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#112795 - OOPMan - Wed Dec 20, 2006 9:50 am
It would be great to have the lovely NiN soundtrack rolling in the background :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#112805 - bitshiat - Wed Dec 20, 2006 12:18 pm
You could also use a less cpu intensive format, like wav with little compression, sure it would fill up a lot more space on the sd card, but you can keep it optional and hell, buying a dedicated sd card for quake is still cheaper than most commercial games are ;)
* sorry, read over tepples post which suggests the same thing...
#112806 - Ant6n - Wed Dec 20, 2006 12:23 pm
tepples wrote: |
ADPCM at 32768 Hz mono is 131 Kbps, not too bad for encoding a whole CD soundtrack.
But with the standard IMA ADPCM supported by DS hardware, you will run into a slope overload problem on some waves, which can sound like clicking or clipping depending on the wave. I made an ADPCM codec called "8ad" with customized quantization tables to provide extra headroom at the expense of some hiss. |
how did you make these?
#112812 - simonjhall - Wed Dec 20, 2006 2:10 pm
tepples wrote: |
ADPCM at 32768 Hz mono is 131 Kbps, not too bad for encoding a whole CD soundtrack. |
That'd be great, it doesn't sound like it'd need too much CPU time or memory to decode. I'm thinking about putting it on the ARM7 along with the wifi and sound. It looks like gba_nds_fat will let me run it on the '7, so I wouldn't have to pass the data across from the '9 - nice.
I'm going to have to extend the debugger to allow ARM7 debugging at this rate :-(
_________________
Big thanks to everyone who donated for Quake2
#113057 - simonjhall - Fri Dec 22, 2006 4:24 pm
Texturing!
I've finally managed to figure out how to compute the texture co-ordinates of the brush models (ie the world and ammo boxes) and I'm dead chuffed. Basically, the designers didn't specify UVs like artists do today, instead they just decided how they wanted a texture map to be projected onto polygons. So I've gotta calculate my own UVs :-S
But I've done it now, and I've got the drunkencoders texture splatted all over the game :-D
It's not too hard now to actually use the real textures, plus whilst figuring out this texturing lark I also found out how to generate the UV co-ords for the lightmaps...
Oh and there's NO slowdown using texture maps!
_________________
Big thanks to everyone who donated for Quake2
#113060 - MelGibson - Fri Dec 22, 2006 4:46 pm
Thats really amazing work. May I ask on which card you have it running ?
Concerning the sound.. maybe it would be easiest just to use 44.1khz WAV files at first as the overhead of computing these would be lowest imho, even though they take up most of the space.
#113062 - OOPMan - Fri Dec 22, 2006 5:05 pm
Lack of slowdown is very cool :-)
Mel: Wouldn't a 22khz or 11khz file have less overhead?
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#113069 - MelGibson - Fri Dec 22, 2006 7:20 pm
Hmm.. probably your right OOPMan. I wonder if there is any sound format which the DS supports out of the box ? maybe (AD)PCM ?
#113072 - elhobbs - Fri Dec 22, 2006 7:31 pm
using the 3d hardware is probably a dead end for quake on the ds. the tri count is just too high once you start rendering the models. in addition the lack of a proper blending mode makes this difficult. you can use the frame capture to grab the texture frame then render the lightmap frame and blend them in software. but the mdls have way too many traingles. you could also render the mdls in software and then use the hardware to render them as sprites. also you may run into problems with the lightmap texture coords since the coords are too small for the 12.4 data type. you can use the texture matrix to scale the coords by 1/16th you just need to use a special flag when loading the lighmap textures - TEXGEN_TEXCOORD. best case scenario you get 30 fps - I would be surprised if you got more than 10 or 15 fps.
#113075 - simonjhall - Fri Dec 22, 2006 7:55 pm
Au contraire: using the cpu to do all the rendering is definately a dead end for Quake on the DS. I can say with confidence that the *there is no way* that a software-only renderer can be faster than using the geometry engine, and so I decided to pursue the hw-acc'd route for that reason.
Have a little faith! I'm determined to get this thing running at a good framerate - as I've said before, I already I can get a cosy 20+ fps when just rendering the world with full-res textures (not running the VM) and I'm *well below* the polygon limit, even when rendering models! Perhaps there is also another near-free lighting option that you didn't consider... (hint: there is)
Now Quake2 - that's a whole different situation. Until I can get my hands on the required hardware I'm not gonna be able to properly tell what kind of performance I'm gonna get.
And to ye who have faith, I've not yet looked into the actual sound details yet. I don't know what format the sounds are in, and I'd rather not downsample them on the DS... But for the CD tracks that'd obviously be done offline so a more appropriate sample rate should be chosen then.
_________________
Big thanks to everyone who donated for Quake2
#113077 - elhobbs - Fri Dec 22, 2006 8:25 pm
there is hardware blending but it does not have the right modes. yes, you could use the hardware lights or use per vertex colors - both would look awfull. Neither would would be anywhere near the quality of the lighmap solution. since the ds does not multitexture I am not sure that there are a lot of other options.
#113079 - simonjhall - Fri Dec 22, 2006 8:33 pm
Well it looks like I'd just better delete all the source from my hard drive and go back to playing Mario Kart then. Anyone want to buy a used gbamp?
_________________
Big thanks to everyone who donated for Quake2
#113081 - elhobbs - Fri Dec 22, 2006 8:47 pm
sorry not trying to be too negative. just pointing out that you have some intersting/difficult obstacles to overcome as I am rather curious to know how you are getting around them. I wish you the best of luck.
#113083 - simonjhall - Fri Dec 22, 2006 9:09 pm
Ta man :-)
This project has taught me not to worry too far into the future. Whenever there has been a showstopping problem a solution has always presented itself. The fact that this has happened so many times now I've just stopped caring!
For a machine that was never designed to run this game, the DS is doing a damn good job of it.
So regarding performance and lighting issues, it'll be alright on the night :-D But I too am interested in how...
_________________
Big thanks to everyone who donated for Quake2
#113084 - Firon - Fri Dec 22, 2006 9:12 pm
simonjhall: if you do with ADPCM, please use stereo for the music if possible, 'cause mono is just lame. :P Though, having to read 262 kbits every second might be too much for some CF/SD cards...
You'll definitely have to convert the sound effects on the PC to get the right sample rate and have it as ADPCM (8ad or otherwise). As for the sample rate, it should probably be either the same or half the sample rate of the DS's hardware.
#113085 - sajiimori - Fri Dec 22, 2006 9:14 pm
Did you see my post about VQuake? The Rendition Verite did not have multitexturing. VQuake essentially stored the surface cache in VRAM. This seems like a very servicable solution for the DS.
#113086 - simonjhall - Fri Dec 22, 2006 9:31 pm
Yeah, that's the same (or similar-sounding) as what the regular software renderer does. When I was still using the software renderer I found (obviously) that the larger the surface cache I gave it, the better the performance. But the thing is, this cache ate up a large amount of memory... I'll def have a go again with this method at a later date but I'm still worried about the memory usage.
Although...(the brain starts working)...I'll get back to you on this one!
_________________
Big thanks to everyone who donated for Quake2
#113088 - xtoc - Fri Dec 22, 2006 10:13 pm
keep on the good work !
if you'll have time, take some screenshots or create another video :p
greetz, and happy holidays!
#113091 - sajiimori - Fri Dec 22, 2006 11:15 pm
The surface cache has to be in VRAM anyway -- I can't think of any reason to duplicate it in main RAM. The speed of VRAM access on the DS will be a blessing, as compared to uploading textures to a PCI card.
#113094 - simonjhall - Fri Dec 22, 2006 11:49 pm
Quote: |
The surface cache has to be in VRAM anyway |
Yeah, that's what I was thinking, and having 512k of cache would be pretty awesome (I managed to get it to run with just 45k - the default is 256k!). Although that'd mean the texture maps would have to live in regular RAM (what RAM?!). Building the combined light/texture maps is still expensive though.
I'm still plodding on with regular texturing, and yeah I could show I video but I've got a palette problem and the colours look kinda mashed. Looks good with depth fogging though.
I'm also not so sure about downsampling the textures (like has been mentioned before) as it looks pretty crap, esp with the lack of texture filtering.
Oh and I just got another donation - yeah!
_________________
Big thanks to everyone who donated for Quake2
#113097 - PeterM - Sat Dec 23, 2006 12:43 am
GLQuake can handle cards which can't multitexture, but by the sounds of it you're writing your rendering back end from scratch and not porting from GLQuake?
Also, getting Quake to fill a buffer with audio, which you can then send to a sound device is really easy. I'm not sure how the DS handles sound, but on the PSP, we did the following:
1. Set up an audio callback function. This thread's function gets called back by the system's audio thread whenever the hardware buffer needs filled.
2. When filling the buffer, we convert from Quake's 11 KHz audio to 44 KHz for the PSP, taking into account different buffer sizes, wraparound, etc etc.
3. We store a count of how much of the buffer has been sent to the hardware. This tells Quake where to fill up to when it's filling the buffer for us.
The PSP source is available here:
http://psp-quake.cvs.sourceforge.net/psp-quake/Quake/WinQuake/psp/sound.cpp?view=markup
Most of the complexity is due to the buffer conversion.
If with the DS you can get around "pull" method of the PSP (i.e. instead use the same buffer for Quake to mix in as you use for the DS to play from), you should be golden.
Sorry for the long rambling post!
_________________
http://aaiiee.wordpress.com/
#113100 - simonjhall - Sat Dec 23, 2006 1:04 am
That's definately helpful, and now we all know the sample rate is 11kHz :-)
Also, ta for the link to the source - your code is so much nicer than mine! C++ and everything! I haven't the memory for C++...
Ok, bunch of questions - by the looks of the change logs it seems you didn't change too much of the rendering or model loading - am I right? It's also nice to see what PSP homebrew source looks like, what with the reverse-engineered SDK! Did you ever try and improve the clipping and transformation by using the VFPU? And what kind of framerate did you get? Also, did you get far using the 3D hardware? (I miss programming the PSP :-S )
Back on sound, the thing I'm most not looking forward to is the ARM9<->ARM7 hoo-ha. I'm sure it's going to conflict with the wifi library...
_________________
Big thanks to everyone who donated for Quake2
#113103 - Lazy1 - Sat Dec 23, 2006 2:02 am
simonjhall wrote: |
Back on sound, the thing I'm most not looking forward to is the ARM9<->ARM7 hoo-ha.
|
If you figure that out let me know, I've pretty much given up due to the complexity.
#113107 - sajiimori - Sat Dec 23, 2006 4:55 am
Excuse me, Peter, you're right -- It's not that GLQuake needs multitexturing, but on cards without it (including Voodoo 1), the renderer made a second pass with an alpha blended light map.
As for why VQuake used a surface cache, I forgot whether it was a lack of support for true alpha blended textures on Rendition chips or if it was just too slow for two passes.
I'd expect the DS rasterizer to be too slow to render the entire background twice, especially because multi-bit alpha textures absolutely murder the fill rate.
It would also double the poly count for the background, but that might not be as much of a problem for typical Quake 1 levels.
#113117 - Sunray - Sat Dec 23, 2006 10:31 am
I would be happy with plain vertex lighting. Just sample the lightmap at the vertex position..
#113129 - PeterM - Sat Dec 23, 2006 1:16 pm
simonjhall wrote: |
That's definately helpful, and now we all know the sample rate is 11kHz :-) |
I'm pretty sure Quake can mix in whatever sample rate you want, you just need to tell it what your desired sample rate is and it'll mix appropriately.
simonjhall wrote: |
Also, ta for the link to the source - your code is so much nicer than mine! C++ and everything! I haven't the memory for C++... |
*bites tongue to avoid C++ flame war*
I pretty much *need* to write nice well commented code, or when I go back to it I don't know what the fuck I was talking about when I wrote it.
I usually write pseudo-code using comments first, then add the real code!
I'm just surprised that the code has been out there so long and nobody's hassled me for using a switch statement in my format conversion -- it does get optimised out, I checked!
simonjhall wrote: |
Ok, bunch of questions - by the looks of the change logs it seems you didn't change too much of the rendering or model loading - am I right? |
Yep, I don't think I touched that code at all.
simonjhall wrote: |
Did you ever try and improve the clipping and transformation by using the VFPU? |
Nope, I tried to do the bare minimum of messing with Quake's code.
simonjhall wrote: |
And what kind of framerate did you get? |
Somewhere in the region of 20, depending on scene complexity.
simonjhall wrote: |
Also, did you get far using the 3D hardware? (I miss programming the PSP :-S ) |
I did some pottering, but barely past the stage of commenting out all the GL calls and unused fluff until it compiled. My plan was then to iteratively add in PSP substitutes for the GL calls until it worked.
simonjhall wrote: |
Back on sound, the thing I'm most not looking forward to is the ARM9<->ARM7 hoo-ha. I'm sure it's going to conflict with the wifi library... |
Yeah, I don't envy you there, that will indeed be the tricky part - Quake can probably do all the mixing and stuff for you.
_________________
http://aaiiee.wordpress.com/
#113132 - simonjhall - Sat Dec 23, 2006 1:48 pm
Quote: |
especially because multi-bit alpha textures absolutely murder the fill rate |
Is that true? I know using alpha reduces the fill rate on modern video cards, but does that also happen on the funny 3D hardware inside the DS? I always assumed that it guaranteed that you could render X number of textured, lit, blended polys at 60fps... (or have I got the wrong end of the stick?)
Quote: |
I would be happy with plain vertex lighting. Just sample the lightmap at the vertex position.. |
That's what I was planning on doing. Plus I have loads of polygon budget free, so I could easily tesselate the polygons that are drawn to increase the amount of lightmap data used. Plus aren't there hardware lights? I was thinking of using them (combined with vertex lighting) to do the dynamic effects.
Or for the dynamic effects I could just do what GLQuake does and plain not bother. Instead it just draws alpha-ed circles/spheres around the light sources. And no, I'm not porting the GLQuake renderer. I'm extending the software renderer and ripping out all the slow stuff as I go along. Kinda wish I had just taken the GL route, but doing it this way has allowed me to port a tiny bit at a time (so I can see it still works) rather than doing it the GL way and having nothing on the screen the first time I power it on :-) Also using the software renderer keeps me way below the polygon limit as all the clipping is done in (now fixed-point) cpu code.
Anyway, I'm still having texture palette problems so I've whipped out the software renderer (and upgraded to dkp 19b at the same time) and as I've got a proper handle on the textures now I decided to test how stuff looks at different quality levels. So here are four screenshots of the same scene with different mip levels: (with the sw renderer btw) (and sorry they look so dark and small - imageshack doesn't seem to like resizing gifs)
0: [Images not permitted - Click here to view it]
1: [Images not permitted - Click here to view it]
2: [Images not permitted - Click here to view it]
3: [Images not permitted - Click here to view it]
Notice the banding on the walls the higher the quality - this goes away when using all four mipmaps on the same scene. I reckon level 1 is pretty doable and the reduced quality isn't that noticeable. Hell even level 2 looks ok half the time but it looks quite poor on the near stuff (like pick ups). Here's some more examples on the Necropolis demo:
0: [Images not permitted - Click here to view it]
1: [Images not permitted - Click here to view it]
2: [Images not permitted - Click here to view it]
3: [Images not permitted - Click here to view it]
Shall I just use level 0 and then drop down a level on the levels I can't fit in memory? Or does anyone have any better suggestions?
Oh and Peter, the sound on PSP Quake was the first thing I noticed as I could hear the Necropolis demo running on someone's PSP :-D Very cool.
Man, this is one BIG post.
_________________
Big thanks to everyone who donated for Quake2
#113138 - OOPMan - Sat Dec 23, 2006 4:44 pm
PeterM wrote: |
simonjhall wrote: | Also, ta for the link to the source - your code is so much nicer than mine! C++ and everything! I haven't the memory for C++... |
*bites tongue to avoid C++ flame war* |
Hehehe, that's funny ;-)
simonjhall wrote: |
Is that true? I know using alpha reduces the fill rate on modern video cards, but does that also happen on the funny 3D hardware inside the DS? I always assumed that it guaranteed that you could render X number of textured, lit, blended polys at 60fps... (or have I got the wrong end of the stick?) |
Hmmmm, possibly. I think the DS has got the hard-lock on max poly's per scene to try and ensure that FPS is as close to 60 as possible at all times, but I think there's no guarantee on things really. Still, given that most DS games using 3d never have low FPS, it probably works to some extent :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#113146 - ecurtz - Sat Dec 23, 2006 6:19 pm
OOPMan wrote: |
simonjhall wrote: | Is that true? I know using alpha reduces the fill rate on modern video cards, but does that also happen on the funny 3D hardware inside the DS? I always assumed that it guaranteed that you could render X number of textured, lit, blended polys at 60fps... (or have I got the wrong end of the stick?) |
Hmmmm, possibly. I think the DS has got the hard-lock on max poly's per scene to try and ensure that FPS is as close to 60 as possible at all times, but I think there's no guarantee on things really. Still, given that most DS games using 3d never have low FPS, it probably works to some extent :-) |
Alpha doesn't appear to reduce the fill rate on the DS, but I haven't tested it explicitly. You are rather limited in your texture options, but you'd probably be fine with 8 alpha levels and 32 shades of brown for Quake anyway. If you don't want multiple levels per texture it's even simpler, you could just flip a bit and render everything at 50% as a test (blending won't work unless you assign stuff some reasonable polygon ids during clipping).
Speaking of the rather limited palette, have you considered reducing the texture colors and giving them individual palettes as an alternative to reducing the resolution/mipmaps? If I recall Quake used a unified palette, which there's no reason to do if you're using hardware textures.
#113166 - sajiimori - Sat Dec 23, 2006 10:24 pm
The poly limit is different from the fill rate limit. The reason there are hard limits is because there's no framebuffer, not because of some push toward 60 fps.
The fill rate limit is complicated -- it's on a per-scanline basis, but it's not just a straight X number of pixels or X number of polys per scanline. A smaller number of large polys is faster than a large number of small polys (covering the same number of pixels). If you run out of fill, VDraw doesn't wait -- it just drops polys and moves to the next scanline.
By all means, try rendering the whole scene twice -- maybe typical Quake levels are simple enough for it. In my experience though, scanlines drop out much sooner if multi-bit alpha blending is happening.
Quote: |
Or for the dynamic effects I could just do what GLQuake does and plain not bother. |
Keep the surface cache; the DS can handle it! :) The light code only does integer math. Drop the highest detail mip level, keep the rest, and have the mip bias lean toward lower detail levels. That will reduce the CPU usage of the lighting code by a lot!
#113167 - tepples - Sat Dec 23, 2006 10:32 pm
sajiimori wrote: |
The fill rate limit is complicated -- it's on a per-scanline basis, but it's not just a straight X number of pixels or X number of polys per scanline. A smaller number of large polys is faster than a large number of small polys (covering the same number of pixels). If you run out of fill, VDraw doesn't wait -- it just drops polys and moves to the next scanline. |
So do you get dropout/flicker artifacts like on the NES when you had more than 64 sprite pixels on a scanline?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#113168 - OOPMan - Sat Dec 23, 2006 10:37 pm
sajiimori wrote: |
The poly limit is different from the fill rate limit. The reason there are hard limits is because there's no framebuffer, not because of some push toward 60 fps. |
Thanks for correcting me on that "theory" :-) Anyway, a very interesting post there sajii with a lot of useful info :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#113170 - sajiimori - Sat Dec 23, 2006 11:32 pm
Yeah, try going up to a wall in Metroid and firing a weapon with a nice big alpha effect. Great way to cheat in multiplayer by seeing through walls! :)
Well, maybe not that useful, but it's nice to see that big name titles aren't immune to such problems...
#113188 - Dood77 - Sun Dec 24, 2006 4:18 am
tepples wrote: |
So do you get dropout/flicker artifacts like on the NES when you had more than 64 sprite pixels on a scanline? |
yes ive noticed an issue like this on metroid DS...
#113222 - simonjhall - Sun Dec 24, 2006 5:40 pm
This just takes the piss - my CF card died this morning, so I went into town to get a new one - it works on the PC but I can't boot anything off it. I coax my old one back into working (even though it's on its last legs). My DS then gives the hint that it wants to be charged, I plug in the power and now it's dead like my other DS. Seriously, WTF?
Can I take another bricked (and flashed) DS back to get it exchanged? It's gotta be my gbamp that's making it do this...
That means if I choose to get a new one I'm gonna have to get it flashed and everything! I'll also have to chuck my dodgy gbamp, get a SC/M3. Or I could just give up on DS development...I'm thinking about it :-(
_________________
Big thanks to everyone who donated for Quake2
#113223 - OOPMan - Sun Dec 24, 2006 5:48 pm
Hmmmmm, surely it's still under warranty (The DS?). Get it replaced, or at least try...
Try the idiot act: "Dur...I tried to charge my DS and now it doesn't work. What gives?"
How dead is dead? There's a lot of stuff on the Flash Equipment forum that'll help you determine whether it's just a blown fuse or something more serious...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#113225 - simonjhall - Sun Dec 24, 2006 6:06 pm
I think it's just a blown fuse, again. The light comes on for a second (when connected to the charger) and then goes off. I might just order the screwdrivers required to open it up and then solder over the contacts of the fuse :-)
Althought if it's gonna do this every few months I'm just gonna give up. I could return it again, but I'm gonna have to buy a FlashMe kit or something. If I keep returning them the people in Game are gonna start to know me as "the guy with the bricked DS'".
Now what the hell am I supposed to do over Chistmas? I'm at home for the week and now have to...hang around with my family...
_________________
Big thanks to everyone who donated for Quake2
#113230 - OOPMan - Sun Dec 24, 2006 10:03 pm
I feel for you :-)
Hey, a break from coding and head-scratching could be good for you :-)
I always find problems solve themselves in the shower rather than at the keyboard :-)
Anyway, yah, just chill and out, if you get desperate, rob a nearby Game store for supplies ;-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#113231 - CommDante - Sun Dec 24, 2006 10:04 pm
Euhm, how the hell do you blow a fuse on a DS (except the usual "oops, I did it again ... SL1"-case)?
Anyways, it seemed you were pretty far getting things running with Quake, it would be a waste to just "drop it". Even if you would "hand it over" it will take some time for peeps to "get into it" and people might all be releasing their one version as "the one (and only)".
If it's a blown fuse and you didn't use flashme orso, screw them (salers). Though it seems to me you'd wanna get rid of using that GBAMP. Call it a "pause" untill you receive enough funds so you can afford a SC/M3 cart, you might wanna consider tellig peeps how much you got already though. I bet that if you're close to the amount and people can see that what they donated is received in good hands .. more people will donate.
The other Quake-porter did a similair job and only posted a few times, noone could actually see it work or see what was donated. To me it sounded like a hoax/make-money-fast deal. Though I might be wrong, he did nothing to prove otherwise. Also, it would be nice to dedicate some credit-screen before the port starts to show who made it all possible (financially). Most people are kind enough to give some pocket-change, but alot of people have a hard time paying the bills (most likely like yourself). Just a thought on money raising.
Conclusion: Get a new DS, pause the project untill you raised enough money for a good cart (SC/M3?) ... and post all the amounts received for it here. The more people that are "known" which are given credits or acknowledged to what they have tributed, the more people would donate ... at least that is what I reckon.
You might want to contact some sites for the cart, maybe you can get a deal. Alot of review sites get free samples for the commercial/"we got it from ..." to use for a review. I bet if you could convince one of those sites and put it into the "credit-screen", you could get one free.
I bet there is no better commercial then getting your site named in a homebrew. But that might be just me.
Meh, for all that good information you might give me a mention in the "credit-screen". ;-) Trust me, most people would do alot to get into one of those.
Rather common Dutch phrase: "If you don't shoot, you always miss (/never hit)."
Iaw: Give it a shot, you've got nothing to lose ;)
#113250 - HyperHacker - Mon Dec 25, 2006 9:14 am
I'd hate to see you just quit, though I can understand the annoyance. If you've blown two fuses already though, shorting over it's probably a bad idea.
OOPMan wrote: |
I always find problems solve themselves in the shower rather than at the keyboard :-) |
Same here. Except that problem where the water randomly becomes really hot or cold. <_<
_________________
I'm a PSP hacker now, but I still <3 DS.
#113514 - simonjhall - Thu Dec 28, 2006 12:59 pm
Hi everybody - hope you all had a nice Christmas!
Anyway, I've decided not to quit - I've got a tri-wing screwdriver on the way and hopefully I can repair my DS, or (I'm sure) I've got the receipt for it on my desk at work :-)
Oh and I just got a mail from the nice people at M3 who tell me they're gonna send me an M3 lite. Hey! When I get my hands on it I think I'll fork off a Q2 thread.
But until I'm back up and running again Q1 is on hold (I've tried emulators but fat support seems patchy). So for those who've not been following,
- Quake 1 runs and every single level (and it's models and scripting code) will fit into memory without textures or lighting
- some levels can be run with full quality textures
- the rest of the levels should run with reduced texture quality
- all models should be rendered with textures
- there's no lighting yet...
- game rendering is hardware-accelerated, but the overlays (eg status bar, menus) aren't drawn
- QuakeC mods and total conversions are technically possible, as long as they don't take too much memory
Once I implement all the graphical features I think I'll release the first public version which hopefully won't be too far off...
Oh and CommDante - I like the idea of a credits screen! More stuff to code... :-P
_________________
Big thanks to everyone who donated for Quake2
#113614 - Nintendo Maniac 64 - Fri Dec 29, 2006 5:34 am
I dunno if this is just me or what, but I always assumed you had a DS phat and not a Lite... Unless you do, then what will you do with an M3 Lite? O_o Not to mention there are versions of the M3 WITHOUT the extra RAM (no GBA support)... Just hope it does have it. :P
And btw, you really don't need a tri-pronged screwdriver to get into your DS, just a very small flat-head and lots of downward force. (though a tri-prong works MUCH better)
#113615 - Firon - Fri Dec 29, 2006 5:37 am
There's a $2 GBA shell to use the M3 Lite on a Phat and a GBA SP.
#113618 - Nintendo Maniac 64 - Fri Dec 29, 2006 5:58 am
oh XD Wow I forgot about that! >_> But yet again, there ARE M3s without GBA/extra RAM support.
In fact, here's a link to one....
um... wtf? Why is it not on their site anymore? I guess it was discontinued... and with good reason too. XD
#113621 - Firon - Fri Dec 29, 2006 8:17 am
M3 Professional/M3 Lite Professional are the ones you're thinking of. They only have 32mbit of PSRAM.
#113637 - simonjhall - Fri Dec 29, 2006 11:49 am
After they told me that I was getting an "M3 Lite" I asked them to confirm if it has the extra RAM in it (as that's the whole point) and then told them that I had a phat - but no reply. So hopefully they'll send me the right one :-D
No reply from the Supercard people yet. If the memory isn't too much slower than the M3 then I guess I should support that one too. I don't think the quantity of RAM is important either - I think I can squeeze Q2 into 6-8MB, inc code, data and game data.
_________________
Big thanks to everyone who donated for Quake2
#113639 - Firon - Fri Dec 29, 2006 12:15 pm
Well, if you only need 4MB of additional memory, then the M3 Pro and the Opera memory cart (assuming Quake is run from a slot-1 device), can be used.
I have no idea if the SC rumble has any additional memory.
#113643 - simonjhall - Fri Dec 29, 2006 12:34 pm
Has anyone got the Opera expansion to do anything yet?
36 megs would be nice though as that'd allow me to be really lazy :-)
Although I'm seriously looking at getting Quake 3 working too, and I think the bigger cards will be essential. And yeah, I realise that Q3 will pretty much pwn the DS' graphical hardware - it would be SO cool though!
_________________
Big thanks to everyone who donated for Quake2
#113647 - OOPMan - Fri Dec 29, 2006 12:43 pm
I believe some devious hackers here and there have done stuff with the Opera memory cart, but not very much.
I'm not that interested in it though, since you need a SLOT-1 card for it to be of any use and I have a SC:miniSD :-)
I think Q3 is a pipe dream. It probably has more floating point math than integer math overall and makes use of all kinds of other funky tricks, such as a funky little fast invsqrt function that has quite an interesting history...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#113648 - Firon - Fri Dec 29, 2006 12:50 pm
Moonshell has made use of the Opera RAM cart. I don't know what else has.
#113649 - MelGibson - Fri Dec 29, 2006 1:21 pm
Depending on if it is the M3 Lite Perfect or the M3 Lite Pro it will have or have not the extra ram. Surprisingly it is the Perfect featuring the RAM while the Pro series comes without
#113651 - OOPMan - Fri Dec 29, 2006 1:38 pm
Nothing like marketing obfuscation, eh?
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#113652 - Firon - Fri Dec 29, 2006 1:42 pm
I said that earlier. And they DO have some RAM, but only 32mbit (that's 4MiB for you non-bit-oriented people). I don't know for sure if it can be used, but I assume it can be.
#113660 - tepples - Fri Dec 29, 2006 3:12 pm
simonjhall wrote: |
After they told me that I was getting an "M3 Lite" I asked them to confirm if it has the extra RAM in it (as that's the whole point) and then told them that I had a phat - but no reply. So hopefully they'll send me the right one :-D |
M3 Perfect: 32 megabytes. M3 Pro: 4 megabytes.
Quote: |
No reply from the Supercard people yet. |
SuperCard: 32 megabytes. SuperCard Rumble Series: no RAM.
Quote: |
If the memory isn't too much slower than the M3 then I guess I should support that one too. |
A copy from SuperCard RAM takes about 50% longer than a copy from M3 RAM.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#113672 - simonjhall - Fri Dec 29, 2006 4:40 pm
tepples wrote: |
A copy from SuperCard RAM takes about 50% longer than a copy from M3 RAM. |
Hang on, didn't you say that the SC would get about 5.5MB/s and the M3 would do about 6.6MB/s?
Yeah, I think Q3 is a pipe dream but if Q1 is doable and Q2 looks doable then I've got to at least try Q3 to see what the limits of the hardware are! Plus there's no Q3 PSP but how cool would it be if there was a version for the DS ;-)
I think the texturing is too advanced for the DS but as there's no software renderer the engine might be simpler. I could at least just use regular texturing and vertex lighting...
_________________
Big thanks to everyone who donated for Quake2
#113679 - OOPMan - Fri Dec 29, 2006 6:08 pm
Hmmmmm, it would probably be a good idea to design for the SC if the M3 is faster, since the SC is the "worst case scenario" device. Well, almost. I'd imagine nothing or the Opera cart is a little lower on the ladder...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#113681 - simonjhall - Fri Dec 29, 2006 6:37 pm
I'd rather have 60 megs/second as 6 megs/second is just not cool.
I'm hoping that I can substantially reduce the amount that needs to be transfered by using the bsp-culling system. If I'm moving more than 100k/s frame then the transfer speed may slow down the whole game just too much...
_________________
Big thanks to everyone who donated for Quake2
#113695 - PeterM - Fri Dec 29, 2006 9:03 pm
simonjhall wrote: |
Plus there's no Q3 PSP but how cool would it be if there was a version for the DS ;-) |
If you think Q2 is tight for memory, you'll hate Q3!
I found that the static data segments alone took up around 25MB...
_________________
http://aaiiee.wordpress.com/
#113707 - simonjhall - Fri Dec 29, 2006 10:34 pm
Ah, so have you had a go, Peter? And how come you didn't do Q2 for the PSP after you did Q1? It looks to me that you could get it to run with only a few changes...actually regarding PSP stuff, how much memory do you get to play with? The full 32 megs?
_________________
Big thanks to everyone who donated for Quake2
#113711 - PeterM - Fri Dec 29, 2006 10:55 pm
8MB is used by the PSP OS, so you get at most 24. This is of course reduced depending on the stack size, threads started, static data size etc etc.
I think in Quake we get about 21MB free for the heap, but I'm not 100% sure.
I would love to have a go at Q2 though, so if you've got any memory saving tips which you could offer that would be great. I really really wouldn't want to rewrite the loading code though!
_________________
http://aaiiee.wordpress.com/
#113713 - simonjhall - Fri Dec 29, 2006 11:04 pm
Right, I assumed that homebrew PSP software got full control of the machine and could use the full amount of memory...
I've already started to rewrite chunks of the code to deal with the split memory system...once I actually get it onto a working DS I could always give it to you to see what you could do with it on the PSP. It might add unnecessary code though as the PSP has just one big chunk of (relatively fast) memory rather than this funny system we're gonna have on the DS :-D
EDIT: I've just stepped my way through the level initialisation of Q3 and it looks a lot like Q2 but it seems that the source given away on the id site seems geared towards x86 (despite there being the ocassional PPC Mac reference...). I'll have a proper look at a later date to see if there's any scope for Quake3 on the DS.
_________________
Big thanks to everyone who donated for Quake2
#113770 - simonjhall - Sat Dec 30, 2006 1:25 pm
I fixed my DS! Kinda got a bit worried when bridging F2 didn't work and also nearly cried when I couldn't find my solder :-) Let's all thank old hard drives where there's just too much solder on their molex connectors :-D
_________________
Big thanks to everyone who donated for Quake2
#113777 - tepples - Sat Dec 30, 2006 3:34 pm
simonjhall wrote: |
tepples wrote: | A copy from SuperCard RAM takes about 50% longer than a copy from M3 RAM. | Hang on, didn't you say that the SC would get about 5.5MB/s and the M3 would do about 6.6MB/s? |
My bad. The ROM-access side of a copy from the SuperCard takes 50 percent longer than on the M3. The RAM-access side, which does not vary per card, diminishes this difference somewhat if the RAM is slow (as it is on the Game Boy Advance, to which my figures refer).
Quote: |
Yeah, I think Q3 is a pipe dream but if Q1 is doable and Q2 looks doable then I've got to at least try Q3 to see what the limits of the hardware are! |
If it was hard to fit the game into Dreamcast, which has 6 times the RAM (26 MiB vs. 4.6 MiB) and 3 times the CPU of a DS (200 MHz plus ARM7 coprocessor vs. 67 MHz plus ARM7 coprocessor)...
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#113781 - simonjhall - Sat Dec 30, 2006 4:00 pm
Well neither Supercard nor M3 have said anything further to me, so maybe it was just a ploy to get my contact details... But either way I'll be able to see what the transfer speeds are like first once I get one (from whatever source!).
And yeah, you could be right about Q3 - it does seem like a bridge too far. Even with the extra RAM it'd run too slowly (as the memory transfer speed is too low). Ahh...
Actually, does anyone fancy doing a Duke3D port?
Oh and back on Q1: I've fixed the colour corruption problems but now I'm getting horizontal bands (for just one frame) whenever I change the texture palettes. When is the 'proper' time to change a palette? At the beginning of a frame?
_________________
Big thanks to everyone who donated for Quake2
#113783 - Firon - Sat Dec 30, 2006 4:06 pm
Duke3D on the DS would be lovely. :P
#113784 - tepples - Sat Dec 30, 2006 4:08 pm
Firon wrote: |
Duke3D on the DS would be lovely. :P |
Come get some.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#113785 - simonjhall - Sat Dec 30, 2006 4:14 pm
Wow! And there was me thinking that it'd be non-trivial to do...and they've already done it on the GBA!
To hell with the DS, I'm gonna do Q2 for the GBA.
_________________
Big thanks to everyone who donated for Quake2
#113788 - xtoc - Sat Dec 30, 2006 4:37 pm
- i'm still hoping on a duke3d port (atomic one).
keep on the good work
greetz
#113789 - tepples - Sat Dec 30, 2006 4:40 pm
simonjhall wrote: |
Wow! And there was me thinking that [porting Duke3d to DS would] be non-trivial to do...and they've already done it on the GBA! |
That's because Build isn't much more advanced than Doom, which has already been ported to the GBA. Based on what I've read, Build is a raycaster like the Wolf3d engine, except with polygonal sectors replacing the square map grid.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#113791 - xtoc - Sat Dec 30, 2006 4:45 pm
- did not like the gba version at all.
- what about stunt or daggerfall ? is it possible ? (just to know)
#113796 - Lazy1 - Sat Dec 30, 2006 6:52 pm
This isn't a request thread, but if you want I could take a look at the duke3d sdl sources and possibly make a quick port.
Keep in mind I also have 2 other projects to worry about both long overdue for an update.
#113827 - simonjhall - Sun Dec 31, 2006 2:51 am
I finally get my DS fixed and I fix most of my graphical problems in the same day!
So, now theres:
- no (massive) texture palette corruption
- no palette crashes
- menus! (they use LOADS of VRAM)
- sprites (explosions etc)
- animated textures work (no water, sky, lava or teleporter animation though)
- nearly all the transformation and clipping is done in hardware now
and the big one (the reason I'm posting!)
- no nausea-inducing texture co-ordinates!
Basically Q supplies me with the world in triangle fans (no quads). As I was doing all the perspective scaling in software, when it came to rendering the world there was no perspective scaling on the textures and it made everything look...funny. Seriously hard to track down :-) If I had gotten my data as quads this would never have been a problem!
One side-effect of this is that it's now even faster. Shame, eh?
There's still no particles or proper lighting and plenty of texture co-ords are broken but it looks seriously cool now >:-D
_________________
Big thanks to everyone who donated for Quake2
#113828 - tepples - Sun Dec 31, 2006 2:55 am
simonjhall wrote: |
As I was doing all the perspective scaling in software, when it came to rendering the world there was no perspective scaling on the textures and it made everything look...funny. |
No perspective correction, like on the original PlayStation?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#113830 - simonjhall - Sun Dec 31, 2006 3:15 am
Dunno about Playstation...
Here's a (poor) explanation.
If you look along a wall (which is made of two tris, not a quad) and you consider the triangle with one vertex near you (and two in the distance), the texels close to the vertex nearest you should be bigger than the ones at the other end of the wall. It's almost like they should be stretched as if a fourth vertex (near you) were there dragging them out.
But when I gave the geometry to the DS I gave it a really tiny Z, big enough to have z-testing work but small enough to allow me to use gluPerspective rather than glOrtho (as that didn't work for me). So the DS didn't realise that the textures had to be stretched and just filled in the triangles with the texture like a 2D pattern.
I really need some pictures to illustrate this :-D
What made this especially hard to find was if you look at a wall at a relatively shallow angle what's causing it is less obvious but you can still see there's a problem. PLUS if you think about the wall again the other triangle (the one with two vertices near you) has the same texture but it's at a slightly different angle to the texture on the other triangle, so the texture for the wall slightly dips in the centre.
And then when you start to walk it all the textures start to move slightly and as Q tesselates geometry like crazy it makes it look like the floor is moving! Maybe I'll add this back in as an Easter egg :-)
_________________
Big thanks to everyone who donated for Quake2
#113861 - simonjhall - Sun Dec 31, 2006 3:17 pm
I'm really chuffed with this texturing, but changing it to hardware transformation and clipping broke everything else.
So here's a quick video (7.41 megs) of it running the intro demos but WITHOUT any entities. Enjoy! Oh and no, this is the actual speed (so far) - I've not post-pro'd anything.
http://myweb.tiscali.co.uk/simonhall/textured.avi[/url]
_________________
Big thanks to everyone who donated for Quake2
#113862 - Dark Knight ez - Sun Dec 31, 2006 4:10 pm
Video stops after approximately four seconds of playing for me.
Tried both Windows Media Player and Winamp. Redownloading didn't help.
Just thought I'd let you know there might be a chance the video is corrupt.
_________________
AmplituDS website
#113863 - MelGibson - Sun Dec 31, 2006 4:14 pm
Yeah the video is corrupted unfortunatly, but you can restore it with virtualdub.
Oh yeah and it looks awesome !
Happy new year :)
Last edited by MelGibson on Sun Dec 31, 2006 4:15 pm; edited 1 time in total
#113864 - NorQue - Sun Dec 31, 2006 4:14 pm
No go with Totem, VLC and MPlayer, too :( . MPlayer shows it's 2:02, though.
#113882 - Mr. Picklesworth - Sun Dec 31, 2006 7:04 pm
I viewed it with VLC just fine. It had to repair the video, though (it offers to) and there's a lot of artifacting, but it's visible.
Very nice work, Simon! It looks (and runs) even better than I expected :)
_________________
Thanks!
MKDS Friend Code: 511165-679586
MP:H Friend Code: 2105 2377 6896
#113883 - simonjhall - Sun Dec 31, 2006 7:20 pm
Here's a recompressed and reuploaded version. I've increased the bitrate on this a little bit (now 9.5 megs) so hopefully there will be fewer artifacts. I've not yet figured out how to increase the video resolution of my camera either....
http://myweb.tiscali.co.uk/simonhall/textured.avi
Oh and happy new year!
_________________
Big thanks to everyone who donated for Quake2
#113887 - CommDante - Sun Dec 31, 2006 8:10 pm
WOW, that movie went pretty slick/fast. More fast then slick though, I guess it's the camera. It seems the current engine doesn't like to be underwater though. It has been a while since I played Quake (1), did it have some morph effect?
Might be nice to have an option to turn it on/off.
Are the entities turned off, or just not displayed? I'm asking because the entities might cripple the framerate alot and/or memory usage. Also, the stone-walls (not the brick ones) looked very repeated, bad/"old" textures or still some work to be done?
I'm kinda beginning to hate those GPL (:? the open-source agreement) thingies, would be awesome to run those test builds on real hardware instead of movies. (Note: I don't blame you for not releasing the source-code yet since it's such a hazzle, but it seems rather silly you can't give builds while testing them without the source.) Still, better something then nothing, I'm glad you posted a movie showing your awesome progress.
Here is an idea, I don't know if it's valid though: release builds with the menu disabled ... it should run the demo's, but it wouldn't be a complete port (yet). This way we can see it on hardware and you can see if it works on all kind of flash-carts. In other words: You release the build as an test and everyone downloading/using it is part of the development/testing team ;)
Meh, there should be a hole in that agreement somewhere ... :-(
#113915 - simonjhall - Mon Jan 01, 2007 3:15 am
As a result of me changing the viewing frustrum the alias models are no longer being rendered as they're not transformed properly. They're currently a bit slow to draw but that's mainly because I've not optimised the code for that yet (something I have done for the brush models). They are loaded in memory though.
The texture maps shown here are the actual maps from the game. Some of the texture co-ordinates are out a bit though, but the scaling/tiling should be right correct. They're also the highest quality texture map, as I'm not using mipmapping (although I could do if I had more VRAM). It looks a bit repeated in places as there's no lighting currently. If you try running up a software-rendered version of Quake (I use DOSBox) type in r_fullbright = 1 to see just how much texture repetition there is!
And the underwater effect you're talking about is called waterwarp :-) I think it's also connected to the appearance of the water when you're not in water, lava, sludge, the sky and the teleporters. It works by heavily tesselating the geometry and putting sin waves on the triangles. If I have the poly budget I'll have a go...
And I have already done a pre-release version to a few people just to see what problems I had with the cards! I might do another one at some point...
Oh and the thing I'm really debating at the moment is the menus, as my implementation isn't too cool. Do I:
a) overlay the menu on the graphics, like in the real game - this is what I have already done. This uses lots of VRAM and looks a little crap, plus is quite hacky to the Quake engine
b) put the menu and console on the bottom screen (with the 3D on the top) and draw everything framebuffer-style? This will be easier to do (assuming I can do framebuffer on one screen and 3D on the other) and it would also allow you to (maybe) use the pen to select menu entries...
Yeah and new years in central London (we were next to Big Ben) was pretty cool. Fireworks weren't as good as last year though.
_________________
Big thanks to everyone who donated for Quake2
#113917 - tepples - Mon Jan 01, 2007 3:43 am
simonjhall wrote: |
Do I:
a) overlay the menu on the graphics, like in the real game - this is what I have already done. This uses lots of VRAM and looks a little crap, plus is quite hacky to the Quake engine
b) put the menu and console on the bottom screen (with the 3D on the top) and draw everything framebuffer-style? This will be easier to do (assuming I can do framebuffer on one screen and 3D on the other) and it would also allow you to (maybe) use the pen to select menu entries... |
Yes, you can put an extended rotation background (similar to a frame buffer) on the sub-screen, but it might have to be 8-bit and with 16/32-bit writes due to the VRAM size limitation. A 16-bit frame buffer takes 96 KiB, but only 64 KiB is available in any of the other VRAM banks.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#113918 - simonjhall - Mon Jan 01, 2007 3:52 am
Will it just allow me to splat data into it like I would a framebuffer or does it have some kind of tile structure (I haven't too much idea about DS 2D)? It'd actually be best if it was an 8-bit image as my palette already lives in VRAM E, for the texture maps.
_________________
Big thanks to everyone who donated for Quake2
#113927 - tepples - Mon Jan 01, 2007 6:14 am
In extended rotation, there is no tile structure.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#113952 - xtoc - Mon Jan 01, 2007 8:04 pm
@simonjhall impressive.
about the sound, would this be possible, or will it reduce the framerate?
(at moment, very nice framerate)
Anything news from supercard, or m3?
@Lazy1
that would be great (only if you have time)
which are those other 2 projects?
#113958 - simonjhall - Mon Jan 01, 2007 10:45 pm
Thanks very much. I'm sorry but I have no idea about sound, as I've not yet looked at it. I'm hoping I'll be able to do all the mixing and cpu-intensive stuff on the ARM7 and let the ARM9 do it's thing with the game. So I'm not imagining it slowing it down too much.
Oh and the framerate in that video is no longer representitive of the real thing :-) The video on here runs at about 8-15 fps (surprisingly cosy for this game) but I just seriously went to town on the brush model renderer and bumped the frame rate up to a mammoth 35 fps (average) with the lowest speed at 20fps! The necroplis demo now takes just 22 seconds to run...
One more day closer to releasing this thing...
EDIT: Oh and no I've not heard anything more about the free cards. I'll be back at work tomorrow so I may send out some mails (unless there's not a card there waiting for me already!)
_________________
Big thanks to everyone who donated for Quake2
#113978 - kusma - Tue Jan 02, 2007 2:32 am
I just had a quick look at the sound-code for quake1, and it seems like the sound hardware on the DS should be able to cover at least the most common cases. There's 8 dynamic channels by default (for entity sounds), 4 channels for ambient sounds, and a surprisingly 116 channels for "static sounds" (whatever that is..). All of these are compile-time defines, and I believe that some lower values should work fine in reality. Another option is to reserve two channels for software-rendering if running out of hardware-channels. The 16bit sample mode should be possible to do directly, the 8 bit seems to do some non-linear volume ramping, so I think it would need pre-processing at least to work. ADPCM is most likely the best solution though, but that would require modifying the data-files.
#113990 - Metaluna - Tue Jan 02, 2007 10:11 am
xtoc wrote: |
@Lazy1
that would be great (only if you have time)
which are those other 2 projects? |
His two projetcs :
- Wolfenstein 3D DS (only lack sound)
- Mini vMac DS
http://lazyone.drunkencoders.com/wordpress/index.php
#114001 - simonjhall - Tue Jan 02, 2007 4:33 pm
What's the difference between WAV and ADPCM? Is ADPCM the one where you store the difference between each sample? I could see myself having to write some kind of tool to pre-process the sound files on the PC as I'm sure they're not in a DS-friendly format :-(
I'm actually concerned that sound may take away some of my precious memory, plus I have no idea how much sound memory is required in game, so I can't allocate some now. I'm considering sticking them in one of the VRAM banks and sharing the data between the 7 and the 9 through that.
I don't think I'll be including sound in version one as I think it's gonna take quite some time to get right (what with CD music and all).
_________________
Big thanks to everyone who donated for Quake2
#114011 - xtoc - Tue Jan 02, 2007 7:44 pm
@metaluna, yep i remember his 2 projects, but wasn't his mac project finished?
ontopic :
quake1 maps
http://palib.info/forum/modules/newbb/viewtopic.php?forum=33&post_id=13395#forumpost13395
don't know if it's useful
#114012 - kusma - Tue Jan 02, 2007 7:56 pm
simonjhall wrote: |
What's the difference between WAV and ADPCM? Is ADPCM the one where you store the difference between each sample? I could see myself having to write some kind of tool to pre-process the sound files on the PC as I'm sure they're not in a DS-friendly format :-(
|
ADPCM is a lossy, compressed audio format. It's basically 4 bit delta-samples with some tricks.
simonjhall wrote: |
I'm actually concerned that sound may take away some of my precious memory, plus I have no idea how much sound memory is required in game, so I can't allocate some now. I'm considering sticking them in one of the VRAM banks and sharing the data between the 7 and the 9 through that.
|
The sound-code in quake seems to be based on an software-controlled sample-cache, so samples can be loaded on the fly and discarded when not needed in a while. That should at least make the sound-code a tad less memory-hungry.
#114104 - agentq - Thu Jan 04, 2007 12:38 am
You can use the code in ScummVM DS to play ADPCM files. These can be created under Windows with every sample editor.
In ScummVM, people rip the CD to ADPCM WAV files with a program called CDEX, and ScummVM can stream them from the flash card or GBA cartridge. Decompression is incredibly cheap and you get a 4:1 compression ratio. You only need a few Kb of RAM for a buffer. Sound quality is perfectly acceptable.
Yo mama.
[Please use the [url=] syntax when posting long URLs. -- MOD]
#114113 - Firon - Thu Jan 04, 2007 3:23 am
tepples, is it possible to add stereo support to 8ad? Or is 262kbps too much to stream?
#114123 - tepples - Thu Jan 04, 2007 6:25 am
All you have to do to run 8ad in stereo is make two 8ad decoder structs, decoding left and right streams in parallel. (You might want to interleave them on disk.) Then feed the left stream to one DS audio channel, panned hard left, and the right stream to another, panned hard right.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#114129 - simonjhall - Thu Jan 04, 2007 10:25 am
I'm hoping to stream all the sound straight from disk and do everything on the ARM7. Hopefully that'll be ok and it won't be too laggy.
And ta Neil for the Scumm heads-up. I've already been looking at your code to get some clues as to how you set up the extended rotation background on the sub screen. So I now have the proper Quake console running on the bottom screen now :-) Looks a little crappy though as I can only fit a 128x128 background there though. 256x256 would be much better but I think I'd have to sacrifice to texture memory for that. Oh and you mentioned the other day that someone was writing a software scaler for you (but it wasn't too fast). Why don't you just use the scaling provided by the hardware?
And my CF card finally died. I reckon it's done 1,000-2,000 plug/unplugs on Quake alone so it's done pretty well :-) Shame I can't get my other CF cards to booth though. Luckily I got another (big) donation last night so that's cool. Keep em coming!
_________________
Big thanks to everyone who donated for Quake2
#114130 - xtoc - Thu Jan 04, 2007 11:00 am
heh nice, i did some post on website for doing this donation, hopefull other will donate too
greetz
#114136 - Firon - Thu Jan 04, 2007 11:32 am
simonjhall wrote: |
I'm hoping to stream all the sound straight from disk and do everything on the ARM7. Hopefully that'll be ok and it won't be too laggy.
|
Well, for the music, you'll definitely want to use a decent-sized buffer to give the card time to read everything else.
simonjhall wrote: |
Oh and you mentioned the other day that someone was writing a software scaler for you (but it wasn't too fast). Why don't you just use the scaling provided by the hardware?
|
The hardware only provides near-pixel filtering, which looks ugly. Maybe he tried to implement something better-looking.
#114139 - Lazy1 - Thu Jan 04, 2007 2:14 pm
Firon wrote: |
The hardware only provides near-pixel filtering, which looks ugly. Maybe he tried to implement something better-looking.
|
If you scroll the background X by 1 back and forth every frame it will smooth things out very nicely.
It was suggested by someone on this forum but I'd have no idea who.
#114141 - sasq - Thu Jan 04, 2007 2:18 pm
I did a text-screen on GBA where I needed to use as little RAM as possible, the source is here:
http://www.nightmode.org/pocket/gs/text.asm
Basically I use TEXT-mode and put several characters into each block, so each pixel only takes 1 bit - so the entire font only takes 512 bytes (for 64 characters).
#114142 - simonjhall - Thu Jan 04, 2007 2:42 pm
Lazy1 wrote: |
If you scroll the background X by 1 back and forth every frame it will smooth things out very nicely. |
Maybe I could do that to the Q console to get it looking a bit more high-res.
I'm a bit relucant to break into my banks A-D in order to get the console looking better...
_________________
Big thanks to everyone who donated for Quake2
#114145 - xtoc - Thu Jan 04, 2007 3:36 pm
those text functions that mollusk added with palib, don't they use small ram size?
Even the sound....
( http://www.palib.com )
#114172 - simonjhall - Thu Jan 04, 2007 9:54 pm
I've been told that the video I hosted has exceeded the bandwidth of my webspace, so I've put it on youtube. There's no new material here btw.
http://www.youtube.com/watch?v=BIA7VHEBulM
Oh and I don't think I can use a text thing for the bottom screen as I'm gonna wanna put pictures on it too.
_________________
Big thanks to everyone who donated for Quake2
#114178 - tepples - Thu Jan 04, 2007 11:45 pm
If you load up half the sub-screen's tile VRAM with glyph tiles and the other half with graphics tiles, you can make a text layer on top of a graphics layer.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#114350 - Epicenter - Sun Jan 07, 2007 1:48 am
Speaking as an avid Quake mod developer/programmer and all-purpose Quake I/II enthusiast, I can say without a doubt this is excellent work you are doing. I can't wait to see how this runs at the described 20 FPS! The Quake port to the GP2X only manages a measely 10-15 FPS, with an ARM9 clockrate of *305 MHz*. I'm sure once you get the ARM7 in on the action, sound won't be much trouble.
I've donated 13GBP / ~25USD to your worthy cause. :) Quake I and II in playable state on the DS would be a dream come true.
If I may make a request-- not to jump the gun-- but once things are all working more or less correctly would you take a stab at adding support for modifications? It's of particular value to me as a mod programmer, and there's quite a collection of great mods out there-- bots, Airquake, weapon mods, list goes on and on. And some sort of multiplayer capability over WiFi would be .. well, nothing short of incredible.
Again keep up the fantastic work; I will be following this project with great interest. :)
#114354 - simonjhall - Sun Jan 07, 2007 2:25 am
That's epic, thank you very much!
I'm gonna order a Supercard soon, and apparently M3 never received my contact details (but they *should* do now), so hopefully I'll shortly have some Q2-worthy hardware.
re: the GP2X - does it have 3D hardware? If they're doing it all with the software renderer, 10-15 fps is pretty good. Also, what about an FPU?
I'm hoping that I can make the brush model renderer another 5ms faster with the use of a dash of assembler, meaning it'll be running about 40 fps. If I then have the same good luck with the Alias model renderer and the VM I'll be laughing!
Yes, the game will support mods and total conversions out of the box. However, I don't want to have to do the support for that - I'm gonna make the standard game run in four megabytes but I'm a little worried I'll get mails like "why doesn't mod X run?"! Also, how would you choose which mod to run? I could knock up a menu somehow or just have a file on the disk where you just specify the command line....(crappy)
And yes there will be wifi gaming and sound, but I'm not promising them for version 1! Dunno how I'm gonna test DS<->DS gaming though as I only have one DS. I think Quake has poor support for NAT, so...
ot: I've just had to upgrade my Paypal acc from personal->premier (the next one up). Does anyone know what the disadvantage of doing this is?
_________________
Big thanks to everyone who donated for Quake2
#114357 - tepples - Sun Jan 07, 2007 3:14 am
Premier means that you can take VISA and MasterCard brand credit cards, but PayPal eats some of your incoming money as a transaction fee (30 bells + 3%).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#114370 - Epicenter - Sun Jan 07, 2007 6:45 am
Well, if you can get it to work over TCP/IP with a Windows or Linux-running PC with the standard Quake client .. you'd at least know it could play over the internet :D That'd be incredible. Make it Quakeworld compatible and play online from a WiFi AP? More likely scenario than bumping into someone with a DS, a backup device and Quake loaded on it, really. :)
As for mod support .. just put a disclaimer in the readme file and hopefully people will see it when they look for instructions on using mods. Or make a good error message that explains the out of memory condition and that they're probably just screwed? :)
As for the GP2X .. no 3D hardware, no decent 2D hardware, even. No FPU, either. So 10-15 FPS is pretty good, it was a port of PocketQuake though, which IIRC has most FP-intensive code replaced with fixed point equivalents.
Maybe a couple options you could add to the menu are to use r_fullbright 1 to disable lighting, or r_drawflat 1 for extreme speedup (no textures?) Quake II-- I think a big benefit might be to turn off model inter-frame interpolation and again, fullbright. :)
For RAM issues, have you considered using M3 or Supercard onboard memory? If I understand correctly they have ~32MB of SRAM. They already use it to cache the game you're running if you specify, or if you run GBA software (slot 2 devices of course.) IIRC M3 devices have faster SRAM, Supercards are often plagued by slowdown in the some of the most intensive GBA games. In such a demanding application as Quake, every bit of access time you can shave off would be crucial.
I can also build you a progs.dat that will get higher framerates, e.g. turn off extraneous particle effects, optimize a few complex parts of the AI that are more of a CPU burden than they need to be, so forth. Progs.dat is as you probably know the 'game rules'. It won't change how the demo runs since that's a bunch of prerecorded server messages, but it will change how the game runs. If you record your own timedemo with it, it'd be a good benchmark. Let me know. :)
#114386 - simonjhall - Sun Jan 07, 2007 1:06 pm
Ok, let me try to answer all these points:
- the game may not be compatible with the stock version of Quake, so PC<->DS gameplay may not be doable
- I've not looked at Quakeworld as that's a whole different source tree, instead I've derived my port from the WinQuake source (from the id site). Dunno if WQ can play against QW.
- user-made levels and models will work if they're of comparable file size to the original file (so Malice doesn't run as the levels are like a megabyte bigger)
- fullbright and drawflat are only really useful when used with the software renderer as texturing and lighting really slow it down! Luckily that's not the case with the hardware-accelerated version!
- I'm gonna make the extra RAM from the SC/M3 a requirement for Q2 as there's not enough free on the DS to get the most basic stuff rendering!
- AI is definately a sluggish thing at the moment - so I may get back to you on that offer!
_________________
Big thanks to everyone who donated for Quake2
#114400 - kusma - Sun Jan 07, 2007 3:48 pm
simonjhall wrote: |
re: the GP2X - does it have 3D hardware? If they're doing it all with the software renderer, 10-15 fps is pretty good. Also, what about an FPU?
|
Even without a GPU, 10-15 fps is absolutely horrible on 2x200Mhz ARM9.
Okay, so the overlapping float-division can't be done, but there are other smart ways of doing this trick on FPU-less CPUs, costing only a few cycles - divivde it over 8 or 16 (never remember how often quake did the perspective correction), and it's virtually nothing.
As for TNL, there's very efficient ways of keeping floating-point range/precision efficiently without special hardware too. It's a bit of work, but preformance-wise, it's really worth it.
#114414 - simonjhall - Sun Jan 07, 2007 7:51 pm
Yeah, I've replaced a lot of fp code with ints and a whole lot of << and >> :-D
I'm using 22 bits of err..big numbers and 10 bits of...the little number.
The biggest problem with fixed-point numbers so far is that the DS' 3D hardware wants the geometry as fixed-point numbers but the world is normally way too big to fit into that type. So I'm literally loading my vertex data into memory (from disk) as 0.006 * the original position! As the there's not a huge amount of precision in the fixed-point type used, the floor nearby can sometimes wobble slightly. I'm looking for some kind of fix for this, but if not the wobble isn't big enough to annoy (unlike those crazy texture co-ordinates!)
Oh and the original untouched software renderer ran at 1.5-4.0 fps on the 66 MHz ARM 9 (and that's just in the demo - the VM doesn't run then!). That's why I was surprised that they could get 10-15 on something ~3 times the speed. That's why I assumed there was an FPU.
_________________
Big thanks to everyone who donated for Quake2
#114419 - kusma - Sun Jan 07, 2007 8:17 pm
simonjhall wrote: |
The biggest problem with fixed-point numbers so far is that the DS' 3D hardware wants the geometry as fixed-point numbers but the world is normally way too big to fit into that type. So I'm literally loading my vertex data into memory (from disk) as 0.006 * the original position! As the there's not a huge amount of precision in the fixed-point type used, the floor nearby can sometimes wobble slightly. I'm looking for some kind of fix for this, but if not the wobble isn't big enough to annoy (unlike those crazy texture co-ordinates!)
|
One normal "fix" for fixedpoint range/precision, is to - for each mesh - rescale all vertices so that you're using the entire range of precision for that mesh. You can compensate for this in the modelview matrix.
#114422 - Ant6n - Sun Jan 07, 2007 8:44 pm
or simpler, rescale to just fit the viewing frustrum into the range
#114425 - kusma - Sun Jan 07, 2007 9:29 pm
Ant6n wrote: |
or simpler, rescale to just fit the viewing frustrum into the range |
Uhm, would you care to elaborate? The way I'm interpreting you is not only much more complicated, but also not robust at all...
#114431 - Ant6n - Sun Jan 07, 2007 10:43 pm
I dont really know that much baout ds 3d hardware, but i thought there is 16 bit precision on vertices, with 3 bit integer part. thats like the size of the world (i'd call it world box). My thought would be to just put the camera at the centre of the world, translate all visible vertices so that they are relative to the camera, and multiply (or shift) them so all visible ones are inside the world box. the multiply or shift would be constant, since its related to the maximum viewing distance.
#114436 - simonjhall - Sun Jan 07, 2007 11:04 pm
I could do that with the frustrum if I were still doing the clipping in software.
I could do per-surface scaling and that'd give me the best-looking solution. I'd have to do that at load time though, but wouldn't be too hard. Would mean that I'd need extra matrix operations though...
I'll think about it!
At the moment I scale everything by the same value (to cover the worst case) then rescale everything back up with the modelview matrix.
---
Ant6n (just saw your new message), you're right - there's one bit sign, 3 bits integer, 12 bits fractional - or so nocash tells me!
The method you've got there is almost the same as the software-clipper that I was using. As I'm no longer using it you can sometimes get some big polygons. These need to be cut up so that big, but still valid, polygons aren't thrown out. As I'm not doing that anymore I'll need to do some per-surface/mesh scale thing like kusma suggested... I may bring back the software clipper though if I can make it fast enough.
_________________
Big thanks to everyone who donated for Quake2
#114440 - Ant6n - Sun Jan 07, 2007 11:25 pm
oh.. yeah, that makes sense. I have been wondering about clipping. The only algorithms I have seen online clip polygons, one at time. But if meshes in a BSP are convex anyway, one could probably clip a whole mesh in one pass (in my head its a mess though). Have not seen anything about that though.
Other suggestion: since your problem seems that some polygons that are big would be partially outside of the "world box", one could either clip only against the worldbox which could be an aligned box, or only clip against the far viewing plane. You'd just make sure that vertex compenents dont overflow and let the precise cutting be sort out by the hardware.
#114444 - kusma - Sun Jan 07, 2007 11:55 pm
simonjhall wrote: |
At the moment I scale everything by the same value (to cover the worst case) then rescale everything back up with the modelview matrix.
|
This is basically what I mean, but don't use the same rescale-factor for the entire scene. It's much better to split the scene into several portions that each fit into the input-coordinate size.
#114462 - Epicenter - Mon Jan 08, 2007 3:15 am
simonjhall wrote: |
- I've not looked at Quakeworld as that's a whole different source tree, instead I've derived my port from the WinQuake source (from the id site). Dunno if WQ can play against QW. |
I don't believe so, the other standard, NetQuake, is incompatible. QW is far preferable though since it includes client-side prediction. It feels easily 200ms less laggy than NetQuake, I'd estimate, in actual gameplay.
Quote: |
- AI is definately a sluggish thing at the moment - so I may get back to you on that offer! |
Probably the primary trick I'd use for this is disabling useless AI and animation that is occurring in an area no player can see. The progs.dat spends so much time running animation macros it's hilarious!
Quote: |
The biggest problem with fixed-point numbers so far is that the DS' 3D hardware wants the geometry as fixed-point numbers but the world is normally way too big to fit into that type. |
How about shrinking the display world? Most maps don't come close to filling the whole 8192-cubic-unit world.
kusma wrote: |
Even without a GPU, 10-15 fps is absolutely horrible on 2x200Mhz ARM9. |
The GP2X's design is horribly crippled-- its CPUs are embedded into a MagicEyes System-on-a-Chip (MMSP2/MP2520F) which is meant for use in a DVD player or a camera. The 2D subsystem is abysmally slow and the 2nd ARM9, the ARM940T, is crippled badly. It has no MMU and 4k/4k cache as the specsheet will tell you. But because it shares memory with the 920T and lacks the MMU, using it usually slows the system down more than just performing tasks on the 920T since the two CPUs fight over the path to memory. It's quite a disaster.
#114463 - Epicenter - Mon Jan 08, 2007 3:33 am
I have a few other ideas you might like, too-- but one of them I do want to ask about. How stressed is the DS' GPU rendering the scene? Is it pushed to its limits or running comfortably? One trick might be to have enemy corpses sink into the floor and be removed from play-- ordinarily they sit there and still display their full polygon count, which really can't be doing much for framerate. I can also, of course, make enemy gibs disappear faster, or enemies gib more easily because the gib models use perhaps 10-15 polys rather than a couple hundred, say, an Ogre or Shambler might.
#114475 - tepples - Mon Jan 08, 2007 6:55 am
Does Quake have low and high detail models? If so, then perhaps corpses could be drawn with lower detail. But fading the corpse out would work too; this is the approach GoldenEye 007 used.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#114484 - Epicenter - Mon Jan 08, 2007 8:57 am
Well, there is no support for alpha drawing of models in WinQuake so it'd have to be implemented. Easier to just have the corpse drop through the floor or vanish after a short period of time (preferably the first as it'll be less spontaneous when they just pop out of existance) since there's already full support for the needed functionality in the engine, it just takes a few simple changes in the progs.dat for monster deaths.
#114499 - Mota - Mon Jan 08, 2007 2:07 pm
Quake only had one detail level for the models, unfortunately. I'm sure they could be made to fade out like the gibs do, though.
#114503 - simonjhall - Mon Jan 08, 2007 2:19 pm
I like to idea of monsters dropping into the floor, but doing this would require custom progs. I'm trying to make it so that people don't need extra files, but I guess it wouldn't be too bad if you could download the new progs if you wanted a little speed boost...
My CF still hasn't turned up yet, so hopefully I'll get to do the fixed-point version of the entity renderer tomorrow. That shouldn't be too hard so all that leaves is improving the performance of the VM!
I'm hoping to do a release within 4-6 weeks.
_________________
Big thanks to everyone who donated for Quake2
#114525 - tepples - Mon Jan 08, 2007 7:45 pm
Epicenter wrote: |
Well, there is no support for alpha drawing of models in WinQuake so it'd have to be implemented. Easier to just have the corpse drop through the floor or vanish after a short period of time (preferably the first as it'll be less spontaneous when they just pop out of existance) |
That, or the corpse disappears once the player is x units away and not in the same room. A lot of 8- and 16-bit games do something like this.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#114544 - Epicenter - Mon Jan 08, 2007 10:31 pm
That approach is OK except that you may never return to the room again, and it's still going to cause slowdown while you're there-- so in a big firefight, the performance is going to stay the same even as you kill off the monsters.
#114550 - sajiimori - Mon Jan 08, 2007 11:00 pm
But in that proverbial firefight, the performance would be better when half the enemies are dead compared to when they were all alive.
If the game is too slow when they're all alive, then enemy placement would have to be adjusted.
That means it shouldn't hurt to leave the bodies there during a firefight.
Quake's vis data is perfect for determining when it's okay to delete a body.
#114556 - simonjhall - Mon Jan 08, 2007 11:55 pm
Don't worry, I'll be able to make the model rendering fast :-)
It's the performance of the VM that I'm worried about! But I'm still confident that I'll be able to do with something with that. It really makes you appreciate having an FPU when you're programming for something a bit more...fully featured.
I just read this:
http://downloads.gamedev.net/pdf/gpbb/gpbb70.pdf
It's a 22 page summary of how the Quake renderer works, written by one of the programmers. It mentions some of the methods they tried and why they chose to do what they did. There's lots of good rendering ideas in there and I now know why parts of the code works like it does!
_________________
Big thanks to everyone who donated for Quake2
#114665 - simonjhall - Tue Jan 09, 2007 11:15 pm
To celebrate the 300th post in this thread, I'm gonna announce...lighting!
No more flat shading :-D
I wish I could afford an extra pass over the image...the lightmaps have a maximum resolution of only 18 by 18! They're hardly high-res. Vertex lighting still looks pretty good.
_________________
Big thanks to everyone who donated for Quake2
#114667 - sajiimori - Tue Jan 09, 2007 11:23 pm
Questions! =)
Are you using lightmaps?
If so, are you using the surface cache, and did you try rendering with two passes?
Why are the light maps so limited in resolution? It wasn't originally a limitation in Quake 1, right?
#114670 - simonjhall - Tue Jan 09, 2007 11:35 pm
I'm using the lightmaps, but I'm currently calculating the (lightmap) texture co-ords then just sampling the brightness from there.
As I literally only got it 'working' (there are BUGS!) ten minutes ago I've not yet had the chance to try other methods. As I think the two-pass rendering isn't doable I'm gonna try the surface cache method you mentioned next, as this probably will yield the best-looking result.
The Q1 lightmaps are 1-byte per-pixel max 16x16 (or 18x18) images. Documentation seems to imply that the max size is 16x16, but the code looks more like 18x18... Could be why things look a little whack at the moment!
It's really hard to see if/how the lighting is buggy - it's not as obvious as if there's problem with texturing... (if y'know what I mean)
_________________
Big thanks to everyone who donated for Quake2
#114683 - Ant6n - Wed Jan 10, 2007 1:29 am
doesnt 16x16 look really shitty on big walls etc, or is there some trick to not have stair effects etc?
#114685 - sajiimori - Wed Jan 10, 2007 1:51 am
Quake's software renderer bilinear filters the lightmaps.
Does it really stretch 16x16 lightmaps over large surfaces, or does it use multiple 16x16 lightmaps?
#114696 - HyperHacker - Wed Jan 10, 2007 5:42 am
Given how long Moonshell takes to bilinear-filter an image (~8 seconds for 256x192), I'm guessing that's not a feasible approach, unless Moonshell's code is VERY unoptimized.
_________________
I'm a PSP hacker now, but I still <3 DS.
#114714 - silent_code - Wed Jan 10, 2007 10:31 am
sajiimori wrote: |
Quake's software renderer bilinear filters the lightmaps.
Does it really stretch 16x16 lightmaps over large surfaces, or does it use multiple 16x16 lightmaps? |
i don't think it does anything near bilinear filtering. glquake does it as this is part of opengl and gfx accelerators.
typically you'll have one big surface cut into smaller bits by the bsp algo, then these smaller bits are used to calculate the lightmaps. each surface has it's own lightmap - up to a 16x16 map. the 18x18 code may result from adjacent surfaces 'bleeding' light/shadow to each other. to avoid this problem most implementations use slightly bigger maps with corrected edges. at least as far as i know.
#114720 - PeterM - Wed Jan 10, 2007 1:07 pm
It does filtering of some kind, otherwise the lightmaps in software quake would look pixelated, which they don't.
Presumably this is the reason the surface cache exists - it caches pre-lightmapped polygon surfaces using the lightmap and the textures.
Unless I'm mistaken, which is possible.
_________________
http://aaiiee.wordpress.com/
#114729 - kusma - Wed Jan 10, 2007 2:19 pm
PeterM wrote: |
It does filtering of some kind, otherwise the lightmaps in software quake would look pixelated, which they don't.
|
not if lightmap-texel changes is aligned with texture-texel changes.
#114731 - PeterM - Wed Jan 10, 2007 2:39 pm
Well, actually still yes. You'd still see a regularly-spaced blocky pattern.
_________________
http://aaiiee.wordpress.com/
#114733 - kusma - Wed Jan 10, 2007 3:00 pm
PeterM wrote: |
Well, actually still yes. You'd still see a regularly-spaced blocky pattern. |
not any more than you would if you had one huge baked texture, which is what a lightmap basically "emulates".
#114749 - elhobbs - Wed Jan 10, 2007 5:01 pm
the quake bsp preprocessor subdivides surfaces to be no larger than 256 units along the texture extents. the lightmaps are at a lower resolution - sampled every 16 units. the lightmaps are extended a little beyond the edge of the surface extents to even out egde cases. the lightmaps are then linearly interpolated between point samples in software in the surface cache. this does produce a certain amount of stair steps on shadow edges but it is not too bad.
#114750 - Sunray - Wed Jan 10, 2007 5:01 pm
Unfiltered lightmaps looks like CRAP. I know, I've implemented a lightmapper.
#114753 - elhobbs - Wed Jan 10, 2007 5:08 pm
surprisingly unfiltered lightmaps look pretty good on the ds. probably due to the low resolution of the display.
#114789 - sajiimori - Wed Jan 10, 2007 8:36 pm
Quote: |
i don't think it does anything near bilinear filtering. glquake does it as this is part of opengl and gfx accelerators. |
The software renderer does bilinear filtering while it's combining color and light data, producing a lit surface with the same pixel dimensions as the color data. The lit surface is then rendered without filtering, unlike typical hardware renderers.
It's possible that I'm misusing the term "bilinear", but I've always taken it to mean linear interpolation on two axes, which is exactly what Quake 1 does.
#114792 - tepples - Wed Jan 10, 2007 8:39 pm
The lightmap in the "tunnel" effect of the demo fr018: aGb is 30x20 texels for the whole screen and isn't filtered, but it still looks OK.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#114803 - PeterM - Wed Jan 10, 2007 9:15 pm
tepples wrote: |
The lightmap in the "tunnel" effect of the demo fr018: aGb is 30x20 texels for the whole screen and isn't filtered, but it still looks OK. |
True, but it is distorted to heck!
_________________
http://aaiiee.wordpress.com/
#114913 - silent_code - Thu Jan 11, 2007 3:43 pm
sajiimori wrote: |
It's possible that I'm misusing the term "bilinear", but I've always taken it to mean linear interpolation on two axes, which is exactly what Quake 1 does. |
http://en.wikipedia.org/wiki/Bilinear_filtering
... but i think you may be right. just installed dosbox and quake and it certainly looks filtered in a way that could be bilinear filtering. that means i'm practiacally an a...hole. sorry. though i'm not sure it actually IS bf. i'd have a look at the sources to confirm it, but i don't have the time to do that. bight be aswell some other cheapo filtering (bf is already cheap, but there are even faster filtering methods - actually filtering can be optimized quite well, especially for static images).
#114917 - elhobbs - Thu Jan 11, 2007 4:30 pm
I think bilinear filtering is only applicable to minifying a texture. in the case of the quake lightmaps they are being magnified. so this is in fact simply linear.
#114928 - tepples - Thu Jan 11, 2007 7:02 pm
elhobbs wrote: |
I think bilinear filtering is only applicable to minifying a texture. in the case of the quake lightmaps they are being magnified. so this is in fact simply linear. |
Bilinear is also for magnification. It's equivalent to tesselating the polygon down to a quad per texel, with a vertex at each texel center, and Gouraud-shading each polygon with the colors at the corners.
There are slight differences in algorithm: The GameCube seems to tesselate the texture into quads for filtering, while the N64 tesselates the texture into triangles. Compare Goldeneye 007 (N64) to Animal Crossing (GameCube).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#114931 - Sunray - Thu Jan 11, 2007 7:14 pm
Bilinear filtering makes sense when -magnifying-. When minifying you often use mipmaps and/or bilinear filtering.
#114939 - simonjhall - Thu Jan 11, 2007 8:35 pm
Love the discussion on the filtering :-) It's just a shame that you can't do texture filtering on the DS... (although I can obv filter the lightmaps in software)
Not been doing a lot of work on this in the last few days as I've got this permanently-exhausted feeling thing going on... Although I just did a quick five minutes of optimisation on the brush model polygon dispatch code and got the Necropolis demo up to ~38 fps average. There's still definately more to go though - I hope to get 60 out of it.
EDIT: just done one more test and the actual looking up geometry and giving it to the hardware step seems to take <4ms, so I don't think I can do too much more in this bit of code! Time to look elsewhere for the slow stuff...
EDIT2: ooh, another 10% faster...
_________________
Big thanks to everyone who donated for Quake2
#114958 - sajiimori - Thu Jan 11, 2007 10:01 pm
60fps would be remarkable. Most 3D games on the DS run at 30fps.
#114988 - Dood77 - Fri Jan 12, 2007 1:30 am
sajiimori wrote: |
Most 3D games on the DS run at 30fps. |
Most full 3D games, i believe nanostray ran at 60, but that wasnt a hughely graphics-intensive engine.
#115006 - Epicenter - Fri Jan 12, 2007 4:03 am
Correct me if I'm wrong, but I believe the system runs at natively at 60hz, and 3D games run at 60 FPS if using one display. If using both the ARM9 is writing to both screens and therefore can only maintain 30 FPS on each.
#115008 - silent_code - Fri Jan 12, 2007 4:42 am
it also depends on vertex count. using a hughe load of vertices some polys won't get drawn (even using strips won't give you extra polys, but it may save just enough vertex ram for all those new vertices created by clipping). btw. does anybody know of a workaround - like flushing the geometry engine to the raster engine and then filling more stuff in (but that would certainly cause things to overwrite other stuff if not done right)?
#115075 - sajiimori - Fri Jan 12, 2007 8:22 pm
Dood77, see dictionary.com for a definition of "most". ;)
Epicenter,
The rendering hardware draws at 60fps unconditionally. The issue is how fast you can upload a new set of polys to it. Until you upload new polys, it'll keep rendering the same thing every frame.
But believe me, I'd love some magic that would make all my games run at a steady 60fps! ;)
#115113 - simonjhall - Sat Jan 13, 2007 1:30 am
So what framerate do regular DS games run at? And how can you tell anyway?! Or are you just doing this by sight?
And as well as improving the performance I've been checking that all the levels run properly by running demos on them. Yeah, they don't require the VM (they use less RAM) but they do ensure that there are no rendering crashes etc... So I've been running Quake Done Quick (with a vengeance, 2) on it! The thing is the people who recorded the demos are *SO SERIOUSLY FAST* that it's seriously hard to see any rendering bugs! Also as there's no timebase (makes debugging replicatable) a 1-2 minute demo (the longest one) runs in like 10 seconds... Hmm...
Oh and Necropolis demo is now 44 fps, average. 16 fps to go!
(for those who are wondering, this isn't currently representative of the in-game speed, just demo rendering speed)
_________________
Big thanks to everyone who donated for Quake2
#115117 - sajiimori - Sat Jan 13, 2007 2:29 am
The DS games I've seen run at either 30fps or 60fps. There are surely games that run at variable framerates; I haven't played all that many DS games, to be honest.
It's easy to visually tell the difference between 30 and 60fps. A lot of 2D games run at 60. All the games I've worked on have aimed at 30.
Congrats on the fast Necropolis run! =) Very impressive.
#115150 - Epicenter - Sat Jan 13, 2007 7:50 am
sajiimori wrote: |
Epicenter,
The rendering hardware draws at 60fps unconditionally. The issue is how fast you can upload a new set of polys to it. Until you upload new polys, it'll keep rendering the same thing every frame. |
Like any good console. :D
Great to hear how high the performance is right now. Let me know whenever you're ready for me to start on a new progs to decrease the CPU load a bit...
#115168 - simonjhall - Sat Jan 13, 2007 2:17 pm
Okey-doke - re: the progs, when I run in in-game mode (ie involving the VM), the profiler shows that there are three functions which I've not seen before, all hogging the top three spots. I don't think they're called in demo mode, so I guess they're invoked by code in the VM.
So if I load the Necrpolis level and just stand there I get about 1000 calls/frame to these functions:
- SV_HullPointContents (0.14ms/call, 25ms/frame)
- Mod_PointInLeaf (0.29ms/call, 14ms/frame)
- SV_RecursiveHullCheck (0.01ms/call, 11 ms/frame)
The code looks like collision-detection, and currently uses lots of expensive floating-point math. Any idea if there's something in the QuakeC code which calls this? It'd be nice if these functions were called a bit less...
I'm obviously gonna do my best to optimise these functions, but it'd still be nice if they were called less frequently.
EDIT: each of those functions gets called by way of SV_Move. SV_Move gets called by, PF_traceline, PF_walkmove, PF_droptofloor, PF_aim and I'm sure that they are functions callable by the VM code.
EDIT2: if in fact all the calls must be from PF_traceline (a route-finding alg) as the other ones weren't called. I think only the zombies were active in this frame...have a look there!
_________________
Big thanks to everyone who donated for Quake2
#115173 - PeterM - Sat Jan 13, 2007 2:54 pm
It might be worth checking if the PDA port of Quake (PocketQuake?) has converted any of these routines to use fixed point math.
_________________
http://aaiiee.wordpress.com/
#115178 - simonjhall - Sat Jan 13, 2007 3:12 pm
Good thinking Batman! Even though their source seems to be incomplete they've still done fp->fp work on some of the key functions. What I don't get however is the fixed-point version of the VM CPU function still uses loads of floats... (I lose 8ms/frame in there)
Oh and get this: I originally emailed M3 about getting an M3 for Q2 a few days after Christmas. They tell me to send me my name, address etc. I wait a week - nothing. So I email them again, and they tell me that they never got my details. Ok, fair enough - the mail must have got lost in the post. So I mail them again. I wait another few days and send a slightly more arsey mail saying "have you got my details yet?" to them. I get a reply next day saying no, they haven't.
Are they having a laugh at my expense here or are they genuinely not getting my details?! Email is not this unreliable.
_________________
Big thanks to everyone who donated for Quake2
#115183 - Epicenter - Sat Jan 13, 2007 4:04 pm
Quote: |
Are they having a laugh at my expense here or are they genuinely not getting my details?! Email is not this unreliable. |
There was apparently an earthquake that severed China's primary connection to the rest of the world, so communication in and out has been dodgy to say the least for the past ... insert period of time here. I really wish I had more details than that. But their servers have been near-inaccessible or godawful slow (think modem speeds circa 1992 for some idea). I've also heard about a LOT of lost mail following those routes. Probably explains it.
Quote: |
EDIT: each of those functions gets called by way of SV_Move. SV_Move gets called by, PF_traceline, PF_walkmove, PF_droptofloor, PF_aim and I'm sure that they are functions callable by the VM code.
EDIT2: if in fact all the calls must be from PF_traceline (a route-finding alg) as the other ones weren't called. I think only the zombies were active in this frame...have a look there! |
The zombies are pretty much cookie-cutter monsters with no obvious exceptions to the standard AI rules like the Demon and Ogre have-- they follow your usual conventions. A check through the common AI code is telling, however. A monster that has a target is checking every frame if it can attack its target, and if it doesn't have one, it is looking for a target. Both of these tasks call Traceline. The 'looking for a target' routines will not call Traceline if the player has FL_NOTARGET set (notarget at the console, simple enough.)
Since this pertains to all monsters, visible to the client or not, the zombies and ogres in that scene, as well as the Wizards, Shambler, et al through out that level are all calling Traceline through the same means. A few ways to change how often this happens would be a change in the Progs that stops the functions that call the expensive engine functions like Traceline from happening EVERY frame would work, as would changing their think times.
As you may or may not know, an entity has a Think Time and various special think times that are called things like th_idle, th_run, th_missile ... they tell the monster what function in Progs to call everytime they need to, for the previous 3 examples, stand there idly, run, or attack by non-melee means. How OFTEN they call these functions is set in stone, presumably in the engine. Their 'common' think time, .nextthink is definable, but the rest are not, from Progs. You might be able to change those times to be a but further in the future each time they run. The consequence of either approach of course is monsters that react a little slower, but the results may not be extreme and not even noticable. I think it's a little odd how the monsters can react in the same frame you attack them, anyway. Unnaturally good reflexes, don't you think? ...
What other expensive functions are you seeing, and what's calling them from QuakeC, if you don't mind having another look? I'll dig through the Progs and think up a few optimizations for you.
#115188 - simonjhall - Sat Jan 13, 2007 4:33 pm
An obvious way to make the QuakeC stuff run faster would be to simply run less code per frame, or get a better compiler which generated more concise code. So any debug code can be removed, update frequencies should be reduced, excessive use of native functions should be avoided etc. Y'know what I mean?
I would do a quick run through a level to see what gets called lots, but I'm converting fp->fp at the moment so it won't compile yet :-)
Will do once it's working again though.
Oh and are progs run during deathmatch levels? I've noticed that the speed on those levels is terrific! Also on the start level there are zombies on the walls. What do their progs do? Do they call anything juicy?
_________________
Big thanks to everyone who donated for Quake2
#115195 - Epicenter - Sat Jan 13, 2007 5:28 pm
simonjhall wrote: |
Oh and are progs run during deathmatch levels? I've noticed that the speed on those levels is terrific! Also on the start level there are zombies on the walls. What do their progs do? Do they call anything juicy? |
Progs are always running since they're sort of the 'game rules' or the script the engine runs from start to finish. However far less happens in progs during deathmatch, most notably because there are no monsters! So much of the code that progs calls only happens when AI is involved or when there's lots of animating objects that call animation macros which probably eat up a pretty big quantity of cycles when you get them all together. Really the less that animates the better for that reason..
For crucified zombies, they have no movetype and are locked into an endless looping animation, but walkmonster_start never runs so they don't have all the usual AI calls. In short they're just a looping animating model with very little overhead.
#115312 - sajiimori - Sun Jan 14, 2007 11:36 pm
When you're not running a demo, collision tests have to be done any time the player moves, even if there are no monsters. If you get the game running at 30fps or more with floating-point BSP traces, I might feel rather jealous after having spent so much time optimizing my fixed-point BSP tools! ;)
Just for reference, the WalkMove operation involves potentially something like 9 collision traces: an optimistic attempt at moving straight to the destination, a FlyMove from the current altitude (which can involve 3 traces), an intersect test to see if stair stepping is possible, a FlyMove elevated by a stair height (potentially another 3 traces), and a snap-down operation to stick to the floor.
That worst case is encountered any time a player presses into a corner.
#115349 - Epicenter - Mon Jan 15, 2007 1:09 pm
The big question is, just how expensive will said functions be when converted to fixed-point math? If it's still going to save a lot of time each frame to skip some of these more frivolous calls and just do them every X frames instead, or other shortcuts, it might be worth doing so to net an extra FPS or two.
Do you know of any other major expensive calls coming from QuakeC I should investigate workarounds/optimizations for?
#115372 - Doom5 - Mon Jan 15, 2007 5:52 pm
Have you thought about using the extra 32MB of memory contained in the Supercard and M3 for storing textures and other data?
#115373 - tepples - Mon Jan 15, 2007 6:16 pm
Yes, but the author also wants to have a version for use with M2, SuperCard Rumble Series, M3 Pro, and SLOT-1 cards.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#115387 - simonjhall - Mon Jan 15, 2007 7:38 pm
As soon as I mention the dodgy email system to M3, they tell me that they're sending a 'sample' card my way! Quake2 time? (no way)
And no, Quake1 won't be using extra RAM at this time. Dunno what I'd use it for anyway! An FPU, however...
I've been kinda busy again with other things*, so I've not had a lot of time to see what else is slow in the game. I did convert loads of code to fixed-point but of course it didn't properly work afterward! Doing this normally takes ages and you can't just do a few functions at a time - you've got to replace all instances of a floating-point variable. Running the two side by side is more trouble that you'd expect...
*I've been tasked with writing a multiprocessor OpenGL-like software renderer (with z-buffering, texture mapping, and texture filtering (both magnification and minification)) in just two days. Tomorrow's day two and I still haven't done any rasterisation. Huh.
_________________
Big thanks to everyone who donated for Quake2
#115393 - Firon - Mon Jan 15, 2007 8:15 pm
The extra RAM could be useful for using mods that have larger data/maps, but that's about it.
#115395 - sajiimori - Mon Jan 15, 2007 8:35 pm
I'm not sure what approach you're using to convert to fixed-point, but making a Fixed struct helps a lot, compared to just using an int typedef. It makes everything typesafe: the compiler won't automatically convert between Fixed and int/float, so you'll have error messages for every location that needs to be changed.
I used this approach to convert Lua to fixed-point and it worked first try, after simply following the compiler messages around.
#115399 - Epicenter - Mon Jan 15, 2007 8:53 pm
Firon wrote: |
The extra RAM could be useful for using mods that have larger data/maps, but that's about it. |
Since the mods I work on tend to be very large, this would be INFINITELY useful.
#115401 - simonjhall - Mon Jan 15, 2007 9:31 pm
I'm replacing float code with 22.10 bit ints like this:
Code: |
float a, b, c;
a = load a float off disk
b = load a float off disk
......<bags of code>
c = a * b
if (c >= 10)
then...
|
would become
Code: |
int a, b, c;
a = (int)((load a float off disk) * 1024)
b = (int)((load a float off disk) * 1024)
......
c = ((a * b) >> 10)
if (c >= (10 << 10))
then...
|
I realise that I have to be careful with multiplies as they can overflow...
PocketQuake wraps lots of the maths with macros which handle arithmetic and the macros do pretty much what I've got above. I just like typing the code straight in :-)
And re: the memory usage, I'm not too sure how I'd lay out the memory differently. With Q2 I'm gonna have the stuff the BSP code uses in main RAM and the stuff that's accessed less (like geometry) in extended RAM.
I could do something similar with fat Q1 maps by pushing stuff that's not used every frame (like bits of the level you're not in) into e-RAM. I'm not a fan of this split though.
Anyone have any good idea of how to handle this? (for Q1, not Q2)
_________________
Big thanks to everyone who donated for Quake2
#115403 - kusma - Mon Jan 15, 2007 9:49 pm
the arm9 performs clz in 1 cycle, so emulating floating point in a simple way shouldn't be that difficult...
#115417 - Ant6n - Mon Jan 15, 2007 11:38 pm
or one could use long long integers,
also, i have been using 32bit q16 fixeds, and to not get overflow, i use something like this for multiplication:
(s32)(((long long)a * (long long)b)>>16)
where a, b are s32. I dunno whether it's fast, but it doesnt overflow, afaik.
If a struct has only one s32 member, will be it be handled internally like an int?
#115419 - sajiimori - Tue Jan 16, 2007 12:03 am
Yeah Simon, I'd definitely recommend using a struct there. It's way too easy to miss a shift somewhere. Modern compilers won't impose overhead.
The only good general way to do fixed point multiplies is to use a double-sized intermediate workspace.
Code: |
#define FRACTION_BITS 12 // 10 for you.
#define FIXED_HALF (1 << (FRACTION_BITS - 1))
// Add 0.5 for correct rounding.
s32((s64(lv) * rv + s64(FIXED_HALF)) >> FRACTION_BITS)
|
#115422 - tepples - Tue Jan 16, 2007 12:09 am
sajiimori wrote: |
The only good general way to do fixed point multiplies is to use a double-sized intermediate workspace. |
Agreed. Who has tested the behavior of various recent GCC versions? They convert it to a signed 32x32=64 multiply (smull) followed by shifts, right?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#115438 - Epicenter - Tue Jan 16, 2007 3:08 am
simonjhall wrote: |
I'm replacing float code with 22.10 bit ints like this:
And re: the memory usage, I'm not too sure how I'd lay out the memory differently. With Q2 I'm gonna have the stuff the BSP code uses in main RAM and the stuff that's accessed less (like geometry) in extended RAM.
I could do something similar with fat Q1 maps by pushing stuff that's not used every frame (like bits of the level you're not in) into e-RAM. I'm not a fan of this split though.
Anyone have any good idea of how to handle this? (for Q1, not Q2) |
It seems to me like models and textures would be substantial memory hogs and that is the primary memory issue with running mods, rather than the maps being the big problem. So you might consider putting them in extended RAM.
A question though; what is the latency like accessing the RAM in GBA ROM space compared to main ARM9 RAM? How about the time to write to it versus read from it? Loading a 16MByte GBA ROM into that space to run from, say, an M3 takes a few seconds so I would have to imagine there's quite a significant performance hit compared to using components only on the ARM9 bus.
#115479 - kusma - Tue Jan 16, 2007 11:34 am
tepples wrote: |
Agreed. Who has tested the behavior of various recent GCC versions? They convert it to a signed 32x32=64 multiply (smull) followed by shifts, right? |
I have, and GCC in general does a very good job of matching the right ARM multiply instructions as long as you give it enough information.
However, I stand on my point about efficient floating-point emulation on the ARM9 with clz and friends. This is something we're doing at work, and it's saving us a lot of cycles and headache. Fixed point almost certanly does run out of range at some point you didn't expect. Especially if you're going to support mods ;)
The idea is basically to store the floats in a depacked format, separating out the sign, mantissa and exponent, and converting the mantissa and sign into twos compliment. You'll loose the -0 encoding, but IEEE compliance is rarely an issue in end-user apps. The CLZ instruction is used to check for renormalization needs.
For vectors, you can even do better. Three component vectors can have three mantissas and one exponent. Think of it like a fixed point direction, and a floating-point magnitude.
Matrices have some similar tricks that can be applied, but I won't bother you with them now. Simon, send me a PM if you'd like some further explanations.
#115498 - simonjhall - Tue Jan 16, 2007 7:38 pm
Right, I getcha.
Kusma, could you give us an example of how you'd do an add with this kind of split format? You've gotta handle your own overflow from the fractional part to the whole part, right? How about multiply? Or have I missed the point here? :-D
And re: the long long stuff, I never considered using 64-bit integers to handle this sort of thing... I could imagine it being a little slow! The hardware I use at work can't do 32-bit multiplies and instead the compiler generates 16-bit mults and an add (or something like that) to achieve the same result.
But yeah, I'm now back on Quake again. My sw-renderer was a hit! Didn't have enough time for anisotropic filtering though :-(
_________________
Big thanks to everyone who donated for Quake2
#115502 - sajiimori - Tue Jan 16, 2007 8:00 pm
64 bit multiplies are slower than 32 bit, but I would expect Quake's collision code to break if you drop a lot of bits for multiplies. All the dot products versus normalized vectors really emphasize the low bits.
At any rate, 64 bit multiplies are a lot faster than software floating point, IEEE or otherwise. :)
#115504 - kusma - Tue Jan 16, 2007 8:09 pm
simonjhall wrote: |
Kusma, could you give us an example of how you'd do an add with this kind of split format? You've gotta handle your own overflow from the fractional part to the whole part, right? How about multiply? Or have I missed the point here? :-D
|
Warning, completely untested code following. It may not even compile ;)
Code: |
class FakeFloat
{
public:
FakeFloat(int exponent, int mantissa) : exponent(exponent), mantissa(mantissa) { }
FakeFloat(float f)
{
union {
float f;
unsigned int i;
} temp = f;
exponent = ((f.i >> 23) & 0xff) - 128; /* extract bits and apply bias */
mantissa = (1 << 23) + (f.i & ((1 << 23) - 1)); /* add in implicit 1-bit */
if (f.i & (1 << 31) != 0) mantissa = -mantissa; /* make twos compliment */
}
operator float() const
{
/* Convert to float. This one is a bit tricky to get fast, but there are ways. */
return (mantissa * (1.f / (1 << 23))) * pow(2.0, exponent);
}
FakeFloat operator *(const FakeFloat &ff) const
{
return FakeFloat(ff.exponent + exponent, ((long long)ff.mantissa * mantissa) >> 23).normalize();
}
FakeFloat operator *(const FakeFloat &ff) const
{
if (ff.exponent < exponent)
{
int shift = exponent - ff.exponent;
if (shift > 32) return *this;
return FakeFloat(exponent, mantissa + (ff.mantissa >> shift)).normalize();
}
else
{
int shift = ff.exponent - exponent;
if (shift > 32) return ff;
return FakeFloat(ff.exponent, ff.mantissa + (mantissa << shift)).normalize();
}
}
void normalize()
{
int m = abs(mantissa);
int lz = clz(m);
if (lz < (32 - 24))
{
int shift = (32 - 24) - lz;
mantissa >>= shift;
exponent += shift;
}
else
{
int shift = lz - (32 - 24);
mantissa <<= shift;
exponent -= shift;
}
}
int exponent, mantissa;
};
|
Also note that this code does not handle denormals, nan or infinity, but we just want fixedpoint with extended range and precision ;)
It isn't as fast as fixed point, but it should be a lot faster than the fpu-emulation code that gcc does. Other optimizations could be done with more knowledge of the operations to be done. For instance, keep in mind that both the exponent and the mantissa is 32bit instead of the normal 8 and 24bits, so we don't really need to normalize between every single operation.
#115533 - simonjhall - Tue Jan 16, 2007 11:34 pm
Wow, it sounds like you've done this before!
This does sound like the most robust idea yet (never thought of using operators), but it's a bit of a shame though that I don't think I can afford to use C++. I'll have a go at rebuilding the code with g++ but I don't think I have the RAM... I guess I'll just have to go through and do it all by hand!
I'll let you know how I get on.
_________________
Big thanks to everyone who donated for Quake2
#115543 - sajiimori - Wed Jan 17, 2007 1:02 am
If you do try g++, don't forget to disable exceptions and RTTI. It's possible to get zero overhead from compiling as C++.
#116174 - simonjhall - Mon Jan 22, 2007 10:18 pm
Got a bit bored of fixed-point, have decided to fix other things :-)
Is the DS antialiasing properly understood? I've had a bit of a mess with it and it seems to be...unpredictable. Does it increase the vertex count? I think I've seem geometry disappear...
_________________
Big thanks to everyone who donated for Quake2
#116267 - M3d10n - Tue Jan 23, 2007 10:42 pm
The anti-aliasing should be free, but I also failed in finding exactly how to setup it properly. All I get is some sort of colored outline around my models.
#116271 - simonjhall - Tue Jan 23, 2007 11:27 pm
Right... It was working for me (with no missing geometry) but then it suddenly stopped, so everything's jagged again. I think it AAs triangles together when they have different polygon IDs. That's the impression I get from gbatek anyway...
In other news the model rendering is now (semi-)hardware-accelerated and a whole lot faster! Still could get 5-10ms off the time though with a bit more hw-action.
When in-game now it's really noticeable how much slower the VM is than the rest of the game - it literally runs at 3x the rate when playing a demo. So I just plowed through and converted the code to C++ which took an hour or two, as I think this game was written before people knew how to cast pointers :-)
Hopefully I should be able to easily use Kusma's fp->fp operators now...
_________________
Big thanks to everyone who donated for Quake2
#116272 - sajiimori - Tue Jan 23, 2007 11:46 pm
If you're using stock .bsp files, I guess you'd want to preprocess the plane data to contain fixed point or simplified floating point values.
You could keep the normals as 3 words and assume a magnitude of 1, though I use 16 bit fixed-point normal components at work to save memory and it works fine.
Using kusma's scheme, you may need to pay a little extra for plane offsets because they have an unknown magnitude. Again, I see no need for variable magnitude there -- a fixed magnitude that's large enough for all levels seems sufficient.
#116371 - simonjhall - Wed Jan 24, 2007 10:22 pm
I'm using the stock bsp files. And yeah, I convert them to fixed-point on load, plus do that global down-scale thing to ensure that they fit in the 4.12 vertex format. Oh and I stopped the floor wobbling btw :-)
I'm still trying to best decide how to do the fp->fp thing. I do think operators are the way to go, but it would mean converting the existing fixed-point code to the new format as the operators wouldn't know if an int contains a 32-bit integer or a 22.10 bit number. Aww.
Also I might not use the split format proposed by Kusma, so might just make do with one 32-bit number (but use 64-bit numbers for mults). Reason being the code asssumes too much the format and packing of data within the game. There's something to be said for using C++ and making data private... I'd like to call it sloppy coding, but who am I to judge the innards of this enormously popular game?
But actually... (rant time) seriously, why the hell did they do everything with globals instead of passing stuff as arguments, like readable code does? There's a tiny performance increase at the expense of maintainability. Come on! And how much time was saved by never casting anything properly?! Oh my god I hate this game.
_________________
Big thanks to everyone who donated for Quake2
#116378 - Vich - Wed Jan 24, 2007 11:35 pm
simonjhall wrote: |
But actually... (rant time) seriously, why the hell did they do everything with globals instead of passing stuff as arguments, like readable code does? There's a tiny performance increase at the expense of maintainability. Come on! And how much time was saved by never casting anything properly?! Oh my god I hate this game. |
It's not even proven that it actually does increase performance! Bad design like that usually does the opposite!
Even the current Photoshop CS SDK works with those ******* globals :|
... and then I'm not even mentioning the rest of the SDK :x
_________________
[project website] [personal website]
#116379 - sajiimori - Wed Jan 24, 2007 11:48 pm
The globally visible data does bother me. For file-static data, I try to think of the file as something like a singleton, where the statics are like private data members and the functions are like methods. A clearer naming convention (like prefixing statics with 's_') would help there.
To be fair though, the Quake source is well above average in readability, at least within the game developer community. Most code I enounter (professionally) is worse, even if it proports to use object-oriented principles.
As for approach in conversion to fixed-point, if you've already got the game compiling as C++, I'd say run with it and use a fixed-point class with the full complement of operators. You'll never want to go back. :)
Short of that, a simple Fixed struct with an int data member is a good compromise without going beyond classic C features.
#116384 - chishm - Thu Jan 25, 2007 12:39 am
Vich wrote: |
simonjhall wrote: | But actually... (rant time) seriously, why the hell did they do everything with globals instead of passing stuff as arguments, like readable code does? There's a tiny performance increase at the expense of maintainability. Come on! And how much time was saved by never casting anything properly?! Oh my god I hate this game. |
It's not even proven that it actually does increase performance! Bad design like that usually does the opposite! |
Globals can in fact degrade performance. Passing an argument on the ARM architecture is a case of putting it in a register and calling the function, or if there isn't enough space in the registers, pushing it on the stack.
Globals require the code to load the memory address (one ldr operation), store the value there (an str operation), have the called function read the address again (another ldr) and then read the value (yet another ldr). That's four accesses to potentially slow memory, compared to at most 2 (str and ldr for the stack) when passing arguments.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com
#116421 - simonjhall - Thu Jan 25, 2007 3:54 pm
That's a good point. There's not a lot I could do though about it as enormous amounts of code would have to be rewritten...
The things that bug me about the code is that random variables get assigned values - and you're never too sure if they're 'parameters' for a function later on (so you have to go looking), plus when in a function there's often not a return value. The results get stored somewhere, but are they stored to temp values or the target value? It's really hard to follow!
But yeah, it's pretty readable/verbose code. Does make a real change from all the next-gen console code I see/hear about where it's nothing but namespaces... Equally hard to follow!
_________________
Big thanks to everyone who donated for Quake2
#116423 - Vich - Thu Jan 25, 2007 4:00 pm
@ Chism: thanks for the technical proof ^^
simonjhall wrote: |
Does make a real change from all the next-gen console code I see/hear about where it's nothing but namespaces... |
Could you clarify that a bit?
I can't imagine a serious(ly sized) next-gen project to be working only with namespace and no object-oriented code (since I'm working on such a project).
_________________
[project website] [personal website]
#116425 - simonjhall - Thu Jan 25, 2007 4:23 pm
I mean OO with namespaces. So yeah, loads of classes too :-)
I've just seen an excessive amount of double-colons in our projects! I've heard from other companies too that they have similar stuff going on.
_________________
Big thanks to everyone who donated for Quake2
#116426 - Vich - Thu Jan 25, 2007 4:53 pm
simonjhall wrote: |
I mean OO with namespaces. So yeah, loads of classes too :-)
I've just seen an excessive amount of double-colons in our projects! I've heard from other companies too that they have similar stuff going on. |
Well, if you have classes that are properly designed, you have a structure for the whole software project that is very understandable.
On the other hand: if you don't apply OO and just do everything with regular function calls, it becomes an even bigger mess in my opinion, since there's not even a possibility of drawing a diagram from a piece of the software to explain someone.
Of course the key is in making a good OO system, not per se just "making it OO".
But bad/wrong OO is probably even worse than having no OO design, since bad/wrong OO can be misleading, while no OO leaves all interpretations open. There are many people that can write software, but there aren't that many who can design it correctly.
_________________
[project website] [personal website]
#116442 - sajiimori - Thu Jan 25, 2007 8:04 pm
If you find yourself often reaching deeply into another namespace, a typical solution is to provide a facade to that subsystem that exposes common functionality at a lesser nesting level.
But it's a fundamental principle of concise language that the less often you refer to something, the more verbose you must be to refer to it unambiguously. The most proximate scope is like high-priced seating at a concert.
#116447 - HyperHacker - Thu Jan 25, 2007 9:08 pm
In the first real program I ever made, I decided to cut down on memory usage by just declaring a few global variables of various types for temporary storage; for example I had TempInt, TempLong, TempStr, i, j and k (for loops), and so on. (This was in VB6.) That proved to be a mistake as once the program got a good way into development I was constantly finding myself confused as to the use of a given variable, and worse, many bugs would pop up from the use of the same variable in two different functions (especially as VB gives you no real control over window message handling); I'd call one function and suddenly the data I'd stored in this temporary variable would be destroyed, or during a for loop a window message would trigger another function which runs another loop with the same variable, messing up my first loop, etc... quite a nightmare. I proceeded to rewrite the program using local variables and made much faster progress (only to rewrite it two more times in C :-p).
_________________
I'm a PSP hacker now, but I still <3 DS.
#116491 - Sunray - Fri Jan 26, 2007 8:01 am
Hehe, stack > static memory. :)
#116550 - sajiimori - Fri Jan 26, 2007 7:50 pm
&& sizeof(stack) < sizeof(static_memory)
;)
#116609 - Epicenter - Sat Jan 27, 2007 8:46 am
chishm wrote: |
Globals can in fact degrade performance. Passing an argument on the ARM architecture is a case of putting it in a register and calling the function, or if there isn't enough space in the registers, pushing it on the stack.
Globals require the code to load the memory address (one ldr operation), store the value there (an str operation), have the called function read the address again (another ldr) and then read the value (yet another ldr). That's four accesses to potentially slow memory, compared to at most 2 (str and ldr for the stack) when passing arguments. |
Another favorite trick is to run loops 'backwards', e.g. for (i=0;i<goalvalue;++i) .. replace with for (i=goalvalue;i>=0;--i)
#116615 - Mighty Max - Sat Jan 27, 2007 12:15 pm
Quote: |
Another favorite trick is to run loops 'backwards', e.g. for (i=0;i<goalvalue;++i) .. replace with for (i=goalvalue;i>=0;--i) |
Thatsmainly for x86 systems as thos backward loops can use the LOOP[N/NZ] instruction instead of splitting it apart into INC + CMP + JMP
_________________
GBAMP Multiboot
#116627 - simonjhall - Sat Jan 27, 2007 4:06 pm
So I've spent the last few days working on this fp->fp thing, using operators. At the moment I'm just wrapping a float up in a class though, in order to find operator-specific bugs.
I've been having this weird infinite-loop in the VM when using certain operators, and I've spent ages pinning the error down to one function where it didn't like the use of the subtraction operator. A little exploring has made me believe that I'm running out of stack, or trashing something like that... This is a hugely recursive function btw.
I'm pretty sure it's a stack thing as if I put a printf anywhere in the function the code will eventually hang. So, how do I increase the stack size? I've had a look at the linker scripts but I don't really know what I'm looking at...
_________________
Big thanks to everyone who donated for Quake2
#116628 - agentq - Sat Jan 27, 2007 4:12 pm
The stack is set up in on-chip memory, which is quite small.
This is not a 'good' way, but I increased my stack size just by moving the stack pointer to the end of main memory, like this:
Code: |
// Move the stack to the end of main memory
asm volatile (
"mov sp, #0x02400000\n"
"sub sp, sp, #4"
); |
Since the heap allocates from the start of memory, and the stack from the end, this should work fine until the memory runs out, when bad things will happen.
#116629 - Sunray - Sat Jan 27, 2007 4:20 pm
Why not malloc a block of memory and set the stack pointer to point at that block?
#116633 - simonjhall - Sat Jan 27, 2007 5:02 pm
Ta. I tried that and it ocassionaly didn't crash but there was still big loads of corruption. So maybe it's not the stack.
I've just recompiled that file without any optimisations and it's still hanging... Time to step in there with the debugger :-(
Or maybe I can just replace all the fp stuff in this file with macros...
Oh and Neil, I still owe you some kind of burger thing (or whatever it was I had).
_________________
Big thanks to everyone who donated for Quake2
#116700 - agentq - Sun Jan 28, 2007 2:52 pm
Yeah, we should meet up some time. Swap insider information, so to speak.
#116776 - kusma - Mon Jan 29, 2007 11:33 am
Mighty Max wrote: |
Quote: | Another favorite trick is to run loops 'backwards', e.g. for (i=0;i<goalvalue;++i) .. replace with for (i=goalvalue;i>=0;--i) |
Thatsmainly for x86 systems as thos backward loops can use the LOOP[N/NZ] instruction instead of splitting it apart into INC + CMP + JMP |
Not really, comparing to zero instead of some random variable still saves a register. As long as the loop count is not constant and of a ARM friendly constant size, you can almost always find good use of an extra register.
Edit: Of course, what way of looping is most efficient depends a lot on your what you're doing, and most loops don't even really need optimizing. I won't recommend blindly replacing all loops with downwards loops ;)
#117523 - simonjhall - Mon Feb 05, 2007 10:39 am
So I've been away for a week and when I got back to work there's this package from China waiting for me! Yeah, M3 have sent me a sample bit of hardware but I'm sure it's the wrong one.
It's a slot-1 M3 Simply. I've got a feeling that as it's a slot-1 card it can't have extra RAM on it - is this correct?
_________________
Big thanks to everyone who donated for Quake2
#117539 - Sunray - Mon Feb 05, 2007 2:12 pm
Correct. But still, slot-1 is the future ;)
#117571 - simonjhall - Mon Feb 05, 2007 9:04 pm
Hmm...the whole reason for asking them for sample hardware was to get hold of of something with extra memory!
I'm grateful - don't get me wrong, but I ain't gonna be Quake2ing with this thing! Not too sure about the included miniSD reader either. That thing ain't gonna survive a few thousand plugs/unplugs!
Time to order yet more flash memory...
Actually, I think it's time to get a hold of a Supercard. Too lazy to search for good prices though...
_________________
Big thanks to everyone who donated for Quake2
#117596 - tepples - Mon Feb 05, 2007 10:39 pm
simonjhall wrote: |
Actually, I think it's time to get a hold of a Supercard. Too lazy to search for good prices though... |
Too lazy for Froogle? Or don't they have Froogle in the UK?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#117609 - simonjhall - Mon Feb 05, 2007 11:20 pm
I think there's a froogle for the UK, but yeah, just TOO lazy :-)
Plus I never trust those price comparison sites anyway...
---
Right, just checked out froogle and loads of sites that I've seen selling the SC don't seem to be listed. So either they're all dodgy sites or my lack of trust has been well-placed :-D
Time to use regular google!
Anyway, regarding Quake - the fp->fp stuff's coming along and there's no more unexpected crashes. It's also no faster - which I find really weird, so I'm gonna have to disassemble the slow stuff to figure out what's happening. I reckon the compiler's gotta be inserting loads of extra int<-->float conversions...
May have to rewrite stuff in assembler. Sounds like a bit of a mission.
_________________
Big thanks to everyone who donated for Quake2
#117949 - simonjhall - Thu Feb 08, 2007 10:19 pm
Oh my god, best moment of the project EVER!
Ah, hear the zombies moan, the grenades bounce, the super nailgun :-D
Can you guess what I've got running? :-p
Anyway, now that I've got it going (and literally just got a hint from PeterM just this second) I'm gonna rewrite it and do it properly.
Awesome.
_________________
Big thanks to everyone who donated for Quake2
#117951 - PeterM - Thu Feb 08, 2007 10:32 pm
\o/
I helped!
_________________
http://aaiiee.wordpress.com/
#117962 - simonjhall - Thu Feb 08, 2007 10:54 pm
Yeah, ta for the heads up!
At the moment I'm just playing the sounds as soon as I get the S_StartSound message; I'm not doing any mixing. I only got that message from you as I was posting here :-)
Still trying to figure out that push/pull stuff and how I should work that into the game. As far as I can tell, I just push sound onto the hardware and it plays it. The mixing code in snd_mix I'm looking at seems to rely on you knowing how far into the buffer the sound hardware is. I don't know if I can find that out... I could always make a guess, but it might end up jumping a little bit.
Problems I'm already getting are related to memory - it takes just too much! I'd like to relocate sound to some of the VRAM banks C and D, but I was hoping to use one of these banks to increase the quality of the Quake console/bottom screen as it's a bit too low-res at the moment. Also when there's any loading (by the Q engine) and there's sound playback then the sound memory gets trashed and squeaks come out. Ugh...
This is why I'd like to directly pull sounds from disk, rather than store them in memory.
_________________
Big thanks to everyone who donated for Quake2
#117970 - tepples - Thu Feb 08, 2007 11:11 pm
Have you already tried compressing Quake's sounds with ADPCM?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#117971 - DekuTree64 - Thu Feb 08, 2007 11:14 pm
simonjhall wrote: |
The mixing code in snd_mix I'm looking at seems to rely on you knowing how far into the buffer the sound hardware is. I don't know if I can find that out... |
Nope, can't read the position of a hardware channel directly. You can use CPU timers to track them though. If it's only reading the position to see how many samples it needs to mix, then counting samples with a timer should work.
Quote: |
Problems I'm already getting are related to memory - it takes just too much! |
If you're not trying to stick to the exact original assets, you could compress sounds with ADPCM. Saves a bunch of memory, since hardware channels can play it directly.
Also, how does the music work? Is it sequenced, or just raw wave files or something? And if sequenced, can you convert it to play entirely on hardware channels instead of software mixing?
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#117976 - PeterM - Thu Feb 08, 2007 11:38 pm
You don't have to be exact with the "DMA position" as Quake calls it. Q only uses it so it doesn't trample over audio which hasn't yet been sent to the sound device.
If you're copying the mix buffer to the hardware, you can simply set the DMA pos to the end of where you copied from. But I've no idea how audio works on the DS :-/
You may have to double buffer it - have one buffer for sending, one for mixing and swap them when you want to copy to the HW.
Presumably there is a better way to do it though - a 'pull' method is much easier to use for streaming audio (which Quake's built in mixer does for you).
_________________
http://aaiiee.wordpress.com/
#117982 - basilb - Thu Feb 08, 2007 11:52 pm
do you see there being any limitations on quake ds multi-player interms of how many players will be able to play on a single map?
_________________
-
BOOm BOOm
#117984 - simonjhall - Thu Feb 08, 2007 11:56 pm
The in-game music was played directly off the CD (as in they were CD-audio tracks). I'm thinking about allowing you to rip these tracks then slap on your flash card, and then having those files streamed off and mixed with the game sounds.
Compressing sounds offline would be a good idea. At the moment the files are (I'm sure...) 8-bit 11kHz wave files. How much would ADPCMing them shrink them by?
But yeah, I'm just trying sound out - I'm not like doing it properly now. It can now live with the many unfinished things, like lighting, texturing, fp->fp, water, menus, console...
In fact I'm thinking about releasing version 1 without sound altogether.
_________________
Big thanks to everyone who donated for Quake2
#117985 - Firon - Thu Feb 08, 2007 11:59 pm
Assuming you're using 4-bit ADPCM, ADPCM would decrease the filesize of your 8-bit files by half. For the 16-bit CD tracks, it'd be 1/4. :P
#117989 - DekuTree64 - Fri Feb 09, 2007 12:22 am
simonjhall wrote: |
The in-game music was played directly off the CD (as in they were CD-audio tracks). I'm thinking about allowing you to rip these tracks then slap on your flash card, and then having those files streamed off and mixed with the game sounds. |
Yeah, you're pretty much forced to do streaming then. If ARM7 isn't too busy with other things, maybe you could use Vorbis or MP3 to reduce the amount of data you have to read off the card. And there's always tepples' GSM decoder too, which could work if everything else is too slow.
The safest bet for buffered sounds is to have a hardware channel loop on a ring buffer, and count samples with a timer. Keep track of what the timer value was last time you mixed, and you can calculate how many samples you need to copy into the buffer.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#117991 - simonjhall - Fri Feb 09, 2007 12:25 am
basilb wrote: |
do you see there being any limitations on quake ds multi-player interms of how many players will be able to play on a single map? |
I've just spent a while thinking about this and I'm still not sure of the answer.
In deathmatch games, as there are so few entities the performance of a DS hosting a network game could be really good. It'd still be better if a PC were to do it though as any slowness on the host DS part would slow down everyone else.
The question's really gonna be the amount of memory used. The program size for the multiplayer levels is really small, so hopefully that'd provide enough room for the MP stuff. I could make two builds: one for single player and one for multiplayer, just with different memory setups.
If we get lucky and I can find the memory I can't see why you won't be able to use the full 16 players in a deathmatch levels. Co-op run-throughs are different though, and I don't think there will be enough memory for more than one extra player.
Don't forget that making a multiplayer build requires me to link in the various bits of Quake net code as well as the wifi library. The whole lot costs at least 100k... (then add at least 16k for every additional player you want to use)
_________________
Big thanks to everyone who donated for Quake2
#118002 - Firon - Fri Feb 09, 2007 1:22 am
DekuTree64 wrote: |
If ARM7 isn't too busy with other things, maybe you could use Vorbis or MP3 to reduce the amount of data you have to read off the card.
|
MP3 is too slow, but I think Tremor could be viable in low accuracy mode, as long as the bitrates are kept low (80kbps should be perfect). The only thing I'd be worried about is lack of IWRAM on the ARM7. Perhaps it'd be possible with the lowmem branch of Tremor.
#118086 - simonjhall - Fri Feb 09, 2007 11:55 pm
I've now got a whole bunch of extra hardware: a miniSD Supercard, a M3 Simply and various flash cards, and I'd like to say a big thank you to the people who have donated. Thanks very much!
All I need now is a 'real' M3...
Time for Q2.
EDIT: the people who have had trouble with the Supercard - eh? Worked first time with me, and without having to extract the pak files...
_________________
Big thanks to everyone who donated for Quake2
#118265 - basilb - Sun Feb 11, 2007 7:05 pm
simonjhall wrote: |
Don't forget that making a multiplayer build requires me to link in the various bits of Quake net code as well as the wifi library. The whole lot costs at least 100k... (then add at least 16k for every additional player you want to use) |
Yeah hopefully they shouldn't be too hard to link if dsdoom is anything to go by.
_________________
-
BOOm BOOm
#118267 - PeterM - Sun Feb 11, 2007 7:20 pm
basilb wrote: |
Yeah hopefully they shouldn't be too hard to link if dsdoom is anything to go by. |
I'm not sure you can compare the two as easily as that...
_________________
http://aaiiee.wordpress.com/
#118295 - Dood77 - Sun Feb 11, 2007 11:06 pm
simonjhall wrote: |
EDIT: the people who have had trouble with the Supercard - eh? Worked first time with me, and without having to extract the pak files... |
Hm, strange, I have the same card, the miniSD. Did you get the rumble perhaps?
Send be a build that looks for PAK'd files and ill try again...
#118298 - simonjhall - Sun Feb 11, 2007 11:16 pm
Dood77 wrote: |
Send me a build that looks for PAK'd files and ill try again... |
Will do, once I get the thing working again... And yeah, I got a full-blown Supercard with extra RAM and everything.
I just upgraded from r19 to r20 and now I get no 3D graphics whatsoever. Kinda skipped r19b, but I did try it on my other computer and there were no 3D problems! Also the binary size has dramatically increased, so I may just go back to r19 and gba_nds_fat :-(
Hopefully it's just a few things that I need to change to get it working nice with r20.
EDIT: huh, most bugs were pretty easy to fix! Even the broken the wifi... Weird-ass bug that remains though - the M3 Simply will hang in touchReadXY() until the screen is touched for the first time...
EDIT2: Dood77, check your mail.
_________________
Big thanks to everyone who donated for Quake2
#118311 - Mrshlee - Mon Feb 12, 2007 1:18 am
simonjhall wrote: |
Hopefully it's just a few things that I need to change to get it working nice with r20.
EDIT: huh, most bugs were pretty easy to fix! Even the broken the wifi... Weird-ass bug that remains though - the M3 Simply will hang in touchReadXY() until the screen is touched for the first time... |
You should jump to Wintermute for some hint.. I'm sure he loves these challenges ;)
might give him some time tho..seems to be the busy bee atm.. working on the libnds
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia
#118513 - simonjhall - Wed Feb 14, 2007 1:02 am
Ah, I can't be arsed to look into why you've gotta do that screen-touch thing... If it happens on anyone else's card though I guess it'd better be fixed!
Got sound pretty much working now, but I'm still not sure that I'm doing it the right way. Don't do any software mixing, just throw the sounds at the hardware :-) It's pretty cool as I also got the 3D position-based sound working too!
Still a big ol bunch of bugs though - hopefully these will get fixed by me moving the code from the ARM9 to the ARM7.
The whole in-game music thing has pretty much gone out the window though, as I can't get libfat working directly on the ARM7. Instead files have to come via the '9, causing the main CPU to chug. Plus Tremor's code size is too big (91k) and libMAD probably is too... Huh.
_________________
Big thanks to everyone who donated for Quake2
#118518 - Doom5 - Wed Feb 14, 2007 1:23 am
simonjhall: How about using the Helix MP3 decoder? https://datatype.helixcommunity.org/mp3dec.html
Quote: |
Memory Usage
* ROM = 13446 Bytes (const globals)
* RAM = 23816 Bytes (heap)
o Total Data Memory = 37262 Bytes
* Code Size = 21000 Bytes (approximately - depends on compiler)
|
It's designed for fixed point ARM processors. Take a look.
Keep up the good work! I enjoy reading your progress.
#118546 - Firon - Wed Feb 14, 2007 5:00 am
simonjhall, even the lowmem version of Tremor is too big?
#118550 - Epicenter - Wed Feb 14, 2007 5:10 am
I don't mean in any way to rush you, but when do you suppose we can check out a fairly recent build? I'd like to get started on seeing what I can streamline in the progs.dat. :) If you're not comfortable enough with it yet, no problem. Keep up the great work.
#118577 - simonjhall - Wed Feb 14, 2007 10:36 am
Firon wrote: |
simonjhall, even the lowmem version of Tremor is too big? |
Yeah, I tried the lowmem branch. I think the memory bit may be referring to the amount actually needed for the decompression etc.
I compiled it the other night with -Os and -mthumb, then stripped it (heh) and I got 91k worth of code. It's probably more when you include bss and the buffers needed to for the decompression. BUT, it was in the middle of the night so I probably missed something obvious :-)
Doom5 - thanks for the heads up, I'll have a look. I'm still gonna have to find some low-cpu way of streaming the music to the ARM7 for decompression though. The ARM9 is already doing enough work as it is!
Epicenter - sure. Have a not sent you a binary yet? Sorry! I'll send you a build when I get home later...
Wanna get this game out before April (when I move house!). Still need to improve the in-game performance and fix a shit-load of graphical bugs though. But it is pretty much feature-complete.
_________________
Big thanks to everyone who donated for Quake2
#118579 - kusma - Wed Feb 14, 2007 11:07 am
simonjhall wrote: |
I compiled it the other night with -Os and -mthumb, then stripped it (heh) and I got 91k worth of code.
|
91k worth of code, or 91k worth of library file?
simonjhall wrote: |
Doom5 - thanks for the heads up, I'll have a look. I'm still gonna have to find some low-cpu way of streaming the music to the ARM7 for decompression though. The ARM9 is already doing enough work as it is!
|
Well, most 4bit ADPCM variants are pretty damn cheap cpu-wise. I wrote a variation of the IMA ADPCM algorithm that takes about 3% cpu on a gba and still sounds quite good. I guess you'd want even more quality and less speed, but hey, re-engineering takes time. The IMA ADPCM decoder is out there under a GPL-compatible license...
edit: oh, didn't see Doom5s suggestion. It seems like mp3 would be the best option here...
#118580 - simonjhall - Wed Feb 14, 2007 11:22 am
kusma wrote: |
91k worth of code, or 91k worth of library file? |
I took the object files and turned them into flat binaries with all the crap taken out by doing objcopy -O binary, which left 91k. Again, maybe there's something that I did obviously wrong! I'll check later...
And I've been looking at that Helix MP3 player - it looks good! Could be just what's needed... ADPCM would be cool too. Actually, doesn't the hardware support already ADPCM?
But again, it's not the decoding that I'm worried about. Disk usage on the ARM9 during gameplay makes the game chug. Hopefully I can tune that somehow so it's not as noticeable...
_________________
Big thanks to everyone who donated for Quake2
#118582 - xtoc - Wed Feb 14, 2007 11:33 am
good to see some progress :)
keep up the good work!
#118607 - Doom5 - Wed Feb 14, 2007 4:39 pm
It's not the optimal solution, but if accessing files for music through libfat is too cpu intensive, maybe you could have two builds of Quake?
One build with music support on M3/SC devices, as the sound/music files could be stored in the additional memory. Then have a build for non-ram containing cards without music support.
#118608 - simonjhall - Wed Feb 14, 2007 4:56 pm
Fantastic, what a good idea! Assuming file access is too expensive to do per-frame, this would be a really good solution (assuming all the music can be made to fit into 32 megs, which shouldn't be too hard).
Oh and first *public* alpha is likely to be this weekend.
_________________
Big thanks to everyone who donated for Quake2
#118611 - tepples - Wed Feb 14, 2007 5:08 pm
simonjhall wrote: |
And I've been looking at that Helix MP3 player - it looks good! Could be just what's needed |
Unless Fraunhofer sends its raccoon goons to your door.
Quote: |
ADPCM would be cool too. Actually, doesn't the hardware support already ADPCM? |
Yes, but ADPCM is 4 bits per sample, unlike Vorbis and MP3 that are 1 to 1.5 bits per sample.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118614 - Doom5 - Wed Feb 14, 2007 6:02 pm
simonjhall wrote: |
Fantastic, what a good idea! Assuming file access is too expensive to do per-frame, this would be a really good solution (assuming all the music can be made to fit into 32 megs, which shouldn't be too hard).
Oh and first *public* alpha is likely to be this weekend. |
I don't think you'd even have to fit all of the music files into memory. Just set aside a piece of memory that would fit the longest track, and load up each mp3 at the start of each level.
That would use a lot less memory, but I don't know if it'd be any more difficult to code for.
#118629 - simonjhall - Thu Feb 15, 2007 12:11 am
tepples wrote: |
Unless Fraunhofer sends its raccoon goons to your door. |
Yeah, don't you need a license to use mp3? Or is that only in commercial software?
I retried Tremor, and it really does take all that extra RAM assuming all the object files are linked in (I tried with the '7 elf). I don't know if any of the object files are optional.
So I tried the Helix mp3 decoder (on the ARM9) and it works! Despite me quad-buffering it there's still a tiny crackle at the end of each frame, which is pretty annoying. Something else to fix...
_________________
Big thanks to everyone who donated for Quake2
#118634 - Firon - Thu Feb 15, 2007 12:54 am
I believe you don't need a license to use MP3 decoders, but you do for MP3 encoders and if developing a decoder of your own. Possibly for commercial projects as well.
#118635 - HyperHacker - Thu Feb 15, 2007 1:01 am
You wouldn't have to fit all the music into 32MB, only the tracks that will be played in that level. You might even be able to decompress them into that 32MB during level loading, which would mean using barely any CPU power on the ARM7 to play it. (No reason to do this unless you're starved for ARM7 cycles though.)
_________________
I'm a PSP hacker now, but I still <3 DS.
#118649 - Epicenter - Thu Feb 15, 2007 3:05 am
A big thanks for the build-- I'm going to pick up a new DS Lite tomorrow (mine is broken) and then I'll fire it up and see what I can do to speed things up. Sounds like it's quite fast already though!
As for music, I wouldn't worry TOO much about it, I don't know if this is the popular opinion but I thought Quake worked just as well without as with music. Most of the time I just never bothered putting the CD in. There's already ambient sounds in game that keep it sounding pretty immersive anyway.
#118650 - simonjhall - Thu Feb 15, 2007 3:37 am
The ARM7 now plays streamed MP3s, and this doesn't need extended RAM. So, as I REALLY need to go to sleep, here's a quick video to show it! Yeah, I could have totally had iTunes running in the background - but I didn't. You can also just make out the crackling from the dodgy buffering...
Still makes the ARM9 churn a good deal though.
http://www.youtube.com/watch?v=Vq94rwfig8s
PS: the video won't be available for a few mins as it's still getting encoded by YT
Epicenter: I'll reply to your email in the morning - I need to sleep!
_________________
Big thanks to everyone who donated for Quake2
#118651 - Doom5 - Thu Feb 15, 2007 3:50 am
Incredible! How much extra memory does the decoder + the sample mp3 file you're using take?
#118652 - Firon - Thu Feb 15, 2007 4:14 am
The ARM7 actually has enough CPU power to play MP3s?
#118653 - HyperHacker - Thu Feb 15, 2007 4:20 am
Moonshell's been doing it for a while. Though I'm impressed that he managed to do it streaming audio data from the ARM9 while running Quake.
_________________
I'm a PSP hacker now, but I still <3 DS.
#118654 - Firon - Thu Feb 15, 2007 4:25 am
Moonshell has libmad running on the ARM9, not the ARM7. The ARM7 handles oversampling and volume changes.
#118659 - OOPMan - Thu Feb 15, 2007 9:25 am
Wow, great work simon :-)
BTW, I haven't seen a build in my inbox for a while ;-)
HyperHacker, your idea of pre-decompressing the audio onto the extra memory on SC/M3/G6 cards is pretty cool. I wonder if simon will give it a go...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#118668 - simonjhall - Thu Feb 15, 2007 10:36 am
Doom5 wrote: |
Incredible! How much extra memory does the decoder + the sample mp3 file you're using take? |
The code takes up (for some reason) a whole lot more than is stated in the stats on the Helix page - it's gotta be ~50k. That + the wifi is really really tight.
The decoder is using 16k for an fread buffer and I think each decoded frame requires 1-2k (of which I have four). The minimum needed would be an fread buffer the size of one compressed frame plus one decoded frame.
Quote: |
The ARM7 actually has enough CPU power to play MP3s? |
Again, the stats on the Helix site don't line up with what I've found (prob cos they assume super-fast RAM). The ARM9 managed to read and decode the original song (160kbps, 44.1kHz, 16 bit, stereo) about 10% faster than real time, which seems a bit slow to me. I've tested the ARM7 playing the same song but in mono (64kbps, 44kHz) with freading via the '9 and it still comes out in real-time.
Quote: |
BTW, I haven't seen a build in my inbox for a while ;-) |
Haven't heard from you for a while! Again, thinking about a public pre-release this weekend, so wait a little bit!
Quote: |
HyperHacker, your idea of pre-decompressing the audio onto the extra memory on SC/M3/G6 cards is pretty cool. I wonder if simon will give it a go... |
I'd like to have a go, but I'm worried about the delays it'll incurr. You'll have to wait while it loads the file, then wait while it decodes the file, then you get to play the game. Or should it be interleaved with gameplay?
Although I guess Epicenter's right - who actually played with the CD in anyway?
_________________
Big thanks to everyone who donated for Quake2
#118674 - OOPMan - Thu Feb 15, 2007 12:43 pm
Ha, yeah, I've been quiet of late. Didn't have a net connection for a while :-)
The interleaving idea sounds interesting, but whether it will be feasible is another question entirely...
It would be sad not to have music, but I mostly played Quake without it (Thanks to never having a cd version until recently...)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#118675 - kusma - Thu Feb 15, 2007 12:54 pm
I personally don't care too much about the music either, but having the feature there sure doesn't hurt. And letting it cost some cpu cycles isn't that critical either ;)
Btw, 44khz might be a bit much for the DS, how about 32khz instead? That is, after all, the rate of the hardware mixer... Needing to encode music specifically for quake isn't a big loss either ;)
#118676 - xtoc - Thu Feb 15, 2007 12:54 pm
i prefer a good wifi connection instead of playing the game with music.
#118679 - tepples - Thu Feb 15, 2007 1:51 pm
Or just use the Doom music. Mod players shouldn't need as much CPU time as an MP3 player, but they do need samples to be loaded into RAM.
Or use MP2, which should be less complex than MP3. MPEG-1 and DPG video use MP2.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118688 - Doom5 - Thu Feb 15, 2007 3:41 pm
Quake 1 has excellent sound track by Trent Reznor. For single player, I always made sure to pop in the CD.
Music on/off could be left as a menu option. The code would still take up some memory, but there wouldn't be a cpu performance penalty if it were disabled.
#118694 - OOPMan - Thu Feb 15, 2007 5:03 pm
Oh, yeah, I wasn't saying I dislike the soundtrack. I am a Nine Inch Nails fan after all :-)
In fact, it was a very appropriate soundtrack :-)
Too bad I only got my hands on it long after I stopped playing Q1 on my PC :-(
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#118705 - Noda - Thu Feb 15, 2007 10:06 pm
Great news!! Which MP3 player did you use? is it possible to make the source of this player available, I this I could interest a lot of people (including me!) as it's a nice way to add music into games :)
#118711 - basilb - Thu Feb 15, 2007 11:42 pm
simonjhall wrote: |
...thinking about a public pre-release this weekend, so wait a little bit!
|
That would be brilliant
#118714 - Dood77 - Fri Feb 16, 2007 12:40 am
lol, that doesnt sound like nine inch nails!
#118715 - Firon - Fri Feb 16, 2007 12:50 am
simonjhall wrote: |
The ARM9 managed to read and decode the original song (160kbps, 44.1kHz, 16 bit, stereo) about 10% faster than real time, which seems a bit slow to me. I've tested the ARM7 playing the same song but in mono (64kbps, 44kHz) with freading via the '9 and it still comes out in real-time.
|
That's actually much slower than libmad, at least for the ARM9. But libmad uses too much memory, right?
And hey, even if people don't like the original music, you could always make it so people can replace the music with their own. :P
#118717 - simonjhall - Fri Feb 16, 2007 12:59 am
Dood77 wrote: |
lol, that doesnt sound like nine inch nails! |
It's Trent Renzor 'pre-op', honest.
Still not too sure about the CD music, yeah it's cool but I dunno if now's the time to fix the bugs. Also I'm not sure if it's the memory corruption that's doing it, but I'm getting poor performance/unexpected results when both the ARM7 does a file read (via the '9's vblank) and the ARM9 mainline code does one at the same time...
Oh and thanks again Spike for the help with the music :-)
Quote: |
Great news!! Which MP3 player did you use? is it possible to make the source of this player available, I this I could interest a lot of people (including me!) as it's a nice way to add music into games :) |
Check out https://datatype.helixcommunity.org/mp3dec.html, it's pretty easy to get going. To compile you almost just do 'arm-eabi-gcc *.c -c" on the directory of about ten files. I then modified the demo program by about five lines to send the sound to the hardware, rather than disk. Ea-sy.
Quote: |
That would be brilliant |
And also a pain in the arse! Sticking to a self-imposed deadline three days away is never fun, esp when tomorrow's your birthday and Sat/Sun should be spent househunting, not coding whilst hungover! Either way I'm gonna try and see how much I can cram in to the build.
_________________
Big thanks to everyone who donated for Quake2
#118726 - Epicenter - Fri Feb 16, 2007 4:32 am
I might be misunderstanding, but are you running this on the ARM9 and giving the output to the ARM7 to play back? That might be why it's causing the ARM9 to chug a good bit; it looks like it expects to use about 100% of a 25 MHz ARM9, and that's about a third of your cycles for the NDS' ARM9. Also sending that much data over the bus might be causing that 'gap' in the audio that makes it stutter. Can you run this on the ARM7TDMI and play it back from there, just feeding it MP3 frames from the ARM9?
Or alternatively, for persons with Slot 2 flash devices like Supercard and M3, how about putting the MP3 data in GBA ROMspace on the RAM those devices provide and decode/playback all on the ARM7? No ARM9 intervention, then, so no need to plague the ARM9 with it while it tries to handle the engine.
Also maybe this was covered and I missed it, but what bitrate of audio was being used for your demonstration? I imagine cutting that down to a minimum that still sounds good, and limiting to ~22 KHz might help performance too.
Maybe you could give OGG Vorbis a shot, too. I'm not sure if average CPU utilization to decode it is higher or not, but you can generally get the same audio quality with a 2x or more decrease in bitrate over MP3.
Just an idea. :)
#118729 - Firon - Fri Feb 16, 2007 7:57 am
He's running it on the ARM7. The ARM9 is just reading the MP3 data from disk and passing it along to the ARM7. He used 64kbps, 44khz mono to run it on the ARM7.
He looked into Vorbis using Tremor, but it uses far too much memory and the code is quite large.
#118738 - Epicenter - Fri Feb 16, 2007 8:45 am
Alright; thank you for that information. I do think though that it should simply be a requirement that if the 'use Mp3 music' option is enabled, the files be read into GBA ROMspace prior to playback to improve framerate by leaving the ARM9 alone, assuming this is feasible. If I am not mistaken the ARM7 has direct access to this memory without the help of the ARM9, even in NDS mode (correct me if I'm wrong).
#118744 - simonjhall - Fri Feb 16, 2007 10:34 am
I've not yet tried to use the extra memory of my supercard, and I don't think there's enough time to fix the IPC bugs and do the memory thing before Sunday. Fixing the problems with the regular sound effects are a higher priority, I think...
Also development with my SC is so much more effort than my gbamp, and there's no extra RAM on that, so I'm gonna make it work in the worst case... Plus I've not yet timed it to see how much of a performance dent the streaming costs...
I found that the Quake soundtrack is pretty hard to debug with - there are some tracks which are meant to sound like static! There's me spending ages to fix it, but then loaded a track up in iTunes and then I'm all like ah!
_________________
Big thanks to everyone who donated for Quake2
#118761 - tepples - Fri Feb 16, 2007 2:50 pm
simonjhall wrote: |
I found that the Quake soundtrack is pretty hard to debug with - there are some tracks which are meant to sound like static! There's me spending ages to fix it, but then loaded a track up in iTunes and then I'm all like ah! |
That's why you use simpler music such as Doom music, not even Doom music, or one of NIИ's actual albums (e.g. Halo 2), and replace it with the Quake soundtrack later.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118763 - Doom5 - Fri Feb 16, 2007 2:56 pm
simonjhall wrote: |
I found that the Quake soundtrack is pretty hard to debug with - there are some tracks which are meant to sound like static! There's me spending ages to fix it, but then loaded a track up in iTunes and then I'm all like ah! |
Use a "clean" sounding soundtrack in place of the Quake's soundtrack. I can't imagine the fustration of trying to find out if the static in the sound is from the music, or buffering issues :)
#118770 - Lazy1 - Fri Feb 16, 2007 4:33 pm
What license is that MP3 decoder? If it's not GPL then I could use it for music in wolf3d.
As for sending sound data to the arm7, I also had problems when I would read from a file during vblank.
For example, some sprites would be loaded as garbage but it was rare and went away when I took out the vblank file code.
Maybe you could add your sound update code to the main loop?
#118771 - Doom5 - Fri Feb 16, 2007 4:57 pm
Lazy1: Wolf3d music is in IMF format. To decode it, why not pull the code that MAME uses for ADLIB/IMF decoding? Just a thought, maybe you've tried it already though.
#118772 - Lazy1 - Fri Feb 16, 2007 5:05 pm
Yeah, I went through that already but found that the arm7 wouldn't be powerful enough to emulate the YM3812 sound chip.
My solution was to build an app called IMF2RAW which took the input IMF music file, ran it through the emulator and dumped raw pcm data to a file.
This was all good until I realized 99% of all audio decoders are GPL which is incompatible with the ID Software license which wolf3d was released under.
#118778 - Epicenter - Fri Feb 16, 2007 5:38 pm
Lazy1 wrote: |
Yeah, I went through that already but found that the arm7 wouldn't be powerful enough to emulate the YM3812 sound chip.
My solution was to build an app called IMF2RAW which took the input IMF music file, ran it through the emulator and dumped raw pcm data to a file.
This was all good until I realized 99% of all audio decoders are GPL which is incompatible with the ID Software license which wolf3d was released under. |
You should e-mail iD about it. From what I can tell they're quite flexible legally. It's even rumored they gave the source code to the Wolf3D engine to 'Wisdom Tree' for an unlicensed SNES game (Super 3D Noah's Ark) after they were irritated by the terrible and heavily-censored Wolf 3D port to that system. :D
simonjhall wrote: |
I've not yet tried to use the extra memory of my supercard, and I don't think there's enough time to fix the IPC bugs and do the memory thing before Sunday. Fixing the problems with the regular sound effects are a higher priority, I think... |
Absolutely; I just meant for later on when you have the time and inclination to play with background music. Like I said, I don't think BGM is very important at all.
simonjhall wrote: |
Also development with my SC is so much more effort than my gbamp, and there's no extra RAM on that, so I'm gonna make it work in the worst case... Plus I've not yet timed it to see how much of a performance dent the streaming costs... |
Did you just pick up that GBAmp? Aren't those notorious for poor compatibility? (I might be thinking of Max Media Launcher.. but I know they're quite dated either way you look at it.) A good M3 or Supercard slot 2 device and a 1gb MicroSD can be had for under $80 these days. :)
#118780 - simonjhall - Fri Feb 16, 2007 5:51 pm
Quote: |
Did you just pick up that GBAmp? Aren't those notorious for poor compatibility? |
I so prefer my gbamp and compact flash to my supercard and m3 (simply) for development. I've had it since May and I love it! I'm finding miniSD and microSD too slow and fiddly (and unreliable with my card reader) - compact flash is so much more sturdy! Plus the auto-booting thing on the gbamp is a god-send too...
Compatability-wise I think it's one of the more supported things, but it lacks the extra memory that the more flash cards have which is a bit of an arse.
Quake2 ain't gonna be developed on the gbamp :-( If I'm gonna do it with SD I'm gonna need a better card reader!
_________________
Big thanks to everyone who donated for Quake2
#118789 - Epicenter - Fri Feb 16, 2007 7:00 pm
It might just be that your transflash->SD adapter is bad. I use the Kingston adapter that came with my 1GB microSD card and I've never had an issue with it. :) What sort are you using?
#118791 - Sunray - Fri Feb 16, 2007 7:09 pm
simonjhall wrote: |
I so prefer my gbamp and compact flash to my supercard and m3 (simply) for development. I've had it since May and I love it! I'm finding miniSD and microSD too slow and fiddly (and unreliable with my card reader) - compact flash is so much more sturdy! |
DS-Xtreme with USB is nice for development :)
You might get one for free here: http://forums.ds-xtreme.com/showthread.php?t=150
EDIT: I saw your post in that thread :/
#118792 - Doom5 - Fri Feb 16, 2007 7:13 pm
#118793 - Epicenter - Fri Feb 16, 2007 7:24 pm
A USB connection for development and then a device with RAM in Slot 2 all at once seems like an ideal solution ... be sure to let me know if you are low on funds to purchase equipment you need for Slot 2! I'll be more than happy to pitch in, and my partner-in-crime as far as Quake modification (he goes by HydraLancer) plans to donate in a day or 2.
#118854 - Miika - Sat Feb 17, 2007 3:33 pm
I really look forward to this! When is the first version available?
Can you actually play the game or is it just the necropolis demo?
I'm looking forward to this! ;)
You asked about where to buy an EZ4 Card, here are some links:
http://www.gameyeeeah.com/ezflash-iv-lite-deluxe-tf-adapter-p-172.html
http://www.kicktrading.ca/ezflash-c-24.html?filter_id=7
http://www.kicktrading.ca/ezflash-c-24.html?filter_id=7
As I stated before, the EZ4 Deluxe has:
256 Mbits (32 Mbytes) of PSRAM memory
384 Mbits (48 Mbytes) of NOR memory
32 Mbits (4 Mbytes) of loader memory
8 Mbits (1 Mbyte) Of SRAM for saves
I think you can use both 32MB + 48MB.
At least it's possible to burn stuff up to 48MB in the NOR memory and then run it. Please make Quake DS EZ-Flash 4 compatible ;)
Best regards - Miika aka S.O.Q at YouTube :)
#118862 - simonjhall - Sat Feb 17, 2007 5:10 pm
Miika wrote: |
I really look forward to this! When is the first version available? |
Tomorrow.
Quote: |
Can you actually play the game or is it just the necropolis demo?
I'm looking forward to this! ;) |
I haven't decided yet :0
And isn't NOR memory the same as flash (storage) memory? I don't really know too much about memory (dur!)...
I'll try and support the extra memory of the ez4 for Quake2 assuming a) I have one of these devices b) someone gives me a snippet of code showing me how to use the memory.
And a DS-X could be cool, as using USB to upload programs sounds really convenient! It's got no RAM though, right? And more donations? Score!
For the M3 Simply, I have a USB microSD reader and that works just fine (microSD is so fiddly though). For my SC, my miniSD however has to go via a mini->fat SD adaptor, and I think the connections are a bit loose in there. As a result, my (regular) card reader often moans at me. Maybe I should get a standalone miniSD reader...
And any chance someone could look at that Helix license and see if it's compat with the (GPL) license that Quake's released under? I think that Helix lic has Nokia and Real stuff in there too... I don't think I'll include MP3 playback tomorrow though.
_________________
Big thanks to everyone who donated for Quake2
#118864 - Sunray - Sat Feb 17, 2007 5:43 pm
No slot-1 cards have RAM, it's not possible either. I hope Quake 1 will run without extra RAM!
#118866 - Doom5 - Sat Feb 17, 2007 6:12 pm
Highly unlikely they'll be any support for any ram on an EZ4. AFAIK, no one knows how to use the memory on it or it may not even be possible. Only the M3/SC memory has been used in applications and in DSLinux.
#118867 - Miika - Sat Feb 17, 2007 6:43 pm
simonjhall wrote: |
I haven't decided yet :0
|
Haven't you done that we can play the game?
Oof, I'll get even more bored of the Necropolis demo..
Please make it playable.
#118869 - OOPMan - Sat Feb 17, 2007 6:47 pm
Something to keep in mind. Just because a SLOT-1 device doesn't have RAM does not mean that you can not use the RAM in a plugged in SLOT-2 device...
In other words, the RAM enabled build of QuakeDS or Quake2DS should allow me to run from a SLOT-1 device as long as a I have my SuperCard in SLOT-2 :-)
That would also help you for developing simon. You could use a DS-X or Firelink as you're storage device while just making use of the RAM provided by the SuperCard.
This is all assuming that the SC is init'ed just by switching on the DS when it is plugged in to the extent that writing the necessary unlock codes will enable RAM access.
Does anyone know if this is the case? Does the SC/M3/G6 have to actually be booted on SLOT-2 before the memory can be used, or can it be accessed while running from SLOT-1 without any problems?
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#118875 - GrizzlyAdams - Sat Feb 17, 2007 7:22 pm
Yes, just writing the correct unlock codes will work for the supercard.
#118879 - Tantrum - Sat Feb 17, 2007 7:33 pm
Chism unlocked the DS Browser RAM pack (8MB) here...
http://forum.gbadev.org/viewtopic.php?t=12271&highlight=browser
Worth considering?
#118888 - Dood77 - Sat Feb 17, 2007 9:40 pm
Miika wrote: |
simonjhall wrote: | I haven't decided yet :0
|
Haven't you done that we can play the game?
Oof, I'll get even more bored of the Necropolis demo..
Please make it playable. |
I think hes kidding, the latest build i got for testing is playable, although theres no speed throttling so if it can go faster than normally possible it will.
#118892 - simonjhall - Sat Feb 17, 2007 10:22 pm
Ah, that's because you're one of my select testers! As a result, you get fully-functioning builds :-)
This is a pre-release, remember. If it was fully-functioning it would be a...release!
Tantrum wrote: |
Chism unlocked the DS Browser RAM pack (8MB) here... |
I tried to get one in computer exchange the other day but they told me (something like) they don't accept them, as you have to register them in order to use them.
I'm all like "ah, no! I want to register is under my name!" when I'm really thinking "it comes with a browser? I'm a die-hard Opera fan, but all I really want is the RAM!"
So I'm gonna have to buy one from Game or something. ?30 for 8MB of RAM. S-weet.
GrizzlyAdams wrote: |
Yes, just writing the correct unlock codes will work for the supercard |
You're right! I just did my first extra-RAM test with my Supercard and it worked fine. I then tried leaving the SC in slot 2 whilst using the same program on my M3 Simply in slot 1, and the SC RAM worked fine.
The memory's a little slow but not mega slow, so I'm still pretty confident that Q2 is doable. I don't believe Q1 is bandwidth-bound, so hopefully Q2 won't be either...
How can I tell the difference between an M3 and a SC? Can I do this via libfat?
_________________
Big thanks to everyone who donated for Quake2
#118896 - Lazy1 - Sun Feb 18, 2007 12:31 am
Take a look at my posting here: http://forum.gbadev.org/viewtopic.php?p=117713#117713
The M3 code doesn't work for some reason though and I have no M3 to debug/fix it.
You would need to modify it as well if you plan to run the file system on slot-1 and the ram on slot-2.
Still, that may not be what you are looking for anyway.
#118899 - Firon - Sun Feb 18, 2007 2:14 am
simon, have you looked into WavPack for the music? It has a lossy mode which is ADPCM-like (only artifact is quantization noise and is fixed point), but is much more efficient than ADPCM.
The tiny decoder's executable code and tables use <40KB total, so it's a little lighter than Helix memory-wise. With normal mode, 32768Hz sample rate and 200kbps stereo, you should be able to get faster than realtime playback on the ARM7. If you use fast mode, quantization noise is about 1dB higher (-x3 can help) and it's even faster to decode.
You could probably use lower bitrates than ~200 and still get good sound.
Of course, if you use mono, it'll use even less CPU power and be smaller to boot.
http://www.wavpack.com/downloads.html
Last edited by Firon on Sun Feb 18, 2007 2:41 am; edited 4 times in total
#118900 - tepples - Sun Feb 18, 2007 2:22 am
That or FLAC in 10-bit-per-channel mode.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118901 - Firon - Sun Feb 18, 2007 2:39 am
FLAC has no lossy mode, so it would be very large. Or am I misunderstanding you?
#118909 - tepples - Sun Feb 18, 2007 5:08 am
FLAC and WavPack are conceptually the same (Yule-Walker decorrelation followed by entropy coding). FLAC just doesn't have a lossy mode in the reference encoder. A FLAC file is large because it has to store the low-order bits. However, the DS DAC can't reproduce more than 10 bits. If you zero the low-order bits before passing the data to the FLAC encoder, you should get a smaller file.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118921 - Epicenter - Sun Feb 18, 2007 6:27 am
I'm not sure I see the issue with Mp3. It doesn't look like there's a performance issue, the ARM9 just needs to be cut out of the loop so passing data to the ARM7 doesn't drag it down (which could be fixed by just writing the music to a Slot 2 device's memory before use.) It's worth noting that it appears strongly most DS homebrew devices in people's hands right now have this sort of memory. It would also be possible to use the Opera web browser's RAM expansion cart for this purpose.
#118923 - Firon - Sun Feb 18, 2007 6:31 am
tepples wrote: |
FLAC and WavPack are conceptually the same (Yule-Walker decorrelation followed by entropy coding). FLAC just doesn't have a lossy mode in the reference encoder. A FLAC file is large because it has to store the low-order bits. However, the DS DAC can't reproduce more than 10 bits. If you zero the low-order bits before passing the data to the FLAC encoder, you should get a smaller file. |
I actually tried that. It is smaller, but it still isn't as good. I took the song Control by Poe, truncated to 10 bits (no dithering), resampled to 32768Hz then encoded with -8 (add --lax so it will let you encode) and got an average bitrate of 385kbps with FLAC 1.1.4.
Interestingly enough, WavPack lossy works much better with a 16-bit source. When fed with a 10-bit truncated source, it generates very, very audible hiss. Using a 16-bit source and truncating to 10 afterwards sounds much better.
-fx6b180 sounds pretty good, I can't really hear any additional quantization noise. Gave me an average of 183kbps.
I can post 30-second samples for you to compare, if you wish.
#118940 - Miika - Sun Feb 18, 2007 12:48 pm
Quote: |
simonjhall - I'll try and support the extra memory of the ez4 for Quake2 assuming a) I have one of these devices b) someone gives me a snippet of code showing me how to use the memory.
Doom5 - Highly unlikely they'll be any support for any ram on an EZ4. AFAIK, no one knows how to use the memory on it or it may not even be possible. Only the M3/SC memory has been used in applications and in DSLinux. |
cory1492 said @ EZ-Flash sosuke forums:
PSRAM is fairly simple to use in EZ4 deluxe at any rate, the code to do so was in moonshell 151 and quite possibly is still is in there. The compact version had problems, it doesn't have the same kind of RAM and doesn't work the same way.
-- If you wonder what the compact is, it is the EZ4 lite Compact version that isn't used by so many people I think. The difference is that the Compact does not support GBA. But now I know there is at least a hope for EZ4 lite Deluxe support ;) Does Moonshell have source available?
#118943 - simonjhall - Sun Feb 18, 2007 1:03 pm
That wavpak looks pretty cool, and I'll check it out in a few days. But as Epicenter says, mp3 doesn't look like a performance issue. I just did some basic timings and 64kbps mp3 playback + a demo playback increase the runtime by 25-30%.
So either that's the extra bus activity (unlikely), the IPC blocking (could be) or the file access (likely).
I'll have a go in a while to see how it works if I use the extra memory.
Could be a bit harder (than the current scheme) though with regards to synchronising the lock/unlock of the extra memory. Gonna need proper buffering for that ;-)
And Miika, I had a look at the moonshell source and there's definately mention of your card. BUT, as the there's no code in the lock/unlock functions I assumed that they were just stub functions and no-one knows how to use that card. Does the memory actually work in moonshell? (and what does it use the memory for?)
_________________
Big thanks to everyone who donated for Quake2
#118944 - Miika - Sun Feb 18, 2007 1:11 pm
simonjhall wrote: |
And Miika, I had a look at the moonshell source and there's definately mention of your card. BUT, as the there's no code in the lock/unlock functions I assumed that they were just stub functions and no-one knows how to use that card. Does the memory actually work in moonshell? (and what does it use the memory for?) |
At least it used the memory to first write a .NDS rom in it and then launch it.
Last edited by Miika on Sun Feb 18, 2007 2:51 pm; edited 1 time in total
#118946 - OOPMan - Sun Feb 18, 2007 2:49 pm
Moonshell can use the extra memory in certain cards to load really large images, I believe...
I don't think it really needs that extra memory for loading .NDS files though...
Hmmmmm, the Mystery of the EZ4, hmmmmm?
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#118947 - Miika - Sun Feb 18, 2007 2:53 pm
OOPMan wrote: |
Moonshell can use the extra memory in certain cards to load really large images, I believe...
I don't think it really needs that extra memory for loading .NDS files though...
Hmmmmm, the Mystery of the EZ4, hmmmmm? |
I don't know about the images. But at least when I select an .nds
file it shows the writing progress.
Here is what it looks like after I select a .nds file:
http://bildr.no/view/39071
#119442 - simonjhall - Fri Feb 23, 2007 12:37 am
Yar, thar be networking!
Really gonna need a slimmed-down version of the wifi code though as adding networking has really decreased the amount of memory available to the game...
If someone feels like writing that point-to-point wifi lib thing, now would be a really good time. At the moment you're restricted to playing small levels.
Oh and so far the PC version *seems to be* compatible with the DS version. Therefore, go practice your deathmatch skillz so when you battle PSP people you whup their asses! (sorry Peter, this is a Nintendo forum!)
I've also added a proper timebase to the game (as everyone asked for it). It's really weird using it though, since when the game plays slowly that normally means the framerate is crap. Instead the framerate is slippery-as and it gives a very strange look.
Or maybe I'm just used to playing the game at double-speed :-)
_________________
Big thanks to everyone who donated for Quake2
#119447 - Dood77 - Fri Feb 23, 2007 1:39 am
You could send the build for testing and i could tell you if it seems right or not... and I've got a router working with my DS...
No worries if you dont want to though.
#119449 - simonjhall - Fri Feb 23, 2007 1:53 am
Nah, sorry - it's still pretty fuxored. Yeah it runs, but I'm dropping packets like crazy! As a result, one machine is always smooth, but the non-hosting machine breaks after a few seconds and gets this *seriously* laggy motion. However that (laggy) machine can see the other play walk past with no lag at all!
This happens when the DS hosts and also when the PC hosts.
I dunno how to fix this. If I change to TCP or some error-correcting protocol then the other end will need to know what's going on. It'd be easy for DS/DS games (as I have full control of the code being run). But if you play against a PC client then it won't understand the new protocol.
I could write a protocol wrapper program that sits in the middle...
Or I could somehow fix the wifi stuff...
Also we all guessed right about what happens when the PC hosts - the DS framerate like totally doubles :-)
_________________
Big thanks to everyone who donated for Quake2
#119453 - Darkflame - Fri Feb 23, 2007 2:18 am
Silly question;
Where to get the PC quake demo ? ID's links are down :-/
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.
#119472 - Mrshlee - Fri Feb 23, 2007 9:31 am
Darkflame wrote: |
Silly question; Where to get the PC quake demo ? ID's links are down :-/ |
http://library.dev-scene.com/index.php?dir=DS/Games%2007/QuakeDS/
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia
#119474 - Epicenter - Fri Feb 23, 2007 11:05 am
simonjhall wrote: |
Nah, sorry - it's still pretty fuxored. Yeah it runs, but I'm dropping packets like crazy! As a result, one machine is always smooth, but the non-hosting machine breaks after a few seconds and gets this *seriously* laggy motion. However that (laggy) machine can see the other play walk past with no lag at all!
This happens when the DS hosts and also when the PC hosts. |
This is caused by an inherent fault, or missing feature depending on how you view it, inherent in NetQuake, the standard Quake netcode implementation. There is no clientside prediction of other players in any form or fashion. When packets are lost or high latency is encountered, this problem is severely amplified. Since EVERYTHING is processed on the server and sent to the clients, even things like simple weapon impulses, are just server messages sent to the hosting machine and the responses sent back, for even the most basic things.
NetQuake amplifies the effects of lag terribly, resulting in making a 50ms ping feel like 250ms. It's even visible on connections that are fairly low-latency like 2 clients connected via modem directly with no intervening networks like the Internet-- the server computer is always holding all the cards and pretty much always win unless your dog is playing. However, you're not really stuck with NetQuake's issue.
There's an alternative version of Quake from iD called QuakeWorld. It has clientside prediction and shifts much client-side stuff off the server, where it doesn't belong anyway. It's overall more polished for multiplayer use. It works and lags like a normal modern online game, or Q2/Q3 for reference. It's also a bit more streamlined for MP use and lacks a lot of SP-centric features.
I highly suspect you could copy over the new netcode into your codebase with some changes. Most of what it switches that 'breaks' single player seems to be the changed HUD (which you'll be replacing anyway, odds are), and qwprogs (where most SP functionality like monster entities are pretty much just replaced with function prototypes.
If you'd like, I'd be more than happy to optimize a Progs that doesn't precache anything extraneous and compiles down to a smaller size for MP use. The default QuakeWorld (qwprogs.dat) progs is much smaller to begin with, too.
I like the bit about a dedicated timebase, to keep things smooth-- 'console style' lag is always nice, so long as it never gets to bullet-time speeds. It sounds like speed is very good, so you can surely avoid that. A big thing to be sure of though, is that clients are always running on server time in MP. :D
Still hunting a new DS Lite after mine broke. It seems these things are appallingly popular in Japan, getting TERRIBLY hard to find. If I dont locate one in Sapporo this coming week I'll just order one online. Such a hassle.
Last edited by Epicenter on Fri Feb 23, 2007 11:12 am; edited 3 times in total
#119475 - PeterM - Fri Feb 23, 2007 11:07 am
You can also get the DOS Quake demo in a much more handy ZIP or RAR format from the Quake PSP page:
https://sourceforge.net/project/showfiles.php?group_id=158726
_________________
http://aaiiee.wordpress.com/
#119479 - simonjhall - Fri Feb 23, 2007 12:39 pm
Right... Yeah, I didn't think there was any prediction in the game. And I noticed that every time you wanna do something the sever has to 'approve' you doing it!
I don't wanna try QW, as that's a whole separate source tree and I don't wanna start fresh. Yeah, maybe you could move parts of code across but that sounds pretty tough.
What's weird though is that let's say the DS is hosting: if the DS walks around in front on the PC, the PC will see it instantly (gotta be less than 100ms lag). But if the PC moves then the PC won't be 'allowed' to move for several seconds. When it does move, both games will see the motion at the same time.
When the hosting is reversed, the same thing happens, 'cept the DS is now really laggy.
It could be related to the fact that my many of data structures on the DS are half the size of their PC counterparts... Hoping it's just a network fault though!
I do think packets are getting mangled though (I had loads of trouble with this writing the debugger) - could be that. Also the DS will eventually lock up after a random amount of time - packet corruption? Hmm.
And I didn't realise it was so hard to get a DS in Japan :-)
I had friends who went there and had no problem!
I could really do with a second one though, so if you see em going cheap... :-D
_________________
Big thanks to everyone who donated for Quake2
#119495 - elhobbs - Fri Feb 23, 2007 5:06 pm
simon you may want to take a look at fteqcc (www.fteqw.com) - this quakec compiler can produce a much smaller progs.dat file when optimized for size. 327k vs 401k without modifying the qcc source files. I would bet that 74k would come in handy.
#119525 - simonjhall - Sat Feb 24, 2007 12:32 am
74k would definately be useful - thanks!
Epicenter - whatchu think? Wanna check this out when you eventually get yourself that new DS? ;-)
I no nothing about QuakeC and the tools involved. I do know that I still need to do loads of work in the VM to get the speed up... (shame I'm too busy making the lighting code work :-)
_________________
Big thanks to everyone who donated for Quake2
#119590 - Epicenter - Sat Feb 24, 2007 2:52 pm
Quake's memory footprint can be even more significantly decreased by cutting back on extraneous file precaches at runtime and stripping out content that is useless in SP mode, like replacing progs/player.mdl to a single triangle with virtually no skin information, for a file less than 10KB, as opposed to the default size of 188 KB (!!) The only side effect is at the very end of the game, at the Congratulations scene you won't see the player after the final boss explodes. But that's a pretty small price to pay to free up 178K of RAM.
Help0-5.lmp, Sell.lmp and Conback.lmp should all be extraneous (as long as the Help and Sell screen functions are disabled e.g. {return;} and the console is changed into a simple libnds white-text-on-black affair (negating the need for a console background) .. to save a theoretical 504KB. :D
Removing the ambient sounds could save approximately 50-250KB of RAM depending on how many are used in each level. Decreasing their quality could also severely reduce their size without removing them fully.
The biggest thing is the maps though, weighing in at over a meg each. Some approach 2 MB.
As far as speed optimization I've nailed down some of the slowest points in QuakeC's operation per frame on my PC via some profiling, and I'm working on some good optimizations to speed them up without harming gameplay. It's likely what operations take the longest change to some degree when shifting from an Athlon 64 X2 to an ARM9. However the slowest bits probably stay mostly the same. Once I snag an new NDS Lite I'll see what kind of a difference it makes.
#119596 - simonjhall - Sat Feb 24, 2007 3:52 pm
Cool man, good job.
Precaches: if we're talking about the same precaches then I think they'd be quite essential to making multiplayer work. Yeah, I spose they could be removed in sp, but some hacking would be needed for mp! Oh and the precaches on the DS version are tiny - 13k. Assuming we're talking about the same precaches :-)
Removing the player model: sounds like a very good idea. One thing I haven't fixed yet is that by default when models get loaded they take twice the actual file size to load. By then end of the loading process this goes down to the actual size. This means that to load the player model ~380k needs to be free! If there's not enough memory then it unloads one model so it can find this 380k. But as the discarded model needs to be in memory it'll then reload it! This gives a massive thrashing effect and the framerate plummets!
So if I can just drop the player model, that'd be great! I could probably remove it (and the player progs) altogether in code. I've also had problems with dogs. Maybe they can be 'reduced' in some way.
Help/sell etc: they're only loaded when they get looked at. When the menu is exitted then they should be freed. If you run out of VRAM whilst loading these images (likely) then you'll see a checkerboard instead of a menu. Something needs to be done about that!
The console: yeah, I was thinking of using a libnds console (as the other one just looks crap). But black-on-white looks so homebrew! Maybe I can spruce it up a bit!
Maps: yeah, they're really big. As a result you can't load some total conversions (eg) Malice because they're just too big. Remember though that the textures don't live in the main 3.1 meg heap, they get downsampled and pushed into the 512k of VRAM. I'm gonna drop the VRAM to either 256k or 384k soon though, as I'm gonna put sounds in the remaining space.
Sounds: yeah, gonna put them in VRAM! Also they're not always kept in memory all at once. If a sound hasn't been played for a while it will get thrown away and another gets loaded in its place. Sounds take up about 100-150k of game heap (at 11kHz, 8-bit stereo).
Profiling: yeah, I tried profiling on my A64 and on a PowerPC machine and I quickly realised the results were useless! The timings are completely different to the DS version - the lack of FPU changes things quite a lot... However, the thing to look for is the number of calls to functions - some functions get called hundreds of thousands of times in a matter of seconds! Most of them in are in world.c.
Anyway, I was up *late* night fixing those texture bugs. I think I've got them sorted, but there's this mysterious DS kludge factor I need to add which I can't yet explain. Don't think I've gotten to bottom of this!
I've also got the lighting going again, with the help of a modified PC build. I'm not happy with the results though, so I may chuck it and do something different. I still have spare poly count in most scenes ;-)
_________________
Big thanks to everyone who donated for Quake2
#119601 - Epicenter - Sat Feb 24, 2007 5:22 pm
Did some more work on optimizing progs. Here are some notes on my optimizations so far-- they target the most time-consuming functions when running on my A64 machine. If you can nail down some functions like this from your DS, it'd be a big help and I'll get started on optimizing them however I can.
Client.qc : watermove ()
Most of this function can be skipped by checking if the waterlevel is 0 at the very start, and if it is, exiting the function. The only consequence is that there won't be a gasp when the player exits water. I'd call this very minor and that's one more sound that can just be skipped loading anyway.
I intend to make this be called less frequently. There is no reason to do waterlevel checks and responses like drowning/burning in lava etc. EVERY FRAME, since the intervals at which you burn/drown are far less frequent.
Weapons.qc : ImpulseCommands
At the start of the function, if impulse is 0, exit the function. This skips a lot of unnecessary operations that would have accomplished nothing.
Client.qc : CheckPowerups
Can be sped up by checking if the IT_QUAD, IT_SUIT, etc. flags are set on the player before all the checks for their expiry time are done. And if none of them are set, just exit the function. I'll probably branch this function off into smaller ones, CheckQuad, CheckSuit etc. and only call the relevant one for the powerup(s) the player has.
I also removed the code to switch to the Eyes.mdl model and the eyes modelindex, also an instruction to reset the frame of the player to 0 when this is set, and of course, code to set it back to player.mdl and the player modelindex. Since the player will be a triangle, who cares how he appears with Invisibility?
I also plan to make this function only be called about twice a second, not every frame, which is pretty useless. The only forseeable discrepancy is a possible 0.5sec longer than usual you might get to keep the powerup.
Ai.qc : Ai_Walk
This function checks if the monster calling ai_walk has the classname 'Monster_Dragon'. The dragon was removed before release so this whole section is removed.
Client.qc : PlayerPreThink
Completely skip calling CheckRules in singleplayer mode. Nothing in it applies to SP, just MP.
World.qc : StartFrame
This was wasting a good chunk of time every frame, and seems to be accomplishing nothing terribly significant except updating 'framecounter' which nothing else seems to use. So I just exit it at the very start.
A BIG thing I need to do, is optimize FindTarget or make it run less frequently. It spends tons of cycles and runs for EVERY monster EVERY frame. It's pretty much the worst thing running most of the time.
And yes, I did observe some not-yet-explained slowdown in the zombie code. Especially crucified. I'll have a look at dogs; what in particular is wrong with them? Their Melee-Check code when they jump at you is pretty long-winded. See similar slowdown with Ogres in close range (they use similar melee code, though less intensive)? How about fiends and shamblers?
Once I've optimized some of the known-slow functions from the NDS I'll roll it together as a progs with FTEQCC and post the result. :)
#119642 - HyperHacker - Sun Feb 25, 2007 12:03 am
You know you can map VRAM C and D as ARM7 work RAM? I'm not sure the ARM9 can access it but if not you could switch it to VRAM, write some sound into it, then switch it back to WRAM.
1500 posts \o/
_________________
I'm a PSP hacker now, but I still <3 DS.
#119652 - simonjhall - Sun Feb 25, 2007 1:58 am
I promise I will give you a list of what's expensive, soon! I just keep getting caught up in other stuff. If you like I'll also give you a build which you can properly profile the code with, as in it'll dump you a list of every function called and the number of microseconds it's taken etc...
Now if I called in sick for a week or two I'm sure I'd have plenty of time to get it done!
But I spose you ain't got that new DS yet, so a profiler ain't gonna be of too much use to you :-D
Ooh and I was so annoyed with the dodgy vertex lighting I've been writing on and off for a month that I decided to go and do lightmapping, properly. I've got it working with a checkerboard lightmap - all I have to do is plug in the proper light info... When combined with the hardware lighting to do dynamic lighting this will seriously look da bomb!
Quote: |
You know you can map VRAM C and D as ARM7 work RAM? I'm not sure the ARM9 can access it but if not you could switch it to VRAM, write some sound into it, then switch it back to WRAM. |
Yeah, I was thinking of doing something like that. Just need to find the time to finish writing it...
(can you tell I start lots of things but don't finish them?!)
288 posts, most of them in this thread :-p
_________________
Big thanks to everyone who donated for Quake2
#119696 - OOPMan - Sun Feb 25, 2007 10:33 am
Nice, so we'll be seeing some HW lighting then soon?
Nice work...
Epicenter, cool on getting involved at some level :-) More hands means lighter work. Well, unless you have 1000 hands and are trying to pick up a penny ;-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#119712 - iainprice - Sun Feb 25, 2007 2:42 pm
I am trying to compile the source so I can have a play and am having trouble with the class declaration for fixed_point... anyone else having a play?
#119715 - Sunray - Sun Feb 25, 2007 3:20 pm
How do you render Texture*Lightmap without multi-texturing and multiple passes?
#119716 - simonjhall - Sun Feb 25, 2007 3:28 pm
Sunray wrote: |
How do you render Texture*Lightmap without multi-texturing and multiple passes? |
...by using multiple passes :-)
Still thinking about using the surface cache idea though.
Iain - wanna gimme some error messages? :-p
_________________
Big thanks to everyone who donated for Quake2
#119722 - Sunray - Sun Feb 25, 2007 4:11 pm
Two passes.. twice the polygon count :O
#119733 - tepples - Sun Feb 25, 2007 6:28 pm
Sunray wrote: |
Two passes.. twice the polygon count :O |
What two passes?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#119778 - elhobbs - Mon Feb 26, 2007 4:27 am
preventing the player model from loading in single player may get the level starting faster but it will not effect how much memory is available for other models/data. since the player model is not displayed each frame in single player it is going to dropped from the cache fairly quickly. the same goes for the console background, unused precached models and other menu graphics.
#119781 - Mr. Picklesworth - Mon Feb 26, 2007 5:03 am
tepples wrote: |
Sunray wrote: | Two passes.. twice the polygon count :O |
What two passes? |
[Whisper]He means render passes :b[/Whisper]
_________________
Thanks!
MKDS Friend Code: 511165-679586
MP:H Friend Code: 2105 2377 6896
#119791 - simonjhall - Mon Feb 26, 2007 10:30 am
That's a very good point! Removing the loading of the model might make levels load when there's not quite enough RAM though...(but I don't think there are any levels with that problem!)
And yeah, two passes - nah! I just picked up a second DS from a friend, so I'm gonna experiment with rendering the graphics on two machines, then compositing the results together on a third :-)
Or I could work on DS/DS deathmatches.
_________________
Big thanks to everyone who donated for Quake2
#119803 - elhobbs - Mon Feb 26, 2007 2:54 pm
[quote="simonjhall"]<snip>[/quote]
preventing models from loading will not allow larger levels to load. the cache manager will dump all of the cache if needed in order to load a level.
the memory requirements for multiple pass rendering are pretty high. at least 48k (if you convert it to 8bit on the fly) to store the first frame before the second frame renders. 16k for a 16bit to 8bit lookup table. Two whole vram banks for the capture hardware - you may be able to get by with one but I have never been able to get that to work.
#119808 - simonjhall - Mon Feb 26, 2007 3:17 pm
Quote: |
preventing models from loading will not allow larger levels to load. the cache manager will dump all of the cache if needed in order to load a level. |
Yeah, you're right. That's not quite what I meant though - if the model is prevented from loading at all then levels which couldn't load before may now be able to fit.
For example, if everything is loaded (level, textures, models, sounds etc) bar one final model and there's 101k free the game won't be able to load a 100k model as 200k will be required. If there isn't 100k worth of models to discard then it will fail. If the model was never loaded in the first place... :-p
Or I could just rewrite the loader - like I did for the world loader - to only pull in pieces, rather than a whole copy of the file to memory. It was pretty bad with the level loader as if you wanted to load a 1.5 meg file you needed 3 megs free to do the loading! I'll do the model loader eventually and there will be less thrashing as a result...
Quote: |
the memory requirements for multiple pass rendering are pretty high. |
Yeah...
I'm not actually gonna do multi-pass in the traditional DS sense, where you capture a previously rendered frame. Instead I'm just making use of the spare polygon budget available in most scenes. If there isn't enough polygons to render the scene twice it just drops back to vertex lighting on those polys. You'd think this might give a really patchy image, but as I draw the image from front to back, you get the lightmaps up close and vertex far away...
I should really upload a picture to show what it looks like... Oh and lightmaps take up another 100-150k. More RAM to find!
Still can't figure out how to do the waterwarp/teleporters - these work by tesselating the geometry bigtime and applying a sine wave to the co-ords. As I'll have run out of polys if I do lightmapping I definately won't be able to do this! Any suggestions? I can think of a few crappy ways of doing it, but nothing good.
_________________
Big thanks to everyone who donated for Quake2
#119812 - Miika - Mon Feb 26, 2007 4:29 pm
How's Quake II Simon? I have got the memory expansion pak from Opera browser now.
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#119815 - Tockit - Mon Feb 26, 2007 5:15 pm
simonjhall wrote: |
I just picked up a second DS from a friend, so I'm gonna experiment with rendering the graphics on two machines, then compositing the results together on a third :-)
Or I could work on DS/DS deathmatches. |
Oi simon,
I was wondering: when you say DS-DS deathmatches, will this still need to be facilitated by a computer server with a wireless router, or will it be true ds-to-ds support?
I usualy have bad luck trying to access anything on a server on my computer with my DS. any homebrew or ported games that use that method don't seem to work for me..
so in short, will you need a router and/or computer involved in the scenario?
_________________
-01011101001010101010 (frank)
#119817 - simonjhall - Mon Feb 26, 2007 6:03 pm
I've just noticed that this thread has just passed 500 posts! Wow...
So I'm still working on Q2 when I can find the time. I have so much still to do with Q1 that it's not getting the work it needs! But basically I've *almost* got it working at the moment with my Supercard, but not quite. Finding all these 8-bit writes is a pain in the arse. I reckon I'll be able to YouTube a video of Q2 after I do a massive 10 stint of Q2ing ;-)
I was gonna buy an Opera expansion the other day but didn't when I realised it cost ?30! I'd like to support it, as it'd much rather get the game running in 4+8 megs rather than 4+32 megs.
And DS-DS: until someone writes an ad-hoc library it's gonna need a router! It will not need a PC to play. The DS has more than enough grunt to host a deathmatch. It should be ok-ish on co-op levels too...
_________________
Big thanks to everyone who donated for Quake2
#119820 - Miika - Mon Feb 26, 2007 6:21 pm
simonjhall wrote: |
I've just noticed that this thread has just passed 500 posts!
I was gonna buy an Opera expansion the other day but didn't when I realised it cost ?30! I'd like to support it, as it'd much rather get the game running in 4+8 megs rather than 4+32 megs.
|
What do you mean? Do you mean you would rather use the Opera expansion than M3/SC built-in memory? Is that because M3/SC are slow?
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#119821 - elhobbs - Mon Feb 26, 2007 6:38 pm
probably not a high priority but you could pre-distort the water and teleporter textures each frame - I think R_GenTurbTile does this. the only thing that this does not really work on is the sky - not sure how you are handling that currently.
#119872 - Doom5 - Mon Feb 26, 2007 11:47 pm
Miika wrote: |
simonjhall wrote: | I've just noticed that this thread has just passed 500 posts!
I was gonna buy an Opera expansion the other day but didn't when I realised it cost ?30! I'd like to support it, as it'd much rather get the game running in 4+8 megs rather than 4+32 megs.
|
What do you mean? Do you mean you would rather use the Opera expansion than M3/SC built-in memory? Is that because M3/SC are slow? |
I think he means he'd rather only have to use an additional 8 megs of ram at most.
#119879 - simonjhall - Tue Feb 27, 2007 1:27 am
Yeah that's right. In Q2 I get half the transfer rate to the GBA slot as I do to main RAM. That means that I've got eight times more RAM at half the transfer speed. So if I wanna walk memory it'll take me sixteen times as long.
If I restrict myself to 8Mb the damage caused by slow memory won't be as severe.
And yeah I figure I could do some caching thing, but anyway - that's in the future!
Meanwhile, back at the base,
--------------------------------
I've got rid of most of the stability bugs in deathmatch now, but this latency thing is a serious problem. When I have the wifi lib's debug info turned on, around the time it gets seriously sluggish I started getting messages about running out of transmit buffer (in Wifi_TransmitFunction()). If I increase the size of the buffers it only happens later...
I always get really crap transfer rates when using the ds wifi - and I can't figure out why! Maybe it's a fault with my code (ie I've got the wifi set up wrong) or maybe the wifi lib just can't hack this many packets.
I can't seem to find a way to throttle the game back either. Hmm.
_________________
Big thanks to everyone who donated for Quake2
#119886 - Dood77 - Tue Feb 27, 2007 4:27 am
I understand Epicenter's been tinkering with the source, I'll bet he'll know how to figure it out?
Anyway once this is done the game will be playable without God mode :P
#119896 - kusma - Tue Feb 27, 2007 10:06 am
simonjhall wrote: |
Yeah that's right. In Q2 I get half the transfer rate to the GBA slot as I do to main RAM. That means that I've got eight times more RAM at half the transfer speed. |
Have you tried changing the wait-states? At least on the gba, you can get EWRAM speeds from ROM with the right flash carts. I would imagine this to be possible for SLOT2 RAM expansions on the ds too...
#119909 - 0xtob - Tue Feb 27, 2007 12:00 pm
Quote: |
I've got rid of most of the stability bugs in deathmatch now, but this latency thing is a serious problem. When I have the wifi lib's debug info turned on, around the time it gets seriously sluggish I started getting messages about running out of transmit buffer (in Wifi_TransmitFunction()). |
I used to have the sample problem, but it was fixed when I switched to devkitPro r20 which has a different interrupt dispatcher. Another cause could be if you forgot to set up the FIFO interrupt handler in the ARM7.
On the other hand, I don't know how bandwidth intensive Quake is. The application I had this problem with was transmitting about 120 3-byte packets per second.
_________________
http://blog.dev-scene.com/0xtob | http://nitrotracker.tobw.net | http://dsmi.tobw.net
#119929 - Epicenter - Tue Feb 27, 2007 3:35 pm
Dood77 wrote: |
I understand Epicenter's been tinkering with the source, I'll bet he'll know how to figure it out?
Anyway once this is done the game will be playable without God mode :P |
Adjusting the master tickrate on the server is an idea. Lowering the raw number of frames being handled per second seems a guaranteed way to decrease raw bandwidth utilization. If it still drops packets like crazy etc. at say, a locked master framerate of 20 instead of the default (74?) you'll know something more serious is wrong.
#119961 - simonjhall - Tue Feb 27, 2007 10:50 pm
So I just spent hours trying to get rid of this lag thing. Whatever I tried (different machines hosting, adjusting timers, adjusting buffers etc) I couldn't stop the lag just increasing after a few seconds of play! The DS has no problem receiving hundreds of tiny (<50 byte) packets per second, but just can't seem to send them...
I was seriously thinking of ditching UDP (via an AP) and having a stab at writing a DS p-t-p lib so I could minimise latency etc...
Until I tried the stupid idea of dropping packets - intentionally! When the PC is hosting and the DS drops every other ('unreliable') packet it sends the lag drops down to a nice and stable 30ms! The game is then totally playable!
If the DS hosts, with the PC as the client there's a 60ms lag. It's totally playable on the DS (as it's hosting) but you do notice the slight lag on the PC. Not huge cause for concern, but if you're playing a fast match you're gonna miss some shots!
However when it's DS/DS (via the AP) the lag has to be more like 100ms (I'm guessing here, as I can't type 'ping'). It's playable but it's pretty annoying. Hopefully I'll be able to tweak this by dropping more packets!
I am SERIOUSLY relieved!
Yeah, I could really get to the source - but I don't know anything about the innards of the wifi lib.
EDIT: OMG deathmatches are awesome! Gonna have to play against a PSP tomorrow.
_________________
Big thanks to everyone who donated for Quake2
#120001 - f3 - Wed Feb 28, 2007 5:55 am
Simon.... I love you!
_________________
fckgw
#120015 - Shtroodle - Wed Feb 28, 2007 10:04 am
I love you too man - let's get married! :)
#120037 - Epicenter - Wed Feb 28, 2007 3:01 pm
Do you expect that if the CPU load on the host DS was lower the latency with DS-to-DS play would decrease? I'll do the best I can on that front. :)
#120038 - simonjhall - Wed Feb 28, 2007 3:06 pm
Totally. I've noticed that on DS-DS games the performance of the client machine definately suffers on the 'intensive' bits. Also even if there's not a lot of VM stuff going on, but the graphics are moderately complicated (but still 20fps+) the second machine starts to chug a bit.
I still wouldn't encourage hosting a game on a DS, but it does work a lot better than I expected. Plus if you've got an AP handy then there's likely to be a real computer about which can idle whilst hosting a game or fifteen :-)
Ooh, PeterM - a friend on mine is gonna bring in his PSP 2mo. Does your game support regular UDP/IP Quake gameplay using infrastructure (ie access point) mode?
_________________
Big thanks to everyone who donated for Quake2
#120119 - Epicenter - Thu Mar 01, 2007 3:49 am
I'd be more than happy to set up a game server for Quake if NDS and PSP users will utilize it. I'd like for it to be publically-provided info with the NDS and PSP Quake ports, or maybe even included as a preset or something in the multiplayer mode of sorts, so that it gets used a decent amount.
#120121 - HyperHacker - Thu Mar 01, 2007 4:05 am
Will it work well over the Internet though, especially if it's going to be used by default? Lag/latency in a game that the system is already struggling to run at full speed can not be a good thing.
_________________
I'm a PSP hacker now, but I still <3 DS.
#120124 - Dood77 - Thu Mar 01, 2007 4:39 am
lag with netquake games is terrible, so even if the server is where it can get the best pings to the UK, simon will have a very noticable lag.
#120134 - OOPMan - Thu Mar 01, 2007 7:41 am
HyperHacker wrote: |
Will it work well over the Internet though, especially if it's going to be used by default? Lag/latency in a game that the system is already struggling to run at full speed can not be a good thing. |
Erm, it's not actually struggling to run at full speed...
As we've all seen, it runs very fast until certain elements of the QuakeC VM and so forth kick in...
And these have yet to be optimised...
I'm pretty sure simon will be able to get Q running at fullspeed on the DS, it's just a matter of time now ;-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#120171 - Epicenter - Thu Mar 01, 2007 2:09 pm
It's definitely not 'struggling to run'. The DS' video hardware is more than capable of handling Quake at a blistering framerate, and it's obvious the CPU is the only bottleneck. Quake was designed to run, generally speaking, on a CPU between the range of a 486DX-100 to a Pentium or equivalent 5x86 generation processor at ~166 MHz at the time it came out. Very fast processors in terms of raw floating point performance compared to an ARM9 with only integer processing capability. Hence Simon's work to change as much of the engine to fixed-point as possible and bring performance up. So far, 40+ FPS which is exceedingly good.
What's left seems to mostly be optimization of some aspects of the engine like the model handling code, and streamlining QuakeC. I'm doing my best on that, and I might even reinvent some parts of it from scratch to make some aspects of the game run with more regard for raw framerate and a single-player only environment.
I have similar plans for multiplayer; disabling and removing anything that will get in the way of optimal performance (namely SP-specific unneeded code) .. while keeping the size of the final Progs as small as possible.
However! Despite how well this project is going I strongly recommend implementation of QuakeWorld's netcode. NetQuake's handling lag is unacceptably terrible to a large percentage of Quake's user base (myself included) playing on a PC with a low-latency broadband connection to the internet-- no matter how refined and optimized QuakeDS is, it's going to be even worse than that in terms of raw network performance. So if MP is to be a primary consideration of this port migrating QW support is likely going to be essential.
I'd recommend looking at FTE and maybe having a word or two with its developer, as it manages to implement QuakeWorld netcode while still supporting NetQuake Progs. Something similar for QuakeDS would be extremely ideal.
#120186 - Dood77 - Thu Mar 01, 2007 6:17 pm
Actually FTE has a bug where some single player physics doesnt work. In some places you cant get out of the water without using a command that screws up the collision detection.
Heres my post about it:
http://besmella-quake.com/forum/viewtopic.php?t=1085
I've recently tried the latest version, but it still doesnt work. someone in another post mentioned a patch for this, but i couldnt find one.
#120194 - Epicenter - Thu Mar 01, 2007 6:45 pm
That doesn't have any real bearing on what I suggested; which is imitating FTE's use of QW netcode with NQ progs. I don't recommend porting FTE as it would require starting over from scratch on a lot of things.
#120232 - simonjhall - Thu Mar 01, 2007 10:29 pm
OOPMan wrote: |
I'm pretty sure simon will be able to get Q running at fullspeed on the DS, it's just a matter of time now ;-) |
No pressure :-)
God I wish I was just someone else who was reading this thread, not actually writing it! Can't someone else just optimise it for me?!
And I'm still not too sure of doing the QW thing. I certainly ain't gonna look at non-WinQuake solutions until I've 'finished' porting it. Merging two games together sounds like a right pain in the arse! It might be easier just to port QW from scratch!
Also I'd imagine that using QW code would push the binary size up more and it might not fit comfortably enough to run proper-like.
Oh, is it true that Quake don't like mp with network address translation? Don't you need NAT boxes which understand the Quake protocol in order to play across the net?
However, co-op with the PC hosting is really good. The levels which churn (e1m3, e4m1, etc) run so much better...
My next project: PongDS.
_________________
Big thanks to everyone who donated for Quake2
#120236 - Dood77 - Thu Mar 01, 2007 11:12 pm
simonjhall wrote: |
My next project: PongDS. |
lol sounds compicated.
simonjhall wrote: |
And I'm still not too sure of doing the QW thing. I certainly ain't gonna look at non-WinQuake solutions until I've 'finished' porting it. Merging two games together sounds like a right pain in the arse! It might be easier just to port QW from scratch! |
well you were planning on making 2 builds anyway right? how much different is QW from netquake anyway? (besides network code)
#120237 - simonjhall - Thu Mar 01, 2007 11:25 pm
I just did a diff on the source and it doesn't look totally mega.
I'll have a look at it properly once the game's done...
Tbh I'm surprised that the DS version was compatible with the PC version out of the box. I had to cut some many things down in order to conserve memory, but we might not be so lucky with QuakeWorld.
Hell at least it's not the usual request of "we want better framerate"!
_________________
Big thanks to everyone who donated for Quake2
#120242 - PeterM - Fri Mar 02, 2007 12:06 am
You guys do of course realise that the DS version of Quake probably runs better than our PSP version now! ;-)
_________________
http://aaiiee.wordpress.com/
#120246 - simonjhall - Fri Mar 02, 2007 12:23 am
Well I guess we know which machine games will be hosted on when PSP and DS Quake players get together!
Time to get your GU ass in gear, man :-p
_________________
Big thanks to everyone who donated for Quake2
#120251 - PeterM - Fri Mar 02, 2007 1:16 am
Probably... uni is kinda hectic just now - deadlines every few days!
_________________
http://aaiiee.wordpress.com/
#120261 - Epicenter - Fri Mar 02, 2007 2:25 am
The way I understand it QW is almost identical to NQ, except the netcode is replaced, there's some small interface changes like the HUD is modified to remove Single Player only statistics. Also there's some small syntax changes to qwprogs vs. progs. Maybe the right approach would be a port of QW that runs parallel to your NQ port so you can compile both of them into 2 different binaries at once with the common code shared, like your hardware based renderer.
#120287 - Epicenter - Fri Mar 02, 2007 9:38 am
Also I'd like to emphasize that solid, stable, fast single-player gameplay and support for a decent range of mods should take priority time-wise over multiplayer support. How many PSP Quake players are online at any given time to compete against anyway? ;)
#120291 - OOPMan - Fri Mar 02, 2007 11:25 am
Good point. Being able to use the various mods available would be great...
Hehehe, Epicenter, I think we're all hoping you have some cool QuakeC optimising tricks hiding up your sleeve ;-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#120296 - Epicenter - Fri Mar 02, 2007 1:37 pm
The sooner someone can find me a black DS Lite for sale online with quick airmail shipping the sooner I can lend my efforts. (I also accept donations, haha) While a standard DS Phat would get the job done too there's just no point getting one since I'd just have to replace it later with the one I really want. :(
#120299 - simonjhall - Fri Mar 02, 2007 2:00 pm
Sorry, Quake only runs on the phat. You're gonna just have to buy the ugliest DS you can afford. You also need a gbamp to go with it too, so it looks like it's got a tongue sticking out.
Oh and we had a go of PSP vs DS earlier but could never seem to get them talking together :-(
I think it was a networking problem, rather than something intrinsicly programmingy.
_________________
Big thanks to everyone who donated for Quake2
#120303 - Miika - Fri Mar 02, 2007 2:41 pm
simonjhall wrote: |
Sorry, Quake only runs on the phat. You're gonna just have to buy the ugliest DS you can afford. You also need a gbamp to go with it too, so it looks like it's got a tongue sticking out.
Oh and we had a go of PSP vs DS earlier but could never seem to get them talking together :-(
I think it was a networking problem, rather than something intrinsicly programmingy. |
What do you mean, Quake only works on the phat?!
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#120304 - tepples - Fri Mar 02, 2007 2:52 pm
It's either a joke or a reference to the incompatibility of some versions of dswifi with changes made to the Wi-Fi hardware between older and newer versions of the DS Lite. I'll guess a joke.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#120305 - simonjhall - Fri Mar 02, 2007 3:00 pm
#120307 - Mr. Picklesworth - Fri Mar 02, 2007 3:51 pm
I remember an entry on DrunkenCoders showed a PSP and a DS talking to each-other wirelessly as a tiny tech demo. Maybe you can hunt down the fellow who did that...
I'll see if I can find it for you myself (though I'll be at least 8 hours).
_________________
Thanks!
MKDS Friend Code: 511165-679586
MP:H Friend Code: 2105 2377 6896
#120309 - Epicenter - Fri Mar 02, 2007 4:39 pm
It ought to work fine on any DS, I'm sure he's kidding. At any rate I won't really be worrying about MP performance; I'm mostly concerned with decreasing the amount of work done per frame to increase overall framerate.
I'd get a DS Phat if it didn't physically hurt my hands to hold that thing.
If anyone did actually want to donate to my NDS Fund my paypal address is epicenter@adelphia.net ... but I won't hold my breath. :)
#120374 - jester - Sat Mar 03, 2007 11:12 am
Will this problem with the ds lites and phats be fixed?
_________________
If anyone needs a dragonball online email me @ aaronthejester@hotmail.com
#120407 - pas - Sat Mar 03, 2007 6:48 pm
@jester: What are you blabbering about ? The Phat and Lite act the same software executing wise (or nearly). IF you had thought then you had noticed that old NWFC Games wouldn't work on the lite if it had a new Wifi Protocol... Got it ?
_________________
Starcraft DS ?
#120410 - simonjhall - Sat Mar 03, 2007 7:08 pm
Yikes, didn't expect people to not see that as a joke!
Anyway, go tell me about your slot-2 cards in the other thread!
I'm rewriting the sound system at the moment and I realised that there's 14 megs of sound files and I'm trying to cram them into 256k! Hence, pulling files from memory would be faster than from disk.
This game is nearly done. Trying to decide whether to do another pre-release in a month or just defer that until the final ver...
_________________
Big thanks to everyone who donated for Quake2
#120445 - pas - Sat Mar 03, 2007 9:30 pm
You are talking about Quake 2 ?
_________________
Starcraft DS ?
#120469 - simonjhall - Sun Mar 04, 2007 12:05 am
I'm talking about using extra memory on Quake 1 to improve load times.
_________________
Big thanks to everyone who donated for Quake2
#120474 - tepples - Sun Mar 04, 2007 1:52 am
There might be more demand for it if Opera comes out in North America. Some people notice a pattern of 3 months per region and are guessing April, but others are guessing it'll be another Kuru Kuru Kururin or Payback (that is, a 95 year gap between Europe and North America).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#120488 - Miika - Sun Mar 04, 2007 3:37 am
simonjhall wrote: |
This game is nearly done. Trying to decide whether to do another pre-release in a month or just defer that until the final ver... |
Whoa Simon! ALREADY? Gosh. You must have been working really hard.
Is lightning differences done? what about textures and speed-sync? Oooh I am so big fan of your work here so I wish you will make a new release in a month! :D Keep up the good work!
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#120491 - simonjhall - Sun Mar 04, 2007 4:00 am
Lighting's not yet done
Texture co-ord bugs on brush models are fixed
Networking is done (until QuakeWorld, anyway)
Speed is now fixed (it now uses a proper timebase)
Sound has been rewritten from scratch (no more clicking)
Console is nearly done, but still 'read-only'
Alias models are still untextured and unoptimised.
And the people at EZ-flash tell me they're gonna send me a card :-)
_________________
Big thanks to everyone who donated for Quake2
#120494 - Miika - Sun Mar 04, 2007 4:11 am
simonjhall wrote: |
And the people at EZ-flash tell me they're gonna send me a card :-) |
Aw, that's so nice of them! Another reason to support their card ;)
Nice to hear you have made a lot of progress. By the way, will
the lightning slow the game down a lot?
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#120589 - Dood77 - Sun Mar 04, 2007 10:26 pm
simonjhall wrote: |
Lighting's not yet done
Texture co-ord bugs on brush models are fixed
Networking is done (until QuakeWorld, anyway)
Speed is now fixed (it now uses a proper timebase)
Sound has been rewritten from scratch (no more clicking)
Console is nearly done, but still 'read-only'
Alias models are still untextured and unoptimised.
And the people at EZ-flash tell me they're gonna send me a card :-) |
You've decided to port/implement QW?? Great news! I can't wait. Yay speed fixes! And yay sound! Are you planning on making an on screen keyboard? And what of key customization? And game saves? If your current build is ready as it is or just needs a tiny bit of polishing then I'd say pre-release away! It will only get people more interested in what is to come!
I've shown many of my friends your port and they're really impressed and a few are actually considering buying some hardware for homebrew.
#120620 - simonjhall - Mon Mar 05, 2007 1:12 am
I haven't decided whether or not to do QW. At the moment it's 50/50 and I think a lot of work is involved. Doing one game has been hard enough!
I've been beating my head against the wall this weekend with the sound - having it run on the second processor, needing custom memory allocation, doing a caching scheme, getting rid of the thrashing/clicking etc has been really hard. But I'm very pleased with the result and so sound now takes ~5kb of code space and no main memory at all for data. All the sounds now live in VRAM.
However, this means that I now have less VRAM in which to fit world textures, model textures, HUD textures, menu textures, lightmaps...
I really hope people appreciate how much of a squeeze this game is - I can see some people just running it and saying, "yeah, so he recompiled GLQuake!". Every pixel on the screen has needed work to get it there...
And I'm glad you'll be able to get more people into the homebrew scene :-)
I may add an on screen keyboard, but I can't really be arsed!
And Miika, you really want this card supported, don't you?! Why didn't you just buy a more 'compatible' card?
Main stuff now to do:
- lighting
- alias model texturing
- rendering optimisation
- floating point->fixed point optimisations
_________________
Big thanks to everyone who donated for Quake2
#120670 - Miika - Mon Mar 05, 2007 12:16 pm
simonjhall wrote: |
And Miika, you really want this card supported, don't you?! Why didn't you just buy a more 'compatible' card?
|
Because I got EZ-Flash for a cheap price and at the moment I bought it (My first card) I didn't really consider that the memory inside should be a problem, or it was hard to support. Now I have M3 Simply and Opera expansion too, is it possible to make it Opera expansion compatible?
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#120674 - Epicenter - Mon Mar 05, 2007 1:20 pm
I imagine it wouldn't be hard to implement the Opera RAM cartridge since you just need to enable use of the RAM and then read/write from/to the relevant address range in GBA ROMspace. Both of which are well documented as far as I can tell. Simon, feel free to correct me if I'm wrong. :D
In other news I now am the proud owner of a black NDS Lite, and I can safely say QuakeDS runs marvelously on it. I'm now working on hammering out a usable preliminary optimized progs.dat and a new config file that should be more comfortable on your hands to play with. Wish me luck.
[Images not permitted - Click here to view it]
Last edited by Epicenter on Mon Mar 05, 2007 1:24 pm; edited 1 time in total
#120675 - OOPMan - Mon Mar 05, 2007 1:21 pm
Yes, it probably is, as people have worked out how to use the memory on the Opera cart...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#120682 - Epicenter - Mon Mar 05, 2007 2:13 pm
Good news; I've got a custom progs running with QuakeDS with some early optimizations from the PC side of things, and I'm seeing what look like some very impressive performance gains. I'm getting more optimistic about this by the second.
Once I have an idea of the most expensive functions in QuakeDS (my current optimizations are based on the PC version) it'll only get better from here.
#120705 - Mchart - Mon Mar 05, 2007 6:28 pm
You've done a great job.
(Seriously, you have)
Grab yourself a cold brewski and have a shot at my girlfriend. You deserve it.
#120737 - simonjhall - Mon Mar 05, 2007 9:52 pm
@Miika - right, getcha! Price is always a good decider :-p
I'm still waiting for my free DS-X and EZ-5. They've both been sent, apparently...
@Mchart - ta man. I'll be throwing a launch party when this thing eventually gets finished. Anyone who fancies hitting some bars in Soho (London) when I eventually get this finished is fine by me! Seriously.
@OOP - yeah, I thought about getting one after chishm posted how he did it... The only thing that's holding me back is that it requires a slot-1 card too (which many people ain't gonna have). Oh and the price :-)
@Epicenter - nice pic! I'm making you a list of expensive functions and a special profile build right now!
off topic: I just got myself a second hand gamecube (it was effectively free) but when I hook it up to my telly (a Bravia) the picture is so bright it's hard to play any game. Any other input (eg PS2, DVD, laptop etc) looks beautiful on it. When I plug it into my TV card via the same composite cables the picture looks just like it should do! What gives?
_________________
Big thanks to everyone who donated for Quake2
#120739 - daninski - Mon Mar 05, 2007 10:04 pm
if i'm in london when you finish it i'll shout you a few! i'm going to be around for a few film fests this year.
_________________
www.holbrooksfilms.com
www.tdotodotm.com
#120740 - simonjhall - Mon Mar 05, 2007 10:07 pm
It would actually be a complete laugh to do a 'homebrew night out'... Now how to organise this ;-)
_________________
Big thanks to everyone who donated for Quake2
#120749 - daninski - Mon Mar 05, 2007 10:43 pm
...any excuse for a beer isn't it :D I'd kick everyones ass at mariokart mind :D
_________________
www.holbrooksfilms.com
www.tdotodotm.com
#120782 - Miika - Tue Mar 06, 2007 1:55 am
simonjhall wrote: |
I'm still waiting for my free DS-X and EZ-5. They've both been sent, apparently...
|
So you're getting an EZ-5? Aw, I thought you were getting an EZ4 so you
could support it... bah.
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#120871 - Lazy1 - Tue Mar 06, 2007 10:56 pm
They responded to your request for free hardware?
I asked for docs about using the ram on the ez4 and have so far been ignored.
#120896 - Epicenter - Wed Mar 07, 2007 2:59 am
I'm convinced the best solution right now, while a little expensive, is a Slot 1 card like an M3 Simply or Supercard equivalent with a 1gb MicroSD card, and a Slot 2 M3 Lite or SC equivalent with another 1gb card. This way you get the best of both worlds-- an excellent moonshell based GUI for slot 1, the ability to use expansion RAM in slot 2, and GBA compatibility on slot 2.
#120919 - OOPMan - Wed Mar 07, 2007 7:55 am
Yup, I agree with that Epicenter :-)
Planning to get myself an R4 in the near future to complement my SC :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#121003 - simonjhall - Thu Mar 08, 2007 1:31 am
Thanks to Kusma we got a little bit more speed in the VM/physics code :-)
Epicenter, route finding should be getting faster by the day - so by the time I eventually give you a build it should be...usable!
A side effect of this is that I'm massively out of stack! The game barely runs at all now :-S
On a plus side though, I've optimised the brush model rendering even further and I'm very pleased to say that the *demos* (minus monsters) run at 60fps! I've not included the monsters as they're still not finished (or textured). The brush model renderer can still be faster if rewritten in assembler.
It's soooo smooth!
HyperHacker - did I ever send you a software-rendered build, or a very early (ie z-shaded) hw build? If so, could you send it back to me just so I can include 'slideshow mode' when I do my next release? :-D
EDIT: nuts, it just dropped down to 30fps :-(
_________________
Big thanks to everyone who donated for Quake2
#121021 - HyperHacker - Thu Mar 08, 2007 7:03 am
I don't recall you sending me anything.
_________________
I'm a PSP hacker now, but I still <3 DS.
#121027 - simonjhall - Thu Mar 08, 2007 8:35 am
Sorry, I meant OOPMan! Somehow I always get the names mixed up :)
OOPMan wrote: |
...faster than the old software build I tested a while back, although not as pretty just yet |
I can't get the software renderer running anymore and it'd be useful as a reference etc...
_________________
Big thanks to everyone who donated for Quake2
#121038 - Lord Graga - Thu Mar 08, 2007 9:39 am
Been ages since I have coded GBA, and I know very little about the DS, but I just want to air my idea:
Do you have a rot/scale background avaible? in that case you could just throw it in the back of the main background, and use it for Mode-7 rendering a skybox.
A quick hack for the animated teleporter background could be done by putting a sprite somewhere between the skybox and the main BG, and then scale and wiggle it around :)
Else do some kind of static animation with 15 frames for a second and switch between them (assuming textures are stored in ROM only).
#121042 - OOPMan - Thu Mar 08, 2007 12:05 pm
simonjhall wrote: |
Sorry, I meant OOPMan! Somehow I always get the names mixed up :)
OOPMan wrote: | ...faster than the old software build I tested a while back, although not as pretty just yet |
I can't get the software renderer running anymore and it'd be useful as a reference etc... |
Yup, you did, and I still have it.
I've even got an old build that didn't work on SCs :-)
Hehehe, and all software too ;-)
Want me to email them back to you?
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#121045 - simonjhall - Thu Mar 08, 2007 12:45 pm
Yeah, that'd be ace thanks! I just can't be arsed to fix the current build to get the SW renderer working again :-)
And Lord Graga - sounds like some good ideas there! I'll have a look later/this weekend to see if I can get some of this working... Might look a bit too 2D though. Also I have so little VRAM left it just ain't funny! I haven't got enough to get a HUD on the subscreen but I might be able to get one on the main display...
_________________
Big thanks to everyone who donated for Quake2
#121066 - Epicenter - Thu Mar 08, 2007 5:08 pm
Keep in mind if you do implement the teleporter texture that way, water, lava and slime, anything with a * before the name of the texture, will draw the same way, too.
#121081 - tepples - Thu Mar 08, 2007 7:01 pm
Water, lava, and slime can probably just be drawn as a semitransparent plane, just like in SM64.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#121098 - Lord Graga - Thu Mar 08, 2007 10:10 pm
Well yeah, for teleporters I would think the animated texture would do the best job - shouldn't be that many kilobyte for 15 frames after all. Or do they all need to be in the VRAM?
Alternatively you would have to reserve just a single frame of space and then do some noice over it every a part of it every frame so that it would look like it was flickering old 50 Hz screens captured with video cameras :)
#121107 - bear - Thu Mar 08, 2007 11:59 pm
Quote: |
Water, lava, and slime can probably just be drawn as a semitransparent plane, just like in SM64. |
Except that, unless a level is compiled to allow for transparent water, what's below the surface wouldn't get drawn anyway (at least not without some further hacking).
#121151 - Epicenter - Fri Mar 09, 2007 3:52 pm
Lord Graga wrote: |
Well yeah, for teleporters I would think the animated texture would do the best job - shouldn't be that many kilobyte for 15 frames after all. Or do they all need to be in the VRAM?
Alternatively you would have to reserve just a single frame of space and then do some noice over it every a part of it every frame so that it would look like it was flickering old 50 Hz screens captured with video cameras :) |
If I recall correctly there aren't individual frames; the texture is distorted by the engine for the water effect if the texture's name has the * in it.
#121155 - simonjhall - Fri Mar 09, 2007 4:28 pm
Yo Miika, I got my (free) EZ-flash 5 in the post today! It even includes a rumble feature which I really really wanna have a go with!
However, the RAM expansion won't fit in my phat! It's designed for a lite! What can I do about this? Are there adaptors for this sort of thing? Need rumble...
_________________
Big thanks to everyone who donated for Quake2
#121157 - Miika - Fri Mar 09, 2007 4:45 pm
simonjhall wrote: |
Yo Miika, I got my (free) EZ-flash 5 in the post today! It even includes a rumble feature which I really really wanna have a go with!
However, the RAM expansion won't fit in my phat! It's designed for a lite! What can I do about this? Are there adaptors for this sort of thing? Need rumble... |
Hi. Nice that you received it! Originally I though you were going to receive an EZ-Flash 4 deluxe, the same I have. As you know the GBA expansion 3-in-1 pak holds rumble feature, GBA game support and Opera expansion, so now you can at least try to support that one! :D And no I don't think there is an adapter for that. But, I know 2 solutions for this:
1. If you have an old GBA game, you can try modding its casing and fit the expansion pak in there, though I don't know if rumble will work well then.
2. Buy a DS lite.
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#121212 - Epicenter - Sat Mar 10, 2007 7:44 am
Good luck. I had to sell my soul to Satan for one. It's a good thing I didn't have a soul to begin with. (Sucker.)
#121669 - simonjhall - Tue Mar 13, 2007 9:30 pm
Miika (or someone with EZ-flash hardware), could you please try out the testing program available from http://ezflash.sosuke.com/viewtopic.php?p=29106 and tell me what happens?
I've managed to get my EZ5 RAM expansion into my phat and I'd like to know if you get the same results on other EZ hardware...
The rumble is shocking in the phat - it made me jump! It may need fastening down...
_________________
Big thanks to everyone who donated for Quake2
#121693 - simonjhall - Wed Mar 14, 2007 1:01 am
No-one with EZ flash hardware eh? Doesn't look like it's worth supporting then :-P
But seriously, if you've got a phat DS and you want to get one then it's easy enough to fit in your DS. Just unscrew the cartridge and push it in as far as it'll comfortably go! Then pull it out with tweezers/a screwdriver!
The rumble feature is crap-as in the phat though and I broke it within two minutes! Time to find some more solder...
Anyway, I just coded the sleep sequence in Quake - it was surprisingly harder than I imagined! But more importantly: I also found that if you enable and disable IRQ_LID on the ARM7 quick enough you can power off the machine! Score.
A question, for those who know: when sleeping, my ARM7 is suspended in swiWaitForVBlank (with vblank disabled, crafty eh?) and gbatek reckons the processor is entered into a low power mode. Now as I couldn't get any of the FIFO IRQs working on the ARM9 (gotta be doing something wrong...) I've got it waiting in
Code: |
while (REG_IPC_FIFO_CR & IPC_FIFO_RECV_EMPTY); |
instead. Is this likely to sap too much juice? Or is it worth making a dummy timer interrupt and then doing a swiIntrWait on that?
The only reason I've got it waiting on the FIFO (rather than real memory) is to save power by not using the bus or main memory.
swiDelay appears to keep the processor fully-powered.
_________________
Big thanks to everyone who donated for Quake2
#121696 - Epicenter - Wed Mar 14, 2007 1:12 am
Seeing as I've had my GBA, with ARM7TDMI (granted, at half the clockrate) running for over 24 hours straight with the display on, with a regular pair of alkaline disposable AAs I don't expect you'll have to worry TOO much about power consumption as long as the ARM9 and GPU aren't sucking powerand of course most importantly both screen backlights are off (The real hogs.) :D
That said, good thinking, Sleep is crucial for a long game o' Quake. I forgot I was going to ask about it .. way to read my thoughts :)
Anytime you want to try any sort of test of using the expansion RAM on the M3 I'm all ears, I'd love to do some beta testing of that bit for you if you intend to implement it. Maybe you could use a proper console background by freeing up VRAM, moving sounds into GBA romspace.
Not to push, but how goes that list of expensive functions? I'm too busy to work on Progs this week but this weekend I'll be free again.
#121711 - Miika - Wed Mar 14, 2007 5:27 am
simonjhall wrote: |
Miika (or someone with EZ-flash hardware), could you please try out the testing program available from http://ezflash.sosuke.com/viewtopic.php?p=29106 and tell me what happens?
I've managed to get my EZ5 RAM expansion into my phat and I'd like to know if you get the same results on other EZ hardware...
The rumble is shocking in the phat - it made me jump! It may need fastening down... |
Hello, I tried that program, it is for the expansion pak which is NOT same device as EZ4. It gives me this message:
Nor Flash id=0x .
Nor Flash err
Anyway, as cory said "My goal in my co-operation with EZTeam is to produce a 3rd party GBA loader that will allow the use EZ 3in1 with any Slot 1 card, as well as better info for homebrewers to use EZ4 products to their fullest Also, hopefully, the loader I am producing will eventually be extended to work with many cards (F2A, Neo2, etc)."
Maybe this means he may implement it at later point? Anyway, now that you have the expansion pak, why not support the Opera expansion as they are virtually identical, let me hear you will!
Man, I had actually thought you'd receive a EZ4 deluxe from EZTeam...
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#121766 - simonjhall - Wed Mar 14, 2007 6:07 pm
Maybe the NOR unlock sequences are different between cards. Hopefully the PSRAM unlocks will be the same though... I'll send you a modified build at some point to test that.
The Opera unlocks have been published (by chishm) so that won't be too hard to support. I'm too lazy to get a card to test it though...
I'm in no rush to support extra memory so I'm not too worried if things don't work now!
Although I really wanna support rumble, as I think that'd be ace in Q. Again, hopefully rumble is the same on all rumble cards! Does the EZ4 have rumble?
And re: the other thread, maybe I should do pre2. I'll think about it.
_________________
Big thanks to everyone who donated for Quake2
#121829 - Miika - Thu Mar 15, 2007 5:30 am
simonjhall wrote: |
The Opera unlocks have been published (by chishm) so that won't be too hard to support. I'm too lazy to get a card to test it though...
Again, hopefully rumble is the same on all rumble cards! Does the EZ4 have rumble?
|
But you have the 3-in-1 expansion for EZ-Flash 5? Then you don't need to buy the opera RAM expansion as they are work like the same don't they? Then the Opera unlocks should work on EZ5 expansion too.
No, EZ4 doesn't have rumble.
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#122239 - simonjhall - Sun Mar 18, 2007 12:54 am
Just a quick snap of pre-release 2 before I spend the next few days optimising it and packaging up for release:
[Images not permitted - Click here to view it]
I really think you're gonna like pre2 over pre1 :-D
Even though I've been told I should 'just give up and do Q2' I'll be damned if I'll do so this close to the finish line!
pre2 things:
- it's faster!
- proper time base - no more super-speed
- proper console font
- aligned power-of-two textures and other texture fixes
- monster texturing if I can make it work properly (there are still real bugs)
- rewritten sound system - no more clicks
- sky animations (teleporter/water/lava now work too)
- heads-up display
- full key configuration
- game loading/saving
- co-op and deathmatch gaming
- non-final lighting :-(
- light animations :-)
- if there's time...dynamic lighting
Linky with be available soon.
We're gonna need some Quake clans soon too :-)
EDIT: water/lava/tele' is go!
_________________
Big thanks to everyone who donated for Quake2
Last edited by simonjhall on Sun Mar 18, 2007 12:00 pm; edited 1 time in total
#122244 - Miika - Sun Mar 18, 2007 1:46 am
Keep up the good work!
MAN don't even think about quitting this project before it's finished! No way! It's best to do one project at time!
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#122250 - Shtroodle - Sun Mar 18, 2007 2:57 am
Really looking forward to this next release. I haven't even tried the first one on purpose - I decided to wait for a more polished version, and it looks like it's on its way ;) I hope you'll be able to get the monster texturing and dynamic lighting done for this build.
And yeah, don't even think about quitting - you've gone a long way baby ;) I was never really into coding or software development on DS but this thread is one of my all time favourites. Keep up the good work Simon.
#122356 - Dood77 - Sun Mar 18, 2007 9:48 pm
:D great job, that lighting looks really good by the way, and the sounds are awesome, barely any hiccups or crackles. Are you gonna add an experimental network option in this build? That would be awesome, then we can really get these clans goin.
One question, in the build you sent me, in the config it mentions binding "PAD A" and such, but I didnt see the B button or Select listed, are these possible to bind? If i have the time im gonna bust out my camera and show youtube what these lightmaps look like in action...
#122358 - simonjhall - Sun Mar 18, 2007 10:05 pm
A youtube vid? I dunno...that build I sent you was pretty WIP! If you like I've got a version where I've optimised the lighting code and texture alignment stuff so the brush model performance is as fast as it was in pre1 >:-)
The sound was also unfinished (no ambients sounds or stereo/distance scaling). At the moment I'm trying to see if I can run sound off the supercard RAM. If it's available I won't have to swap 14 megs of sound in and out of the '7's 128k WRAM!
PAD B is available for use. I have however purposely bound start to escape, select to enter and the directional pad to cursor_up/down/left/right. This way if you haven't got a config file or you're using a dodgy config file you can always get into the menu and reconfigure your settings.
Co-op/deathmatch will be a separate build with pre2. I keep meaning to send you a sample to try :-)
Oh and dynamic lights don't look as easy as I expected. I was planning on using the hardware lights but only directional lights look available. Plus I'm sure I'll need normals and I don't have any. Looks like I'll have to do dynamic lights ala GLQuake. ie crapply!
_________________
Big thanks to everyone who donated for Quake2
#122360 - tepples - Sun Mar 18, 2007 10:10 pm
simonjhall wrote: |
The sound was also unfinished (no ambients sounds or stereo/distance scaling). At the moment I'm trying to see if I can run sound off the supercard RAM. If it's available I won't have to swap 14 megs of sound in and out of the '7's 128k WRAM! |
The audio hardware on the DS can't read GBA ROM. The source address is 27-bit (0x00000000 through 0x07FFFFFF).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#122364 - simonjhall - Sun Mar 18, 2007 10:36 pm
That's a relief! I suspected that may be the case.
It was gonna be pretty hard to do the switching (without crackles) from card mode to RAM mode when the ARM9 wanted to read data anyway (if the ARM7 was still playing somthing)
How do gba games play music then? Do they have to stream the sound into main memory and then play from there? If so, isn't that a bit of a problem when you've only got 256k of RAM?
EDIT: I can confirm that playing from the gba space gives no sound output.
_________________
Big thanks to everyone who donated for Quake2
#122370 - tepples - Sun Mar 18, 2007 11:54 pm
simonjhall wrote: |
How do gba games play music then? |
Game Boy Advance games play music through the GBA sound hardware, not the DS sound hardware. The GBA sound hardware supports reading samples from ROM, but programs running in DS mode can't see it, just like they can't see the Game Boy Color tone generators.
Quote: |
Do they have to stream the sound into main memory and then play from there? |
In fact, most of them do. A typical GBA game has a software mixer that mixes eight voices from ROM into a pair of ring buffers in IWRAM about 1 KB in size.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#122402 - Epicenter - Mon Mar 19, 2007 4:34 am
Are you sure about that? I seem to recall New SMB uses the GB Color sound generator for some of its music (in conjunction with the DS sound hardware of course.)
#122409 - tepples - Mon Mar 19, 2007 4:47 am
Epicenter wrote: |
I seem to recall New SMB uses the GB Color sound generator for some of its music (in conjunction with the DS sound hardware of course.) |
Or does it it use the DS sound hardware's built-in square and noise samples, the same samples used in my AXE demo?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#122413 - HyperHacker - Mon Mar 19, 2007 4:50 am
DS has a tone generator like GBC did, but it's operated quite differently.
_________________
I'm a PSP hacker now, but I still <3 DS.
#122831 - phanboy_iv - Thu Mar 22, 2007 6:46 pm
simonjhall wrote: |
Even though I've been told I should 'just give up and do Q2' I'll be damned if I'll do so this close to the finish line!
|
The guy who said that is obviously an idiot. Ignore him.
And you're right. It'd be silly to give up now, when you've done so many cool things with this project.
#122832 - Darkflame - Thu Mar 22, 2007 7:06 pm
Question; Where can you actualy get Quake1 demo files :-/
Every site I try....includeing ID's own....only has broken links.
Obviously everyone on the net needed that extra 10Mb of webspace :p
The only site I found with it started downloading a dodgy looking file with a *.zip.exe extension.
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.
#122835 - PeterM - Thu Mar 22, 2007 7:26 pm
Myself and Chris Swindle kindly repackaged it as a .zip and .rar for the PSP port of Quake:
https://sourceforge.net/project/showfiles.php?group_id=158726
_________________
http://aaiiee.wordpress.com/
#122849 - simonjhall - Thu Mar 22, 2007 10:34 pm
Yo, sorry about the delay to putting up a download - I've been pretty busy at work, plus I'm moving house soon! Basically I still haven't gotten round to optimising a few key functions I want sorted before pre2.
I hear from my testers however that the networking build works fine - there's a relief! But I guess for every hundred people it works for I'll get one person who mails me telling it's broken :-)
Did you get the pak files in the end? I chose not to host them myself as I wasn't too sure of the licensing. (same with the MP3 music decoder too - I'm still not sure of the licensing!)
_________________
Big thanks to everyone who donated for Quake2
#122891 - OOPMan - Fri Mar 23, 2007 8:17 am
I think it's fine to distribute the shareware data, it being shareware and all...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#122892 - Epicenter - Fri Mar 23, 2007 8:22 am
The engine itself and PAK0P.PAK are free to redistribute. For anyone who wants it, here is PAK0.PAK.
http://www.epicgaming.us/quake/pak0.rar
#122958 - Darkflame - Fri Mar 23, 2007 10:52 pm
Thanks, both of you :)
I think its odd ID dosnt have it, they have patchs to Quake1, but not the demo itself.
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.
#122974 - Dood77 - Sat Mar 24, 2007 2:08 am
I found it fine here:
http://www.idsoftware.com/games/quake/quake/index.php?game_section=demo
#122989 - Darkflame - Sat Mar 24, 2007 4:23 am
yeah, I found that, but it never worked when I clicked it.
Something has changed now, however, it gives a 421, I normaly just got a 404.
hmz.
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.
#123031 - Darkflame - Sat Mar 24, 2007 6:41 pm
Ok, got quake working :)
Not bad work at all :)
Think I might change the config around though,my left thumb is more comfortable for aiming.
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.
#123402 - silent_code - Tue Mar 27, 2007 10:31 pm
simon, i see you have got lightmaps working. do you use q's texture caching or have you come up with something different? how's memory usage and performance when combining color and luminosity (q's lighmaps are 1bit, aren't they? so you have to filter them when combining)?
#123409 - simonjhall - Tue Mar 27, 2007 11:30 pm
The lighting is a two-step process.
Step 1 is to render the entire scene, twice, with the Z writes set to 'equal', using the lightmap as the texture map and a bit of polygon transparency. I don't use a second pass (ie requiring a capture) so when I'm outa poly count that's it for lightmapping!
Step 2 is for when I've got insufficient poly count to render the lightmap polygons. It's basically vertex lighting, and it works better than I expected!
You'd think that this would give an inconsistent image as close objects in the scene may be lit with different lighting, but I have the Quake bsp set up to deliver me polygons front to back, so the close-up stuff gets lit proper-like!
It does mean that as you move into more 'intense' sections, you can see the vertex lit polygons moving closer to you...
However - as you've said - the lightmaps are very low-res so it's noticeable that they're not bilinear filtered. They're in 8bpp (greyscale) format btw. It'll probably need the whole surface cache system (like we've mentioned before) to make it look correct.
I'm *really* trying to get this fancy lighting into pre2, but due to these problems at the moment all you're be getting is vertex lighting! The screenshot I've shown here uses just vertex lighting.
This is all part of my new texturing system (which is half-broken) which allows me to swap in textures during vblank and allows me to render the Alias models properly. However fixing all these problems will push pre2 further back - but it would mean non-white monsters (in 2-4 weeks!)
Other than that the game is pretty much finished ;-)
The question is: can the homebrew community stand another game with pink monsters?!
PS dood77: you mentioned recently that you might do a YouTube vid. If I send you a build with that pentagram fix, you wanna make that vid? I'm too lazy to do it myself!
EDIT: the performance hit of lighting is neglible - vert lighting < 1ms, lightmapping < 3ms
_________________
Big thanks to everyone who donated for Quake2
#123412 - kusma - Wed Mar 28, 2007 12:01 am
simonjhall wrote: |
The lighting is a two-step process.
Step 1 is to render the entire scene, twice, with the Z writes set to 'equal', using the lightmap as the texture map and a bit of polygon transparency. I don't use a second pass (ie requiring a capture) so when I'm outa poly count that's it for lightmapping!
Step 2 is for when I've got insufficient poly count to render the lightmap polygons. It's basically vertex lighting, and it works better than I expected!
|
Huh, is there a good reason why you're not using the lightmap-cache thingie that's already in there? It's designed for rasterizers without multi-texture support, you know ;)
#123414 - tepples - Wed Mar 28, 2007 12:08 am
kusma wrote: |
Huh, is there a good reason why you're not using the lightmap-cache thingie that's already in there? It's designed for rasterizers without multi-texture support, you know ;) |
Limited RAM perhaps?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#123418 - Dood77 - Wed Mar 28, 2007 12:27 am
simonjhall wrote: |
PS dood77: you mentioned recently that you might do a YouTube vid. If I send you a build with that pentagram fix, you wanna make that vid? I'm too lazy to do it myself! |
Sure! My camera doesn't do sound, although if I recorded with my voice recorder at the same time I might be able to sync it up... send away!
#123451 - OOPMan - Wed Mar 28, 2007 8:46 am
simonjhall wrote: |
The question is: can the homebrew community stand another game with pink monsters?!
|
Now that is the *real* question, eh :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#123458 - simonjhall - Wed Mar 28, 2007 9:25 am
@kusma, yeah I *will* try the surface cache at some point, honest! - I just keep putting it off! I want to get it to run au naturale before I give up bring back bits of the software renderer. I don't think memory usage is gonna be a huge issue (I used to run the software renderer with a 60k surface cache) but I'm worried about the amount of computation required to generate these surfaces, as this was one of the reasons why the software renderer ran so slowly! It may lurch bigtime every time you enter a new room...
Maybe I can rewrite it in fixed-point... (WHY didn't they put an FPU in the DS?!)
@dood77, that's ok - I'll just give you a build without sound (like normal!)
@oopman, I may as well just go for it and release it in it's current state as I'm gonna be outa action for a while soon (as I'm about to go from being a South-Londoner to a North-Londoner) :-)
_________________
Big thanks to everyone who donated for Quake2
#123477 - kusma - Wed Mar 28, 2007 1:13 pm
simonjhall wrote: |
I don't think memory usage is gonna be a huge issue (I used to run the software renderer with a 60k surface cache) but I'm worried about the amount of computation required to generate these surfaces, as this was one of the reasons why the software renderer ran so slowly!
|
If that's a worry, I could look into writing some optimized code for this for you. A shade-table should do the trick, I think.
#123543 - simonjhall - Wed Mar 28, 2007 11:21 pm
Cool man. I reckon I'll need a second(+) set of eyes going over this game at some point to spot the obvious things that could be improved. And it sure sounds like you know what you're doing with an ARM CPU!
I should really re-learn ARM assembly...(yet another ISA to learn, at least it's simple though)
_________________
Big thanks to everyone who donated for Quake2
#123582 - OOPMan - Thu Mar 29, 2007 8:10 am
simonjhall wrote: |
@oopman, I may as well just go for it and release it in it's current state as I'm gonna be outa action for a while soon (as I'm about to go from being a South-Londoner to a North-Londoner) :-) |
Good luck with that then. I was an East Londerer (Mile End, to be precise) for about 3 months, but now I'm back in my own country, so it's all irrelevant ;-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#123601 - souLLy - Thu Mar 29, 2007 3:26 pm
simonjhall wrote: |
I'm about to go from being a South-Londoner to a North-Londoner) |
TRAITOR
;P
#123851 - simonjhall - Sat Mar 31, 2007 9:57 pm
Wotcha guys,
I just spent all day rewriting the model loading stuff so that less temporary storage is required. Yeah, fun :-)
This does mean that the game should no longer thrash to/from disk in the heavier parts of the game. Plus big stuff that never worked before can now be loaded into the engine!
Just to test this new loader I added some quick mod/total conversion support to allow you to easily start different games. And sha-zam, the Malice TC now runs on the DS!
So for those who played this (awesome) total conversion, here's some screenshots to rekindle those memories:
In the submarine:
http://img232.imageshack.us/img232/9480/imgp0507cy1.jpg
That weird console font they use:
http://img61.imageshack.us/img61/8596/malicefontot5.jpg
And that cool-ass shotgun: (I couldn't find the flamethrower to test)
http://img65.imageshack.us/img65/4624/malice1jw3.jpg
Framerate is surprisingly bonze - shame you can't run too many levels though as the average level is a whole megabyte larger than the regular Quake levels :-(
Also Malice requires more keys than the DS has! (time to write that touch-buttons code...)
Dood77: all the saves that you sent me run fine now ;-)
_________________
Big thanks to everyone who donated for Quake2
#123858 - Epicenter - Sat Mar 31, 2007 11:04 pm
Simon, mind if I give that a whirl? I think it'd play a lot better with some of the stuff I'm trying that uses custom progs.
#123859 - Dood77 - Sat Mar 31, 2007 11:18 pm
Awesome! I like how the gun models are rendered now, but i noticed theyre not anti-aliased, is this in the plan? Ooh, and what of support for team fortess? This one will likely require an on-screen keyboard though... And i've been meaning to do that youtube video, although I realized I let my sister borrow my camera on her spring break... she should be back monday though. And of course if this build runs much better, go ahead and send it along for youtube instead...
#123911 - simonjhall - Sun Apr 01, 2007 11:57 am
Yeah, it's meant to be antialiased but I've found that AA on the DS is pretty hit-and-miss, so it doesn't seem to work anymore, despite me giving stuff different poly IDs etc. Huh.
Never played Team Fortress, so I don't really know too much about it. As long as it fits within the restrictions I've imposed then it should run and load, but I dunno how playable it'll be without (as you say) a keyboard.
_________________
Big thanks to everyone who donated for Quake2
#123958 - Dood77 - Mon Apr 02, 2007 3:00 am
It was one of the first major mods for quake. I think the only problem is finding an old NQ build, its been updated numorous times for QW. And the only thing you need a keyboard for is choosing your class with the numbers and stuff, just basic menu interaction.
But since its multiplayer and this is only NQ then I'm really not to keen on having it very soon, just curious.
#123961 - Doom5 - Mon Apr 02, 2007 3:29 am
Simon: Great progress! Incredible reading all the way from page 1, to where you are now.
Any chance of you having the option for extra ram to be used in Quake 1, so that load times/mod compatibility would be better? I don't know if having a base and separate extra memory version would be too much of a pain in the butt, in terms of keeping both version in sync with each other.
Enjoy your week!
#123988 - simonjhall - Mon Apr 02, 2007 9:53 am
@doom5: you read 42 pages of this?? ;-)
I was gonna release the second pre-release yesterday, but I'm gonna hold off until I can get yet more features into the game - and one of them is extra RAM support! The code is all ready to support extra RAM (I wrote everything for that a few pages back when I tried putting sound in that memory) so it wouldn't be TOO hard to offload big levels to extra RAM.
The thing is - the memory management for Quake (and to a lesser extent, Quake 2) is completely whack, so I dunno how hard it will be to shoehorn in a second memory space! However, if (say) 1% of the people who play this wanna run mods/TCs, is it worth the effort?
Btw, what card do you have? I've got a Supercard and an EZflash 5, so I'll be able to add support for those.
_________________
Big thanks to everyone who donated for Quake2
#123995 - Shtroodle - Mon Apr 02, 2007 11:53 am
Hey Simon,
just wanted to ask about the benefits of having a slot-2 solution with extra RAM. I know you've mentioned before that it would not be required for Quake alone, so I'm guessing you're talking about mods, right?
And the news about pre2 sound great - looking forward to it. By the way - are monsters still pink? ;)
#123996 - Doom5 - Mon Apr 02, 2007 12:03 pm
simonjhall wrote: |
The thing is - the memory management for Quake (and to a lesser extent, Quake 2) is completely whack, so I dunno how hard it will be to shoehorn in a second memory space! However, if (say) 1% of the people who play this wanna run mods/TCs, is it worth the effort?
Btw, what card do you have? I've got a Supercard and an EZflash 5, so I'll be able to add support for those. |
I run a Supercard; I don't have an idea on what would be the best way to tackle on deciding what should go into extra memory, and how unfortunatly. Setting up a memory management system cannot be a simple task on the DS...
The ability to run mods/TCs turns the game from just Quake, to a ton of different other games; giving it virtually endless replayability. That's where I see the value in it.
As you're well aware, it's your project, and keep it going in the direction that ultimatly makes you happy :) I don't think there's one of us that isn't impressed with what's been done already.
#124015 - simonjhall - Mon Apr 02, 2007 2:13 pm
Yeah, this is for mods and total conversions. I know that I'm gonna regret saying this: I can guarantee that every standard Quake level will be playable on a regular four-meg DS. You won't need any extra memory to play.
However, for levels which are out of my control I can't make such a guarantee. I'll try and make a special (extra mem) build which is as compatible as possible, but I don't wanna be getting endless emails from people who wanna play some obscure mod ;-)
I may be able to improve the co-op compatiblity with slot-2 memory too...
That's not to say that mods or TCs won't run on the regular 4MB build, you'll just have to be a bit more careful when you're trying to run that total conversion which requires a P200 and 32 megs of RAM! Also don't forget that the memory in the RAM expansion is not as fast as main memory and that it can't be used as texture memory...
And pink monsters? I thought you liked them! I'm also gonna try and get some extra (non-standard Quake) graphical effects into the newest build...
Also, yeah memory management in the DS is an arse. I've got a custom memory manager for main memory, extended memory, texture memory, sound memory... (thank god there is no more memory in the system!)
_________________
Big thanks to everyone who donated for Quake2
#124148 - Epicenter - Tue Apr 03, 2007 4:14 pm
simonjhall wrote: |
However, if (say) 1% of the people who play this wanna run mods/TCs, is it worth the effort? |
I'll gladly donate a lot more to see it happen in addition to what I'm working on as far as optimizing the VM a.k.a. Progs-- since I and my partner-in-crime HydraLancer are working on building 2 entire games based on the Quake engine with the DS specifically in mind, the more extensible the system is and the more able we are to use its full capabilities the better! :)
#124512 - simonjhall - Fri Apr 06, 2007 1:57 pm
Yet more pics, this time QuakeDS handles transparent water. "Big whoop", you may be saying, "how hard can that be?", but Quake doesn't have proper support for transparent stuff. Quake 2 does though.
Anyway, if you wanna know more about transparency in Quake and what you have to do, here's a site which gives info:
http://retroquake.planetquake.gamespy.com/blog/?p=34
There are three ways of doing tr water:
- disabling all visibility checking (r_novis in GLQuake); this will totally crank the polygon count and makes the framerate crawl
- revis your maps (slow, takes ages)
- patch your bsp/pak files (fast)
And some average pictures:
Here's a shot from 'e1m1' above water
http://img172.imageshack.us/img172/718/e1m1abovelz7.jpg
And the same shot from underwater
http://img172.imageshack.us/img172/9137/e1m1belowio8.jpg
The entrance to 'e4m1' from 'start'
http://img172.imageshack.us/img172/686/starte4m1zf6.jpg
The beginning of 'e4m1' after you fall down that big hole at the start into the water and look up
http://img244.imageshack.us/img244/6505/e4m1pr8.jpg
Yeah, pretty low-quality shots! Should have found some better stuff...
Here's a teleporter from 'd6'
http://img244.imageshack.us/img244/876/d6teleqi9.jpg
Now who thinks transparency on multiplayer games is cheating? ;-)
_________________
Big thanks to everyone who donated for Quake2
#124514 - PeterM - Fri Apr 06, 2007 2:06 pm
Ooh pretty!
Yes, transparent water in multiplayer is cheating. If you can see an enemy through the water but they can't see you, you have an unfair advantage.
_________________
http://aaiiee.wordpress.com/
#124513 - Miika - Fri Apr 06, 2007 2:06 pm
Simon, have you made the lighting and/or textures for models yet?
When is the next release?
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#124516 - simonjhall - Fri Apr 06, 2007 2:22 pm
Miika,
http://img183.imageshack.us/img183/6947/ogree1m3sl3.jpg
I tried to gets some snaps of the zombies too but they kept moving! It's *really* hard to photograph the screen of a DS. It's like photographing an interference pattern!
But yeah, monster textures and lighting etc is in there. Monsters aren't lit though at the moment and I should really add that...
EDIT: Peter, I had a look at Q3A yesterday and I got pretty put off by the massive file which maps Q3 GL commands to the native GL implementation. Plus when I realised I didn't have the pak files with me I just gave up! Score.
_________________
Big thanks to everyone who donated for Quake2
#124518 - Miika - Fri Apr 06, 2007 2:55 pm
simonjhall wrote: |
Miika,
http://img183.imageshack.us/img183/6947/ogree1m3sl3.jpg
I tried to gets some snaps of the zombies too but they kept moving! It's *really* hard to photograph the screen of a DS. It's like photographing an interference pattern!
But yeah, monster textures and lighting etc is in there. Monsters aren't lit though at the moment and I should really add that...
|
Ooooh that looks awesome! Can't wait for the next release...
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#124525 - Shtroodle - Fri Apr 06, 2007 4:11 pm
Wow! I don't remember Quake 1 looking that good!
Although that ogre kinda looks like a midget to me - bad angle I guess ;)
But seriously, great work Simon - I'm eagerly awaiting the release.
#124531 - simonjhall - Fri Apr 06, 2007 5:16 pm
Shtroodle wrote: |
...I'm eagerly awaiting the release. |
Yeah, me too! Not too many features left to get into the game now.
Anyone have any special requests? For instance things you've seen in other ports (eg graphical effects) or DS-specific stuff you'd like.
Just for kicks I may see if I can get it so you can hold the DS book-style and then span the 3D display across both screens...
_________________
Big thanks to everyone who donated for Quake2
#124537 - Mr. Picklesworth - Fri Apr 06, 2007 6:36 pm
Oooh, even nicer!
I'd like to know how your RAM expansion stuff is going to work. How I'm guessing is that it would cache files in the extended RAM, then as they become necessary they get moved into the real RAM. Sounds like lots of memory management bother, though, so am I completely wrong?
One suggestion: Can that HUD (maybe the menu as well) be moved to the bottom screen? If it's not too difficult, it could be worth a try. May look nicer :)
_________________
Thanks!
MKDS Friend Code: 511165-679586
MP:H Friend Code: 2105 2377 6896
#124540 - simonjhall - Fri Apr 06, 2007 7:31 pm
I'd like to move graphics to the bottom screen and I do intend to do it, but the only reason I haven't done so so far is cos I haven't got a VRAM bank big enough to make it look high-res enough! It's in the works :-)
RAM expansion: I've done the work to see what I need to move and I reckon it's quite doable without too much work... I'd like to put the world into extended memory as that's normally the biggest object by far, and leave the Alias and brush models in main memory.
I guess there's a decision to make here: should I allow big levels or lots of varied models? There are advantages and disadvantages to doing either... (eg framerate would be better if the world was in main memory)
_________________
Big thanks to everyone who donated for Quake2
#124541 - Dood77 - Fri Apr 06, 2007 7:35 pm
Woah! Those pics are amazing! Hows the framerate? I noticed one time that the game really chugs when theres lots of enemies on the screen, like when I tried nightmare on the first episode, I think on average it was 10 - 15 fps, but of course theres no meter...
Anyway if you wanna send this one along for my youtube video go ahead, I would might testing this one out... unless you're planning on pre-release 2 very soon, then I'll wait :)
#124543 - simonjhall - Fri Apr 06, 2007 8:01 pm
(continuing the extra memory thing)
..yeah, I reckon I could do some kind of cache thing to push out old models into extended memory. I just dunno if I can be bothered though - Quake's memory manager is just awful (in my opinion) and I don't think it'd enjoy me messing around with it like that! I'm sure it's good for the situations it was written for, but it's not cool for a low-mem solution like the DS. There is a caching structure built into it though, so maybe I can use that...
@dood: the transparent stuff should run without penalty assuming you have vis'ed maps. If you don't (and want transparent stuff) then you have to disable all visibility testing and the framerate drops quite a lot.
I can't remember which build I sent you last but the model renderer is 3x faster than it used to be. Texturing takes no extra processing time. Swapping textures in and out does have it's costs though - but you don't really notice it when the ARM7 swaps sounds in and out...
The reason it gets slow when you've got lots of monsters in the mix is because a key function is still done in floating point and I'm having a hard time making it better. Once I can sort it in-game framerate should be much better. It's literally the bottleneck of the entire game! Rendering takes like 10ms...
_________________
Big thanks to everyone who donated for Quake2
#124544 - Shtroodle - Fri Apr 06, 2007 8:20 pm
@Simon
Few days back you mentioned a possibility of AA implemenation into your build of Quake. Is this thing really doable and what are the main complications?
#124547 - simonjhall - Fri Apr 06, 2007 8:26 pm
As in antialiasing? If so, well it used to work. The hardware is supposed to do it for you, assuming you render the stuff you want antialiased with different polygon ids. However I'm doing that now and it's not making any difference! Ah well ;-)
_________________
Big thanks to everyone who donated for Quake2
#124548 - PeterM - Fri Apr 06, 2007 8:29 pm
Hmm, is it possible to take screenshots in-engine? On the PSP we can access the framebuffer RAM directly, but on the DS can you use "capture" (whatever that is - I'm a DS graphics newbie)?
_________________
http://aaiiee.wordpress.com/
#124560 - elhobbs - Fri Apr 06, 2007 10:03 pm
you can use the capture hardware for screenshots but it requires a full VRAM bank to store the image
#124565 - Ant6n - Fri Apr 06, 2007 11:06 pm
wouldnt that mean one could basicly capture inot one of the banks overwriting whatever is there; so that during playing one could get one screenshot (with game sorta stopping afterwards)?
#124683 - xskater101189 - Sat Apr 07, 2007 7:20 pm
I've been following this thread for a while now, guess its time I finally joined these forums. Simon great work so far, when are you planning on getting pre release two out?
#124795 - simonjhall - Sun Apr 08, 2007 7:27 pm
Thanks man ;-)
I was gonna do pre2 last week/the week before, but it was gonna be earlier than I planned as I'm moving house on Saturday. I really wanted to get some key stuff in but there wasn't time, and I (and others) weren't happy with me releasing in that state!
So rather than oversaturate the market with ports/yet more Quake I thought I'd just defer it (call it skipping the second pre-release) and just go for a feature-complete build within a month.
I could do a pre-release tomorrow, however...as I've not tested the networking too much (I've not yet played online) and compatibility with many total conversions hasn't been tested I figure you'll enjoy playing with a completed game rather than playing something which is 'nearly there' ;-)
_________________
Big thanks to everyone who donated for Quake2
#124806 - xskater101189 - Sun Apr 08, 2007 8:28 pm
I wouldnt be upset with another pre release but if you want to hold off I guess I can keep up my patience (which unfortunately I lack most of the time) but anyhow great job with the game, cant wait to try out the next build be it complete or not.
#124815 - Miika - Sun Apr 08, 2007 9:42 pm
xskater101189 wrote: |
I wouldnt be upset with another pre release but if you want to hold off I guess I can keep up my patience (which unfortunately I lack most of the time) but anyhow great job with the game, cant wait to try out the next build be it complete or not. |
Seconded. :)
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#124922 - Tockit - Tue Apr 10, 2007 1:57 am
simonjhall wrote: |
Anyone have any special requests? For instance things you've seen in other ports (eg graphical effects) or DS-specific stuff you'd like.
Just for kicks I may see if I can get it so you can hold the DS book-style and then span the 3D display across both screens... |
any chance of seeing touch screen buttons added with open bindings for weapon changing, or say grappling hook mods?
anyone feel like starting a DS-based Quake clan website??
it'd be awesome to have a place to organize online games - perhaps an IRC #?
just some ideas to kick around.
_________________
-01011101001010101010 (frank)
#124934 - Epicenter - Tue Apr 10, 2007 4:04 am
[quote="Tockit"] simonjhall wrote: |
any chance of seeing touch screen buttons added with open bindings for weapon changing, or say grappling hook mods?
anyone feel like starting a DS-based Quake clan website??
it'd be awesome to have a place to organize online games - perhaps an IRC #?
just some ideas to kick around. |
Actually, Simon and I were discussing just that, re: the touch-screen weapon selection. They'd trigger impulses in QuakeC so you could have a good bit of flexibility, maybe have them do different things per mod. I was also thinking having it store your items like Quad, Ring of Shadows, the Biosuit, or the Pentagram of Protection for later and you could touch the icon to use it when you really need it. This will require some underlying code in a custom progs but I'm making one anyway, so it wouldn't be tough to implement that.
#124935 - tepples - Tue Apr 10, 2007 4:12 am
Epicenter wrote: |
I was also thinking having it store your items like Quad, Ring of Shadows, the Biosuit, or the Pentagram of Protection for later and you could touch the icon to use it when you really need it. |
Kirby Squeak Squad style, right? But wouldn't that change the game balance significantly?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#124944 - Dood77 - Tue Apr 10, 2007 6:44 am
Actually more like quake II style with a touch screen. And yes, it would change the game very much... online usually the game is so incredibly fast paced that if you can actually get the quad you need to use it right then.
But yes, touch screen buttons bound to impulses, or better yet custom coded keys (e.g. the current BUTTON A etc.) would be very helpful.
What would be extremely sexy is custom icons for those buttons, and the ability to resize and move those buttons with some kind of an editor that would use a grid you snap to... And then again it would be cool to play flash games and watch youtube videos on the DS as well.
#124970 - simonjhall - Tue Apr 10, 2007 2:07 pm
I'm gonna be adding some touch buttons at some point soon, although they're low on the to-do list. However the to-do list now only has four (main) things left in it, so I'll be writing it soon! I'm thinking that a button will act as a virtual key, and you'd be able to bind functionality to it just like you would a real key.
I can't promise graphical icons on the touch buttons though as VRAM is so low it hurts.
Oh and Quake clans would be a right laugh. It'd be very cool to know that everyone you're playing against is playing on a DS. I could make some adjustments to the code too to ensure that you're only playing against DS clients...
_________________
Big thanks to everyone who donated for Quake2
#125023 - Dood77 - Tue Apr 10, 2007 11:17 pm
simonjhall wrote: |
I can't promise graphical icons on the touch buttons though as VRAM is so low it hurts. |
I figured as much :P
simonjhall wrote: |
I could make some adjustments to the code too to ensure that you're only playing against DS clients... |
As long as you make it still able to connect to PC clients, just have it tell you when a client is a DS one. (something in showscores)
#125412 - Epicenter - Fri Apr 13, 2007 3:48 am
tepples wrote: |
Epicenter wrote: | I was also thinking having it store your items like Quad, Ring of Shadows, the Biosuit, or the Pentagram of Protection for later and you could touch the icon to use it when you really need it. |
Kirby Squeak Squad style, right? But wouldn't that change the game balance significantly? |
This would be in a custom progs with other changes/improvements so you wouldn't have to use it if you didn't want to. If you connect to a stock Quake server you'll be using the server's progs anyway.
#125421 - Darkflame - Fri Apr 13, 2007 4:39 am
Touchscreen buttons didnt work well in Metroid, imo.
Aiming was wonderfull and fast with the thumbstrap, but then that stupid button at the bottom was too small to click.
[/2cents]
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.
#125504 - Dood77 - Sat Apr 14, 2007 1:48 am
the button on the bottom left for alt-form? i usually used my left thumb for that instead of the one of aiming, worked flawlessly, unless you count the fingerprints.
#125769 - Tockit - Mon Apr 16, 2007 8:41 pm
oi simon,
I was thinking: would it be possible to tweek the touch screen so that it "gives" a little, so to say, before it turns? kinda hard to explain what I'm talking about...
pop in metroid prime: hunters, and you'll see what I mean. if you play on the touch screen for a bit, you'll notice that the more miniscule movements that you make kind of just move the crosshair, without making the screen it'self move. it greatly cuts down on the jerkiness of the overall experience. it's just ever-so-slight.
there's a few other FPS on DS that didn't bother with this, and they're all a bit jumpy and... well... crappy in the aiming department.
goldeneye, and bionical heroes, to name a few.
any input?
_________________
-01011101001010101010 (frank)
#125773 - Neil - Mon Apr 16, 2007 9:57 pm
Sounds like you might mean pitch and yaw, that should be changeable from the users config file. Although I've not played Quake 1 in many years so could be wrong. Are there settings for cl_pitch and/or cl_yaw in the cfg files?
#125775 - Dood77 - Mon Apr 16, 2007 10:53 pm
No, he means a bounding box. Like a small portion of the center of your aim where you can aim the gun and move the crosshair with out the whole feild-of-view moving, MPH uses this, as well as all the wii fps titles to date, but those bounding boxes are a lot bigger compared to the MPH one.
#125782 - simonjhall - Tue Apr 17, 2007 12:13 am
Soz, I been away from Quake for a bit - just moved house...
Anyway, I have no idea where I would hook in that sort of functionality, sorry! I'd imagine that it'd have to be done through the QuakeC interface. Although moving the crosshair itself is a bit funny, as Quake can't do that (only me!)
But yeah anyway, at the moment I'm STILL doing performance tuning. I'm working on the levels which are slow (as the VM is slow) and I'm trying to double the performance. Although I'm getting really bored of it, so I may just release it still running slow...
_________________
Big thanks to everyone who donated for Quake2
#125793 - tepples - Tue Apr 17, 2007 2:04 am
If you've never played MPH or a Wii FPS, the R button cursor in GoldenEye 007 for Nintendo 64 has similar behavior.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#126010 - Tockit - Thu Apr 19, 2007 3:57 am
I've been really curious as to how the console and wifi will be implemented.
the other quake port, using telnet as the console, was actually surprisingly pretty usable. but without a computer and a wifi hub around, one is left console-less.
I was happy to find I was actually able to connect my comp and DS for a wifi match. deathmatch and coop both worked.
but I'm very aware of how different your methods are in porting this, so really - I'm hoping for any details as to how you've implemented the console and multi player features..?
cheers!
_________________
-01011101001010101010 (frank)
#126015 - Dood77 - Thu Apr 19, 2007 5:18 am
Yeah I thought the telnet thing was a good idea, but it can be beat by an on screen keyboard, it can't be that hard, can it? (I've been pushing for this for a long time :P) And full compatibility with the PC client would be nice too.
But rather than either of those it would be amazing if quakeworld was ported, then games over IP would be, well playable. (that is, without all those HPB tricks prominent back in the day...)
#126020 - simonjhall - Thu Apr 19, 2007 8:12 am
What would you want to use the console for?
_________________
Big thanks to everyone who donated for Quake2
#126030 - simonjhall - Thu Apr 19, 2007 1:53 pm
Touche.
Looks like nobody really wants a console (or shortcuts) then! Less code for me ;-)
But unrelated: the game is still progressing - just slowly. Just moved house and it's been a very tough week at work... Must get rid of Quake soon...
_________________
Big thanks to everyone who donated for Quake2
#126038 - kusma - Thu Apr 19, 2007 2:33 pm
simon: If you wanted some help with optimizations on that surface-cache, i'm all ready to work now. Easter-deadlines has been met, and I have no big personal projects running anymore.
#126042 - Miika - Thu Apr 19, 2007 3:11 pm
Simon, have you done the texture downscaling when standing with a little distance from objects? Maybe not a good description but for example in GP2X Quake, when going further away the textures in for example walls, becomes more pixelated the further away you go. I think you can adjust this, because on the DS screen some of this wouldnt maybe be very noticeable.
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#126045 - kusma - Thu Apr 19, 2007 3:51 pm
The technique is called Mipmapping. Unfortunately, to do it efficiently you would need more memory. It really does do some wonder both for quality (by reducing visual aliasing) and performance (better cache patterns for texel-fetches), but it's 33% increased memory usage might be a stopper for it.
edit: Additional note: With some "clever redesign" of the surface cache, it might actually end up requiring less memory as most textures would not need the full-resolution surfaces most of the time. It's something that might be worth doing a quick profile-run on...
#126048 - simonjhall - Thu Apr 19, 2007 4:29 pm
Yeah, mip-mapping isn't supported in hardware so I dropped it. Plus it takes loads of memory! Using mip level one it takes me normally 100k (for a smallish level) for the world textures or 400k if I want to use mip level zero. If I want to include all the mip levels it's more like 500k+. I don't have that much memory free...
In fact it looks a bit ropey when running with full quality on that screen as you get lots of aliasing etc. But yeah, it could be done with the surface cache technique.
Kusma, I still do reckon the surface cache is the way forward for high-quality renderering. However I've started way too many things at the moment and the code's not in a good state with regards to modifying the rendering further at the moment!
Instead (as you seem pretty good at this optimising lark), reckon you could help with improving the performance of the server and VM stuff? I've done my best with plain C, but lots of stuff still needs to be faster and I *know* the machine can do it! I just don't have the time!
Or does that sounds really boring to you? ;-)
_________________
Big thanks to everyone who donated for Quake2
Last edited by simonjhall on Fri Apr 20, 2007 8:05 am; edited 1 time in total
#126095 - Dood77 - Thu Apr 19, 2007 11:48 pm
simonjhall wrote: |
Touche.
Looks like nobody really wants a console (or shortcuts) then! Less code for me ;-) |
I hadn't had time to read/post...
One of my main reasons for just wanting an on screen keyboard is for chatting in multiplayer. You could just make a function that does messagemode and also displays the keyboard. 'nuff said?
So why would you want the console in the original game in the first place?
I can think on millions of things. One of them is that there are tons of people who like setting up stuff in the console rather than using the arrows for the menu.
Also while hosting a game you can mess around with plenty of variables like gravity and all that stuff.
You've been concerned about compatibility with mods and such, a ton of these have custom console functions (like the hook and stuff) and unless you know exactly what you're doing it would be tedious to write out all the binds in the config.cfg and then test it to see if you got it right. Easier would be to test it in-game with the console and write it down for later use.
Aliases. They make weapon switching, for one, a TON easier. You can make an alias that readies your best available weapon and fires it right then. Almost everybody does it in multiplayer. Theres also the capability for a zoom-in script, possibly put to best use in some mods, and one-button rocket jumps.
Do I really need to go on?
#126121 - Tockit - Fri Apr 20, 2007 4:12 am
Dood77 wrote: |
simonjhall wrote: | Touche.
Looks like nobody really wants a console (or shortcuts) then! Less code for me ;-) |
I hadn't had time to read/post...
One of my main reasons for just wanting an on screen keyboard is for chatting in multiplayer. You could just make a function that does messagemode and also displays the keyboard. 'nuff said?
So why would you want the console in the original game in the first place?
I can think on millions of things. One of them is that there are tons of people who like setting up stuff in the console rather than using the arrows for the menu.
Also while hosting a game you can mess around with plenty of variables like gravity and all that stuff.
You've been concerned about compatibility with mods and such, a ton of these have custom console functions (like the hook and stuff) and unless you know exactly what you're doing it would be tedious to write out all the binds in the config.cfg and then test it to see if you got it right. Easier would be to test it in-game with the console and write it down for later use.
Aliases. They make weapon switching, for one, a TON easier. You can make an alias that readies your best available weapon and fires it right then. Almost everybody does it in multiplayer. Theres also the capability for a zoom-in script, possibly put to best use in some mods, and one-button rocket jumps.
Do I really need to go on? |
I second all of this. and the list could go on.
anyhow, even the telnet console was easily usable, but if you're not feeling it, then I won't press the matter.
but I'm inclined to point out that the console was half the reason, in my opinion, that quake was as good a game as it was. and still is. ;)
anyhow, I'm excited for you, and I think this is going to be a great step for the homebrew community. it needs something like this to really show off what the DS is capable of. ;-D
cheers sir!
_________________
-01011101001010101010 (frank)
#126131 - simonjhall - Fri Apr 20, 2007 8:08 am
Yeah, alright then. I'll have a think today about what code is needed.
Quote: |
Theres also the capability for a zoom-in script |
Got any info on this?
_________________
Big thanks to everyone who donated for Quake2
#126133 - Lick - Fri Apr 20, 2007 8:57 am
Zoom-in? I think it's simply a change of the perspective. If you make the viewing angle smaller, the screen looks zoomed in. That's how they do sniper rifles in commercial games.
_________________
http://licklick.wordpress.com
#126134 - Spike - Fri Apr 20, 2007 9:00 am
simonjhall wrote: |
Yeah, alright then. I'll have a think today about what code is needed.
Quote: | Theres also the capability for a zoom-in script | Got any info on this? |
Here you go.
Code: |
// Zoom
bind c +zoom
alias +zoom "fov 22;m_pitch 0.005;m_yaw 0.005"
alias -zoom "fov 90;m_pitch 0.022;m_yaw 0.022" |
#126135 - simonjhall - Fri Apr 20, 2007 9:11 am
Ah, interesting! That's what I thought they'd do, to be honest.
Changing the (quake) fov variable won't actually change the field of view at the moment for the rendering, but it it will increase the amount of polygons which are clipped on the screen! So as you decrease the number it'll just show less stuff on the screen. It's a cool effect!
Not useful though.
_________________
Big thanks to everyone who donated for Quake2
#126140 - kusma - Fri Apr 20, 2007 9:38 am
simonjhall wrote: |
Kusma, I still do reckon the surface cache is the way forward for high-quality renderering. However I've started way too many things at the moment and the code's not in a good state with regards to modifying the rendering further at the moment!
Instead (as you seem pretty good at this optimising lark), reckon you could help with improving the performance of the server and VM stuff? I've done my best with plain C, but lots of stuff still needs to be faster and I *know* the machine can do it! I just don't have the time!
Or does that sounds really boring to you? ;-) |
I'm a bit more of a graphics-feature junkie, but I can sure help out a bit if you give me some pointers to what the bottle-necks are. I'd REALLY like to see light-mapping implemented in the future though, since it kind of makes things look... not shit ;)
#126216 - Dood77 - Sat Apr 21, 2007 1:23 am
kusma wrote: |
I'd REALLY like to see light-mapping implemented in the future though, since it kind of makes things look... not shit ;) |
YES that would be amazing. To tell you the truth sometimes I liked the full-bright version better than the partially lighted current version...
simonjhall wrote: |
Changing the (quake) fov variable won't actually change the field of view at the moment for the rendering, but it it will increase the amount of polygons which are clipped on the screen! So as you decrease the number it'll just show less stuff on the screen. It's a cool effect!
Not useful though. |
LOL xD I need to try that out :P
I realize that there are probably many people who use Spike as a screen name but... could you be the developer of FTEQW...?
#126265 - bear - Sat Apr 21, 2007 1:49 pm
What I'd want the console for is primarily the "map" command to be able to start any map of my choice...
#126285 - Dood77 - Sat Apr 21, 2007 9:04 pm
As I said... the list goes on...
#126813 - xskater101189 - Fri Apr 27, 2007 12:04 am
So any progress being made lately? Can we expect a release anytime soon?
#126819 - Ant6n - Fri Apr 27, 2007 1:24 am
i've looked at your underwater pictures there, and noticed that there doesnt seem to be the underwater warping effects quake has. When fiddling with some gba i noticed that one way of getting that effect on the gba would be to render on a surface (has to be done on gba anyway) and scale every scanline in the x-direction by like 1.02 and offset each scanline a little bit, i.e. by a sine-function along all scanlines. i dont know exactly how the ds renders stuff, but maybe something similar could be done to get some water fx going.
#126827 - Tockit - Fri Apr 27, 2007 3:21 am
oi simon,
what's this I read about ad-hoc being implemented...?
is this true?? are you really the chosen one of homebrew who will do this?
I really think an ad-hoc lib would change the scene. there is none in existance, am I correct?
do it. I'll send you a beer in the mail for your efforts.
two beers!
two beers, simon... :P
_________________
-01011101001010101010 (frank)
#126831 - tepples - Fri Apr 27, 2007 4:00 am
Ant6n wrote: |
i've looked at your underwater pictures there, and noticed that there doesnt seem to be the underwater warping effects quake has. |
Neither does Super Mario 64 DS. Nor do the underwater scenes of documentaries on Discovery Channel. It looks to be a phenomenon specific to Quake. But is underwater warping desirable enough to go to the trouble of reserving half the texture VRAM for rendering to texture and then using HDMA to offset individual scanlines of the rot/scale background?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#126833 - sajiimori - Fri Apr 27, 2007 4:09 am
I thought you could already use HDMA on the 3D background without capture, but I could be mistaken.
You could also use the GLQuake method of moving the verts around.
But honestly, I was never that keen on the effect myself.
#126854 - simonjhall - Fri Apr 27, 2007 12:39 pm
Hello guys, again sorry for the lack of updates.
Anyway, I'm just about ready to finally get the next pre-release out, and I'll be sending a build or nine to my usual testers pretty soon. I'm aiming to release next weekend (as in 7+ days time).
I'm too lazy to search, but who was the person who said they could do some tests to see which mods/TCs worked?
Oh and for the technical people: in that thread where I was asking about uploading textures without flicker - in Quake I can unlock VRAM at about vcount ~150, but it must be locked again by 214 for flicker-free rendering.
Also the water effect you're talking about is called waterwarp. The PC version did as y'all suggested and just shift scanlines. The GL versions tesselate the geometry bigtime (I'm 90% sure of that) and sin/cos the verts to make the wiggle. Tesselating geometry for me is a serious no-no, and rendering to a VRAM bank is also a big no. Any other method? At the moment I just use heavy fog when underwater - and it looks pretty good I reckon... (what's HDMA?)
_________________
Big thanks to everyone who donated for Quake2
#126855 - tepples - Fri Apr 27, 2007 12:45 pm
simonjhall wrote: |
(what's HDMA?) |
HDMA is the use of a DMA channel to update PPU registers at each horizontal blanking.
I say skip the water warp. Does water really work that way?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#126856 - PeterM - Fri Apr 27, 2007 12:46 pm
You could probably also do some projection matrix trickery to add some "aspect ratio, fov = x + y * sinf(time * z)" wobble to the projection. Pretty easy to do if you have a function like glPerspective available.
I'm pretty sure Zelda OoT did this when underwater. Maybe Mario 64 did too, I can't remember.
_________________
http://aaiiee.wordpress.com/
#126857 - kusma - Fri Apr 27, 2007 1:20 pm
PeterM wrote: |
You could probably also do some projection matrix trickery to add some "aspect ratio, fov = x + y * sinf(time * z)" wobble to the projection. Pretty easy to do if you have a function like glPerspective available.
I'm pretty sure Zelda OoT did this when underwater. Maybe Mario 64 did too, I can't remember. |
Ah, this is a really cool idea. I'd say go for it if it works :)
#126858 - bear - Fri Apr 27, 2007 2:10 pm
As part of the one-week-hack origins of glquake it's implementation also adds nasty cracks between the warped geometry so whatever you do don't copy that.
I am looking forward to the next release!
#126859 - Lord Graga - Fri Apr 27, 2007 2:30 pm
You could also do some kind of vertex-distorter based on sin/cos according to their x/y/z values. Would be kind of slow, though, I guess. Basicly just pass the coordinates through a distortion function before passing them to the polyfiller hardware.
#126865 - simonjhall - Fri Apr 27, 2007 3:18 pm
Yeah, this is similar to what I do on the teleporter, water, sludge and lava brush models. It only works in certain situations though, as if done in the wrong place you'll be able to see holes in stuff!
_________________
Big thanks to everyone who donated for Quake2
#126866 - Lord Graga - Fri Apr 27, 2007 3:24 pm
Not if you warp *all* vertices while underwater :)
#126869 - kusma - Fri Apr 27, 2007 6:23 pm
Lord Graga wrote: |
Not if you warp *all* vertices while underwater :) |
It could fail if the meshes have t-junctions...
#126870 - PeterM - Fri Apr 27, 2007 6:24 pm
I reckon that's what bear was talking about.
_________________
http://aaiiee.wordpress.com/
#126876 - simonjhall - Fri Apr 27, 2007 7:06 pm
I forgot - Kusma, after this (and the extended-ram) build is out, shall we have a look at this lightmapping thing? I did a pretty mammoth play through the game now to look for show-stopping bugs and found a few places where lightmapping could be cool :-)
_________________
Big thanks to everyone who donated for Quake2
#126892 - Lord Graga - Fri Apr 27, 2007 10:31 pm
kusma wrote: |
It could fail if the meshes have t-junctions... |
Sigh, yeah :/
#126908 - HyperHacker - Sat Apr 28, 2007 12:26 am
Ant6n wrote: |
i've looked at your underwater pictures there, and noticed that there doesnt seem to be the underwater warping effects quake has. When fiddling with some gba i noticed that one way of getting that effect on the gba would be to render on a surface (has to be done on gba anyway) and scale every scanline in the x-direction by like 1.02 and offset each scanline a little bit, i.e. by a sine-function along all scanlines. i dont know exactly how the ds renders stuff, but maybe something similar could be done to get some water fx going. |
Hmm. In 3D mode the 3D image replaces a background layer, right? Can you still scroll that layer like you can the 2D ones? If so, there's your warp effect right there; use a sine function to shift the X position back and forth in HBlank. Even Pok?mon Red/Blue were able to pull this off; if your layer is never going to move normally (and it doesn't in Pok?mon's battle scenes, only during animation) then you can even precalculate the X coord for each line, and only have to read a byte from an array and write it to the scroll register each HBlank.
tl;dr summary: Can the DS's 3D layer be scrolled like the 2D layers can?
_________________
I'm a PSP hacker now, but I still <3 DS.
#126915 - Lick - Sat Apr 28, 2007 12:49 am
HyperHacker: yes the 3D layer can be scrolled. It is was used to add texture filtering (sort of) in a demo.
_________________
http://licklick.wordpress.com
#126960 - kusma - Sat Apr 28, 2007 2:16 pm
simonjhall wrote: |
I forgot - Kusma, after this (and the extended-ram) build is out, shall we have a look at this lightmapping thing? I did a pretty mammoth play through the game now to look for show-stopping bugs and found a few places where lightmapping could be cool :-) |
sure thing!
#127001 - Tockit - Sun Apr 29, 2007 2:06 am
simonjhall wrote: |
I forgot - Kusma, after this (and the extended-ram) build is out, shall we have a look at this lightmapping thing? I did a pretty mammoth play through the game now to look for show-stopping bugs and found a few places where lightmapping could be cool :-) |
Am I to understand that there will be 2 releases - one for ram extension and one without? if so, what will be the advantages/differences of the ram-supported build?
I'm all kinds of curious now..!
_________________
-01011101001010101010 (frank)
#127005 - Dood77 - Sun Apr 29, 2007 3:22 am
Tockit wrote: |
Am I to understand that there will be 2 releases - one for ram extension and one without? if so, what will be the advantages/differences of the ram-supported build?
I'm all kinds of curious now..! |
Actually, there might well be 4 releases, one for average cards, one for ram, one for multiplayer, and another for ram and multiplayer.
Right now there is no ram enabled build (I believe)
As of the latest build I got yesterday, there is sound (no music though), partial lighting, full textures on all models, only some non-power of 2 textures are not working, and the skybox isn't textured at the moment. Expect a youtube vid from me today or tomorrow...
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#127015 - Dood77 - Sun Apr 29, 2007 7:25 am
Dunno if I should've edited my last or not, but I wanted it bumped:
I finished one cut of my video, theres probably gonna be 3 or 4 more.
This is the build sent to me yesterday, the video probably won't be there for a few hours or so... but heres the link:
http://www.youtube.com/watch?v=3_GVJkC9U6c
#127047 - simonjhall - Sun Apr 29, 2007 4:06 pm
There's gonna be three or four builds for pre2 - I haven't decided yet.
- single player, no extended memory - today, in a few hours time
- multiplayer, using sgstairs wifi stuff for infrastructure-based gaming - in a few days after I've done some more testing
- extended memory build (maybe including networking in there too) for full PC mod/TC compatibility - a few weeks time
The EXRAM build makes use of the extended memory provided by cards such as the Supercard, M3, Opera browser etc. Using Lick's RAM unlocking code... (that's ok right, Lick?)
This build allows you to run levels which won't fit on a stock DS, for example the Malice total conversion. As I've said before - you will not require this build in order to play the standard Quake levels. I have personally played every level from ep1-4 from start to finish on the regular QuakeDS build that'll be going out today...
The extended memory build also provides caching of things such as sounds and textures, a bit like L2 cache, to make the loading of these things a bit more snappy. In regular QDS these data files are pulled in from disk on demand, so this will improve loading times.
_________________
Big thanks to everyone who donated for Quake2
#127048 - Lick - Sun Apr 29, 2007 4:52 pm
Of course you can use the RAM Unlocking API, however, you should use the new version. I'm going to upload it to h**v*n in a few minutes.
_________________
http://licklick.wordpress.com
#127127 - Tockit - Mon Apr 30, 2007 5:34 am
Hey, so it looks LOVELY.
I've gotten a small mod to work on it, without any problems.
the only thing I noticed that I'd consider off is that I could find nowhere in the config file you provided for the PAD A and PAD B buttons for binding. I tried, accordingly, just adding in the following:
bind "PAD A" "+shrink"
bind "PAD B" "+grow"
but this didn't seem to work. I was trying to bind the two to make the chain raise and lower with the Tarzan style grappling hook mod.
is there something we can do to get the A and B buttons to work?
HOORAY QUAKE!!!!
Edit: yeah, so I figured it out. I was getting confused at first as to where the mod folder would go. I tried it originally in the id1. when that didn't work, for reasons which promptly became obvious, I surmounted that the mods go into the root of the card, as though it were my "quake" directory, parallel to the id1 directory. long story short - I was trying to edit the wrong config file.
still hoping to see touch screen buttons in the final release...! it'd be so great for mods and conversions!! :o
feckhing awesome work, my friend.
_________________
-01011101001010101010 (frank)
#127178 - MelGibson - Mon Apr 30, 2007 6:32 pm
Yeah It just looks sooo nice... I really love the feature to show polygons. Gives the whole game a "comic" look :D
#127181 - simonjhall - Mon Apr 30, 2007 6:58 pm
Thanks again for all the comments - although I obviously can't take credit for the development of the game!
I just fired up a copy of pre1 (as I still had it on one of my flash cards) just to compare and it looks *shit*. I can't believe I released it looking like that! And it's WAY too fast!
Btw try with VIS'd maps - I've been told that they 'just work' once you change the water alpha...
Oh and I'm glad you got mods working so easy - that's a relief! How obvious is it that you need to stick lots of newline in there? Did I make that too confusing?
But yeah, give it a few days and it'll be time for some DS clans I think :-D
Although I'm really looking forward to playing some total conversions (its just a shame that I've actually gotta write all the code for that...)
Thanks again for playing :-D
_________________
Big thanks to everyone who donated for Quake2
#127191 - MelGibson - Mon Apr 30, 2007 7:45 pm
simonjhall wrote: |
Thanks again for playing :-D |
Yeah.. thanks for the coding ;)
#127746 - Miika - Fri May 04, 2007 1:19 pm
Cool, a new release!
I thought it should release this weekend, but it was last week!
Now, it looks quite good and has a load of options, but why is that when new objects appear on the screen they are untextured for a small moment before they are becoming textured? Something to do with the memory?
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#127750 - tepples - Fri May 04, 2007 1:44 pm
Miika wrote: |
but why is that when new objects appear on the screen they are untextured for a small moment before they are becoming textured? Something to do with the memory? |
That, and it takes time to load an object from SD. Well at least untextured objects are better than Super Mario 64's coins that just pop in and out of view.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#127760 - simonjhall - Fri May 04, 2007 4:50 pm
tepples wrote: |
Miika wrote: | but why is that when new objects appear on the screen they are untextured for a small moment before they are becoming textured? Something to do with the memory? |
That, and it takes time to load an object from SD. Well at least untextured objects are better than Super Mario 64's coins that just pop in and out of view. |
Yeah, this was a design decision that I made when I realised that no amount of squeezing and down-ressing was gonna make the Alias textures fit in there.
The code will be faster in later builds (so the loading won't be so noticeable), but also in the EXRAM build it'll all get cached in extended memory so the loading will be even quicker.
But yeah, the speed of the SD/CF card is a big factor (as is the fragmentation on the your card). I was really worried about this, as it worked well on my CF card but I heard that SD was dead slow - so it was a pretty big risk but it definately paid off :-D
_________________
Big thanks to everyone who donated for Quake2
#127761 - Sunray - Fri May 04, 2007 5:22 pm
Loads quite fast on my DS-Xtreme. Less than a half second...
#127776 - Dood77 - Fri May 04, 2007 10:17 pm
The code will be faster in later builds (so the loading won't be so noticeable), but also in the EXRAM build it'll all get cached in extended memory so the loading will be even quicker.[/quote]
Is this because you haven't done any/much optimizing of the server code yet? Is this in the plan?
#127828 - simonjhall - Sat May 05, 2007 12:14 pm
The server stuff is the bottleneck for single player games, and much of it is still in fp.
The texture loading stuff (in particular the code which handles transparent colours) is slow and needs to be improved.
The extended RAM build caches the textures so a) you don't need to read them off disk and b) you don't need to do the Quake->DS transparency conversion every time you load that texture.
I could make a really fast texture loading function, but you'd see massive flickering on the screen.
_________________
Big thanks to everyone who donated for Quake2
#127830 - kusma - Sat May 05, 2007 12:58 pm
did you get my pm, simon?
#127831 - PeterM - Sat May 05, 2007 12:59 pm
You've probably already replaced any uses of doubles with floats, right?
I recently went through the PSP port, changing calls to sin() and friends to their float counterparts, getting rid of doubles not related to timing, and so on. It gave us a decent boost.
I know the DS doesn't have hardware float support, but double emulation is probably even slower than float emulation.
_________________
http://aaiiee.wordpress.com/
#127832 - Lick - Sat May 05, 2007 1:14 pm
Simon, how do you manage the external RAM?
_________________
http://licklick.wordpress.com
#127853 - simonjhall - Sat May 05, 2007 6:25 pm
I haven't actually gone looking for doubles. Are there any hot spots?
Plus I'm still using sin in the functions which calculate rotations - although they only take ~5ms. There are other much bigger functions to go after!
I'm keen to change the QuakeC VM from float->int, but that's going to be really tough, but will be worthwhile as I'm losing 9ms there...
To manage memory, in Q2 I use this:
http://gee.cs.oswego.edu/dl/html/malloc.html
In Q1 it's more of a homebrewed memory allocator for the things like textures, sounds etc. Models are cached here using the existing Quake memory system.
My fingers smell of chlorine...hmm...
_________________
Big thanks to everyone who donated for Quake2
#127856 - PeterM - Sat May 05, 2007 7:06 pm
I've no idea about hot spots. I basically removed all references to doubles other than those present in network messages and demo recordings.
_________________
http://aaiiee.wordpress.com/
#127890 - Ant6n - Sun May 06, 2007 5:50 am
simonjhall wrote: |
...
I'm keen to change the QuakeC VM from float->int, but that's going to be really tough, but will be worthwhile as I'm losing 9ms there...
...
|
I've been thinking about the whole fp issue, and was wondering whether it might be possible to handle floats in a non IEEE format to be handled more quickly. I.e. the following:
every float is stored as a s32 mantissa and s32 exponent (or shift on the mantissa). The only requirement on the mantissa is that the leading one is in the top 8 bits. There are no special cases like NaN, denormalized, infinity etc.
That way one would have at least 24 bits precision (like with IEEE), but arithmetic might be faster because
- floats dont have to be bit packed/unpacked
- no special cases except 0
- one doesnt have to find the leading one, only leading byte
its still slower than fixed ints, but one wouldnt need to worry about overflows; and one could use operator overloads to keep existing code to a certain extent (i think). Comparison is slower. Also, one would need more space to work with these, which is ok cuz arm has much more registers than x86. And one would need some convention for 0.
one a side note, does anybody have good resources of information on surface caching techniques mentioned a couple pages back? I find the idea intriguing, but there is only very general info in the abrash book.
anton
#127951 - simonjhall - Sun May 06, 2007 10:51 pm
So how would I do this? At the moment I have a fixed point class, which uses operators to emulate the fp interface, but underneath the hood it's fixed point. By changing loads of the existing floats to using this class the speed goes right up...
But it's still a pain, so something automatic (ie done by the compiler) would be nice!
_________________
Big thanks to everyone who donated for Quake2
#127959 - Ant6n - Sun May 06, 2007 11:42 pm
Oh. I thought that there might be a problem with overflow and/or underflow, or loosing precision; and that you spend a lot of time trying to figure out whether floats do not overflow/underflow etc, i.e. for which floats its 'safe' to use fixed instead.
The thing i proposed is basicly a fixed/float hybrid that would close to never under/overflow.
ever tried putting something crude like
#define float fixed
in the slow .c files?
#127963 - simonjhall - Mon May 07, 2007 12:11 am
Yeah, I thought about doing something similar! But now I've done all the 'easy' float->fixed conversion, and am left with the really gorey stuff which is gonna take some hard work...it had better be worth it!
Unrelated to the float->fixed thing, just a quick heads up of the EXRAM build I'm making. Here's a (quite long) video of the Malice total conversion 'just working' on the DS. No downsizing, no tweaking - just running.
It does however require the Supercard's extra RAM to actually run though... but I'm quite surprised by the lack of slowdown, as I'd expect the game to crawl since the SC RAM is much slower than the DS' main memory.
Oh and I have no idea how that cool rain effect is coded - I certainly didn't write it!
http://www.youtube.com/watch?v=4iEBpuuKkTI
Coming soon to the Nintendo DS...
_________________
Big thanks to everyone who donated for Quake2
#127965 - Mr. Picklesworth - Mon May 07, 2007 12:39 am
Wow, nice!
(And yay, I'm happier by the minute with my SC CF).
Those sparks look like a textured particle effect. Does this mean you have particles fully working now? (Or is it just magic? Or am I horribly mistaken?)
Malice looks amazing, by the way. I bet Nintendo is jealous :)
_________________
Thanks!
MKDS Friend Code: 511165-679586
MP:H Friend Code: 2105 2377 6896
Last edited by Mr. Picklesworth on Mon May 07, 2007 5:10 am; edited 1 time in total
#127981 - Tockit - Mon May 07, 2007 4:41 am
sprites and particles are hacked in (as of 17/02/07) and are only partially hardware-accelerated, and have no textures.
that's not me talking. ;-D
(typing..?)
they just look like pink floaty dots, as of now.
on a separate note, I've actually found myself playing this release enough to have collected all 4 runes.
I sooooooooo can't wait for the wifi build..!! any word on ad-hoc, simon?
_________________
-01011101001010101010 (frank)
#128000 - sonny_jim - Mon May 07, 2007 2:02 pm
Just a quick one to say that I'm very impressed. Compared to the last version I tested, pre2 was leaps and bounds ahead. It's getting the polish of a professional game.
Well done!
#128768 - Mr. Picklesworth - Tue May 15, 2007 1:39 am
I am sorry to do this, but... how are things going, Simon?
Thanks to that video, I've been refreshing this page every five minutes for a week!
_________________
Thanks!
MKDS Friend Code: 511165-679586
MP:H Friend Code: 2105 2377 6896
#128778 - f3 - Tue May 15, 2007 5:02 am
yeah really, this is absolutely incredible.
_________________
fckgw
#128787 - simonjhall - Tue May 15, 2007 7:53 am
Yo, I've been
- fixing random bugs that people have been getting
- trying to clean up gui stuff for the wifi build (and fixing broken broadcast packets, again...)
- adding better support for mods (especially Team Fortress)
- fixing graphical errors in the game
- adding some support for extra memory on cards.
So yeah me getting the multiplayer build out is dragging on a bit! Hopefully I'll have released it by the end of the week.
Keep refreshing the page :-D
_________________
Big thanks to everyone who donated for Quake2
#128817 - MechaBouncer - Tue May 15, 2007 4:44 pm
Just out of curiosity, are you using the external RAM API or your own implementation?
_________________
Cobalt/Black NDSL
CycloDS Evolution (firmware 1.55 BETA 3) and EZFlash 3-in-1
Kingston SD-C02G JAPAN 2GB MicroSD
MoonShell 1.71, DSOrganize 3.1129, QuakeDS Pre3, ScummVM DS 0.11.1, Pocket Physics 0.6, OpenTyrian DS 0.3
#128818 - simonjhall - Tue May 15, 2007 4:56 pm
I was originally using mine for Q1 (Q2 still uses mine) but now I'm using a combination of mine with Lick's RAM API.
I'm doing this as mine includes goodies to handle the file system and other thread-safe stuff. There are many threads all contending for the file system, VRAM, memory and extended memory in Quake and they all need to be managed somehow :-)
_________________
Big thanks to everyone who donated for Quake2
#129104 - simonjhall - Fri May 18, 2007 9:59 pm
A shameless plug for the people who don't look in the releases forum: the wifi build is now available for people to break.
It hasn't had such extensive testing as the regular single player stuff, so I'd expect more holes than normal.
_________________
Big thanks to everyone who donated for Quake2
#129196 - STAKED - Sun May 20, 2007 3:45 pm
Just been playing it against a PC running GLQuake, absolutely stunned at how simple it was to get going (gotta love wifilib) and how fast and smooth it holds up. You just don't see ports of this kind of quality these days. *This* is the kind of thing I own my M3 Simply for. Great work, looking forward to the RAM-enhanced versions.
(I have this vague dream of Ailen Quake running someday.) ;)
EDIT: Never realised co-op mode worked too. Shiny.
(Also, some minor texture/speed problems on good old Ziggurat Vertigo.)
#129276 - STAKED - Mon May 21, 2007 12:11 pm
Just out of technical curiousity and thinking in the most basic sub-1fps untextured cut-down box level way... would Quake 3 ever potentially"run" even on those kind of terms? I don't know the intricate detail on the demands of that one. It would be amusing to see if nothing else.
#129280 - simonjhall - Mon May 21, 2007 1:58 pm
Yo, what's Alien Quake? If it's a mod or total conversion it might just run. If it's a full engine change then it won't.
Anyway, I had a look at Q3 and I do think it could be doable. It does however need 64 megs of RAM and was designed from the ground-up to be plugged directly into something which (properly) supports OpenGL. Also, there's no software renderer which is quite essential to tell if you've managed to load the game correctly!
Also whilst poking through the Q3 sources I notice a bit too much x86 assembler (in non-time critical functions) so I'm not too sure what would have to be done to fix that. I don't think there were generic-C versions.
I won't be porting Q3...(hell I don't even think I can be arsed to finish Q2)
_________________
Big thanks to everyone who donated for Quake2
#133371 - Miika - Thu Jul 05, 2007 8:52 pm
*Grave digging*
Simon, have you been working on this lately or did you just drop it?
_________________
My DSQuake video: http://www.youtube.com/watch?v=03wz7nmaXa8
My QuakeDS video: http://www.youtube.com/watch?v=nNIKneo11o4
#133383 - simonjhall - Thu Jul 05, 2007 9:49 pm
Omg, not this thread again! :-D
I've taken a break from DS homebrew, and have gone outside to see what the sun looks like again...
However as it's been raining endlessly in London for the last few weeks, I've been working on Q2 - but there are people who would rather see extra memory support for Q1. I'm willing to do it, but I don't think the 'market' is big enough to warrant me doing that.
I don't think many people are aware that the existing builds of QDS support mods (to some degree) and there doesn't seem to be much interest about playing mods or TCs on the DS, despite the initial interest when I was porting Quake. So if I was to code extra memory support then I don't think many people would use it.
That's why I've been looking at Q2, as there seem to be many more people who would prefer to see Quake 2 on the DS than Quake 1.
Oh and no, I'm not going to code both :-D
Oh and I did look at ad-hoc for a while, but I got pretty busy at work then forgot to pick it back up...
EDIT: Woo, page 50 of this thread! Teh pwnage.
_________________
Big thanks to everyone who donated for Quake2
#133403 - Tockit - Fri Jul 06, 2007 12:05 am
I'm not sure the extended ram edition would be THAT big of a release.
I think you should just clean up what you have on q1, (textures, touch buttons, touch screen sensitivity, double tap jumping [PLEAAAAAAASE]).
I'd have to say that to see Q2 on DS would mean SO MUCH.
so much.
_________________
-01011101001010101010 (frank)
#133452 - Dood77 - Fri Jul 06, 2007 7:24 am
While I would like to see Q2 on the DS, I liked Q1 a lot better. And I only played Q2 for multiplayer, which would definitely be extremely far away.
I would MUCH rather see ad-hoc done, as well as optimizations to Quake's server code for QuakeDS. I feel like these would come sooner, seeing how long it took the first one to be pre-released. In fact just the things Tockit said, touch buttons, double-tap, etc. are things I would like to see before Q2. But thats just my opinion ;)
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#133456 - Mrshlee - Fri Jul 06, 2007 7:52 am
Love your work :)
Are you planning to release another "newer" q1 release or is the current release stable enough?
I'll buy a RAM cart soon if you plan on adding support.
I think building support for slot 2 RAM will simply make people buy ram carts and not deter people if the cart is going to improve the game..
Q2 + RAM = fine if it improved the performance and/or quality.
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia
#133469 - simonjhall - Fri Jul 06, 2007 9:47 am
Hmm...this is what I'm talking about! Everybody wants me to code something different!
I still don't think enough people would play the extra-memory build if I were to write it, but it would at least put a tick in the box as I'd be supporting one of the final big features I said I would.
On the flip side, many people are under the impression that adding more memory to the system will improve the performance so WILL download it, play the single player game and then email me, telling me it's slower. (because it will be)
Quote: |
Q2 + RAM = fine if it improved the performance and/or quality. |
Well dur :-)
There's no way I'd release that program I've got in the youtube video! I'd do some magic on it and crank the speed up first...
So yeah, I still don't know what to do! Hopefully it'll stop raining soon, and the good weather will make the decision for me ;-)
_________________
Big thanks to everyone who donated for Quake2
#133519 - dantheman - Fri Jul 06, 2007 7:20 pm
If the RAM build would make things slower, what would be the advantage? Doesn't it have to do with being able to load all the graphics at one time or something?
#133605 - simonjhall - Sat Jul 07, 2007 4:47 pm
dantheman wrote: |
If the RAM build would make things slower, what would be the advantage? Doesn't it have to do with being able to load all the graphics at one time or something? |
It's just to facilitate the loading of big models and maps which need to fit wholy in RAM during runtime. Pulling them from disk isn't a cool thing to do :-)
To be fair, it's not that it's mega slow, it's just that there's no chance of the frame rate going up.
Ok, I've caved - I'm gonna write it. I'll hopefully re-add music support, fix those non-po2 textures (eg the Quake logo in the entrance map), sprite textures etc. Touch buttons couldn't hurt too. Texture and sound caching in that memory was always something I wanted to write too...
Request time:
- any chance of getting hold of an Opera RAM expansion? (for a phat)
- I really want to support the official mission packs (as there's lots of special code in Quake to support them), but I can't get a hold of them for a decent price - anyone got them lying around and wanna send them my way?
- I'm gonna need some testers for this shit, and they're gonna need to have mods and TCs, and need to know what they're doing - volunteers? (Seth, I'm sure I can count on you too!)
Wurd.
_________________
Big thanks to everyone who donated for Quake2
#133607 - Mr. Picklesworth - Sat Jul 07, 2007 5:40 pm
Well, sorry to say I can't offer you any of those services, but thank you for still working on this one :)
I really look forward to seeing how this works out. (Again). Good luck!
_________________
Thanks!
MKDS Friend Code: 511165-679586
MP:H Friend Code: 2105 2377 6896
#133609 - Masterofdarkness - Sat Jul 07, 2007 5:49 pm
Dang it I want ad-hoc, But good luck Simon =)
#133612 - tepples - Sat Jul 07, 2007 6:04 pm
simonjhall wrote: |
Request time:
- any chance of getting hold of an Opera RAM expansion? (for a phat) |
You can order Nintendo DS Browser directly from Nintendo in most countries.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#133617 - dantheman - Sat Jul 07, 2007 7:15 pm
You can actually also order just the RAM pack itself from Nintendo's store (search for 'browser' to find it). The page I found was this one for the Phat-sized version, but it's $15 plus shipping, which may be more than you wanted to pay for something like that.
#133632 - Dood77 - Sat Jul 07, 2007 9:44 pm
simonjhall wrote: |
(Seth, I'm sure I can count on you too!) |
Ditto ;) I'm gonna have to go through all my old mods and TCs and find the ones I liked best... (my C:\quake directory is over 1GB!)
I have the second expansion pack (disillusion of eternity) lying around on my PC in ISO format... an old backup, since my disk is now toast thanks to a dodgy ancient CD drive, not that I even know where the damaged disk is... Oh wait, just checked, can't find the ISO either. The "rogue" directory came out to be just over 13MB in a .rar format... care for an email?
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#133745 - theli - Sun Jul 08, 2007 8:38 am
simonjhall, if you started to working on quake again...
could you, please, move all quake-related files to /quake/ ?
so all mods and paks will sit there? ( /quake/id1/ , /quake/malice/ , ... )
#133803 - Dood77 - Sun Jul 08, 2007 9:48 pm
Good idea, keep the same file structure as the PC...
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#133815 - simonjhall - Sun Jul 08, 2007 10:45 pm
But that'd require you moving the executable inside the new quake directory...this would then add confusion for the people who need to have the executable in the root of the card in order for it to boot.
Suggestions?
_________________
Big thanks to everyone who donated for Quake2
#133824 - Ant6n - Mon Jul 09, 2007 12:13 am
does libfat allow to check whether a file/directory exists in a directory?
if yes, maybe it'd be possible to just check both combinations in a senseful way.
#133826 - tepples - Mon Jul 09, 2007 12:22 am
Ant6n wrote: |
does libfat allow to check whether a file/directory exists in a directory? |
Try calling stat() on the file's path. The implementation of stat() in libfat is in fatdir.c.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#133828 - Ant6n - Mon Jul 09, 2007 1:14 am
one could create a standard for an overall config file sitting in the root of a flash cart, kind of like the windows registry. Quake could search all directories for the files (or let the user search it), and once found save it in that 'registry'.
#133839 - theli - Mon Jul 09, 2007 4:43 am
simonjhall wrote: |
But that'd require you moving the executable inside the new quake directory... |
why???
#133849 - simonjhall - Mon Jul 09, 2007 7:58 am
Dood77 wrote: |
Good idea, keep the same file structure as the PC... |
_________________
Big thanks to everyone who donated for Quake2
#133850 - theli - Mon Jul 09, 2007 8:05 am
simonjhall wrote: |
Dood77 wrote: | Good idea, keep the same file structure as the PC... |
|
oohh.. :)
well, .. DS is not a PC
so i say "move all quake-related to /quake/ and leave it to user to choose where he want's his executable to be".... if you don't mind :)
also ( though it was already mentioned ) something to choose mods would be very convenient ... (though not necessary... but nice :D )
#133856 - simonjhall - Mon Jul 09, 2007 9:20 am
Well if they can choose where they like for the executable, it'll have to discover where it is in relation to the data files on startup. Sounds a bit dodgy to me!
And theli don't worry I'll be getting back to you about the crashing...it's just that the code's in a bit of a state at the moment as I'm doing big stuff with it, and getting a build together ain't too easy. But also, there's someone else with the exact same problem! Too many printfs and it doesn't crash :-(
_________________
Big thanks to everyone who donated for Quake2
#133857 - theli - Mon Jul 09, 2007 9:29 am
simonjhall wrote: |
Well if they can choose where they like for the executable, it'll have to discover where it is in relation to the data files on startup. |
why?????
executable doesn't even know where it was launched from!!
simonjhall wrote: |
And theli don't worry I'll be getting back to you about the crashing...it's just that the code's in a bit of a state at the moment as I'm doing big stuff with it, and getting a build together ain't too easy. But also, there's someone else with the exact same problem! Too many printfs and it doesn't crash :-( |
i'm not worrying or hurrying you up :)
thanks to you i've already had pleasure of finishing several levels with debug build :D
(though i'm waiting for "re-add music support" .. so that singleplayer missions would be more "atmospheric" ... as they were intended to be :) )
#133858 - Noda - Mon Jul 09, 2007 9:34 am
Simon> for the quake files, you could take a look at my EFS system: you have all the advantages of a fat system with all the advantages of having only one .nds file embedding everything; also, data can be added after compilation using ndstool without any problems :)
#134005 - Dood77 - Tue Jul 10, 2007 2:01 am
Ant6n wrote: |
one could create a standard for an overall config file sitting in the root of a flash cart, kind of like the windows registry. Quake could search all directories for the files (or let the user search it), and once found save it in that 'registry'. |
See my post here: http://forum.gbadev.org/viewtopic.php?t=12867&start=64&highlight=64
Noda wrote: |
Simon> for the quake files, you could take a look at my EFS system: you have all the advantages of a fat system with all the advantages of having only one .nds file embedding everything; also, data can be added after compilation using ndstool without any problems :) |
No offense Noda, but ick... Requires too much work to modify the .cfg files and everything. As it is, I can edit them with DSOrganize very easily.
And Simon, I think theli is right about the quake executable, it doesn't matter where it is, as long as it knows its own stuff is in (root)/quake
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#134112 - phanboy_iv - Tue Jul 10, 2007 6:54 pm
I for one would love a RAM build. I would much rather have Quake 1 on the DS than Quake 2.
But like you said a page or so back, everyone wants something different.
So do what you want. After all, you're the one busting your tail coding this stuff. And believe me, we appreciate it!
#134890 - simonjhall - Wed Jul 18, 2007 12:18 am
Ok, I'm so excited that I can't not post this (even though it's very early days)...QuakeDS can now run entirely from slot-2 RAM!
It's taken many many tedious hours to make it work and there are still show-stopping bugs but the game is very playable, although it has taken a speed hit.
Probably the coolest thing was increasing the magic RAM count, parms.memsize (a variable I fought against for months) from a paltry 2.9 megs up to a whopping 16 megs and having it just work! Twenty seconds later, and I'm playing Malice on my DS and I've needed no kludges to get there! Yeah, I've not been this chuffed since I first got sound working ;-)
What comes next
- get rid of the crashes
- test excessively
- turn on data caching (it's playable with it turned OFF)
- make it run from just one flash card (at the mo I'm using slot-1 for FAT, slot-2 for RAM)
- cache textures and sound, rather than pull them from disk every time
- add more features, fix existing problems etc...
Big thanks go out the people who have helped me get this far with the pain that is slot-2. There's still lots more to be done though...
:-D
PS: Lick, I still need to get round to checking out your new RAM lib...
_________________
Big thanks to everyone who donated for Quake2
#134891 - Doom5 - Wed Jul 18, 2007 12:55 am
Fantastic! I haven't heard of anyone else running code entirely from Slot 2 memory!
Using Lick's ram library would be a good idea, if it's possible, as to allow you to code a somewhat generic EXRAM build for the multitude of devices out there.
A question for you though... Will this new breakthrough transfer over to getting your Quake 2 port running?
#134894 - masscat - Wed Jul 18, 2007 1:11 am
Simon, John Carmack might fancy helping you out with your port.
#134896 - tepples - Wed Jul 18, 2007 1:36 am
Doom5 wrote: |
Fantastic! I haven't heard of anyone else running code entirely from Slot 2 memory! |
Have you looked in the GBA sections of this board? ;-)
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#134897 - Doom5 - Wed Jul 18, 2007 1:58 am
tepples wrote: |
Doom5 wrote: | Fantastic! I haven't heard of anyone else running code entirely from Slot 2 memory! |
Have you looked in the GBA sections of this board? ;-) |
Well, in GBA mode, where else are you going to run the code out of? :)
#134907 - Mrshlee - Wed Jul 18, 2007 6:38 am
Simon, What card is this going to run from?
Does it work with the official browser RAM cart? an additional 8MB
Does it work with the Supercard and M3 CF editions? an additional 32MB
Does it work with the slower supercard SD editions? unknown extra ram.
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia
#134913 - OOPMan - Wed Jul 18, 2007 8:19 am
simonjhall wrote: |
Ok, I'm so excited that I can't not post this (even though it's very early days)...QuakeDS can now run entirely from slot-2 RAM!
It's taken many many tedious hours to make it work and there are still show-stopping bugs but the game is very playable, although it has taken a speed hit.
Probably the coolest thing was increasing the magic RAM count, parms.memsize (a variable I fought against for months) from a paltry 2.9 megs up to a whopping 16 megs and having it just work! Twenty seconds later, and I'm playing Malice on my DS and I've needed no kludges to get there! Yeah, I've not been this chuffed since I first got sound working ;-) |
Stellar news man :-)
Quote: |
What comes next
- get rid of the crashes
- test excessively
- turn on data caching (it's playable with it turned OFF)
- make it run from just one flash card (at the mo I'm using slot-1 for FAT, slot-2 for RAM) |
Just to check, you will retain the ability to run from SLOT-1 for FAT and SLOT-2 for RAM, though? At the moment I keep an R4 in slot-1 and a SC:miniSD in slot-2, so it would be cool to not have to boot onto slot-2 to run the game. Although it's no biggie if one does have to, I suppose :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#134916 - simonjhall - Wed Jul 18, 2007 9:24 am
Thanks everyone for the comments.
@doom5, I'm already using Lick's library - just an old one. This'll hopefully allow me to use whatever card it supports.
And nah, this is no help for Q2 as I've already done all this stuff! The memory system for that game is also quite different, in that it's easier to make different parts of the game run from different memory spaces.
Moving all of Q1's memory to slot-2 is not something I wanted to do, but I've only done so as the memory management in the game is shit!
@masscat, thanks for the gcc memcpy/memset/memmove thing from the other thread. Changing it directly in the a file does sound a much more robust way of doing it.
@tepples, yeah, gba games run from slot-2...but they don't use it as RAM!
@mrshlee, at the moment I'm using a supercard miniSD in slot-2 for the memory so that definately will be supported. I've tried it on an M3 (I don't own one though, so testing won't be as robust), and I intend to re-try it on my EZ-flash 3-in-1 at some point (but I'm not expecting good results with that).
The Opera expansion pack is a funny one, due to the limited amount of memory. On the one hand it's got 2-3x more memory than I could use if I was using the internal memory but it's still not a lot considering the whole point of this build is playing large mods! I was also intending to use a large chunk of the slot-2 memory as a file cache, so that sounds and textures don't have to swap to disk as often. This would hopefully offset some of the expense of using slow RAM. (QDS reads from disk frequently, depending on the speed of play)
Finally, I was hoping to use some of that memory for use with music playback - before you know it, you haven't got a lot of memory left in your Opera expansion. Suggestions? I don't want to make customised builds for each expansion pack!
@oopman, again I'd like to support all combinations with the minimum hassle. FAT from #1 and RAM from #2 is easy, and if I make a specific build for this setup you'll get better load times and performance etc. However, that's one more build to make!
Btw I intend to make this slot-2 build a combined single player/multiplayer game, ie wifi will be built in. One less build to make ;-)
And for the slot-1 only people, the game is not about to become slot-2 only but there's no way of getting really large TCs and mods running from the internal memory...so don't even ask!
_________________
Big thanks to everyone who donated for Quake2
#134926 - Mrshlee - Wed Jul 18, 2007 1:10 pm
I've heard on the grapevine that the memory from the M3 units are faster then the Supercards.. the memory used the on CF versions are faster then the SD and all of them use different lock/unlock codes.
This is something that might be worth testing once and for all. not being an uber programmer guy.. Are you limited by 8bit/16bit read/writes? Is the speed of the slot2 RAM carts limited by the memory speed or the speed of the bus?
I would recommend the Supercard/M3 duo.. The EZFlash 3v1 unit is something I've had my eye on for awhile and that would be an excellent addition..
I'm happy to donate for your effort.. an all in one single/multiplayer edition would be.. one of the greatest achievements in DS home brew history :)
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia
#134928 - simonjhall - Wed Jul 18, 2007 1:26 pm
I'd be interested in seeing the difference between the M3 and Supercard - I may benchmark them just to see... However once I enable data caching on that slot if there is a performance difference it ought to be quite negligble. I don't intend to do that for a while though as performance isn't something I'm too worried about yet. I also do think I'm limited more by the bus speed than by the speed of the actual memory.
The 8-/16-bit write thing is a Big Deal, and I don't think I've reliably removed all of the offending instructions - this is why I'm gonna need to test it to death to make sure I've got 'em all!
The other big thing is that since everything now lives in slow RAM, this is going to have an adverse effect as all the collision detection (the slowest part of the game by far) is gonna have to be done against data that lives on this slow bus. This could be a bit of a show-stopper...
And yeah, I've got an ez 3-in-1 (they sent me one!), however it's for a lite, but I've got a phat so I don't really wanna use it very often as plugging it into my DS is quite a chore! But yeah I also hear that the RAM can be a bit flakey. As I said the Opera expansion is gonna be the interesting one! However I don't have one of those so it's gonna be interesting working on that...
For those people who are still having the freeing precache bug, I've not forgotten about you. It's just that the code is not in a state for me to mail it around at the moment...
_________________
Big thanks to everyone who donated for Quake2
#136976 - simonjhall - Mon Aug 06, 2007 11:59 pm
Yo, just another shout out to say that the extended-memory version of Quake is still going on.
The real reason I'm posting is to tell y'all prospective players to go find and rip your Quake CDs, as MP3 playback now works beautifully!
The good news is that I don't think the performance is as bad as I originally thought - I'm currently using less than half the ARM7's CPU time and it's playing a 128kbit *mono* choon just fine :-)
However the higher the bitrate the more the ARM9's gonna get worn out fetching data.
Just tested 192kbit (mono) and it's just started to crackle slightly, so I guess I just found the 50% CPU load mark :-D
_________________
Big thanks to everyone who donated for Quake2
#136989 - Nintendo Maniac 64 - Tue Aug 07, 2007 2:44 am
I'm assuming this is at 32KHz, correct? I believe 44.1/48KHz used way too much CPU power...
And also, I noticed that moving your stylus faster doesn't make your view turn more like I believe it does in MPH. I'm not sure if it's like this in Quake on the PC, but due to the limited "screen-movement space", this would be very useful.
#137001 - simonjhall - Tue Aug 07, 2007 7:54 am
The stuff I've been trying has a 44.1kHz sample rate. I've not tried anything else yet...
And do you mean acceleration on the pen? I guess I could chuck something in...
_________________
Big thanks to everyone who donated for Quake2
#137005 - Noda - Tue Aug 07, 2007 8:51 am
So you finally solved your problem? Could you tell us which solution you finally choosed?
By the way, did you try a stereo mp3? would be nice to see 44k/96kbps/stereo file playing working ;)
#137006 - simonjhall - Tue Aug 07, 2007 10:50 am
I didn't try stereo as the helix decoder outputs data in LRLRLRLR format, and I'm gonna see if I can find where's it's doing it (so I can get it to make two separate buffers).
Getting the playback click-free was entertaining but I'm not 100% sure I've got it sorted yet, as there's still one song that I tried that gets slightly clicky a few minutes in. I'm gonna see if I can fix that but I still wouldn't recommend playing an hour long tune as I'm sure it'll start to click :-)
Now I've gotta get the freading of the data to run asynchronously, and it'll all be hunky-dorey.
_________________
Big thanks to everyone who donated for Quake2
#137012 - Noda - Tue Aug 07, 2007 12:29 pm
The stereo thing can't be simply demuxed inside the helix codec, as AFAIK the stereo processing is finally done with an ASM optimised polyphase filter so unless it's rewritten...
But a friend of mine wrote an ASM desinterleave function for the LRLRLR thing, if you want to try it, I can send it to you.
For now I can't work on the mp3 lib I've told you in PM as I'm going preparing my move to Canada (for my last year of study), but I'm greatly interested in your work, so I'm following your progression with impatience, and I hope to work on my lib with your help soon ;)
#137014 - melw - Tue Aug 07, 2007 12:55 pm
I don't know if this is old news, but nevertheless there might be also an official Quake for DS on the way: id hints at Quake DS game.
#137026 - kusma - Tue Aug 07, 2007 2:24 pm
melw wrote: |
I don't know if this is old news, but nevertheless there might be also an official Quake for DS on the way: id hints at Quake DS game. |
Interesting. This makes me more eager to get that light-mapping working, so we can make sure the homebrew-port is a good step ahead ;)
#137029 - simonjhall - Tue Aug 07, 2007 2:46 pm
Yeah I found that 'official Quake' thing quite worrying :-)
But once that comes out everyone will forget about this port and I can finally lay it to rest! Sweet...
@noda, ok the mp3 stuff (currently) works like this:
you have a buffer, named 'play buffer' which is the length (in samples) of one decoded mp3 frame
you have another buffer, named 'decode buffer' (the same size as the play buffer)
you have an mp3 data buffer named 'mp3 buffer', (as big as you like)
so,
Code: |
clear play buffer
play 'play buffer', in loop mode
while (data left in file)
{
fill mp3 buffer from file if there's less than one frame's worth of data in there
decode one frame from mp3 buffer into decode buffer
once the first half of the play buffer has played, copy the first half of decode buffer over the first half of play buffer
once the second half of the play buffer has played, copy the second half of decode buffer over the second half of play buffer
}
stop sound playing |
The secret to click-free playback is to ensure you know exactly when the sound is half way and all the way through the sound buffer. I did this with a timer started at the same time as the sound.
For instance when you start the sound hardware to play a 44.1kHz sound you're really telling it that each sound sample is ~760 clock cycles long. (someone correct me where I get it wrong please!)
Each mp3 frame (so far...) is 1152 samples long so the buffer will loop after 875520 cycles. However if you set up a timer the largest value you can give it is 65535 cycles (ignoring the prescalar). So if I set up a timer to fire an interrupt after 760 * 16 cycles I'll need to count 72 interrupts until the buffer loops (or 36 until half the buffer is up).
I've chosen a clock cycle multipler of 16 because if I'm playing a 11025Hz tune then each sample is 3043 cycles long and 16 is the largest number I can multiply 3043 by in order to stay < 64k and also divide 1152 nicely.
Also, even though each sample isn't exactly 760 cycles long (for 44.1kHz) as long as I tell the sound hardware and the timer the same value (* 16) they should both stay in step.
So I configure my timer like this:
Code: |
TIMER_DATA = 0xffff - (32 * 1024 * 1024) / sample rate * 16 + 1 |
I originally missed out the +1 and after a few minutes the playback would get out of sync with the timer as the timer would 'gain' one cycle over the sound hardware every sixteen sound samples. One clock cycle quickly adds up at 44kHz...
(is that enough info for you? :-)
BTW I'm sure there are mistakes in this stuff too...
So yeah, that's how I'm doing the playback at the moment and I think I've got it nailed but I'm gonna need more testing to confirm it...
_________________
Big thanks to everyone who donated for Quake2
#137048 - Noda - Tue Aug 07, 2007 5:25 pm
Thanks for your precisions ;)
#137089 - Tockit - Tue Aug 07, 2007 9:10 pm
melw wrote: |
I don't know if this is old news, but nevertheless there might be also an official Quake for DS on the way: id hints at Quake DS game. |
Say John Carmack, on bringing the quake franchise to the DS:
"My early inclination on this is to build a game that is definitely Quake Arena-themed... but leave it more or less Doom 2 style deathmatch with two-and-a-half-D,"
:-/
hope it's not dissapointing.
oi, simon! this RAM build is sounding mighty keen, my friend! I'm looking forward to a release, m'man!
_________________
-01011101001010101010 (frank)
#137099 - Dood77 - Tue Aug 07, 2007 10:56 pm
Father Doom wrote: |
My early inclination on this is to build a game that is definitely Quake Arena-themed... but leave it more or less Doom 2 style deathmatch with two-and-a-half-D |
Yeah, admittedly I was a little disappointed to hear this to, but I'm thinking it will turn out okay. Either that or the idea will be trashed altogether in favor of the "Metroid Prime Hunters" style of controls.
Overall I'm glad Nintendo and id are finally making progress toward peace, maybe ol' Carmack will get it into his head to port the older quake games to Wii. A good example of a good dream turned nightmare is finding out quake is in the works for Wii, but it ends up being Quake 4...
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#138286 - lord_hardware - Wed Aug 22, 2007 9:53 am
Hey? will the new ram build work with the EZFlash4 Lite Deluxe? i dont know the differences between EEPROM and all those... just curious, loving the current build :D thanks for all your work simon
_________________
NDSL: M3Real, EZ4 Lite Deluxe, 2x Kingston 1GB Micro SD, 1x Kingston 4GB Micro HCSD 1x Kingston 8GB Micro HCSD
#138299 - plazmas - Wed Aug 22, 2007 3:04 pm
You try http://www.ilhome.ic.cz/ but maybe it isn't your language
_________________
Nintendo DS tips: http://www.ilhome.ic.cz/
#138303 - simonjhall - Wed Aug 22, 2007 6:36 pm
lord_hardware wrote: |
Hey? will the new ram build work with the EZFlash4 Lite Deluxe? i dont know the differences between EEPROM and all those... just curious, loving the current build :D thanks for all your work simon |
I've tested it first-hand on a Supercard, M3, Opera RAM expansion and an EZ flash 3-in-1 - I've not tried an EZflash 4. However, by the looks of it (as in I'm looking at the retail info on the web site) it should be compatible with the EZ 3-in-1, so I'd hazard a 'yes'.
To be sure, buy me (or Lick) one :-)
Touch
_________________
Big thanks to everyone who donated for Quake2
#138886 - Creebo - Thu Aug 30, 2007 7:06 am
I think theres something wrong. I have commercial Quake and followed the guide on the site. Problem is it gets stuck at FREEING PRECACHES. top screen is blank and the LED blinks.
#138892 - simonjhall - Thu Aug 30, 2007 9:21 am
Is that the wifi build? The LED shouldn't be blinking otherwise.
Anyway, yeah that's a known problem. There have been two 'freeing precaches' bugs - the first one has been fixed in all pre2 builds, but this second one I'm having serious troubles tracking down. I could do it in an hour or so if I had a DS which exhibited these troubles...but I don't have one!
Seems to be a timing-related problem when setting up the 3D hardware, and only a handful of DSes get this bug. It does seem to be affected by the type of flash card and booting method used though. (eg if it doesn't work from your card's built-in loader, try using moonshell or something)
_________________
Big thanks to everyone who donated for Quake2
#138893 - Creebo - Thu Aug 30, 2007 9:28 am
thanks for the quick response.
I'm using a GBAMP with moonshell (also renamed it to auto boot) and I have a 2 month old Lite. My bro has my old phat from xmas '04 so ill try it out on there tomorrow when everybody's awake.
EDIT: Not using wifi build
#138895 - simonjhall - Thu Aug 30, 2007 9:58 am
Shit, I pretty much developed the entire game with a gbamp (in _boot_mp.nds mode) so I would have thought that card would be best! As I said, it seems to be a per-DS timing problem. Grr!
And the LED blinking? As in the green power LED blinking? I've never written any code to flash the light (bar what's in dswifi) so...err...yeah!
_________________
Big thanks to everyone who donated for Quake2
#138896 - Creebo - Thu Aug 30, 2007 10:04 am
well for some reason it stopped blinking :/. It seems to be freezing cause nothing happens when I close it. The only other thing I can think that would mess it up is it doesnt detect autoexec.cfg but as I have said before, I have the commercial game. I tried shareware but same thing came up.
#138906 - the warlock - Thu Aug 30, 2007 3:25 pm
Just curious, but why wouldn't the EZFlash 3-in-1 get good results? It's kind of all I've got; should I look into getting something better? Did EZF cheap out and put really slow RAM in the thing or something?
#138908 - simonjhall - Thu Aug 30, 2007 4:08 pm
Why wouldn't it get good results? (I can't remember if I said that before...this thread is 50+ pages long!)
The 3-in-1 works pretty well for me. In fact the memory in it is FASTER than my Supercard!
_________________
Big thanks to everyone who donated for Quake2
#138913 - stamba - Thu Aug 30, 2007 5:43 pm
Hey ;)
Tried it today with grey NDS, SuperCard CF and SuperPass, shareware version 1.06..
Works fine !
Had to adjust brightness to max but it's still quite dark..
Really nice anyway ! ;)
Thanks Simon !
#139174 - Dood77 - Mon Sep 03, 2007 2:44 am
stamba wrote: |
Had to adjust brightness to max but it's still quite dark.. |
Two reasons:
1. DS Phat (old 'grey' one) has a dim screen. DS Lites, however...
2. Quake is a dark game.
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#139272 - lord_hardware - Tue Sep 04, 2007 4:16 am
simonjhall wrote: |
've not tried an EZflash 4. However, by the looks of it (as in I'm looking at the retail info on the web site) it should be compatible with the EZ 3-in-1, so I'd hazard a 'yes'.
To be sure, buy me (or Lick) one :-) |
I would, but im kinda low on cash myself having just bought my entire kit... if your looking for components www {dot} bamboogaming {dot} com has the cheapest prices of anywhere ive seen and the sell using aus dollars...
thanks for the port dude its wonderful... :D
_________________
NDSL: M3Real, EZ4 Lite Deluxe, 2x Kingston 1GB Micro SD, 1x Kingston 4GB Micro HCSD 1x Kingston 8GB Micro HCSD
#139885 - lord_hardware - Tue Sep 11, 2007 5:58 am
Oh and btw, can you update the QuakeDS website? its getting to be a hassle going thru this overclogged (while still beautiful) topic...
Thanks :)
_________________
NDSL: M3Real, EZ4 Lite Deluxe, 2x Kingston 1GB Micro SD, 1x Kingston 4GB Micro HCSD 1x Kingston 8GB Micro HCSD
#139887 - Dood77 - Tue Sep 11, 2007 6:07 am
That should be under way soon... With the release of the build that uses extra RAM.
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#139892 - username - Tue Sep 11, 2007 7:49 am
Can't wait for the EXRAM build! Simon, this really is great work! The DS is only my second homebrew experience after the Sega Dreamcast and I gotta say, your port is on par with any of the homebrew ports the DC has to offer (there's a leaked port by a professional studio for DC that's amazing though, despite no netcode). I intend to start testing the current build with as many mods as possible and will start a thread posting my results. Keep up the good work!
#140597 - simonjhall - Tue Sep 18, 2007 12:54 am
I've just got back from my summer hols (sun..burn...).
I think I've done all the optimisation I can now, the slot-2 RAM stuff is pretty solid, CD audio is pretty much there, it's just the final 5% that takes ages then testing testing testing! (and lots of after-sun)
Back to work tomorrow :-(
_________________
Big thanks to everyone who donated for Quake2
#140683 - Mrshlee - Wed Sep 19, 2007 2:35 am
simonjhall wrote: |
I've just got back from my summer hols (sun..burn...).
I think I've done all the optimisation I can now, the slot-2 RAM stuff is pretty solid, CD audio is pretty much there, it's just the final 5% that takes ages then testing testing testing! (and lots of after-sun)
Back to work tomorrow :-( |
I would like to beta test this if possible.. I've found my Supercard CF again..
I noticed that multiplayer is possible and thats freaking awesome so... Are you using the same netcode? or netquake? Can we use the QuakeDS nat tunnnel? Id like to have a fragging match with you later ;)
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia
#140725 - simonjhall - Wed Sep 19, 2007 3:34 pm
Mail me your email address (and details of what cards you have) and I'll try not to forget you when its test time :-)
Btw familiarty with mods and total conversions is pretty essential.
And yes I'm using the original NetQuake UDP network code, except I have modified many parts of the Quake-side 'driver' to get various things to work, eg broadcast network game-finding and various other bits of juice. Since the protocol is exaclty the same as the regular UDP Quake one, if you have a protocol tunnel which works for PCs (or Macs, or whatever) behind firewalls then it 'ought' to work for the DS too! If it doesn't then it's something I'd like to hear about and I'll try and resolve. And yeah, I'd like to have a match at some point :-D
Anyway (the real reason I'm posting!) is that I'd like to know how the game performs with a Datel Games 'n' Music card. Big kudos as ever go out to Chishm (and anyone else involved in making DLDI-age), but I'm concerned about the supposedly crappy speed. Could someone with a faster flash card (eg gbamp, supercard, m3, r4 etc) compare load times with the GnM for me? I'd in particular like to know how long it take for the GnM to get from the results of the 'fat init' step to the first frame of 3D video, versus a faster card. Also, once the first demo (Necropolis) starts, how long does texture loading take compared with a faster card? Is it noticeably slower? Is it annoyingly slow?
(I'm just interested in how it performs - there's not really I a lot I can do about it with a slot-2 RAM-less build)
_________________
Big thanks to everyone who donated for Quake2
#140727 - kusma - Wed Sep 19, 2007 3:52 pm
simonjhall wrote: |
Anyway (the real reason I'm posting!) is that I'd like to know how the game performs with a Datel Games 'n' Music card. |
I've got one of those, and access to the repo. So if there's anything in particular I should test, let me know.
#140729 - simonjhall - Wed Sep 19, 2007 4:07 pm
Man, I should really start using that SVN lark. Did you rearrange the respository in the end to the format you said is more typical? If so, what does that mean for my files when I go to check in? Will it 'know' where to put then (ie the new location) or will it just make a copy in a different location (ie the place where I originally put the files)? We use a very different version control system here at work :-)
Anyway, just using the pre2 build and Necro demo should do fine. Since rendering performance has increased quite a bit in later builds (and still improving...) it'll only highlight slow texture and sound load times. Level and model loading (done at the start of play) is another problem with slot-2 RAM due to the quite shite GBA slot transfer rates!
Textures and sounds will be cached in slot-2 memory for that build, but on-demand loading is still done in the regular build.
_________________
Big thanks to everyone who donated for Quake2
#140734 - kusma - Wed Sep 19, 2007 4:49 pm
simonjhall wrote: |
Man, I should really start using that SVN lark. Did you rearrange the respository in the end to the format you said is more typical? If so, what does that mean for my files when I go to check in? Will it 'know' where to put then (ie the new location) or will it just make a copy in a different location (ie the place where I originally put the files)? We use a very different version control system here at work :-)
|
I'm a bit unsure, but update and copy over whatever files you've changed. Check that in, and you shall once again have full control. You're the one who has the current trunk-head (even if it's not in the repo), so your copy should serve the purpose fine. The only files I've really changed is the "Makefile_erik", which I believe you haven't touched, and some stuff in my scratch-folder. If there's any more details, we could take that over e-mail, though. Oh, and let me know if you know of any particular bottle-necks ;)
#140852 - username - Thu Sep 20, 2007 6:53 am
Simon, I know you have much more important things to do, and this is far from a request, just something I thought might be interesting to impliment... It's a utility made for DC ports of Quake called JoyMenu (info here), I don't know how easily it could be implimented into the DS port, or if it's even remotely possible, but I think it would add a lot of functionality to the DS Quake experience. Thoughts?
#140921 - simonjhall - Thu Sep 20, 2007 6:57 pm
Ok, I just had a quick lookie at that joymenu thing (seems to be more on http://quakedev.dcemulation.com/fragger/mod_joymenu_description.htm).
Which features caught your eye? Remember, there are more buttons on the Dreamcast controller than there are on the DS and that the next release should be including some kind of touch screen buttons system.
Of the things in the list, I see:
- in game music - this is coming in the next release
- cheats
- intermission saves (not too sure what this is - I know all about the intermissions, but more details would be nice)
- framerate counter
- some kind of keyboard thing (there's an on-screen keyboard in QDS, so this won't be necessary)
- 3rd-person mode
I'm open to suggestions of what features to add in, but two things I don't want to hear are touching the screen to jump and the all-time classic "hey, I've just had this AMAZING idea - why don't you improve the frame rate?" :-D
_________________
Big thanks to everyone who donated for Quake2
#140932 - kusma - Thu Sep 20, 2007 8:34 pm
Why don't you improve the frame rate?
Edit: Sorry, that's "Why don't you improve the frame rate, BITCH?"
#140942 - sonny_jim - Thu Sep 20, 2007 9:02 pm
You forgot to ask for M:PH style double tap jumping. Whilst I'm at it, could you include "moon on a stick" mode as well please?
;-p
Keep up the good work Simon!
#140949 - simonjhall - Thu Sep 20, 2007 9:44 pm
LOL!
I'm gonna have to add a moon on a stick as some kind of easter egg, aren't I?!
_________________
Big thanks to everyone who donated for Quake2
#140981 - username - Fri Sep 21, 2007 3:25 am
simonjhall wrote: |
Ok, I just had a quick lookie at that joymenu thing (seems to be more on http://quakedev.dcemulation.com/fragger/mod_joymenu_description.htm).
Which features caught your eye? Remember, there are more buttons on the Dreamcast controller than there are on the DS and that the next release should be including some kind of touch screen buttons system. |
Well as I see it, they have more-or-less the same amount of buttons if you equate the DS touch screen to the DC's analogue stick (actually, DS has one extra, the DC controller has no select button). As it stands, though, I like the DS control scheme as is so I don't have any suggestions there (except maybe a keybind for the on-screen keyboard in the options menu rather than having to add it to the config file beforehand).
As for which features caught my eye, now that I see how many of them are either unnecessary or have already been implimented, there aren't too many, heh (a testament to your good work, I'm sure). I like that with Joymenu you can use the "Start Custom Levels" or "Start Deathmatch" options whilst playing a regular single-player game and switch back at will. I guess I could stop being such a lazy git and just type the command lines in for custom levels, but as lazy as I am, I know there are others that are even lazier or just don't know how, so maybe it's something to contemplate down the line. Also, the Omicron bot mod exists and is functional, it'd just be nice to not have to hide the qdsopts file every time I switch between single-player and deathmatch (although I suspect integrating them so as to allow switching between on the fly without reboots would push the RAM). Still, this is all stuff I wouldn't bother with until you have a buld of Quake you're finally happy with, and by then I imagine you'll be sick to death of it, heh.
simonjhall wrote: |
- intermission saves (not too sure what this is - I know all about the intermissions, but more details would be nice) |
Exactly how it sounds - with a button press you can save during each intermission between levels. I think the big deal about this is that without Joymenu the save files took up a ridiculous amount of space on the memory card s well as corrupting the entire card if more than one save existed, so I don't think there's really anything there in regards to saving that would be essential for DS.
simonjhall wrote: |
- 3rd-person mode |
Personally, I think that would be cool but somewhere towards the bottom of the priorities list.
simonjhall wrote: |
I'm open to suggestions of what features to add in, but two things I don't want to hear are touching the screen to jump and the all-time classic "hey, I've just had this AMAZING idea - why don't you improve the frame rate?" :-D |
li3k OMG Y W0NT MY M4X M3DIA DOCK D00 T3H RAGDOLL PHYZIKZZZ!!1!1!!BAN!11!!1!1two:D
As always, your hard work (and tolerance of vague queries like mine) is much appreciated!
#140989 - tepples - Fri Sep 21, 2007 4:28 am
username wrote: |
Well as I see it, they have more-or-less the same amount of buttons if you equate the DS touch screen to the DC's analogue stick (actually, DS has one extra, the DC controller has no select button). |
Dreamcast L and R are analog, so they are effectively two buttons each, one for light and one for heavy. But how many DC games used the analog triggers as such?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#140991 - Ant6n - Fri Sep 21, 2007 4:47 am
wanna go that route? ... any truly analog control has a continuous set of possible states, i.e. at the same cardinality as the reals
#140992 - Dood77 - Fri Sep 21, 2007 4:55 am
3rd Person mode could be done as a normal quake mod, as evidenced in the malice TC. I would say just look at the malice code, but it was commercial.
I'll bet there's already some mod out there that does this, someone should search on one of those quake development sites, or even post on a forum.
Also, I like the idea of being able to bind your buttons by pushing them, instead of typing them in the console or .cfg file.
Oh, and username, did you get the omnicron bot mod working? I was trying for ages until I figured out that the files needed to be in .PAK files... but it still doesn't work, I don't remember how exactly I arranged the files, probably wrong. Could you post your file structure or the files or something?
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#141003 - username - Fri Sep 21, 2007 7:13 am
tepples wrote: |
username wrote: | Well as I see it, they have more-or-less the same amount of buttons if you equate the DS touch screen to the DC's analogue stick (actually, DS has one extra, the DC controller has no select button). |
Dreamcast L and R are analog, so they are effectively two buttons each, one for light and one for heavy. But how many DC games used the analog triggers as such? |
Yeah, true. I can think of a couple of games that use the analogue sensitivity of the triggers, such as Vigilante 8: Second Offense and some racing games, but in most games it's just a matter of them being pressed or released, sensitivity isn't taken into account.
Dood77 wrote: |
Oh, and username, did you get the omnicron bot mod working? I was trying for ages until I figured out that the files needed to be in .PAK files... but it still doesn't work, I don't remember how exactly I arranged the files, probably wrong. Could you post your file structure or the files or something? |
I've been using this for the Omicron bots; the actual rocket arena mode didn't interest me so I removed it entirely. I still can't get it working exactly as I'd like, though. A few things I've been trying to change with no luck (bear in mind that I really don't know a hell of a lot):
***Adding more than one bot at once - I've added a maxplayers command in the qdsopts file but it just doesn't seem to let you add more that one bot, maybe it was built that way due to DS limitations, I don't know
***Getting extra maps to work correctly - apparently you can get them to progress either one after the other or randomly, neither way seems to work for me, whether it's a legitimate error or me doing something wrong, I'm not sure
I'll have to set up the mod again but I can try for a file structure sometime soon if you'd like.
#141006 - theli - Fri Sep 21, 2007 7:52 am
simonjhall wrote: |
I'm open to suggestions of what features to add in |
fon't forget to move all data into /quake :)
#141015 - simonjhall - Fri Sep 21, 2007 9:35 am
@theli, I'm thinking about the /quake kind of thing. However, there are enough people out there who took long enough to realise where the root of their card was (in order to place the id1 directory) that a change like this could completely throw them! (seriously)
@username, y'know you can bind all the major keys in the menu under the key config menu? There's also an entry for the OSK in there too, so you don't have to touch the config file if you don't want to. However, if you want to make aliases you're gonna have to use a text editor or the console - I'm not too sure of how it could be done through a gui...
@dood77, yeah Omicron works fine and I don't remember there being any significant beef with setting it up. But since I can make the changes to the code to get it to run without actually thinking about it, I can't remember if the regular pre2 build of the game can run it or not! I'm pretty sure it can though...
@username again, max players is capped to two when you're hosting a game - you can't override this (if you can I'd like to know!). This is due to a RAM limitation and was one of things quickly cut when squeezing it into the 4MB. I ought to be able to up it without problem on the exram build, but the more players you host for (or bots you create), the slower its going to get!
I like the idea of having make a map / demo browser to allow you to start any level without using the console. Wouldn't be too hard to write...
Also, dood77's right about the third-person view since it's been done with several mods / TCs. Malice does it when you press the right button, and Skate is a 3rd-person mod where you're on a skateboard (with a texture that's too big to render, hence the checkerboard!)
One thing I've pitched to a few people now is how to set up wifi and slot-2 RAM card settings. I've had a few responses, but am interested in the opinions of others...
Quote: |
with the slot 2 RAM builds, there's a chance that the card used won't be auto detected or will be detected correctly, causing it to crash. What do you think is the most intuitive way to get the user to manually select their card and skip the auto detect step? I was thinking something along the lines of they hold A down during the "fat init..." step to get a box to pop up to change settings. Also if the card is correctly detected they may want to overclock the card - this needs to be done as early as possible so that not a lot of time is wasted if the card can't take it. Should I not use any card auto detection at all and require them to select their card and overclocking settings every time they run? That could get annoying though.
If the setting is saved to a file, what happens if it only works the once and the game won't start a second time? They'd never be able to make it to the menu to lower the speed! Also, card settings can't be added to the regular Quake config.cfg and so would have to go in that qdsopts.txt file - but I've had a lot of stick over that file so am relucant to use it! |
_________________
Big thanks to everyone who donated for Quake2
#141021 - theli - Fri Sep 21, 2007 10:29 am
simonjhall wrote: |
Also, card settings can't be added to the regular Quake config.cfg and so would have to go in that qdsopts.txt file - but I've had a lot of stick over that file so am relucant to use it! |
why not in config.cfg? :) // maybe just use some variable which is not used by DS build ?
#141032 - simonjhall - Fri Sep 21, 2007 11:01 am
It'd be nice to pop it in there with a variable like ds_cardtype or something, but the config.cfg/default.cfg stuff comes relatively late in the system setup as it requires the (weird) memory system to have been initialised and the pak files to have been loaded in etc.
In the retail game, if you want to change any memory-related things (eg number of particles, max players, heap size etc) you've got to do it through the command line...
_________________
Big thanks to everyone who donated for Quake2
#141034 - username - Fri Sep 21, 2007 11:46 am
simonjhall wrote: |
@theli, I'm thinking about the /quake kind of thing. However, there are enough people out there who took long enough to realise where the root of their card was (in order to place the id1 directory) that a change like this could completely throw them! (seriously) |
Seems to me that this would be the perfect solution; if the game could run from a /quake directory then you could set up the file directory for them to download and just drag/drop to their card, but what do I know, heh.
simonjhall wrote: |
@username, y'know you can bind all the major keys in the menu under the key config menu? There's also an entry for the OSK in there too, so you don't have to touch the config file if you don't want to. However, if you want to make aliases you're gonna have to use a text editor or the console - I'm not too sure of how it could be done through a gui... |
Really? Bah, retard factor = 578439754, sorry about that...
simonjhall wrote: |
@username again, max players is capped to two when you're hosting a game - you can't override this (if you can I'd like to know!). This is due to a RAM limitation and was one of things quickly cut when squeezing it into the 4MB. I ought to be able to up it without problem on the exram build, but the more players you host for (or bots you create), the slower its going to get!
I like the idea of having make a map / demo browser to allow you to start any level without using the console. Wouldn't be too hard to write... |
Ahh, good to know, I thought I was screwing up the maxplayers command somehow...
The "Start Custom Levels" option in Joymenu works by starting a level that you define with an alias command beforehand, then when you finish the level it opens a "levelname.cgf" file in the maps folder of the PAK that tells it which level to change to next. Not very user-friendly, but it works. The "Start Deathmatch" option is pretty similar except that before the map starts you pick a bunch of DM-specific options (number of bots, single-weapon modes, stuff like that). Don't know if any of that was worth bringing up, but there ya go...
#141036 - simonjhall - Fri Sep 21, 2007 12:13 pm
So it's like a level playlist?
_________________
Big thanks to everyone who donated for Quake2
#141040 - Spike - Fri Sep 21, 2007 12:45 pm
simonjhall wrote: |
I like the idea of having make a map / demo browser to allow you to start any level without using the console. Wouldn't be too hard to write... |
username wrote: |
The "Start Custom Levels" option in Joymenu works by starting a level that you define with an alias command beforehand, then when you finish the level it opens a "levelname.cgf" file in the maps folder of the PAK that tells it which level to change to next. Not very user-friendly, but it works. The "Start Deathmatch" option is pretty similar except that before the map starts you pick a bunch of DM-specific options (number of bots, single-weapon modes, stuff like that). Don't know if any of that was worth bringing up, but there ya go... |
I like both these ideas.
To have a death match option available from the GUI would be great. Especially a customizable one with say instant gib, low gravity setting, last man standing modes etc.. would be ace.
#141041 - username - Fri Sep 21, 2007 12:45 pm
simonjhall wrote: |
So it's like a level playlist? |
Yeah, pretty much. The upside is that you can automatically play from one map to the next, and the system is reasonably easy to impliment. The downside is that you have to configure everything beforehand; unlike a browser where you can pick a map from a directory, the joymenu method forces you to create a list that you can't really deviate from without going to the console, which kinda defeats the purpose. Also, using this method, every time you finish a level it opens a a new .cfg file, so if you have 300 deathmatch maps, you need 300 .cfg files with changelevel instructions. Easy enought with the proper batch file, but still, user-friendliness takes a hit.
Also, just realised - the reason I hadn't found the OSK bind in the key config menu is because it's only in the wifi build, not the regular pre2. Doh!
Are you still looking for Scourge Of Armagon?
#141045 - simonjhall - Fri Sep 21, 2007 1:47 pm
What happens when one map switches to the next - do you carry over all your weapons and health, or is it the equivalent of using the map command?
And I chose not to update the non-wifi build with the OSK since it adds several kilobytes to the size of the executable and I didn't want to risk making some levels unplayable at the expense of a keyboard! Some of my poor testers ran the game to death trying to find the sections of the game where it has to swap out to disk - I doubt they'd want to do it again!
Anyway the keyboard will be much more functional in the next release (functional shift keys, for example). And I've got the find the VRAM for touch buttons...somewhere... That's gonna be a bit of a mission. A splash screen couldn't hurt either...
And Scourge - I'll get back to you. I think I have it already.
Btw has anyone ever seen a mod or TC which has a black text on white background (or similar) console? Since I don't draw the background image (VRAM...) but do preserve the font and its colour if there's a dark font you'll find it really hard to read due to the lack of background. Catching cases like this would be nice.
_________________
Big thanks to everyone who donated for Quake2
#141053 - username - Fri Sep 21, 2007 4:13 pm
simonjhall wrote: |
What happens when one map switches to the next - do you carry over all your weapons and health, or is it the equivalent of using the map command?
And I chose not to update the non-wifi build with the OSK since it adds several kilobytes to the size of the executable and I didn't want to risk making some levels unplayable at the expense of a keyboard! Some of my poor testers ran the game to death trying to find the sections of the game where it has to swap out to disk - I doubt they'd want to do it again!
Anyway the keyboard will be much more functional in the next release (functional shift keys, for example). And I've got the find the VRAM for touch buttons...somewhere... That's gonna be a bit of a mission. A splash screen couldn't hurt either...
|
In Joymenu there is a "Keep Status" option, defaulted to off, that carries over weapons and health; how this works, I don't know. I can't say I've paid enough attention to know if it's a changelevel thing or something specific to Joymenu.
I should probably mention - Joymenu itself takes the form of PAK2, PAK3 is a dedicated music pak and PAK4 contains two folders, the "maps" folder and the "maplist" folder which contains the config files for custom leve/deathmatch selection.
Fair enough about the OSK, I just wish I'd paid more attention to your site beforehand, I spent ages trying to work that one out, heh.
Hmm, idea time... since Simon has put in so much work to give us what we have so far, why don't the rest of us come together and try to come up with some DS-specific QUake mods so that, come next relea,se there'll be heaps of cool stuff to play?
#141065 - tepples - Fri Sep 21, 2007 7:28 pm
simonjhall wrote: |
Btw has anyone ever seen a mod or TC which has a black text on white background (or similar) console? Since I don't draw the background image (VRAM...) but do preserve the font and its colour if there's a dark font you'll find it really hard to read due to the lack of background. Catching cases like this would be nice. |
Can you just average the color of the background image and use that as the background color?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#141079 - JLsoft - Fri Sep 21, 2007 10:23 pm
simonjhall, would it be possible/easy for QuakeDS to support 'skin groups' like the original engine can?
Basically, there's a flag in the .MDL that lets you set up automatically-animated texture cycling, along with delay-in-ms for each 'frame', just like you can for actual model animation frames (frame groups).
-
See 5.3.1 in http://www.gamers.org/dEngine/quake/spec/quake-spec34/qkspec_5.htm
-
(The main editor I know of that could properly set up skin groups and frame groups was the final QuakeME/QME version, 3.1 preview 2)
Sorry I can't think of any mods offhand that use this, but it -is- useful, especially when planning out some QuakeDS-engine-specific TC's/etc :)
...also, will the next release display .SPR sprites? :)
#141142 - simonjhall - Sat Sep 22, 2007 2:39 pm
username wrote: |
Hmm, idea time... since Simon has put in so much work to give us what we have so far, why don't the rest of us come together and try to come up with some DS-specific QUake mods so that, come next relea,se there'll be heaps of cool stuff to play? |
This would really nice. I was seriously chuffed when that rocket arena mod was made, but annoyed that that was the only one. I guess the hard bit is coming up with ideas for games which are best played on a handheld...
@jlsoft, yes the game supports skin groups. In pre2 it's broken, but will be working in the next version since one of the official expansion packs require it.
And yeah, there will be textured (and properly z-sorted) particles and sprites. It's top of my list :-)
@tepples, yeah that's what I thought too but it might look a bit shit. I'll experiment. Actually, since the background image is an indexed coloured image what do you suggest to get the 'average' colour? I can think of crappy ways...
_________________
Big thanks to everyone who donated for Quake2
#141160 - tepples - Sat Sep 22, 2007 7:48 pm
simonjhall wrote: |
@tepples, yeah that's what I thought too but it might look a bit shit. I'll experiment. Actually, since the background image is an indexed coloured image what do you suggest to get the 'average' colour? I can think of crappy ways... |
The following untested code illustrates the approach that I was thinking of:
Code: |
enum {
RED_MAX = 0x1F,
GREEN_MAX = 0x1F,
BLUE_MAX = 0x1F,
RED_SHIFT = 0,
GREEN_SHIFT = 5,
BLUE_SHIFT = 10
};
typedef unsigned int RGBColor;
typedef unsigned short PALETTE[];
static inline unsigned int getr(RGBColor color) {
return (color >> RED_SHIFT) & RED_MAX;
}
static inline unsigned int getg(RGBColor color) {
return (color >> GREEN_SHIFT) & GREEN_MAX;
}
static inline unsigned int getb(RGBColor color) {
return (color >> BLUE_SHIFT) & BLUE_MAX;
}
static inline RGBColor makecol(int r, g, b) {
return (r << RED_SHIFT) | (g << GREEN_SHIFT) | (b << BLUE_SHIFT);
}
RGBColor getAverageColor(BITMAP *bmp, PALETTE pal) {
unsigned int totalRed = 0, totalGreen = 0, totalBlue = 0;
unsigned int totalPixels = bmp->w * bmp->h;
/* make sure that the cumulative component values can
fit in an unsigned int */
assert(totalPixels <= UINT_MAX / GREEN_MAX);
for (unsigned int y = 0; y < bmp->h; ++y) {
for (unsigned int x = 0; x < bmp->w; ++x) {
unsigned int index = bmp->line[y][x];
if (index == 0) {
/* pixels whose color index is 0 are transparent,
so don't count them in the average */
totalPixels -= 1;
} else {
RGBColor palEntry = pal[index];
totalRed += getr(index);
totalGreen += getg(index);
totalBlue += getb(index);
}
}
}
/* make sure we didn't get a completely transparent image */
assert(totalPixels > 0);
return makecol(totalRed / totalPixels, totalGreen / totalPixels, totalBlue / totalPixels);
}
|
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#141229 - username - Sun Sep 23, 2007 10:04 am
simonjhall wrote: |
This would really nice. I was seriously chuffed when that rocket arena mod was made, but annoyed that that was the only one. I guess the hard bit is coming up with ideas for games which are best played on a handheld... |
Well I guess a lot of ideas hinge on the eventual functionality of the wifi capabilities. A thought I just had - would there be any possibility of an online scoreboard/leaderboard type thing? Probably impossible for adhoc games but maybe a PC server could be modified to upload scores and such. This isn't something I'd expect you to do, just thinking out loud.
Considering how lame Quake Arena is sounding so far, I really think your work needs all the outside support it can get. I don't really know a hell of a lot so all I can do right now is test the mods that already exist, which I'm in the process of doing, so I'll try to stop bombarding you with questions/comments and let you concentrate on getting something done, heh.
#141280 - Dood77 - Sun Sep 23, 2007 8:00 pm
I'm really glad QuakeDS is picking up speed again! I'm excited for particles, which were really the only thing not done by the 3D engine, except the non-power-of-two textures, did you sort this out? No big deal though, I'm more excited for particles.
I think I'm gonna go search out some quake mods and try and tweak them for QuakeDS... There was this one called Quake 1 Arena I saw a long time ago that really emulated the gameplay of Quake 3 incredibly well... A simple mod selector at the very initial stage in QuakeDS would be nice right about now, maybe you could use Lick's directory searching library (modified to look for .PAK files) to find mod directories and use their folder names to make a little menu?
Anyway I hope I can find some good mods, and good luck on those particles!
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#142157 - theli - Fri Oct 05, 2007 12:46 pm
simon, any news you can share?
#142163 - simonjhall - Fri Oct 05, 2007 3:08 pm
I've been busy with other things recently, and I've not got a free weekend this month!
Anyway,
- particles are in and are rendered 100% correctly, however they need optimisation since they're still done with floating-point
- sprites (eg explosions) are in and rendered and animated correctly, however on the first instance of an explosion you don't get to see it since the textures haven't yet been loaded (textures are loaded and cached when they're needed, not at the beginning of the level). This looks a bit odd, so I may play everthing a frame behind or something...
- rendering performance has been improved again, and there's still more to go (although rendering performance has not been the bottleneck for many many months)
- world processing performance has had a right kick up the arse but is still pretty slow
- the performance of the game is primarily bound by the performance of the RAM, so I'm looking into pld-ing data if I can, to improve the speed
That's about it.
_________________
Big thanks to everyone who donated for Quake2
#142403 - sonny_jim - Mon Oct 08, 2007 11:14 pm
Great to hear you're keeping up the good work, here's a pressie for you, see if you can guess what it is?
[Images not permitted - Click here to view it]
;-)
#142533 - Dood77 - Wed Oct 10, 2007 2:40 am
Lol, didn't think of it until I read the title on the image.
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#143622 - simonjhall - Wed Oct 24, 2007 9:08 pm
Barely related to this thread, but I just discovered the power of the hardware divide and square rooter! Wow it's fast! ('fast' and 'DS' rarely go together)
I've had a dodgy skybox in Quake for many months now (it looks like a box, not a sky since the texture co-ordinates treat it like a box, not a plane) so I had a chat with the graphics buffs at work today about it, and they talked me through Kraz-e Karmack's code to render the sky, but it requires divides and square roots.
I had a quick go at implementing a slow, floating-point version on the DS (which worked first time...hmm...) but after timing it, computing texture co-ordinates was weighing in at 29000 cycles / surface! After a bash with the hardware divider and sqrter and it's down to 3850 cycles / surface! Not bad for 20 mins work :-)
Although 3850 sounds bad (it is definately slower than computing tex co-ords for normal surfaces) there are very few sky surfaces in the scene, so staring at the sky only adds ~1ms / frame...
So yeah, I'd advise using the hardware dividers if you can if you have a lot of divides or square roots to do. Teh awesome, teh.
_________________
Big thanks to everyone who donated for Quake2
#143627 - DekuTree64 - Wed Oct 24, 2007 9:31 pm
Heck yeah. And best of all is that you can do other stuff while they work, so really the only time you're spending is the store/load instructions to the registers.
Just be sure to save/restore the original register values if you're in an interrupt, so you don't destroy anything the main loop was doing.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#143725 - moncho_again - Thu Oct 25, 2007 5:47 pm
Hey!
Just downloaded quakeds... very good!
I got a problem, however... on starting underearth (the hidden level from ep.2 IIRC), the app freezes & says "no more edicts" or something. I can provide .sav to test it.
Thanks for porting quake to the ds!
- Moncho
#143729 - simonjhall - Thu Oct 25, 2007 6:25 pm
Yeah, email me the save file.
_________________
Big thanks to everyone who donated for Quake2
#143733 - moncho_again - Thu Oct 25, 2007 6:43 pm
Ready. It should come your way anytime now.
Thanks again for porting QuakeDS!
- Moncho
#146301 - John59 - Sun Dec 02, 2007 11:06 am
Hi Simon,
I just wanted to ask if there is any news on Quake? It has been about 6 weeks since we have heard anything from you. I've been following this project for over a year now and am eager to see it released. Thanks for all the effort you have put in to this so far. Any chance we might see another release before Christmas Simon?
Thanks and keep up the good work.
John
#146304 - simonjhall - Sun Dec 02, 2007 1:19 pm
Nah I've not touched it, bar make the changes to get it to save on the M3 (which I forgot to mail out to people...). Other than that, the game's essentially done, although getting ad-hoc into the game is still a maybe (esp since I've already done half the work).
_________________
Big thanks to everyone who donated for Quake2
#146306 - John59 - Sun Dec 02, 2007 2:39 pm
Hi Simon,
thanks for the update, good to hear that things are still moving forward. If the work is basically done would you release a version 1 any time soon? Also are you still thinking about porting Quake 2. Thanks again.
John
#146308 - simonjhall - Sun Dec 02, 2007 4:24 pm
Yeah it's in the announcements forum, http://forum.gbadev.org/viewtopic.php?t=14410
This is pretty much the latest and most complete version. However I've just found a bunch of graphics optimisations, which may reduce the pop-in of models on high-poly levels (eg e4m1). I'll stick them into the game when I get round to it...
I'm working on Q2 *right now*, and it's quite playable. I'm just trying to sort out some of the rendering problems right now ;-)
_________________
Big thanks to everyone who donated for Quake2
#146521 - John59 - Wed Dec 05, 2007 9:35 am
Thank you Simon!
What a great release, I am really enjoying this. It feels like 1996 all over again, although Quake 2 IMO was a much better game this really is brilliant work. Cheers and thanks again Simon.
John
#150877 - goofy - Thu Feb 14, 2008 1:44 am
Hey Anyone get TC or Mods running with the EXRAM build? Every TC I tried worked for a little and then began suffering massive slowdown, malice included, the first level was playable and the second not so much.
I have a ds lite, m3 ds simply, and a 3in 1 EZ, anything I'm not doing? or can do to get faster speeds? or is dem the ropes?