| View previous topic :: View next topic |
| Author |
Message |
FluBBa Moderator

Joined: 14 Feb 2004 Posts: 2048 Location: GBG
|
Posted: Thu Mar 27, 2008 3:48 pm Post subject: SMSAdvance V2.4 |
|
|
New SMSAdvance finally, thanks to Dwedits idea of copying the first 2 rom banks to VRAM allmost all games now run full speed.
| Quote: |
*Added copying of first 32kB ROM to VRAM for faster execution.
*Added selection of machine.
*Added correct noise generation for SG-1000 emulation.
*Added correct palette in TMS9918 modes on SMS machines.
*Added different vdp capabilities depending on selected machine.
*Added some very basic Mode5 support when Machine=MegaDrive.
*Added different io maps depending on selected machine.
*Added support for the SMS1 tilemap address masking (Ys(J)).
*Added support for turning on/off internal RAM.
*Added auto save of SRAM (if it's allready present) when entering menu.
*Added auto turn off of Bios when no header found (on machine=Auto).
*Added auto region (Pop Breaker GG (J)).
*Fixed support for Dodgeball King (KR).
*Fixed pushing and poping of AF register (Adventure of Batman GG).
*Fixed sprite bugs in unscaled mode on Codemasters games.
*Fixed initializing of all CPU regs on reset.
*Fixed timing of HALT instruction.
*Fixed palette setting for TMS9918 modes on GG.
*Fixed noscrolling for TMS9918 modes.
*Fixed up Mode1 graphics a bit.
*Fixed correct HCounter and latching.
*Better switching between TMS9918 and SMS video modes.
*More info shown from the game header.
*Optimised tile rendering for mode 0 & 2 (for real this time).
*Optimised all Z80 memory reads, one instruction and cycle shorter.
*Optimised DAA opcode.
*Optimised DEC opcodes.
*Optimised SBC A/HL opcode.
*Optimised one of the SRA opcodes.
*Optimised CPI, CPD, CPIR & CPDR opcodes.
|
Edit: Gamma setting fix.
Download
SMSChecker _________________ 0x5AB07A6E
Last edited by FluBBa on Mon Jan 26, 2009 10:05 am; edited 3 times in total |
|
| Back to top |
|
 |
lolololox Member
Joined: 28 Dec 2007 Posts: 12
|
Posted: Thu Mar 27, 2008 3:58 pm Post subject: |
|
|
Great news.
I test it now.
Thanks for all your work on this emulator and for all your work on the others. |
|
| Back to top |
|
 |
Dwedit Administrator

Joined: 26 Feb 2004 Posts: 2218 Location: Chicago!
|
Posted: Thu Mar 27, 2008 5:34 pm Post subject: |
|
|
Yeah, sonic 1 will probably die in the jungle zone if you don't also include the GBAMP version's fixes. _________________ Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats! |
|
| Back to top |
|
 |
FluBBa Moderator

Joined: 14 Feb 2004 Posts: 2048 Location: GBG
|
Posted: Thu Mar 27, 2008 6:23 pm Post subject: |
|
|
So how did fix it in the GBAMP version? Did you move the tiles and ROM a bit closer to the start of VRAM and then put some special sequence after the ROM?
Maybe I should put in an option to enable/disable the copying to VRAM... _________________ 0x5AB07A6E |
|
| Back to top |
|
 |
Dwedit Administrator

Joined: 26 Feb 2004 Posts: 2218 Location: Chicago!
|
Posted: Thu Mar 27, 2008 6:58 pm Post subject: |
|
|
Sonic 1 has a JR which branches ahead of the GG page 2 footer. I moved the ROM in VRAM earlier, then made up the amazing fake Z80 instruction FDFD which tells the CPU to go back to the correct program counter.
I hope the new DAA instruction isn't that damn buggy one that gave me so many troubles...
The last four tiles are the sprite tables, right? I bet you could just force the last 4 tiles to never update, then move the ROM in VROM back 4 tiles. Fill the 4-tile area past the second page with FDFD bytes.
Edit:
Remember that there's always a GG header at the bottom of page 2, so you'll never see a game directly walk off the edge of the bank, but it still may branch off the end. _________________ Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats!
Last edited by Dwedit on Thu Mar 27, 2008 7:42 pm; edited 1 time in total |
|
| Back to top |
|
 |
Dwedit Administrator

Joined: 26 Feb 2004 Posts: 2218 Location: Chicago!
|
Posted: Thu Mar 27, 2008 7:30 pm Post subject: |
|
|
Wow, those CPU optimizations are amazing! O_O _________________ Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats! |
|
| Back to top |
|
 |
juliobbv Member
Joined: 28 Feb 2007 Posts: 18
|
Posted: Fri Mar 28, 2008 12:22 am Post subject: |
|
|
I smell a slightly faster Goomba Color coming up soon . _________________ If I make a grammar or a spelling error, please let me know.
Nervous Brickdown fan. |
|
| Back to top |
|
 |
Dwedit Administrator

Joined: 26 Feb 2004 Posts: 2218 Location: Chicago!
|
Posted: Fri Mar 28, 2008 1:21 am Post subject: |
|
|
So what exactly is this "Megadrive" mode, and which games use it? I don't see any 68000 emulator in there, so it's obviously not emulating an entire mega drive. _________________ Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats! |
|
| Back to top |
|
 |
Dwedit Administrator

Joined: 26 Feb 2004 Posts: 2218 Location: Chicago!
|
Posted: Fri Mar 28, 2008 2:21 am Post subject: |
|
|
| juliobbv wrote: | I smell a slightly faster Goomba Color coming up soon . |
The optimization SMSAdvance used is to pick a table used very frequently (the memmap table), then stick it before the instruction jump table. That way you can immediately index into it using negative numbers, instead of wasting an instruction generating a relative address to that table.
So Flubba shaved off an instruction with every memory read! Cool stuff.
To try to do the same for Goomba Color would not be as easy. The memory map table isn't used quite as much in Goomba Color.
This is all because the GBC has memory mapped IO, so you need to handle different types of memory reads differently, so you need to do memory reads with a jump table. So while SMSAdvance uses the memmap table for everything, Goomba Color only uses the memmap table for jump-type instructions and stack operations.
Looks like I'll probably give the readmem table (jump table) a boost.
The memmap table is used 44% of the time, readmem table is used 56% of the time. _________________ Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats! |
|
| Back to top |
|
 |
Dwedit Administrator

Joined: 26 Feb 2004 Posts: 2218 Location: Chicago!
|
Posted: Fri Mar 28, 2008 4:19 am Post subject: |
|
|
So Flubba, are you going to do the Sonic 1 fix
(disable writes to last 4 tiles, move ROM back 128 bytes, fill area after ROM with FDFD garbage, add the fake FDFD instruction)
or should I do it instead?
Looks like that first step (with disabling writes to the last 4 tiles) doesn't hold true for SG1000 games, or SMS games using the SG1000 video mode?
Or maybe just play some more VRAM Shuffling... Just anything that will give an additional 128 bytes to the rom page. _________________ Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats! |
|
| Back to top |
|
 |
FluBBa Moderator

Joined: 14 Feb 2004 Posts: 2048 Location: GBG
|
Posted: Fri Mar 28, 2008 9:08 am Post subject: |
|
|
Yes I will look into it today, it was a little late yesterday (for me). _________________ 0x5AB07A6E |
|
| Back to top |
|
 |
FluBBa Moderator

Joined: 14 Feb 2004 Posts: 2048 Location: GBG
|
Posted: Fri Mar 28, 2008 4:56 pm Post subject: |
|
|
Fixed. Hopefully I didn't break anything else while moving around the VRAM and stuff. _________________ 0x5AB07A6E |
|
| Back to top |
|
 |
garcimak Member

Joined: 20 May 2006 Posts: 57 Location: Belgium
|
Posted: Sun Mar 30, 2008 11:11 am Post subject: |
|
|
Glad to see you back on smsadvance and thanks for the improvements you made.
Is there a way to get rid of objects glitches when playing with the vsync option off ? Not with all games but it occurs with samurai spirit; Fatal fury; James bond 007; GG shinobi 2 to list some of them.
edit : just noticed the broken save-state system with Excellent Dizzy Collection, The [SMS-GG].sms
edit2 : EZFA as well my F2A are losing the save-state files between sessions. Tested with 512 and 256kbits save type.
Last edited by garcimak on Fri May 09, 2008 1:49 pm; edited 2 times in total |
|
| Back to top |
|
 |
Dwedit Administrator

Joined: 26 Feb 2004 Posts: 2218 Location: Chicago!
|
Posted: Tue Apr 15, 2008 8:17 pm Post subject: |
|
|
I'm going over the code and getting rid of this "//Header Files? Who Needs em" nonsense. I'm already seeing some minor type disagreements resulting from not properly using header files. _________________ Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats! |
|
| Back to top |
|
 |
Dwedit Administrator

Joined: 26 Feb 2004 Posts: 2218 Location: Chicago!
|
Posted: Tue Apr 15, 2008 9:00 pm Post subject: |
|
|
I've just discovered that the source code you posted produces broken binaries! Could you upload a working version of the source code?
In other words, it looks like you forget to pack several changed files.
Yep, the video ram loads into the wrong origin address, overwriting the rom file. _________________ Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats! |
|
| Back to top |
|
 |
|