Next Generation Emulation banner

1 - 20 of 27 Posts

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #1 (Edited)
DSemu (GBAemu) WIP thread!

Well things to be getting along well for the GBA part of the emu. Here's what the author had to say today:

Thursday, 23rd December 2004
Once again, I've decided to resurrect the VBA-compare register dump, to try to highlight CPU bugs. And after running a few demos, the only "bugs" I can find are differences in timing. Dare I say that the CPU is fully working? I doubt it is, but the evidence leans in that general direction.

Of course, there must be a reason for these demos not to be working. And my nose tells me it's the graphics. (Being the only other major component of the system so far, it'd have to be really.) So, I'm going to have to set about rewriting the GPU. Yay fun!
EDIT: More news. Seems like coding part of the DS is gonna start soon :)

Friday, 24th December 2004
As beginning preparations for DS code, I'm starting to work on the coprocessors for the ARM series. Today was disassembly day, and I've managed to hack in disasm support for CPD/MRC/MCR. oh frabjous day.
DSemu HomePage
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #2 (Edited)
Since DSemu has so many updates i guess we can do the same thing as the ZSNES thread and keep all the WIP updates here. If an admin can change the title of this thread to "DSemu (GBAemu) WIP thread" id appreciate it :)

Here's the latest update:

Sunday, 26th December 2004
People have said they don't like me putting all these tiny updates on the site. Well, I couldn't care less; you're getting 'em.

I've had a bug in the debugger (!) highlighted for me; when you scroll up and down the disassembly, the addresses for relative branches change. They were referred to the original value of r15, not the scrolled value. This should be all good now.
DSemu HomePage
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #3 (Edited)
Two more update

Tuesday, 28th December 2004
I've been getting silly numbers of complaints that the emu crashes when it's a certain number of levels down in the directory structure, or when the filename gets too large. It's actually the latter that's the real problem, since I have a pathname 64 characters long that's 9 levels deep.

But sixty-four?! I thought MAX_PATH was 260! I'm gonna try to track down where the crap this disctinction happens.

UPDATE. So, buffer overflows are the most common vulnerability in an application, right? What happens when you write a string bigger than 80 characters into an 80-char space on the stack? You guessed it; big-time breakage. All fixed now!
Monday, 27th December 2004
I've just been looking through the HUGE opcode table, and I noticed some things. 256 SWIs all the same, 256 Bs all the same... there's a bit too much redundancy. I can just feel my Athlon's cache collapsing and gasping for breath every time this 1MB table wades in. So I'm gonna reorganise the tables.

In other news, LDRD/STRD are done! I really can't see code using the Enhanced DSP saturation functions, so that's the ARM9 essentially done. Just need to see if this new table layout speeds things up some.

8 hours later, I've just realised something. All this effort is for one time around the ARM code, since it all gets cached. AND, if I cache a decoder instead of an opcode, I'll actually be slowing the emu down. Reverting to original code!
DSemu HomePage
 

·
It’s Me .. I still Exist
Joined
·
1,224 Posts
and another

Wednesday, 29th December 2004
So, yet more attempting to get some compatibility on the go. I tried to run Clouds, which ran fine before, and now crashes trying to read beyond the ROM in the 0800 range. Simple enough to fix that, I guess; just have the MMU return FFFF for out-of-range reads. And now Clouds runs again (and maybe some other things too).

Update: And as I suspected, a couple more demos do indeed run; peapah and Calc. Screenshots are up, if you require.
 

·
It’s Me .. I still Exist
Joined
·
1,224 Posts
Thursday, 30th December 2004
Thanks to exoticorn, I've had another bug highlighted for me. His mandelbrot renderer makes a lot of use of the long multiply functions, SMULL in particular. And it turns out that I couldn't draw the fractal, because I was retrieving the results from the long multiply in the wrong order. Yay. Swap them round, and you get the image in Screenshots.

Of course, that ROM is stripped and runs without interrupts. The full version crashes (in the dispatch function; weird). So I've yet to sort that out.
http://dsemu.oopsilon.com/
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #6
Saturday, 1st January 2005
Gregorian New Year rolls 'round again. After discussion with a certain someone, I've got a few ideas for optimisation and speedup. The first one to be implemented is instead of checking for the T bit in CPSR, making T another of the specialised flags (I'm supposed to have 8, after all); that way, I eliminate one AND from the dispatch. You'd be surprised what 1 AND means for speed.

Also, since it's optimisation time, it's probably high time that I moved to beta D. So, 0.0.1d is now available.
DSemu HomePage
Beta D (0.0.1d) Download Page
 

·
<font color="#FF0066"><b>Advanced Newbie</b></font
Joined
·
5,797 Posts
well, the thing with the ZSNES WIP thread, was that with every WIP there was a download (IIRC) this works too anyway :p
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #8
* Lady said:
well, the thing with the ZSNES WIP thread, was that with every WIP there was a download (IIRC) this works too anyway :p
well... WIP doesnt necesarly mean a download. I just found it better if they were regrouped like this :p
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #9
Monday, 10th January 2005
So er, I've been told that sprites are rather important things to have. And I tend to agree with that, so I'm gonna look into implementing them. Never having coded for a GBA doesn't help me in that regard, though; I could be a while here.
DSemu HomePage
 

·
Experenced But New User
Joined
·
866 Posts
Norbi said:
Sorry for slight offtopic, but the Admins should really consider allowing you to post news on the home page...
I think the emulator accualy has to show some progress in being a NDS emulator before it hits the main page. Anyways, I hope for the best with NDS emulation!
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #12
Viper_Viper said:
I think the emulator accualy has to show some progress in being a NDS emulator before it hits the main page. Anyways, I hope for the best with NDS emulation!
indeed, this is why its only a WIP thread. Releases should be posted though
 

·
KO'ed User
Joined
·
935 Posts
Viper_Viper said:
I think the emulator accualy has to show some progress in being a NDS emulator before it hits the main page. Anyways, I hope for the best with NDS emulation!
I mean overall. Chrono out of all members is posting the most new on the forum.
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #14
Sunday, 16th January 2005
I took some advice on the structure of the MMUrdS function; instead of a switch(), I now have a set of strategically placed bitmasks and if's. I got a few FPS out of that, always good.

Also been working on making the emulator easy to run from the command line. Now you can simply type "dsemu [myrom]" and it'll be fine. Just one problem at the moment; the File/Open menu keeps wanting to pop open; don't ask me why.
DSemu Homepage
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #15
Friday, 21st January 2005
Yeh, so I haven't updated in a little while. It's been a (relatively) busy week, I've had to go out of the house at least once. However, there has been work on the emu.

For one, I now have an OAM! 1k of memory mapped into 07xxxxxx, for the sprite renderer to work with. Second, I'm reading the x and y coords of sprites and drawing white blocks on the screen. It's not exactly perfect (it's nowhere near working), but it's there. So progress is being made, don't worry.
DSEmu Homepage
 

·
Registered
Joined
·
350 Posts
Saturday, 22nd January 2005
We're starting to get somewhere. At least one ROM displays output as it should. The guy doesn't move, but he's there; that's gotta be a good start. Check it out on the screenshots page.

Right now, sprite support is hecka rudimentary. Nothing else that I've tested runs, and there's no support for anything beyond 8x8 as far as I know.

Two hours later: Slight problem. I was reading from the background palette instead of object palette. Now we're starting to get somewhere; check the Screenshots for mic's OAM test.
A new update!
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #17
Monday, 31st January 2005
Ok. I tried fixing the shifting issues, and no luck on getting the tester say "ok". I'm gonna single-step through the tester's code, but to do that I'm really gonna need breakpoints. So, you guessed it; the next few days will be concerned with getting my head around breakpoints.

In other news, I decided to fire up GBA Linux, since it seems just to run text mode and there won't be huge graphic issues. And sure enough, it runs. To a point. I'll have to work out why it gets stuck on the delay loop, but I'm guessing it's an interrupt or a timer thing.
Saturday, 29th January 2005
Hm. Where'd Friday's entry go? Never mind; I had two hard drives fail yesterday, something has to go missing along the line somewhere. Anyway, I've been passed a demo written in DragonBASIC, and it runs just fine (check the Screenshots page for input-test). That's the first verified dBASIC test to work.

I've been informed that my data-processing shift handling is a touch broken. And the informant would be right about that; my code for eASR, eLSR and RRX is so badly divergent from the spec, I don't know how it even made it into the codebase. Looks like I'll have to get on with fixing that.
DSemu Homepage
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #18
Friday, 4th February 2005
Ok, we're slowly starting to get somewhere. I've been hacking at the extended shift modes, and have managed to get the original error set down to something much smaller. Again, thanks to mic for this; it's helping me out immensely.
Thursday, 3rd February 2005
Darned thing didn't update again. I'm starting to think my Samba install is having issues with passwords. Anyway, my last post was concerned about mic's new GBA-stress-test ROM, and how DSemu fails it on plenty of counts.

From what I can see, it's the extended shift modes of data-process addressing that falls over; I've decided that takes precedence over me trying to get my head around breakpoint implementation, so I'm gonna work on these (not exactly small) bugs before I go for breakpoints.
DSemu Homepage
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #19
Thursday, 10th February 2005
Finally tracked down the rest of the bugs that cause GBAstress to give FAIL messages. Mostly little things like not setting carry before a carry-using subtract, but the MOV issue was fun. Turns out that ARM7TDMI actually defines an output for the Unpredictable scenario of r15 shifted by a register (TDMI adds 12). Check the Screenshots; I quite like all my green lights.

mic's in the process of producing a Thumb stress ROM, and that's a different story. FAILs across the board, even on things he doesn't test; I broke something somewhere.
Wednesday, 9th February 2005
So, I took a quick look at what's been figured out about the DS memory map today. It doesn't look all that different to the GBAs, to be fair. I decided to try a Tetris ROM hacked together by DesktopMan, and sure enough it crashes within one scanline, jumping to empty RAM. Maybe it's a little more different than I first surmised.
DSemu Homepage
 

·
Administrator
Joined
·
8,200 Posts
Discussion Starter #20
Friday, 18th February 2005
After a fair amount of bad code, dovoto's first framebuffer test for the DS looks like it's running. Check the screenshots page for a look, and note how the different size of the screen causes all the other screenshots to fall over and break.

You'll also note the massively reduced framerate relative to most of the shot images. This has nothing to do with the DSness of the ROM under test, but is in fact a symptom of my development system now no longer being an Athlon, but a P3-600. Yes, I'm gonna need some massive skills to get an emulated core up to full speed on this thing.
Thursday, 17th February 2005
I now have seperate DS mmu and gpu source files. The DS mmu copies the ROM over to 02004000 as the hardware seems to, and the gpu does nothing different (not even the resolutions) yet. Even so, I now have gba.dll AND ds.dll, and that is good news.

Good enough to warrant a versioning up, I think. I've hit beta E, so y'all can celebrate this fact by downloading it and trying it out. If you want to load a DS rom, the only way to change DLLs right now is to modify LoadDS in the INI file. You can probably work out what values the variable can take.

And before I get all sorts of complaints, I know it'll crash. I've just put the compilation framework down, that's all.
Wednesday, 16th February 2005
Apologies for the lack of updates these last couple of days; life's starting to actually get busy, for a change.

Ok then. Yet more news about the core, you're probably getting bored of it now. I've patched up most of LDR, since it turned out I was doing something really weird with the source address before reading from it. Just a couple of BADs left there.

Also, mic added MRS/MSR to the wrestler, and they initially failed incredibly badly. In the end, I found out that I wasn't actually updating my internal copies of the flags when I was changing CPSR (and vice versa, of course); that could be a contributing factor.
Sunday, 13th February 2005
Apologies for the extended downtime yesterday. It seems that my ISPs ATM relays went down for the whole day. And since it's a weekend, no-one was in the office to fix it. I guess the problem fixed itself eventually; it didn't have a choice, since there'd be no-one to do anything about it until Monday.

In emulator news, mic's added misaligned word reads to the ARM wrestler, and you know what that means. Yes, a full screen of BAD Rd on LDR. I've talked about this in the past, but it seems that now I might actually have to do some work towards fixing this.
Friday, 11th February 2005
The ARM instruction validator that mic's working on grows all the time. It has 4 screens now! And after a bit of hacking (most notably, fixing rotated-operand LDR to actually rotate the carry in for RRX), I get green lights across the board. I've been assured that Gebea and sGBA do just as well, though, so I still have better competition.

I've packaged the all new ARM-wrestler ROM into the download Zip, so head over to Downloads and try it out.
DSemu Homepage
Downloads
Screenshots
 
1 - 20 of 27 Posts
Top