Quantcast
Channel: project sd2snes
Viewing all 39 articles
Browse latest View live

Tiny status update

$
0
0

So I’ve been getting a lot of questions pertaining to current progress, understandably. ;)
SuperFX is still crawling along, I’ve gotten a basic CPU core control unit and partial instruction decoder to work which can run test code in simulation fine, albeit limited. But it doesn’t deal with the different memory delays, stalling and parallelism yet; also the SNES interface, plot logic and other supplementary stuff are still missing.
The SuperFX uses pipelining which is a thing I haven’t fully understood yet, so that’s going to take some brain work and likely multiple complete rewrites of the CPU core. I’d rather not give an estimated time of completion for that at the moment… ;) Implementing pipelining properly is important because game code is laid out to take advantage of it and will not run correctly otherwise.

Besides the SuperFX, kogami has discovered a BS memory mapping bug, a regression that snuck into firmware 0.1.5 where I rewrote the BS memory mapping based on my own RE efforts. Also some graphical corruption has been found when using the “Run previous game” feature (Start button). I expect to make a bug fix / minor release addressing these issues (possibly others) in a couple of weeks.


FAQ added

$
0
0

I’ve added an FAQ to address some questions I’ve been getting over time. I’d rather not give any time estimates for implemented features since that didn’t work so well in the past… ;) All I can say is that SuperFX is too much for me to handle at the moment so I’m going to target some lower hanging fruit for now.

Firmware v0.1.6 released

$
0
0

It’s been a while~ Firmware v0.1.6 is out with these changes:

  • OBC1 support (yeah, did it anyway :)). Metal Combat: Falcon’s Revenge now works.
  • Menu: Start button now brings up the 10 most recently played games instead of only one
  • Menu: File browser now ignores files with the “hidden” and “system” attributes
  • Partial-size BS-X games should now load correctly
  • Fixed a PSRAM mapping bug in BS-X support that caused sprite corruption or worse on some games (notably Treasure Conflix)
  • Map SRAM to the whole bank instead of just the lower half on LoROM games <=16Mbits. Fixes saving in some games, at least Ys III - Wanderers from Ys.

Grab it here.

Next up will be cheat support and possibly advanced SuperCIC utilization.

Database creation and file browsing – Request for comments

$
0
0

This is a little call for feedback. In order to simplify the general usage of file lists – such as ROM lists, cheat lists, skin lists… – in terms of programming I would like to generalize directory access.

The sd2snes currently scans the entire card on startup and rebuilds an internal database if any change to relevant card contents is detected. This takes place so the file browser can always show the current state on card. Said database contains the entire directory structure and takes up quite some “ROM” space. I would like to replace this “deep scanning” by a simple “list a single directory” function which can also be used to list other kinds of files under different circumstances. This would mean that a folder will be loaded on the fly when you open it, instead of all folders being preloaded at startup.

The current state of implementation has one advantage: browsing the card is fast. There are no delays when changing directories.
The downside is that you have quite a lengthy “Loading …” screen at bootup because of the full card scan. And if something is added/removed/renamed the database rebuild can take a long time.

The advantage of proposed on-the-fly file list creation is that there is almost no loading time at startup. I could even ax the “Loading …” screen altogether. There will be no lengthy “rebuilding database …” either every time you change something on card. Files could easily be manipulated on the fly, too – some people asked for a file deletion feature – without having to rebuild the entire database. Also the database creation code is a complex mess and I want to get rid of it… ;)
The disadvantage is that there will be slight delays while browsing (as a folder is read and sorted on demand) – if a single folder contains several thousand files this can amount to a few seconds.

So um, would you mind if I changed file handling to the latter?

sd2snes in heat

$
0
0

Just a little fun post inbetween. Ingo Korb of sd2iec fame (that’s the project that got me started on sd2snes in the first place!) had the chance to take thermal images of a running SNES+sd2snes. Some people, including myself, found that the sd2snes gets quite hot in the SNES. However the heat actually comes from outside the sd2snes, that is from inside the cart slot! The SNES’s linear voltage regulator produces a lot of heat that gets radiated into the cartridge slot (among other places).

thermal image of an SNES+sd2snes - top view

Top view – SNES cauldron!

thermal image of an SNES+sd2snes - rear view

Rear view

These images illustrate it quite nicely. There are little hotspots where the chip dice are but most of the heat comes from below / behind.

Current status for v0.1.7

$
0
0

Here’s what I’ve been working on in the meantime:

  • More refactorings of the menu ROM. This will facilitate further UI development (sub-menus etc.)
  • NMI+IRQ hook routine – these are required for WRAM cheats and in-game reset. The latter is in working state as of now. I’d like some input on which key combinations would be desirable ;-) (some conflicts can arise with existing SNES mods, see below). There is now a dedicated memory area in FPGA block RAM mapped to $2a00-$2aff which is used for the hook routine and command exchange between a running game and the sd2snes main CPU.
  • Game loading handshake between SNES menu and sd2snes CPU – this is a technical prerequisite for error handling (such as missing supplementary files, write-protected SD Card, etc.)
  • LED blink codes for file system errors – e.g. in case the SRM file cannot be saved this will tell you that something’s gone wrong. Also the sd2snes will retry saving until it works so you have the chance to swap out the SD Card etc.
  • “Screen saver” – the screen is darkened after some idle time to reduce wear on CRT and plasma screens.
  • Memory sharing between SNES and the sd2snes CPU is greatly simplified (The FSM is reduced to only 5 states instead of 18) and timing is more relaxed. This should help with stability on a wider range of consoles.
  • Fixed some compatibility issues with a number of games. (Super Play Action Football (S-RTC interference), GP1 Part II (WRAM initialization), Human Grand Prix (mapper detection bug))

To do for the upcoming release:

  • Cheat management – technical prerequisites for cheats (ROM+WRAM) are met, now to code the GUI for it…
  • Finish on-the-fly file browsing
  • Decide on key combinations for in-game functions. (en/disable cheats, kill cheat engine, reset game, reset to menu)

About key combinations:
I wanted to use combinations that don’t interfere with my SNES IGR mod. This mod uses L+R+Select in combination with Start, A, B, X, or Y to perform different operations. In that scenario I still had the four directional buttons left to put other functions on. However :D With borti4938’s release of the feature-enriched uIGR these are now taken.

So far this is my new proposal for key combinations (UPDATED 2014-06-24):

Buttons
Function
L+R+Select+StartReset game
L+R+Select+XReset to sd2snes menu
L+R+Start+BDisable cheats
L+R+Start+AEnable cheats
L+R+Start+YKill in-game routines (in case they interfere with game operation).

Updated to reflect some of your suggestions. Already looks better to me. I steered clear of L+R+Start+X because it’s similar to L+R+Select+X. ;)

Time flies…

$
0
0

Sorry to keep you waiting! Turns out I have some sort of GUI-code-a-phobia so the cheat interface isn’t done yet.
I’m currently updating the secondary FPGA configurations (cx4, obc1, bootstrap) with the updated in-game command interface and simplified memory sharing. So with a bit of luck I might be able to release a preview version (with everything but cheat support) this weekend. :)

Firmware v0.1.7 preview

$
0
0

NOTE: Satellaview is broken at the moment because it doesn’t work with the NMI vector patching. I’m working on it.
At last here’s the v0.1.7 preview. Cx4 blew up in my face when I tried to insert the cheat/in-game hook engine and ended up taking days to get working. :|
Here’s what’s new (mostly copied from the status post):

  • In-game button combinations are in effect. See the table below for the key mapping. Note that some games show glitches with the in-game functions in place. I added an additional feature to temporarily disable them in case of game glitches (e.g. Secret of Mana hangs at the Squaresoft logo, displaying only garbage). I’m not entirely happy with the button choice but it will do for now. ;)
  • When running a game from the recent games list, the selected entry is now moved to top of the list.
  • LED blink codes for file system errors – e.g. in case the SRM file cannot be saved this will tell you that something’s gone wrong. The blink codes are yet to be listed.
  • Also the sd2snes will retry saving until it works so you have the chance to swap out the SD Card. In that case the directory structure must be present where the sd2snes expects to save the file.
  • “Screen saver” – in the menu, the screen is darkened after some idle time to reduce wear on CRT and plasma screens.
  • Memory sharing between SNES and the sd2snes CPU is greatly simplified (The FSM is reduced to only 5 states instead of 18) and timing is more relaxed. This should help with stability on a wider range of consoles.
  • On-the-fly file browsing. Also shows a little “loading…” window when loading directories/files.
  • Windows are now blue so they stick out better in front of yellow directory listings.
  • Cx4 data ROM is now embedded in the FPGA configuration – no more need for the external file cx4.bin.
  • Initial Satellaview clock is back to 18:00:00 from 18:05:30.
  • SD cards can be hotswapped. Currently there is no automatic refresh of the file list so tapping reset on the SNES or changing the directory is necessary to get the new contents.
  • The status line is moved upward a few pixels so hopefully it doesn’t get eaten by overscan.
  • Navigation: When scrolling page-wise with the right D-pad arrow, the end of the file list is now aligned to the bottom of the screen.
  • Navigation: The shoulder buttons can be used to jump to the beginning/end of a directory listing.
  • Bugfix: some compatibility issues with a number of games. (Super Play Action Football (S-RTC interference), GP1 Part II (WRAM initialization), Human Grand Prix (mapper detection bug))
  • Bugfix: properly initialize FPGA state machine (on some consoles the menu failed to start at all)

v0.1.7 final will contain menu items for various configuration settings and a cheat interface.
Please let me know if any games are broken that worked before, even with the in-game functions disabled.

In-game button mappings:

Buttons
Function
L+R+Select+StartReset game
L+R+Select+XReset to sd2snes menu
L+R+Start+YKill in-game routines (in case they interfere with game operation).
L+R+Start+XTemporarily kill in-game routines (~10 seconds - if you need to get past a glitch but don't want to lose in-game buttons)

Firmware v0.1.7 preview – Update

$
0
0

Here’s another preview: v0.1.7 preview 2
It addresses some issues reported with v0.1.7 preview (and some others).

  • Satellaview works again. BSX alters the original interrupt vectors at run time. The original interrupt vectors are now saved per hook call, not only once when loading the ROM.
  • In game buttons now work with MSU1, too.
  • Automatic hook method choosing: NMI is default but switched to IRQ when no NMIs are triggered. If both occur, NMI has priority. This should enable the in-game buttons for games that previously did nothing.
  • The hook routine saves some CPU time when auto joypad read is enabled by the game – it will just reuse the result instead of doing its own controller scanning. Also the controller is now only scanned every 8 frames. This helps alleviate some glitches, e.g. Secret of Mana now starts up correctly. There are still some glitches left which can’t be eliminated fully.
  • Auto region patching works again without having to delete the sd2snes.cfg.
  • BSX now emulates Type 1 memory packs instead of Type 2. Apparently the BSX BIOS is buggy with Type 2 packs when they contain HiROM games that are supposed to be run from PSRAM. So, at least Bomberman works now, and probably others too.
  • Fixed BSX PSRAM shadowing for HiROM.
  • Files and directories with “hidden” or “system” attributes are now actually hidden from the file browser.

Firmware v0.1.7 preview 3

$
0
0

A minor update, mainly in the name of stability, grab it here: v0.1.7 preview 3
This hopefully eliminates glitches unrelated to the in-game buttons on some consoles, e.g. Seiken Densetsu 3 rebooting intermittently or graphical glitches in DKC 2+3, that had been introduced with v0.1.7 preview 1.

  • Reintroduce more aggressive filtering for control and address lines from the SNES, previously removed after v0.1.6
  • Unify and centralize signal edge detection for all sub-units (e.g. S-RTC, MSU1, BSX, DSP etc.) instead of each unit having its own (slightly different) edge detection.
  • In-game controller scan has become slightly more time effective under certain circumstances (Auto Joypad Read enabled but no NMIs).
  • In-game hooks are now disabled for 10 seconds after loading or resetting a game to help certain games get past their boot screens. This will be configurable in the final.
  • Reconfigure the FPGA only when necessary on warm reset, speeding up “reset to sd2snes menu” by a couple hundred milliseconds.
  • Fix an MMIO access priority bug for DSPx.
  • Fix BS-X ROM detection for games with 2 startups left.
  • Fix directory browsing being broken after setting the clock.

Also some preparations have happened under the hood for configuration+cheat menus.

Ping

$
0
0

I’m alive ;) (sort of). I’ve been sick since mid-November so I’m still a bit bogged down. We put our son into nursery school at the beginning of November and he brings home new germs every day :D Having a cold for 2 months straight (and counting) really feels strange. Also we will be moving house at the end of February so preparations are ongoing for that.

Anyway I’ve been working on the user interface that will be needed for the configuration menu. As of now it can navigate an arbitrary number of sub menus (until stack runs out, that is) and display parameters. Next step is actually being able to alter them.
As some new features, like WRAM cheats and in-game buttons, turned out to have a negative effect on game compatibility I feel it is important to make them an opt-in setting. That’s why a configuration menu is inevitable for the 0.1.7 final.

The other thing to work on is the user interface for cheats. My current proposal is that a .cht file is used/created per game where cheats can be entered (or existing cht files can be downloaded and used). By request it will support entry of both Pro Action Replay and Game Genie codes (not sure how to detect whether a cht file contains GG or PAR codes… any pointers?).

Do you prefer another preview version with just the configuration menu in place (a “stable” 0.1.7 if you will) or do you prefer a later release with the cheat menu already included?

Internet!

$
0
0

Home server is up and running again! \o/ Finally got around to approve all the pending comments that had stacked up in the meantime. As always, thanks for your support and patience!
My room is still packed in boxes, lots of work to do around the new house. I aim to have my development workstation running by the weekend so I can continue work on the sd2snes firmware. See you around. ;)

Site hiccups and small update

$
0
0

Site should be running normally again. I switched to HTTPS a while ago and the transition wasn’t so smooth. In the process a configuration change made the spam filter eat most comments. I’ve dug them out from the spam folder, hope I didn’t miss any. Sorry about it!
Preview 4 will be up shortly but it will mainly contain bug fixes and stability improvements. Squatted some bugs that had been reported in the meantime – some of them a bit tough.

About work in progress, reporting issues

$
0
0

I’ve added Github commits & issues widgets to the sidebar so you can keep an eye on what I’m working on (or have just finished working on), in case you cannot be bothered to look at Github directly. 😉 Of course I will keep posting a summary of changes whenever posting a new release.

Also it would be really really really helpful if you could report issues directly via Github, or at least check if your issue is already there before reporting again. I get many reports about the same issues, questions about when they will be fixed when I already replied to the question to somebody else elsewhere, etc. and I think this gets frustrating for both sides. My time is scarce as it is and I’d rather spend it developing than talking about the same thing over and over 😉
Of course I cannot force anyone to sign up with Github. So if it’s absolutely unacceptable for you to do so you may still report via comments or contact form and I will open a Github issue about it myself. Just check with the issues page if your issue is already there before reporting. 😉

Thanks!

Server upgrade to Debian jessie

$
0
0

Going to upgrade the server to Debian jessie, better expect some downtime… 😉


sd2snes v0.1.7 cheat support preview

$
0
0

Short update: Things are dragging along a bit as we moved house and our second son was born a couple of weeks ago. :)

A tech-savvy user built the current development tree of the sd2snes firmware and made a short demo video. It shows how a YAML file containing cheats is supplied and the cheats are in effect:

v0.1.7 preview 4 will be available in a couple of days. It will also feature a text-based configuration file so in-game hooks (and a couple of other things) can be configured via text file while I am working on the GUI. 😉

Firmware v0.1.7 preview 4

$
0
0

Preview 4 of the notorious 0.1.7 firmware is available. Download here!

Changes in no particular order:

  • Prevent software from using uninitialized DMA ch.0 transfer to corrupt the stack (fixes Nightmare Busters)
  • Disable PPU region patching during the menu
  • MSU1: Stop audio playback on reset (fixes static buzzing noise in games after soft-resetting out of an MSU1 game)
  • Cx4: Add a switch for original/fast mode. “Original” mimics the Cx4 timing better (Megaman doesn’t die in MMX2 attract mode) whereas “Fast” uses a single CPU cycle for every instruction, improving frame rate when drawing polygons (rotating head in MMX2 intro).
  • Hide dot files and directories again (Regression in 0.1.7).
  • “Stealth Mode” for in-game hook memory area hides the memory region used by in-game routines from games. (Fixes Equinox, Lion King)
  • In-game hooks are a bit less intrusive in terms of CPU time, hopefully reducing glitches a bit with problematic games.
  • System Information screen shows file system usage on card.
  • Slow down DSPx a bit to better match original speed (should have no noticeable effect)
  • Font height is reduced by one pixel to increase readability (lines of text are more distinguishable). This has an effect on the font style so some might not like it…? 😉
  • Background is greyed out when a window is active in foreground
  • Menu now uses the dynamic hierarchical menu system, with automatic calculation of window dimensions, etc. Not much of it can be seen at the moment due to the lack of menu entries.
  • Experimental SRAM mapping for Cx4
  • FPGA: adjust address sampling time for “end-of-cycle” events. Should help primarily with DSP1 glitches.
  • MSU1: initial volume now adheres to the latest spec (initial volume = 0) so it must be initialized by software to the desired level. This actually breaks my own example player 😀 I will post an updated version of it shortly.
  • Text file based configuration. Allows you to change some settings while I procrastinate writing the config GUI 😛 The following options are currently implemented (taken directly from the config file, sd2snes\config.yml, as generated by sd2snes, along with their default values):
    # Allow SuperCIC Pair Mode (required for video mode setting)
    PairModeAllowed: false
    
    # Video mode (0 = 60Hz, 1 = 50Hz, 2 = Auto (game only))
    VideoModeMenu: 0
    VideoModeGame: 2
    
    # Satellaview Settings
    #  BSXUseUsertime: use user defined time instead of real time
    #  BSXTime: user defined Satellaview broadcast time (format: YYYYMMDDhhmmss)
    BSXUseUsertime: true
    BSXTime: 19970301180530
    
    # Enable PPU region flag patching
    R213fOverride: true
    
    # IRQ hook related settings
    #  EnableIRQHook: Overall enable IRQ hooks (required for in-game buttons & WRAM cheats)
    #  EnableIRQButtons: Enable in-game buttons (en/disable cheats, reset sd2snes...)
    #  EnableIRQHoldoff: Enable 10s grace period after reset before enabling in-game hooks
    EnableIRQHook: true
    EnableIRQButtons: true
    EnableIRQHoldoff: true
    
    # Screensaver settings
    #  EnableScreensaver: Enable screensaver
    EnableScreensaver: true
    
    # UI related settings
    #  SortDirectories: Sort directories (slower but files are guaranteed to be in order)
    SortDirectories: true
    
    # Enhancement chip settings
    #  Cx4Speed: Cx4 core speed (0: original, 1: fast, all instructions are single cycle)
    Cx4Speed: 0
  • Text file based cheat support. Cheat files are expected in YAML format with the filename “sd2snes\Cheats\<romname>.yml“. Multiple codes per cheat are supported. The expected data structure is as shown in this example:
    ---
    - Name: Invincibility
       Code: "AAAA-AAAA" # this is an example GG code
      Enabled: True
    - Name: Infinite Money
      Code:
        - "7E0345AA" # this is an example PAR code
        - "809AB001" # and another one
      Enabled: False
    

    Cheats are applied immediately after loading a ROM (if they are enabled). 6 ROM patches and 26 RAM patches can be active simultaneously. Currently there is no sanity check so things probably won’t work correctly if you exceed these limits 😉 At the moment sd2snes will re-write the cheat file every time it is loaded so its look will change after the first run. GameHacking can now export cheats in sd2snes format. Awesome!

  • Minor cosmetic changes.

Firmware v0.1.7 released

$
0
0

OK, so I decided to release v0.1.7 😉 There is one feature missing out from the milestone (interactive cheat menu) but I really didn’t want to delay the release EVEN longer. Grab it here!

Here’s what’s new since preview 4:

  • Configuration menu. All settings are now available through the menu. Changes take effect immediately after confirming a setting with the A button. It can use some polish but should work fine. Note that the Video Mode settings are only effective on SuperCIC modded consoles.
  • SRM files (save files) are now stored in sd2snes/saves/<romname>.srm – existing save files will be moved upon save, there is no batch migration.
  • Game fixes:
    • DMA de-initialization has been reintroduced and changed from $00 to $ff. This reflects a real SNES better and hopefully finally fixes sprite corruption with SGnG and SSF2, AND title screen glitches/crashes with Pocky&Rocky US.
    • APU RAM is initialized to $AA (same as specific model SNESes). This fixes stuttering drums due to bugs in sound programming in the intro of Soul Blader on some consoles (not just 1CHIP!)
    • Data written by the SNES CPU is sampled to obtain valid data on certain time points. This should fix Mario Kart track/driver glitches everywhere.
    • All faulty multicycle constraints from Cx4 have been removed. There should be no random “register file error” messages or similar anymore.
  • MSU1 enhancements:
    • MSU1 volume boost: In case MSU1 audio is too quiet you can now increase volume in several steps. Available via Configuration->Chip Options.
    • Interpolation filter to reduce aliasing, resulting in cleaner sound
    • Fixed a bug where volume calculation introduced DC offset to the waveform output. This eliminates clicking or humming on volume changes/fades.
    • Changed MSU1 audio playback rate to exactly 44100Hz to match bsnes/higan implementation. Sound that syncs on bsnes should now also sync properly on sd2snes.
    • MSU1 resume feature implemented (Thanks to Michaël Larouche!)
  • Miscellaneous:
    • Missing ROM files are automatically removed from the “Recent Games” list. (Thanks to borti4938!)
    • Background text is now properly greyed out in the SPC player
    • Ultra16 awareness (mostly thanks to borti4938!):
      • Ultra16 serial number and autoboot setting is displayed in the System Information screen.
      • Exiting from the SPC player doesn’t crash the menu anymore on Ultra16 consoles.
      • Soft reset is prolonged a bit on Ultra16 consoles so you have the opportunity to release the controller buttons, not entering the Ultra16 menu by accident.
      • Auto region patching is disabled on Ultra16 consoles so it doesn’t interfere with the Ultra16’s own facilities.

Firmware v0.1.7 – PLEASE REDOWNLOAD!!!

$
0
0

Obligatory service announcement! A bug snuck into the firmware where the ROM file could get overwritten with your save data when saving or resetting. On the bright side you’d never lose your save data… 😉
I just replaced the download with the fixed version. If you already downloaded v0.1.7, please re-download and replace it on your card. Sorry for the inconvenience!

Firmware v0.1.7a released – important bugfix

$
0
0

Another maintenance release, yay! Get it here.
This fixes a critical bug and two minor bugs reported yesterday:

  • Firmware locked up when loading Zelda 3 after soft-reset. I am surprised that it actually worked so well with all other games.
  • Auto Region Patch setting wasn’t saved properly.
  • Satellaview custom time had a garbled default value (year 1035). The default has now been fixed. If you’d like to apply it you can delete your config.yml or just the “BSXTime” entry from it to load the new default.
Viewing all 39 articles
Browse latest View live