+llabnip Posted January 11 Author Share Posted January 11 10 minutes ago, tmop69 said: One improvement for UI: in the cart selection menu, is it possible to use gamepad's left/right shoulders to jump 1 screen up/down? It could be useful also to have to possibility to jump to the first/last page of the list. With a list of 100+ games it's really boring to move up/down only 1 line each time. 🙂 Thanks for the feedback! Selection of carts can use left/right d-pad to skip 1 screen at a time. I have 1000 Atari games in one directory and learned long ago that a page mechanism was needed... fortunately it got inherited into DS994a As a word of caution - anything that freezes you might try with 'RAM Mirror' enabled in Settings. It's possible there is something other than Congo Bongo to make use of it. 2 Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 11 Author Share Posted January 11 @Asmusr A bit more debug on Skyway8... the first bank write is to >6000 and the next one is >6078 which is strange (and when masked down by 0x03 is still bank 0). Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 12 Author Share Posted January 12 5 hours ago, tmop69 said: @llabnip some new feedbacks after some more tests with latest version: - River Rescue: hangs at initial menu when requested to select 1 or 2. A copter is supposed to arrived from left in the working game; - Red Baron Flight: hangs after launch; - Topper: the hero moves using joysticks diagonals, but doesn't seem to work; Ok… so I’ve made some improvements and am unsure if I fixed some things but RR and Red Baron both play fine with the roms in the FinalGrom repository here. Topper mostly worked for me but controls suck. I’ll add in a proper diagonals mode to make it playable. And I did notice some uninitialized vars that I fixed which will probably fix the odd glitches when starting certain games after playing others. I’ll get a 0.5 build out in a day or so. Thanks again! 4 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted January 12 Share Posted January 12 9 hours ago, llabnip said: @Asmusr A bit more debug on Skyway8... the first bank write is to >6000 and the next one is >6078 which is strange (and when masked down by 0x03 is still bank 0). Yes that's strange, but it doesn't explain why it's not working in your emulator. The mask is 0x06 since the least significant bit is not used, right? Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 12 Author Share Posted January 12 3 hours ago, Asmusr said: Yes that's strange, but it doesn't explain why it's not working in your emulator. The mask is 0x06 since the least significant bit is not used, right? Right. I apply the mask after shifting the address down. I’ll keep after it - the bug can’t hide forever! 2 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted January 12 Share Posted January 12 3 hours ago, llabnip said: Right. I apply the mask after shifting the address down. I’ll keep after it - the bug can’t hide forever! Here's a version that's using the ordinary bank select addresses >6000, >6002, etc. If that works then it must be a problem with the bank selection. skyway8.bin 3 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted January 12 Share Posted January 12 On 1/7/2023 at 11:26 AM, Asmusr said: And finally it never gets through the 'scanline sine scroller', which relies on the 5th sprite flag to work. I was wrong, this part of the megademo actually relies on the sprite collision flag being updated while the screen is drawn. It's the only part of the megademo that's not working in 0.4, although the multicolor part is still slow (even on a 3DS). 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted January 12 Share Posted January 12 49 minutes ago, Asmusr said: If that works then it must be a problem with the bank selection. It does work. 1 Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 12 Author Share Posted January 12 19 minutes ago, Asmusr said: It does work. Talking to yourself is the first sign of imending mental collapse my friend Ok... so my banking isn't right. Can you confirm that this is how it should handle banking? Every even address from >6000 to >7FFE triggers a bank-switch. Odd addresses do not trigger a bank-switch. >6000 would switch in bank 0 >6002 would switch in bank 1 >6004 would switch in bank 2 >6006 would switch in bank 3 >6008 would switch in bank 0 >600A would switch in bank 1 >600C would switch in bank 2 >600E would switch in bank 3 >6010 would switch in bank 0 >6012 would switch in bank 1 >6014 would switch in bank 2 >6016 would switch in bank 3 >6018 would switch in bank 0 >601A would switch in bank 1 >601C would switch in bank 2 >601E would switch in bank 3 Etc... all the way up to >7FFE Quote Link to comment Share on other sites More sharing options...
Asmusr Posted January 12 Share Posted January 12 18 minutes ago, llabnip said: Talking to yourself is the first sign of imending mental collapse my friend Ok... so my banking isn't right. Can you confirm that this is how it should handle banking? Every even address from >6000 to >7FFE triggers a bank-switch. Odd addresses do not trigger a bank-switch. >6000 would switch in bank 0 >6002 would switch in bank 1 >6004 would switch in bank 2 >6006 would switch in bank 3 >6008 would switch in bank 0 >600A would switch in bank 1 >600C would switch in bank 2 >600E would switch in bank 3 >6010 would switch in bank 0 >6012 would switch in bank 1 >6014 would switch in bank 2 >6016 would switch in bank 3 >6018 would switch in bank 0 >601A would switch in bank 1 >601C would switch in bank 2 >601E would switch in bank 3 Etc... all the way up to >7FFE Right, except if you try write to an odd address using a word instruction you will actually write to the even address, so that will also trigger a switch. I'm not sure what a real cart would do if you write to an odd address using a byte instruction, probably it would also switch. But the other Skyway cart was writing to >6078, >607A, and >607C, which corresponds to bank 0, 1, and 2, so that should have worked. 5 Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 12 Author Share Posted January 12 12 minutes ago, Asmusr said: Right, except if you try write to an odd address using a word instruction you will actually write to the even address, so that will also trigger a switch. I'm not sure what a real cart would do if you write to an odd address using a byte instruction, probably it would also switch. But the other Skyway cart was writing to >6078, >607A, and >607C, which corresponds to bank 0, 1, and 2, so that should have worked. I think I see the problem in my code! I will fix it when I get home from work and report back... 4 Quote Link to comment Share on other sites More sharing options...
PeteE Posted January 12 Share Posted January 12 1 hour ago, Asmusr said: I was wrong, this part of the megademo actually relies on the sprite collision flag being updated while the screen is drawn. It's the only part of the megademo that's not working in 0.4, although the multicolor part is still slow (even on a 3DS). In addition to this, transparent sprites (with color = 0) are still checked for collision, even though the pixels are not drawn into the scanline. 4 Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 12 Author Share Posted January 12 Version 0.5: https://github.com/wavemotion-dave/DS994a Streamlined save and load of save state so it's only 2 blocks of SD card (64K). Old saves will not work with version 0.5 - so finish your games before you upgrade. Fixed banking so that Skyway8.bin (and probably others) will load properly. Improved CPU and memory reset so games are less glitchy when starting up after having just played another game. Another frame of performance squeezed out of the CPU core. So I'd grab this release quickly as I may need to take it down... in discussion with the author of TI99/Sim who requires that any code used from his project be released under the GPL. I'm using a healthy mix of code from many sources (sound core from my friend FluBBa, TMS9918A from Col-EM, TMS9900/1 from Ti99/Sim, Disk support from Classic99 and a lot of code I wrote myself to hook it all together into the DS with save/load/highscore support and to make it fast enough to be playable so we're not looking at a slide-show). Since I can't ask all these constituent bits to be released under the GPL, I may be forced to remove the CPU core I've modified for use on the DS which will require me to re-write a new core that I can freely release with my software. I'm waiting on a response - but in the meantime, grab version 0.5 if you're at all interested in this little DS hobby project. 7 Quote Link to comment Share on other sites More sharing options...
Tursi Posted January 12 Share Posted January 12 7 hours ago, Asmusr said: Right, except if you try write to an odd address using a word instruction you will actually write to the even address, so that will also trigger a switch. I'm not sure what a real cart would do if you write to an odd address using a byte instruction, probably it would also switch. Absolutely will. Remember the 9900 doesn't have a byte mode externally, all accesses to memory are always 16 bit at the even address. Byte instructions happen only inside the chip. 2 Quote Link to comment Share on other sites More sharing options...
Tursi Posted January 12 Share Posted January 12 29 minutes ago, llabnip said: Version 0.5: https://github.com/wavemotion-dave/DS994a Streamlined save and load of save state so it's only 2 blocks of SD card (64K). Old saves will not work with version 0.5 - so finish your games before you upgrade. Fixed banking so that Skyway8.bin (and probably others) will load properly. Improved CPU and memory reset so games are less glitchy when starting up after having just played another game. Another frame of performance squeezed out of the CPU core. So I'd grab this release quickly as I may need to take it down... in discussion with the author of TI99/Sim who requires that any code used from his project be released under the GPL. I'm using a healthy mix of code from many sources (sound core from my friend FluBBa, TMS9918A from Col-EM, TMS9900/1 from Ti99/Sim, Disk support from Classic99 and a lot of code I wrote myself to hook it all together into the DS with save/load/highscore support and to make it fast enough to be playable so we're not looking at a slide-show). Since I can't ask all these constituent bits to be released under the GPL, I may be forced to remove the CPU core I've modified for use on the DS which will require me to re-write a new core that I can freely release with my software. I'm waiting on a response - but in the meantime, grab version 0.5 if you're at all interested in this little DS hobby project. I realize it's a bit hacky after decades of modifications, but you're free to adapt the Classic99 CPU core for this project if necessary. 9 2 Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 14 Author Share Posted January 14 On 1/12/2023 at 6:23 PM, Tursi said: I realize it's a bit hacky after decades of modifications, but you're free to adapt the Classic99 CPU core for this project if necessary. Thanks Mike - the offer is greatly appreciated. A community is a reflection of its leaders and you're a major reason why the TI-99/4a community rocks! I'm still hopeful that things will work out amicably with the author of TI-99/Sim. In the meantime, I did upload 0.5a with some improvements. In looking more closely at the CPU core, I was able to gain a 5% speedup across the board rendering most classic games playable at full-speed on the older DS-Lite. For the first time Parsec is running full-speed on the oldest DS hardware. I added a new option to run emulation speed at 110-130% on a per-game basis to help make some of the slower XB games run at a more acceptable pace (yes, Wizard's Lair... I'm looking at you). It should auto-sync the sound so that it just plays a bit faster to keep things in sync. I also fixed banking when the ROM was not a multiple of 8KB (this got broken when I fixed banking for Skyway). 5 Quote Link to comment Share on other sites More sharing options...
SteveB Posted January 14 Share Posted January 14 I downloaded version 0.5 just 15min ago ... but I welcome the update to 0.5a! The micro-sd card is still in the PC. 2 Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 14 Author Share Posted January 14 1 minute ago, SteveB said: I downloaded version 0.5 just 15min ago ... but I welcome the update to 0.5a! The micro-sd card is still in the PC. I like to do this to people... as soon as I see anyone download the current version, I update Sorry for the bad timing! 3 4 Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 15 Author Share Posted January 15 Okay... so here's the state of affairs. The author of TI-99/Sim (Marc Rousseau) has not gotten back to me in 3 days... I've tried two different ways to contact him (including the way he used to contact me). I spent most of yesterday and this morning starting the CPU core re-write. I've taken his (heavily modified) files down from github in preparation. I've managed a complete ground-up re-write of the TMS9901 (IO chip) which is half the size it was and twice as fast. That's gained me nearly 10% speed improvement in the overall emulation and simplified the logic. Not bad but I'd rather have spent the last 10 hours doing something else Now comes the more difficult part - to re-write the CPU core which I suspect is going to be 30-40 hours of effort. I'm going to use a jump table to improve the speed further - with any luck, these changes will render every game at full speed even on the older DS-Lite/Phat hardware and be easier to maintain going forward. I'll be using bits and pieces of the core from Classic99 (especially like the status bits look-up table and parity "magic" calculator) but will also be sleeping with the TMS9900 Data Manual. Until told otherwise, I'm leaving up the .nds executable of 0.5b which is reasonably stable until the core re-write is complete. 7 1 Quote Link to comment Share on other sites More sharing options...
Sergioz82 Posted January 15 Share Posted January 15 (edited) I retrieved my old DS but I can't make the emulator work. I didn't remember I haven't got a R4 but a Supercard DS One. Does it make some difference? If launch the emulator from the DS One OS the top screen goes black and the bottom screen shows me a loading message from OS but nothing happens. Maybe I downloaded the wrong TI bios files? Edited January 15 by Sergioz82 Quote Link to comment Share on other sites More sharing options...
+llabnip Posted January 15 Author Share Posted January 15 8 minutes ago, Sergioz82 said: I retrieved my old DS but I can't make the emulator work. I didn't remember I haven't got a R4 but a Supercard DS One. Does it make some difference? If launch the emulator from the DS One OS the top screen goes black and the bottom screen shows me a loading message from OS but nothing happens. Maybe I downloaded the wrong TI bios files? If you had the wrong TI BIOS files (or no BIOS files at all) the emulator would still launch - but you would get a nice splash-screen with a Texas Instruments 99/4a picture and a message telling you what BIOS files it didn't find. It sounds like the emulator doesn't work with the Supercard DS. I know it runs on all the R4 clone carts... and via anything that will run Twilight Menu. It's possible you need to DLDI patch the emulator to run on the Supercard DS - google DS DLDI patch to get started in that direction... the DLDI patching is so that the emulator (or whatever homebrew) can access the file system ... modern flashcarts like the R4 will do that auto-magically... but some older flashcarts don't. Quote Link to comment Share on other sites More sharing options...
Sergioz82 Posted January 15 Share Posted January 15 2 minutes ago, llabnip said: If you had the wrong TI BIOS files (or no BIOS files at all) the emulator would still launch - but you would get a nice splash-screen with a Texas Instruments 99/4a picture and a message telling you what BIOS files it didn't find. It sounds like the emulator doesn't work with the Supercard DS. I know it runs on all the R4 clone carts... and via anything that will run Twilight Menu. It's possible you need to DLDI patch the emulator to run on the Supercard DS - google DS DLDI patch to get started in that direction... the DLDI patching is so that the emulator (or whatever homebrew) can access the file system ... modern flashcarts like the R4 will do that auto-magically... but some older flashcarts don't. Ok, I'll try DLDI patch and I'll let you know Quote Link to comment Share on other sites More sharing options...
SteveB Posted January 15 Share Posted January 15 20 minutes ago, Sergioz82 said: I didn't remember I haven't got a R4 but a Supercard DS One. Does it make some difference? I have a DS ONE and no problem running any version of DS994a. I have DLDI on my SD card for ages ... I don't know if it does something in the background, but I don't need to apply any manual patch. 1 Quote Link to comment Share on other sites More sharing options...
PeteE Posted January 15 Share Posted January 15 @llabnip My work in progress emulator is here: https://www.github.com/peberlein/bulwip Feel free to use anything from cpu.c that you deem useful for your own 9900 code. The cycle timing isn't accurate yet. It also relies an having CLZ hardware instruction for 9900 opcode decoding, not sure if the DS ARM CPU has that or not. 3 Quote Link to comment Share on other sites More sharing options...
Sergioz82 Posted January 15 Share Posted January 15 (edited) 1 hour ago, SteveB said: I have a DS ONE and no problem running any version of DS994a. I have DLDI on my SD card for ages ... I don't know if it does something in the background, but I don't need to apply any manual patch. What files do you have on your card? I had a lot of garbage I didn't even remember why it was in there.. So I emptied my SD and then I looked on DS One website (which incredibly is still alive) and I got what I think is the last OS version for my card: DSONE_SDHC_Evolution_V1.0_eng_sp6_20121030.zip I looked inside _dsone folder and there's a DLDI file. Now on my sd there are _dsone folder, SCFW.SC file, the last version of ds994a.nds and the rom folder but it donesn't run. I tested a couple of nds games and they run smooth. At least I can exclude a NDS/cartridge problem. Unfortunately I can't find a DLDI patcher as all links seem they have expired years ago. Edited January 15 by Sergioz82 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.