Testing the new Stella TIA core - Emulation - AtariAge Forums Jump to content Sign In Create Account Have You Played Atari Today? 2600 | 5200 | 7800 | Lynx | Jaguar | Forums | Store AtariAge Forums Blogs Gallery Activity Calendar Subs More View New Content AtariAge Forums → Gaming General → Emulation Javascript Disabled Detected You currently have javascript disabled. Several functions may not work. Please re-enable javascript to access full functionality. Testing the new Stella TIA core Started by stephena , Dec 2 2016 8:25 PM stella tia core testers Page 1 of 12 --> 1 2 3 Next » Please log in to reply Go to first unread post 285 replies to this topic #1 stephena OFFLINE stephena River Patroller 2,756 posts Stella maintainer Location: Newfoundland, Canada Posted Fri Dec 2, 2016 8:25 PM OK, some of you may have noticed in the 'Stella 4.7.3 released' thread that a new TIA core is being developed for Stella, ported from the 6502ts project.  I'm happy to say that this will soon be in a state ready for preliminary testing.  I hope to have a some test builds ready on Monday or Tuesday, but I just wanted to let everyone interested know that it's coming.  Throughout this thread, I will update what's been added to each build, and hopefully be able to incorporate/fix some of the issues that you will find.  What we'll be looking for is a somewhat detailed report on the following: regressions against the old Stella core (ie, something worked in Stella before, and is now broken in the new core) regressions/deviations from real hardware (ie, something is broken in the new core, and didn't work in Stella either) improvements in the new core (ie, something that was broken in Stella before, but is now working in the new core) It's very important that we know the status in terms of one of the 3 items above, so we can narrow down how to fix a bug, and/or note where the new code actually works correctly. EDIT: The third test release is now available at  https://github.com/D...stella/releases .  Please read the issues and readme, and report bugs accordingly Trebor , Thomas Jentzsch , Nathan Strum and 6 others like this Back to top #2 Keatah ONLINE Keatah Quadrunner 16,354 posts Posted Fri Dec 2, 2016 8:54 PM La'Woot! Back to top #3 Thomas Jentzsch OFFLINE Thomas Jentzsch Thrust, Jammed, SWOOPS!, Boulder Dash, THREE�S, Star Castle 22,165 posts Always left from right here! Location: D�sseldorf, Germany Posted Sat Dec 3, 2016 2:56 AM Count me in! Maybe we should prepare a list of test ROMs, especially for the last two items? Also, if the current Stella core contains (or once contained) tweaks for special ROMs, these ROMs should be listed for regression tests too. alex_79 likes this Back to top #4 Keatah ONLINE Keatah Quadrunner 16,354 posts Posted Sat Dec 3, 2016 3:01 AM I'm happy to go through the material I have, at random, and look for corner cases or unusual things. Be aware I would only be comparing the old emulation to the new emulation as I do not have real hardware at my disposal. Back to top #5 DirtyHairy OFFLINE DirtyHairy Star Raider 94 posts Posted Sat Dec 3, 2016 3:04 PM I am looking forward to test feedback  I am currently tracking all emulation glitches and missing features in the issue tracker of my fork on github ( https://github.com/DirtyHairy/stella ). You can check out the tracker to get an overview of what should be working and what is know to be broken, and you're welcome to open new issues for any glitches you find. It also would be helpful if you could crosscheck emulation issues against 6502.ts ( https://6502ts.github.io/stellerator ) in order to check whether the issue was introduced in the process of porting the core to Stella. As for the current state of the implementation: the initial port of the 6502.ts core is complete, and we are now working on reenabling the remaining, Stella-specific features, including the debugger. This work is mostly done by Stephen; I will now start digging deeper into the remaining emulation issues and try to iron them out; first in 6502.ts and subsequently porting fixes to Stella. Keatah likes this Back to top #6 eshu OFFLINE eshu Moonsweeper 281 posts Posted Sun Dec 4, 2016 5:56 PM Hi - great news about the TIA core upgrade I hope it's ok to pre-emptively raise an issue here that I think I've at least tried to raise with the old core before....It's difficult to tell if it will be fixed by the new core as the roms I have to hand to demonstrate the issue have other problems in 6502.ts....It's an issue with RESMP0 (/RESMP1) it's been ages since I looked at it but I suspect it relates to the the interpretation of the following passage in the Stella Programmers Guide: RESMP0 (RESMP1) These addresses are used to reset the hoiz. location of a missile to the center of it’s corresponding player.  As long as this control bit is true (1) the missile will remain locked to the center of it’s player and the missile graphics will be disabled. I have a feeling that the issue is the TIA core in Stella interprets "center of it’s corresponding player" literally where it should probably be "4 pixels to the right of it's corresponding player", so that the location doesn't move for a double sized player etc... but it does in Stella - see http://atariage.com/...-3#entry2985254 for example binary. Back to top #7 DirtyHairy OFFLINE DirtyHairy Star Raider 94 posts Posted Mon Dec 5, 2016 6:17 AM Hi eshu! I just checked the rom you linked --- "other problems" is a nice description, that's the most psychedelic bug I've seen so far  . It does work mostly fine on the new 6502.ts TIA core in stella, though, but the paddle is glitched, and it very much looks like what you describe. The current description in the new core is just that: the position is adjusted to the center of the player (I couldn't find any definitive reference, and I currently lack real hardware to compare to). Thanks for the pointer, I'll change that to match real hardware once I get the 2600 I ordered from ebay last week. As a sidenote: do you have an idea what's going wrong in 6502.ts? It's not the TIA, so that leaves timers, CPU timing and bank switching. I'd definitely like to find out what causes the issue and fix it. Edited by DirtyHairy, Mon Dec 5, 2016 6:34 AM. eshu likes this Back to top #8 eshu OFFLINE eshu Moonsweeper 281 posts Posted Mon Dec 5, 2016 7:24 AM As a sidenote: do you have an idea what's going wrong in 6502.ts? It's not the TIA, so that leaves timers, CPU timing and bank switching. I'd definitely like to find out what causes the issue and fix it. Hi DirtyHarry My first guess would be timers - It's using TIM64T and INTIM to judge when to leave a kernel (as well as other stuff) that it looks like it's getting stuck in........I suspect the bug is made to look worse than it really is as things go a bit mad if it doesn't leave that kernel when it's meant to.......... Edit: In case it helps - I think (and it's pretty much pure guesswork) that the problem is probably occuring at: F10C: LDY INTIM F10F: CPY ram_C0 F111: BEQ LF100 (all in Bank 0) if INTIM is off, even by one, it will carry on this part of the kernel and bad things will happen..... Edited by eshu, Mon Dec 5, 2016 7:39 AM. Back to top #9 stephena OFFLINE stephena River Patroller Topic Starter 2,756 posts Stella maintainer Location: Newfoundland, Canada Posted Mon Dec 5, 2016 8:32 AM As a sidenote: do you have an idea what's going wrong in 6502.ts? It's not the TIA, so that leaves timers, CPU timing and bank switching. I'd definitely like to find out what causes the issue and fix it. I also suspect the timers.  Stella has had quite a bit of work over the years wrt timer behaviour, and fixes to make it work like real hardware (moreso than any other 2600 emulator).  There are many test ROMs floating around; I'll see if I can track some down. Back to top #10 eshu OFFLINE eshu Moonsweeper 281 posts Posted Mon Dec 5, 2016 11:26 AM Not really sure if this should be in the 6502.ts thread or this one, but it's TIA stuff so I hope it's ok here.... I thought I'd try some of the 32 character routines on 6502.ts - these are the ones that expose the issue with extra copies when using multiple RESP0/RESP1 on stella - it looks like the TIA core in 6502.ts gets that bit right - but it seems slightly off with the first copy of P0 (which is actually the second copy to the TIA as the first isn't drawn) on one of the RESP hits. DirtyHarry - a bunch of relevant binaries and pictures of the behaviour on real hardware can be found starting here: http://atariage.com/...-2#entry2280849 Back to top #11 DirtyHairy OFFLINE DirtyHairy Star Raider 94 posts Posted Mon Dec 5, 2016 2:03 PM In case it helps - I think (and it's pretty much pure guesswork) that the problem is probably occuring at: F10C: LDY INTIM F10F: CPY ram_C0 F111: BEQ LF100 (all in Bank 0) if INTIM is off, even by one, it will carry on this part of the kernel and bad things will happen..... You're right. I just checked and compared to stella, and during each spin of the loop, the timer picks up a delta of 1. I still have to investigate what exactly goes wrong, but that's the issue I also suspect the timers.  Stella has had quite a bit of work over the years wrt timer behaviour, and fixes to make it work like real hardware (moreso than any other 2600 emulator).  There are many test ROMs floating around; I'll see if I can track some down. Thanks alot, that'd be great. Not really sure if this should be in the 6502.ts thread or this one, but it's TIA stuff so I hope it's ok here.... I thought I'd try some of the 32 character routines on 6502.ts - these are the ones that expose the issue with extra copies when using multiple RESP0/RESP1 on stella - it looks like the TIA core in 6502.ts gets that bit right - but it seems slightly off with the first copy of P0 (which is actually the second copy to the TIA as the first isn't drawn) on one of the RESP hits. DirtyHarry - a bunch of relevant binaries and pictures of the behaviour on real hardware can be found starting here: http://atariage.com/...-2#entry2280849 This thread is fine for me, thanks alot for reporting  The reason for this is the glitching of the draw decode logic if repositioning happens while the decode is in progress --- this is mentioned in the "Re-triggering..." section of Andrew Towers' notes. Now that I have a testcase, I have done a first stab at implementing this corner case, and the 32 chars example looks fine to me now --- could you recheck? However, I am pretty sure that I still haven't got it completely right   In particular: The notes suggest that triggering at a specific clock may completely gobble the decode. Do you know which one? My last change just resets the decode logic. Do you know whether the missiles behave similarly? Edited by DirtyHairy, Mon Dec 5, 2016 2:05 PM. eshu likes this Back to top #12 stephena OFFLINE stephena River Patroller Topic Starter 2,756 posts Stella maintainer Location: Newfoundland, Canada Posted Mon Dec 5, 2016 2:11 PM As to the timer issue, the attached ROM works correctly in the old core in Stella, as well as the 6502ts one.  But when loaded in Stellerator, Donkey Kong is split in half and spread across the screen.  I remember that exact issue in an older version of Stella, and improving the M6532 emulation is what fixed it.  Now I don't remember the exact fix (I guess we could go through the svn commit logs), but at least it's somewhere to start. dk_sprite_demo.bin    4KB    37 downloads Back to top #13 eshu OFFLINE eshu Moonsweeper 281 posts Posted Mon Dec 5, 2016 3:57 PM Wow - quick work! Yep - the 32 char demos etc.. all look right to me now However, I am pretty sure that I still haven't got it completely right   In particular: The notes suggest that triggering at a specific clock may completely gobble the decode. Do you know which one? My last change just resets the decode logic. Do you know whether the missiles behave similarly? I'm afraid I really don't know either of these - some of the more hardware oriented members might have a better idea from the schematics..... Back to top #14 Thomas Jentzsch OFFLINE Thomas Jentzsch Thrust, Jammed, SWOOPS!, Boulder Dash, THREE�S, Star Castle 22,165 posts Always left from right here! Location: D�sseldorf, Germany Posted Tue Dec 6, 2016 4:27 AM Attached another ROM (Three.s) that has problems with the TIMER in Stellerator. And the TomInv5 ROM shows artifacts in Stellerator (and even more in Stella too). Attached Files Tominv5.bin    2KB    41 downloads Three.s (v1.02).bin    4KB    39 downloads Back to top #15 DirtyHairy OFFLINE DirtyHairy Star Raider 94 posts Posted Wed Dec 7, 2016 5:58 PM Hi Thomas! Thanks for the testcase  As for Tominv5.bin: I am aware of the glitch, but this will have to wait until I have improved debugging in 6502.ts (I am currently lacking conditional breakpoints a way to break in machine events like register writes). As for Three.s: how exactly do the timer glitches manifest? Back to top #16 eshu OFFLINE eshu Moonsweeper 281 posts Posted Wed Dec 7, 2016 8:27 PM Hi again Ok - I think this one is a regression from the old core, but I've never run the binary on a real machine - someone might be able to now with a harmony encore? it's an EFSC rom, the menu pointer is made up of a missle, and is supposed to be two pixels wide, I think NUSIZ1 should get changed just in time.....on old Stella it shows up 2 pixels wide, but just 1 on the test release. The relevant code is run out of zero page, it should be executed from about scanline 179 "scanline b1" in the Stella debugger will get you there, then it's the STX NUSIZ1 run from A6 Attached Files long005.bin    64KB    42 downloads Edited by eshu, Wed Dec 7, 2016 8:28 PM. Back to top #17 Thomas Jentzsch OFFLINE Thomas Jentzsch Thrust, Jammed, SWOOPS!, Boulder Dash, THREE�S, Star Castle 22,165 posts Always left from right here! Location: D�sseldorf, Germany Posted Thu Dec 8, 2016 1:29 AM As for Three.s: how exactly do the timer glitches manifest? If you run it in Stellarator start a new game. You can see extra pixel on empty spaces and dots, also some pixel are missing (e.g. the bottom of top dot on two dot tiles). I am pretty sure this is coming from slightly wrong INTIM values, because that's used as kernel index. Note: This only happens in Stellarator, but not in Stella using the new core. Edited by Thomas Jentzsch, Thu Dec 8, 2016 2:17 AM. Back to top #18 Thomas Jentzsch OFFLINE Thomas Jentzsch Thrust, Jammed, SWOOPS!, Boulder Dash, THREE�S, Star Castle 22,165 posts Always left from right here! Location: D�sseldorf, Germany Posted Thu Dec 8, 2016 6:56 AM I have added a few issues to the issue tracker. I hope they make sense and are not redundant. Back to top #19 alex_79 OFFLINE alex_79 Dragonstomper 897 posts Location: Italy Posted Thu Dec 8, 2016 10:19 AM Improvement in the new core: Old stella versions had a small graphical glitch in "Tapper" (circled in yellow in the  picture) Now it's fine with the new core (and in Stellerator too) Thomas Jentzsch , stephena and ClassicGMR like this Back to top #20 DirtyHairy OFFLINE DirtyHairy Star Raider 94 posts Posted Thu Dec 8, 2016 1:42 PM Hi eshu! Hi again Ok - I think this one is a regression from the old core, but I've never run the binary on a real machine - someone might be able to now with a harmony encore? it's an EFSC rom, the menu pointer is made up of a missle, and is supposed to be two pixels wide, I think NUSIZ1 should get changed just in time.....on old Stella it shows up 2 pixels wide, but just 1 on the test release. The relevant code is run out of zero page, it should be executed from about scanline 179 "scanline b1" in the Stella debugger will get you there, then it's the STX NUSIZ1 run from A6 Thanks, I have created an issue on github. Coincidentially, my 2600 Jr. arrived yesterday, and my harmony encore should be arriving soon  Also, that's a good upportunity to EF[SC] to 6502.ts. Are you perchance hitting NUSIZ just when the first pixel is being rendered? Back to top #21 DirtyHairy OFFLINE DirtyHairy Star Raider 94 posts Posted Thu Dec 8, 2016 1:47 PM Hi Thomas! If you run it in Stellarator start a new game. You can see extra pixel on empty spaces and dots, also some pixel are missing (e.g. the bottom of top dot on two dot tiles). I am pretty sure this is coming from slightly wrong INTIM values, because that's used as kernel index. Note: This only happens in Stellarator, but not in Stella using the new core. Ah, now I see, thank you. I have added a few issues to the issue tracker. I hope they make sense and are not redundant. Thanks alot for reporting --- they do make sense indeed Edited by DirtyHairy, Thu Dec 8, 2016 1:47 PM. Back to top #22 DirtyHairy OFFLINE DirtyHairy Star Raider 94 posts Posted Thu Dec 8, 2016 1:48 PM Hi alex_79! Improvement in the new core: Old stella versions had a small graphical glitch in "Tapper" (circled in yellow in the  picture) Now it's fine with the new core (and in Stellerator too) Nice Back to top #23 DirtyHairy OFFLINE DirtyHairy Star Raider 94 posts Posted Thu Dec 8, 2016 2:43 PM I have a feeling that the issue is the TIA core in Stella interprets "center of it’s corresponding player" literally where it should probably be "4 pixels to the right of it's corresponding player", so that the location doesn't move for a double sized player etc... but it does in Stella - see http://atariage.com/...-3#entry2985254 for example binary. I have adjusted RESMP for 16 and 32 pixel players. paranoid_0.01_real.bin now looks like the Stella version on the old core to me. What do you think? You can find a screenshot here  https://github.com/D...tella/issues/23  (if you can build from source, then you can also check the real thing). Edited by DirtyHairy, Thu Dec 8, 2016 2:44 PM. eshu likes this Back to top #24 eshu OFFLINE eshu Moonsweeper 281 posts Posted Thu Dec 8, 2016 5:36 PM I have adjusted RESMP for 16 and 32 pixel players. paranoid_0.01_real.bin now looks like the Stella version on the old core to me. What do you think? You can find a screenshot here  https://github.com/D...tella/issues/23  (if you can build from source, then you can also check the real thing). Nice - the screenshot looks perfect - if I get some time and am feeling brave I might try to build from source Back to top #25 Thomas Jentzsch OFFLINE Thomas Jentzsch Thrust, Jammed, SWOOPS!, Boulder Dash, THREE�S, Star Castle 22,165 posts Always left from right here! Location: D�sseldorf, Germany Posted Sat Dec 10, 2016 3:50 AM Hi again Ok - I think this one is a regression from the old core, but I've never run the binary on a real machine - someone might be able to now with a harmony encore? it's an EFSC rom, the menu pointer is made up of a missle, and is supposed to be two pixels wide, I think NUSIZ1 should get changed just in time.....on old Stella it shows up 2 pixels wide, but just 1 on the test release. The relevant code is run out of zero page, it should be executed from about scanline 179 "scanline b1" in the Stella debugger will get you there, then it's the STX NUSIZ1 run from A6 Can you provide an example which runs on Harmony? Back to top Page 1 of 12 --> 1 2 3 Next » Back to Emulation · Next Unread Topic → Also tagged with one or more of these keywords: stella, tia core, testers Atari Systems → Atari 2600 → Atari 2600 Official Release Date? Started by sramirez2008 , 16 Mar 2017 2600 , Stella , VCS 5 replies 405 views Rhindle the Dragon 22 Mar 2017 Gaming General → Classic Gaming General → Atari 2600's 20th anniversary Started by Nebulon , 29 Jan 2017 Atari , Stella , 2600 , VCS and 5 more... 16 replies 725 views Shawn 14 Feb 2017 Gaming General → Emulation → Stella website has moved Started by stephena , 17 Jan 2017 stella , github 2 replies 312 views TrekMD 17 Jan 2017 Gaming General → Emulation → Stella 4.7.3 released Started by stephena , 22 Nov 2016 stella , new release 1 2 44 replies 1,775 views Keatah 4 May 2017 Gaming General → Emulation → Stella icon change in Windows 10 Started by ChristopherDrum , 9 Oct 2016 stella , windows 10 0 replies 323 views ChristopherDrum 9 Oct 2016 1 user(s) are browsing this forum 0 members, 1 guests, 0 anonymous users Reply to quoted posts       Clear AtariAge Forums → Gaming General → Emulation Privacy Policy Guidelines · Contact Us Help Community Forum Software by IP.Board Sign In Use Facebook Use Twitter Need an account? Register now! Username Forum Password I've forgotten my password Remember me This is not recommended for shared computers Sign in anonymously Don't add me to the active users list Privacy Policy AtariAge Home 2600 5200 7800 Lynx Jaguar Forums Forum Home Blogs Gallery Map Subscriptions Store Store Home New Products Bestsellers Trade Your Games Gift Certificates General Contact Submit News Privacy Policy Legal Mailing List Follow AtariAge   Like us on Facebook AtariAge Facebook Group Follow us on Twitter AtariAge on Instagram Watch us on YouTube Copyright ©1998-2017 AtariAge