Giter Site home page Giter Site logo

Comments (9)

dirkwhoffmann avatar dirkwhoffmann commented on May 12, 2024 1

The first IRQ in SAE is a level 3 VSYNC interrupt. It occurs after the second write to BLTSIZE. Same in vAmiga which is good so far ...

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 12, 2024

Omega write into CIA A space at PC = fe982a. This PC is reached before reaching fe89da which is my current standard breakpoint.

vAmiga does not reach fe982a before reaching fe89da.

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 12, 2024

I started running vAmiga against SAE. The first CIA A accesses read as follows in SAE:

Screenshot 2019-03-17 at 19 34 10

vAmiga reads back:

[83] (156, 26) FC0514: ---- 4004 0020: CIAA: Peek 0 (hex: 00) = 254 (DDRA = 3)
[83] (156, 26) FC0514: ---- 4004 0020: CIAA: Poke 00,FC
[83] (156, 26) FC0514: ---- 4004 0020: CIAA: ## PA changed: /FIR1: 1 /FIR0: 1 /RDY: 1 /TK0: 1 /WPRO: 1 /CHNG: 1 /LED: 0 OVL: 0

More precisely: vAmiga reads 254 where SAE reads 226:

254 = 11111110
226 = 11100010

Seems like vAmiga needs to invert the disk bits (which is strange, because these bits are marked as active low in the HRM).

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 12, 2024

Drive identification looks good.

After the identification has been completed, another mismatch happens:

Screenshot 2019-03-18 at 13 42 25

vAmiga reads back 0:

[84] ( 42,181)  FC6D10: --BD 602C 0060: CIAB: Peek 15 (hex: 0F) = 0
[84] ( 42,181)  FC6D10: --BD 602C 0060: CIAB: Poke(15) = 0 (hex: 00)
[84] ( 42,194)  FC6D16: --BD 602C 0060: CIAB: Poke(10) = 0 (hex: 00)
[84] ( 42,200)  FC6D1A: --BD 602C 0060: CIAB: Poke(9) = 0 (hex: 00)

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 12, 2024

SAE uses 4 as the initial value for the control registers. Strange, because I don't think this reflects what the real hardware does.

ciaacra = ciaacrb = ciabcra = ciabcrb = 0x4;

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 12, 2024

There seems to be an interesting discrepancy in this region:

[85] (  2, 33)  FE5484: PCBD 602C 0040: CIAA: Poke(14) = 0 (hex: 00)
[85] (  2, 39)  FE5488: PCBD 602C 0040: CIAA: Poke(14) = 0 (hex: 00)
[85] (  2, 45)  FE548E: PCBD 602C 0040: CIAA: Poke(14) = 64 (hex: 40)
[85] (  3, 43)  FC4722: PCBD 202C 0040: CIAA: Poke(13) = 136 (hex: 88)
[85] (  3,191)  FE5498: PCBD 602C 0040: CIAA: Poke(14) = 0 (hex: 00)
[85] ( 29,188)  FE58D0: PCBD 602C 0040: CIAA: Peek 2 (hex: 02) = 3
[85] ( 29,188)  FE58D0: PCBD 602C 0040: CIAA: Poke(2) = 3 (hex: 03)

SAE:

Screenshot 2019-03-18 at 14 30 11

It's not easy to compare both emulators from here on, because VSYNC interrupts start to interfere.

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 12, 2024

Screenshot 2019-03-18 at 20 51 52

I think I'm coming closer. The displayed SAE log shows that the serial port interrupt of CIA A gets enabled during boot (first write statement). After that, a VSYNC interrupt triggers (which has higher priority than the SP interrupt). When the VSYNC int is over, the SP interrupt is performed (level 2 IRQ).

As far as I remember, my CIAs don't implement the SP interrupt, because they are taken from VirtualC64 and the C64 does not really use the serial register. Definitely a smoking gun ...

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 12, 2024

CIA A triggers keyboard interrupts now. The keyboard behaves like a real Amiga keyboard and sends a POWER_UP_KEY_STREAM id code on startup, followed by a KB_TERMINATE_KEY_STREAM id code.

Next strange sequence is the following in vAmiga:

[85] ( 70,168)  FE931C: PCBD 202C 0040: CIAA: Peek 7 (hex: 07) = 255
[85] ( 70,179)  FE9316: PCBD 202C 0040: CIAA: Peek 8 (hex: 08) = 0
[85] ( 70,189)  FE931C: PCBD 202C 0040: CIAA: Peek 7 (hex: 07) = 255
[85] ( 70,200)  FE9316: PCBD 202C 0040: CIAA: Peek 8 (hex: 08) = 0
[85] ( 70,210)  FE931C: PCBD 202C 0040: CIAA: Peek 7 (hex: 07) = 255
[85] ( 70,221)  FE9316: PCBD 202C 0040: CIAA: Peek 8 (hex: 08) = 0
...

This sequence also appears in SAE, but it seems to terminate faster in SAE.

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 12, 2024

Fixed

from vamiga.

Related Issues (20)

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.