dirkwhoffmann / vAmiga

vAmiga is a user-friendly Amiga 500, 1000, 2000 emulator for macOS
https://dirkwhoffmann.github.io/vAmiga
Other
297 stars 25 forks source link

Logbook for version 0.1 #1

Closed dirkwhoffmann closed 5 years ago

dirkwhoffmann commented 5 years ago

I am going to use this thread as a logbook in the near future to document the progress towards version 0.1. V0.1 should have about the same functionality as UAE 0.1. We'll then have a (completely useless) emulator that can do nothing but show the Workbench initial screen. To speak with a picture:

goal0 1

This is the current situation:

We have

So let’s see how far we can get with this. These are the first lines of Kickstart 1.2 which I want to step through:

FC00D2  lea       040000,SP         Set stack pointer to top of first 128K.
FC00D8  move.l    #$020000,D0
FC00DE  subq.l    #1,D0             Delay loop.
FC00E0  bgt.s     FC00DE

        ; If the ROM is also visible at F00000, or if there is another
        ; ROM there, jump there.

FC00E2  lea       FC0000(PC),A0     Load base address of ROM we're in.
FC00E6  lea       F00000,A1         Load (absolute address) F00000.
FC00EC  cmp.l     A1,A0             Are we at F00000?
FC00EE  beq.s     FC00FE            If so, don't execute the following.
FC00F0  lea       FC00FE(PC),A5     This is relative, i.e. always points
                                    12 bytes down from where we are.
FC00F4  cmp.w     #$1111,(A1)       If "1111" not found at F00000, then
FC00F8  bne.s     FC00FE            continue running below, else start
FC00FA  jmp       2(A1)             running at F00002.

        ; Set up port A on the first CIA (8520-A).

FC00FE  move.b    #3,BFE201         Set low two bits for output.
FC0106  move.b    #2,BFE001         Set boot ROM off, power light dim.

Before we can get started, we need to install the Kickstart Rom. This is done in the hardware preferences. By default, the Aros replacement Rom is installed.

screenshot 2019-02-12 at 18 41 29

It can be replaced by an original Rom via drag & drop, so why stick to the clone if we can have the real stuff 😎:

screenshot 2019-02-12 at 18 41 45

The Kickstart Rom is usually located in the upper memory area. On startup, the Amiga mirrors it in the lower memory banks to enable the CPU to find the correct start vector. The memory inspector shows the details:

screenshot 2019-02-12 at 18 44 25

When powering on the Amiga, the CPU loads the start vector from the mirrored Kickstart Rom and jumps to address FC00D2. For testing purposes I let the emulator stop at FC00DE at a predefined breakpoint which can be watched in the CPU panel:

screenshot 2019-02-12 at 18 45 35

Let’s set another breakpoint at FC00FE by double clicking the corresponding line in the program window:

screenshot 2019-02-12 at 18 49 47

By pressing the Run button the CPU starts and stops at FC00FE.

screenshot 2019-02-12 at 19 15 12

Pretty nice so far πŸ₯³, but at this point the Kickstart Rom writes into the CIA registers πŸ™. Two CIAs are already present in the current implementation, but they are not yet connected to memory. Therefore I have to stop here. I'll continue this thread once the CIAs are connected. Stay tuned ...

dirkwhoffmann commented 5 years ago

Finally, I think I got it right. vAmiga now has a two-pass upscaling pipeline that can be configured individually in the video preferences:

Screenshot 2019-03-30 at 09 21 28

I also figured out that the xBR shader relies on pixel blending to work properly. The results is quite nice I think.

Upper picture: Original Amiga output (pipeline setting: none + none) Middle picture: In-texture lowres scaling: (pipeline setting: xBR + none) Lower picture: Two-pass xBR (pipeline setting: xBR + xBR)

upscaling
mithrendal commented 5 years ago

Looks brilliant sharp like a vector monitor now. Played once asteroids on a Vectrex. That was as sharp as the results of your two pass xBR pipeline.

dirkwhoffmann commented 5 years ago

Another epic moment: My first Guru meditation 😲.

Screenshot 2019-04-01 at 14 18 21
mithrendal commented 5 years ago

it starts talking to us ... It is already some kind of dialog I think. It says something to us and expects our action in form of a left mouse button click. Surly some kind of intelligent life form... Maybe it wants to test your reaction...

dirkwhoffmann commented 5 years ago

it starts talking to us ...

Yes, it becomes scary now 😬.

Fortunately, it only shows this mean reaction when I restore it from a snapshot. Maybe, it doesn't like it's brain to be frozen πŸ€”. Denise really has to work on her handwriting. The Guru meditation is hardly readable.

Opening two emulator instances in parallel seems to work. I therefore conclude that it doesn't have a problem with multiple personalities.

dirkwhoffmann commented 5 years ago

Oh, just noticed that I don't save the CPU state into the snapshot πŸ™„.

So when it wakes up from hyper sleep, it works with his current brain state on old memories. No wonder he's a little disoriented. Must be like a big hangover for him πŸ₯΄. Poor thing 😟.

dirkwhoffmann commented 5 years ago

Time to release a first beta of vAmiga 0.1 😎:

http://www.dirkwhoffmann.de/vAMIGA/vAmiga_0.1b1.zip

If you want to check it out, make sure that an original Kickstart is used (1.2 or 1.3). Booting the Aros replacement produces a permanent black screen.

vAmiga follows the tradition of UAE 0.1: It runs Kickstart to the point where the hand & disk logo shows up, but because the disk drive is a stub yet, it cannot go further.

Nevertheless, many GUI functions already work. They give you a glimpse what the emulator will look like. You can take snapshots and screenshots, emulate keystrokes by typing on a virtual keyboard, or adjust video settings. The CPU, Memory and Event Inspector windows are nearly complete. You can stop the emulator there and single-step through the code, view the memory layout and content, or watch the currently scheduled events (vAmiga is event-based, so there's a lot going on there).

Any bug reports are welcome, even tiny things. Finding bugs shouldn't be too difficult at this early development stage πŸ™ˆ.

Alessandro1970 commented 5 years ago

Hi to all, It starts well with my kickstarts: Kickstart v1.2 rev 33.180 (1986)(Commodore)(A500-A1000-A2000) Kickstart v1.3 rev 34.5 (1987)(Commodore)(A500-A1000-A2000-CDTV)

The kickstart hand seems to me more shifted to the left and not centered.

rossimariolee commented 5 years ago

Hi everyone, my kickstart 1.3 works, but the image is not centered even to me, it seems to the left a little. With the options in the preferences menu the image is not centered because black vertical bands appear.

dirkwhoffmann commented 5 years ago

Please ignore the centering issue for now (I am displaying almost the full texture yet). I'l take care of that once the DIWSTRT and DIWSTOP registers are implemented properly (but to do this, I need to be able to boot the Workbench first).