Code Monkey home page Code Monkey logo

freedisksysrom's Introduction

FreeDiskSysROM

This project has one goal - a compatible re-implementation of the Famicom Disk System BIOS under an OSS license. Unlike the Famicom console itself, which has no program ROM built-in, the Famicom Disk System includes an 8 KiB PRG-ROM containing disk I/O routines, VRAM transfer routines, joypad reading code, an animation featuring Mario and Luigi when no disk is present in the drive, and more. The code, data, graphics, music, and animation contained in the original BIOS are copyrighted by Nintendo.

FreeDiskSysROM aims to provide a replacement for the original FDS BIOS that can be freely redistributed and that is capable of running all published FDS software.

Audience

Emulators

Famicom and NES emulators historically require a dump of the Famicom Disk System BIOS to be able to emulate FDS titles. Emulators can ship FreeDiskSysROM with their installers instead of requiring end-users to either copy the ROM out of their own FDS hardware or breaking copyright law by downloading a BIOS rip from elsewhere on the Internet.

Clone hardware

Modern hardware clones of the FDS RAM Adapter or FPGA re-implementations of the entire Famicom Disk System also need a BIOS.

Status

APIs

Address Name # of Games Implemented
$e149 Delay131
$e153 Delayms
$e161 DisPFObj
$e16b EnPFObj
$e171 DisObj
$e178 EnObj
$e17e DisPF
$e185 EnPF
$e18b NMI
$e1b2 VINTWait
$e1c7 IRQ
$e1f8 LoadFiles
$e237 AppendFile
$e239 WriteFile
$e2b7 CheckFileCount
$e2bb AdjustFileCount
$e301 SetFileCount1
$e305 SetFileCount
$e32a GetDiskInfo
$e3da AddYtoPtr0A
$e3e7 GetHardCodedPointers
$e3ea GetHardCodedPointersWriteProtected
$e445 CheckDiskHeader
$e484 GetNumFiles
$e492 SetNumFiles
$e4a0 FileMatchTest 0
$e4da SkipFiles 0
$e4f9 LoadData
$e506 ReadData
$e5b5 SaveData
$e64d WaitForDriveReady
$e685 StopMotor
$e68f CheckBlockType
$e6b0 WriteBlockType
$e6e3 StartXfer
$e706 EndOfBlockRead
$e729 EndOfBlkWrite
$e778 XferDone
$e794 Xfer1stByte
$e7a3 XferByte
$e7bb VRAMStructWrite
$e844 FetchDirectPtr
$e86a WriteVRAMBuffers
$e8b3 ReadIndividualVRAMBytes
$e8d2 PrepareVRAMString
$e8e1 PrepareVRAMStrings
$e94f GetVRAMBufferByte
$e97d Pixel2NamConv
$e997 Nam2PixelConv
$e9b1 Random
$e9c8 SpriteDMA
$e9d3 CounterLogic
$e9eb ReadPads
$ea1a ReadDownPads
$ea1f ReadOrDownPads
$ea36 ReadDownVerifyPads
$ea4c ReadOrDownVerifyPads
$ea68 ReadDownExpPads
$ea84 VRAMFill
$ead2 MemFill
$eaea SetScroll
$eafd JumpEngine
$eb13 ReadKeyboard 0
$ebaf LoadTileset
$ec22 unk_EC22
$ee17 StartMotor

Initialization

Building

To build, use asm6f.

asm6f freedisksys.asm

The -l flag is very useful for development - it shows the addresses assigned to each instruction, so you can easily see how much room remains for a given subroutine.

Contributing

Rules:

  1. Do not even look at a disassembly of the original FDS BIOS.
  2. Only contribute code to which you hold the copyright or which is already under a compatible license.

License

FreeDiskSysROM is licensed under the GNU LGPL v3. The intent in using this license is to allow anyone to replace the 8 KiB official FDS BIOS with FreeDiskSysROM, whether for commerical or non-commercial purposes, so long as the source of FreeDiskSysROM (including any modifications) is made available to the end-user under the same license.

Although the Famicom does not have an OS or any concept of dynamic linking, the FDS BIOS is analogous to a system library in practice. FDS titles, FDS emulators, and FDS clone systems are all permitted to utilize FreeDiskSysROM without regard to or changes to the licenses of their own code.

freedisksysrom's People

Contributors

jamesathey avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

htv04 yeah4578

freedisksysrom's Issues

Precompiled release?

Can you add a precompiled version of the BIOS? I would really like to test this out and see how it fares against the original BIOS. Thanks!

Assembler

Which assembler should I use to build this?

AppendFile

I know you said not to look at a disassembly but I just thought I'd let you know that AppendFile has one line of code:
LDA #255

So that's another command you can cross off the list :P

I believe from there the program pointer starts looking at the code for WriteFile, so AppendFile is just an expansion of WriteFile, it seems.

You know, if you're feeling stuck, you can use the FDS BIOS disassembly on NESDev as a reference for this. Like, not copying the code directly but looking at it to know what it does. Considering the amount of code you replaced on your own, using modified code snippets of the original assembly shouldn't be much of a problem, as long as you aren't using any graphics from the original FDS BIOS. For example, you'll probably need to completely rewrite the startup code.

Sorry I couldn't help much on the original code front, the fact that reverse-engineering the FDS BIOS is incredibly hard combined with the fact that I'm not too experienced with 6502 Assembly makes it hard to contribute for me. Huge props to you for recreating so many of these functions. I hope you're able to successfully finish this project someday.

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.