Code Monkey home page Code Monkey logo

lunar's People

Contributors

fleroviux avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

d34d633f

lunar's Issues

ARM7 & ARMv4T support

currently the ARM7 is treated like an ARM9 processor with an ARMv5TE ISA

I expect the following things need to be changed for proper ARM7 support:

  • load instructions must not "branch and exchange" on r15 load
  • adjust alignment edge-cases
  • remove CP15 (throw undefined exception)
  • add CP14 stub (doesn't do anything but prevents undefined exception)
  • remove ARMv5 and ARMv6 opcodes
  • handle LDM/STM edge-cases (done in ARM, only Thumb needs work)

ARM9MemoryBus::UpdateMemoryMap tries to access invalid memory

The sequence of events is:

  1. ARM9MemoryBus constructor
  2. UpdateMemoryMap(0, 0x100000000ULL);
  3. case 0x06: table[index] = VisitVRAMByAddress<GetUnsafePointerFunctor>(address);
  4. GetUnsafePointerFunctor
  5. GetUnsafePointer

At the first attempt to read an address above the 0x068A3FFF mark (VRAM 656KB limit) everything blows up.
Could fix it checking before calling VisitVRAMByAddress:

case 0x06: {
if ((address & 0xFFFFF) < 0xa4000) //Check
table[index] = VisitVRAMByAddress<GetUnsafePointerFunctor<u8>>(address);
break;
}

But for current lack of whole design complete understanding and fleroviux intentions, I'm just documenting here and not opening a pull request.

Tested on:

Platform: Win10
Compiler: Clang 11 under MSVCRT (MSVC can't handle the metaprogramming and won't build, at least in the current stable 14.29)
(logically should be an issue in other platforms, logically)

[SDL Frontend] APU Destructor trying to call invalid memory

The sequence of events is:

  1. Everything out of scope
  2. ~Core
  3. ~CoreImpl
  4. ~Interconnect
  5. ~APU

~APU tries to call close on its audio device, but apparently the check for null pointer doesn't help, because despite having an address it's invalid memory since sometime in the recent past(?). So the application crashes trying to access invalid memory.

Since Interconnect it's marked to be extinguished from existence, this rework could fix the destruction order and solve this issue.

Can't really suggest a solution, for currently lacking understanding of the whole program structure.

Tested on:

Platform: Win10
Compiler: Clang 11 under MSVCRT (Tests can only be performed after fixing #22, otherwise won't run)

Goal?

Wondering what your goal is, is it to be similar to Noo-DS but focus more on stable releases and/or otther things?

Curious I am, watching this and at least* one other repo to see which turns out better.

Hope all goes well

VideoUnit accuracy

  • handle V-count coincidence IRQ more accurately (see the implementation in NanoboyAdvance).
  • the setting of the H-blank flag is reportedly slightly delayed on NDS7
  • NDS7 and NDS9 actually have separate DISPSTAT registers. (see d2c3a25)
  • implement window bugs / glitches

IRQ controller: mask bit7 of IE on ARM9

Trying to set all IE bits gives FFFFFFFFh (DSi7) or FFFFFF7Fh (DSi9).

SIO/RCNT/RTC IRQ can only be used on the ARM7 core and trying to enable it on the ARM9 doesn't set the bit.

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.