Giter Club home page Giter Club logo

dldi's People

Contributors

epicpkmn11 avatar jhs079 avatar lifehackerhansol avatar nightscript370 avatar rocketrobz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dldi's Issues

Align `scdssdhc2` and `ttio` defines via SDIO definitions

SCDS_CMD_CARD_PARAM_R1 is in fact raw SDIO commands.

51aaaaaaaabb0100

  • aaaaaaaa: argument/parameter
  • bb: SDIO command
    • i.e. 08 == CMD8

Defines should be updated to match this, since names I currently thought of are kind of random, and SDIO in general is better documented and easier to follow for people who are well versed into it.

Investigate differences between DSTT and DEMON carts

It is widely known that DEMON carts (timebomb carts, r4i-sdhc.com, etc) are based on the DSTT. DSTT's DLDI has worked on it and has been used this way for years.

Current open-source ttio driver does not work on these carts. It should be noted that this driver was written based on the DSONE SDHC behaviour, which is yet another ancestor of the DSTT carts.

Some things have been noted with some hex editing of prebuilt DSONE SDHC DLDI on hand:

  • DSTT perfectly implements all commands DSONE SDHC uses; the driver initializes and runs fine if you nop the SDHC checks and use an SDHC card
    • This behaviour was reproduced on several other DSTT offshoots
  • this exact same process does not work on a DEMON based cart; it locks up somewhere during read or write

This behaves identically to the current ttio driver.

Notes:

  • DSTT DLDI and the previously open source scdssdhc* all write commands directly to REG_CARD_COMMAND, and only values that need replacing, while the new card library writes an entire u64, replacing what was previously there.
    • Trying to emulate that behaviour locally doesn't work either.

Implement batch read/write into scdssdhc2

This is missing in all source codes for SCDSSDHC/DSTT.

In LogicCardWrite https://github.com/DS-Homebrew/DLDI/blob/master/scdssdhc2/source/iointerface.c

	command[7] = 0x51;
	command[6] = (address >> 24) & 0xff;
	command[5] = (address >> 16) & 0xff;
	command[4] = (address >> 8)  & 0xff;
	command[3] =  address        & 0xff;
	command[2] = 25; // as opposed to 24 in single write
	command[1] = 1;
	command[0] = 0;

can be done to start a batch write.

If the written sector is the last sector, then between 0x50 and 0x56 commands, we need to send this command

	command[7] = 0x51;
	command[6] = 0;
	command[5] = 0;
	command[4] = 0;
	command[3] = 0;
	command[2] = 12; // signal that that was the last block
	command[1] = 1;
	command[0] = 0;

and then loop.

The original R4 SD framework wasn't really designed for batch writes, as the original R4 doesn't have that implemented. So a rewrite of LogicCardWrite may be necessary.

There is no batch reads in the DSTT, however it's fast enough that this doesn't exactly matter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.