Author Topic: MacVICE  (Read 100824 times)

Offline lallafa

  • A600
  • *
  • Posts: 83
  • Karma: 1
  • MacVICE & DI64 Dev
    • lallafa's Blog
Re: MacVICE
« Reply #75 on: April 19, 2009, 05:38:50 PM »
Quote
Looking at the code, it's obvious that it'll only work for x64, and it looks like it'd fail if it autostarts code at $c000. On machines with bankswitching (like C128 and Plus/4) how you'd go about it, without adding what I suspect is a fairly costly check in the core CPU emulation.

I improved the code a bit to wait for the LOADING stage and then do >= $e000 check only. I agree that other machines can cause trouble... - and have no fix for them currently :( Fortunately, the worst thing that might happen is warping toggled at the wrong point in AutostartWarp mode. Without Warp everything should work as before.

Quote
Just pushing the bytes in there, and adjusting the basic end address seems like a much simpler solution, yeah.

I did a first very rough experiment on this in the chris/v2.1.9-filedma branch.
It does dma load for x64 for prg files.
Machine specific code is a skeleton only as I need external help there.
Feel free to play with the code and keep your patches coming ;)

Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Re: MacVICE
« Reply #76 on: April 20, 2009, 05:41:22 PM »
Quote
Looking at the code, it's obvious that it'll only work for x64, and it looks like it'd fail if it autostarts code at $c000. On machines with bankswitching (like C128 and Plus/4) how you'd go about it, without adding what I suspect is a fairly costly check in the core CPU emulation.

I improved the code a bit to wait for the LOADING stage and then do >= $e000 check only.

It would be even better if warp was enabled as soon as the user autostarts, so you don't have to sit around and wait for the C64's reset sequence. PC should be >= $e000 during the reset sequence as well, so the same checks should still apply.

Quote
I agree that other machines can cause trouble... - and have no fix for them currently :( Fortunately, the worst thing that might happen is warping toggled at the wrong point in AutostartWarp mode. Without Warp everything should work as before.

Yeah, worst case should only mean slow loading, and that's not too bad - you can still press CMD-W manually. The only scenario I can think of when it'll fail (as in not disable warp mode automatically) is if one of the bank switching machines loads autostart code above $e000, but I'm not sure if that's feasible - it's certainly not likely.

Quote
Quote
Just pushing the bytes in there, and adjusting the basic end address seems like a much simpler solution, yeah.

I did a first very rough experiment on this in the chris/v2.1.9-filedma branch.
It does dma load for x64 for prg files.
Machine specific code is a skeleton only as I need external help there.
Feel free to play with the code and keep your patches coming ;)

Interesting, I just did a quick test, and it seems to work perfectly: it loads instantly, and TDE state is not touched.

Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Regression?
« Reply #77 on: April 23, 2009, 07:33:59 AM »
I just built the latest trunk to test the latest autostart code (which seems to work well!), and the CPU JAM requester has Monitor and Reset swapped again.

Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Re: MacVICE
« Reply #78 on: April 24, 2009, 12:00:27 PM »
After singlestepping through my source for a while, I suddenly got that requester saying "Sound: write to sound device failed!". Clicking close promptly crashed vice, and now I have to start over again. :(
« Last Edit: April 24, 2009, 12:06:20 PM by MagerValp »

Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Re: MacVICE
« Reply #79 on: May 03, 2009, 03:28:33 PM »
RFE: it'd be nice if VICE started with the user's home directory as the current directory, and not /. If VICE is autostarted, the autostart file's directory would be even better.

Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Re: MacVICE
« Reply #80 on: May 12, 2009, 02:33:11 AM »

Offline lallafa

  • A600
  • *
  • Posts: 83
  • Karma: 1
  • MacVICE & DI64 Dev
    • lallafa's Blog
Re: MacVICE
« Reply #81 on: June 26, 2009, 08:25:57 PM »
To make it easier for you to follow when new MacVICE snapshots are available on my site, I added twitter to my upload scripts to send you a notifcation.

Just head over to: www.twitter.com/macvice

Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Re: MacVICE
« Reply #82 on: June 26, 2009, 09:52:26 PM »
Ah, perfect, added to my rss reader. That joystick dialog crash bugged me the other day :)

Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Re: MacVICE
« Reply #83 on: June 27, 2009, 01:34:38 AM »
I just compiled the latest snapshot, and the joystick dialog works. However, PAL emulation is broken - all I get is a black screen. I deleted my vice prefs, no change.

EDIT: forgot to say that I'm testing on 10.6 DP 10A394.

PS: Wouldn't the PAL filter work beautifully with OpenCL? :)
« Last Edit: June 27, 2009, 03:06:13 AM by MagerValp »

Offline lallafa

  • A600
  • *
  • Posts: 83
  • Karma: 1
  • MacVICE & DI64 Dev
    • lallafa's Blog
Re: MacVICE
« Reply #84 on: June 27, 2009, 04:04:41 AM »
oops! same here on 10.5.7...

will have a look...

Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Re: MacVICE
« Reply #85 on: June 28, 2009, 04:50:51 PM »
Warp mode has been acting up in the latest few snapshots. Enable/disable doesn't always seem to do anything - it interacts with the automatic warp loading somehow. Also, after using warp mode for a few seconds I tend to get an error dialog: "VICE Error! Sound: write to sound device failed." and I have to re-enable sound output.

Offline lallafa

  • A600
  • *
  • Posts: 83
  • Karma: 1
  • MacVICE & DI64 Dev
    • lallafa's Blog
Re: MacVICE
« Reply #86 on: June 29, 2009, 03:48:22 AM »
[21068] should fix the sound resume problems you mentioned.

Can you give me a detailed description how to reproduce the autostart warp interference? I wasn't able to reproduce one here myself...


Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Re: MacVICE
« Reply #87 on: June 29, 2009, 06:01:56 AM »
Steps to reproduce:

1. Double click on Berzerk Redux
2. Take screenshot

:)

Speed drops back to 100% after autostarting, but for some reason the UI still thinks warp mode is enabled.

Offline MagerValp

  • A600
  • *
  • Posts: 85
  • Karma: 0
Re: MacVICE
« Reply #88 on: June 29, 2009, 06:26:55 AM »
[21068] should fix the sound resume problems you mentioned.

Great!

I tried compiling the latest rev with clang and the 10.6 SDK, which unfortunately failed:

http://mazzy.paradroid.net/tmp/clang-10.6.txt

There are a bunch of pretty interesting warnings in there, so you might want to dig through it. In particular the wonderful LLVM diagnostics warnings:

Code: [Select]
vice/src/arch/unix/macosx/cocoa/view/fullscreenwindow.m:112:5: warning: method '-toggleFullscreen:' not found (return type defaults to 'id')
    [[self delegate] toggleFullscreen:self];
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vice/src/arch/unix/macosx/cocoa/view/vicewindow.m:205:39: warning: incompatible type sending 'VICEWindow *', expected 'id<NSWindowDelegate>'
        [fullscreenWindow setDelegate:self];
                                      ^~~~

vice/src/arch/unix/macosx/cocoa/dialog/resourceeditorcontroller.m:62:27: warning: incompatible type sending 'ResourceEditorController *', expected 'id<NSOutlineViewDelegate>'
    [treeView setDelegate:self];
                          ^~~~
vice/src/arch/unix/macosx/cocoa/dialog/resourceeditorcontroller.m:63:29: warning: incompatible type sending 'ResourceEditorController *', expected 'id<NSOutlineViewDataSource>'
    [treeView setDataSource:self];
                            ^~~~

vice/src/arch/unix/macosx/mididrv.c:252:26: warning: initializing 'MIDIPacket const[1]' discards qualifiers, expected 'MIDIPacket *'
    MIDIPacket *packet = pktlist->packet;
                         ^~~~~~~~~~~~~~~

There are also a bunch of deprecations, and so on.

Going to see what I can do to get it to build with clang, as I'm really curious about the performance.

Offline blacky

  • A600
  • *
  • Posts: 1
  • Karma: 0
Re: MacVICE
« Reply #89 on: June 30, 2009, 02:49:13 AM »
@MagerValp

Those functions seem to be inline ones, I've added the 'static' keyword to them in the latest rev, could you please update and see if it compiles now ?