VIC-I anomalies in emulation

Basic and Machine Language

Moderator: Moderators

Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

When I tried it again, NTSC VICE is exactly as fast as a PAL VIC... I wonder why more people haven't complained about this?

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

Maybe this changed along with the VICE versions?

This all gives me a bad feeling for doing time critical things on VICE, but now I understand why some raster interupt routines I tested only worked for PAL but not for NTSC - it seems that the emulation is more PAL based than NTSC.

Another point for Anders for not using emulation but the real machine, I guess :-)

Björg
Bacon
for breakfast
Posts: 578
Joined: Mon Apr 19, 2004 8:07 am

Post by Bacon »

Schlowski wrote:PS: Immer wieder schön, sich mit Landsleuten in Fremdsprachen zu unterhalten*
Anders, Anders, Adam and me do the same thing all the time. I'm so used to it by now that I hardly notice it anymore.

*A rough translation for those who don't read German: "Always nice to speak with compatriots in a foreign language".
Bacon
-------------------------------------------------------
Das rubbernecken Sichtseeren keepen das cotton-pickenen Hands in die Pockets muss; relaxen und watschen die Blinkenlichten.
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

Same for me, but sometimes it strikes me that I talk to my own people in english :-) In technical aspects sometimes I even think in english and have some problems to find the corresponding german words, spooky...

Looking at the 'population' here at denial maybe I should start learning some swedish!

Björg
User avatar
Mike
Herr VC
Posts: 4839
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Regards forum language: I think it's simply a matter of convention. Denial is a English speaking board, all people reading this board understand English, so, for most time we write in English. Alternatively we could exchange messages over the PM system. Writing here gives enough time to think over what you've written - participating in a chat in a foreign language is altogether another experience. :wink:

Back to topic:

Björg, did you actually try my program?
Maybe because I like to program myself and only trust my own bugs ...ahm... features :wink:
I didn't explain the ML part, so:

Code: Select all

.02a1 LDA #$00
.02a3 TAX
.02a4 TAY
.02a5 STA ($FB),Y
.02a7 INY
.02a8 BNE $02a5
.02aa INX
.02ab BNE $02a5
.02ad RTS
... which simply executes 65536 writes in a 256 byte page. Together with the FOR loop that amounts to 1048576 writes. If there a any deviations in access time, they should appear far prominently in roughly the same time (~11 seconds) than with 2560 writes as performed by your program.

Greetings,

Michael
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

Writing and talking are two totally different things, I agrre with you. Especially the so-called smalltalk is not as easy as technical issues :-)

And back to topic here too:
I didn't tried your program - and my statement was not meant in any way offensive :oops: , it's just that I like to program myself...

I didn't get your point in the first run, I only thought about the 10-11 seconds but did not take into account the number of accesses to RAM - silly me. I will try and post the results!

For better bit-testing we should add a TXA so we do not write a million 0's but distinct values into RAM:

Code: Select all

.02a1 LDA #$00 
.02a3 TAX 
.02a4 TAY 
.02a5 TXA
.02a5 STA ($FB),Y 
.02a7 INY 
.02a8 BNE $02a5 
.02aa INX 
.02ab BNE $02a5 
.02ad RTS
You see, I always have to change programs :wink:
Ups, and we should poke the program into the right memory locations, not into zero page...
As I can see, you are using the mysterious 'program indirects' area which nobody knows what it is meant for anyway...

Code: Select all

1 FORT=0TO13:READA:POKE673+T,A:NEXT 
2 ADR=7000:POKE251,ADRAND255:POKE252,ADR/256 
3 T1=TI:FORT=0TO15:SYS673:NEXT:T2=TI 
4 PRINTT2-T1 
5 DATA169,0,170,168,138,145,251,200,208,250,232,208,247,96
Björg
(edited ADR for simple testing of different address ranges and used the read/poke sequence by Mike, saves 3 bytes :) )
Last edited by Schlowski on Wed Jan 18, 2006 7:49 am, edited 3 times in total.
User avatar
Mike
Herr VC
Posts: 4839
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

O.K., then you should alter the program as follows:

Code: Select all

1 FORT=0TO13:READA:POKE673+T,A:NEXT 
2 POKE251,0:POKE252,120 
3 T1=TI:FORT=0TO15:SYS673:NEXT:T2=TI 
4 PRINTT2-T1 
5 DATA169,0,170,168,138,145,251,200,208,250,232,208,247,96
this is because the two BNE instructions have a different jump range now. Of course TXA and STA can't share the same address. :wink:

Michael

Edit: corrected the POKE in line 1 to POKE 673+T, ...
Last edited by Mike on Wed Jan 18, 2006 7:34 am, edited 1 time in total.
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

hehe, just edited my own Post :-)
User avatar
Mike
Herr VC
Posts: 4839
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Ups, and we should poke the program into the right memory locations, not into zero page...
you see I didn't even check my own program... :shock: the right way that is. I wrote the ML part in the VICE monitor, added the BASIC part in the Denial web form, started another VICE, and by intuition corrected the error while typing the program back into VICE again. :?
As I can see, you are using the mysterious 'program indirects' area which nobody knows what it is meant for anyway...
:D I knew about this area since I typed in listings from CPU, RUN, and other magazines in the early 80's :D

Michael
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Schlowski wrote:it seems that the emulation is more PAL based than NTSC.
Quite possible, since all three of the following mostly live in PAL land:
1. VICE developers team
2. Marko and other people who measured the VIC chip
3. Various demo groups who have pushed the limits and thus required emulation to be improved

I don't have a NTSC VIC, so I couldn't tell the difference, but some of the cartridges which due to timing issues don't work in PAL emulation work in NTSC emulation, so there has to be some difference between the two. It may be a matter of a few constants that are wrong, or large parts of the interior workings are simplified.

However, there is a known timing related bug that affects both xvic and x64 and is the reason why Bandits doesn't work in the emulator. I don't know if any more work has been done on fixing this bug.
Anders Carlsson

Image Image Image Image Image
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

Enhanced your version right away with flexible test address.
(This is a point against Anders, without emulation I couldn't play around with this right now, so emulation is good :lol: )

Just run my original test program and on this computer it run exactly as the real VIC with 693 timer ticks - here it's VICE 1.18, at home it's 1.19...

Have to download 1.19 and test again!
vic user
VicGyver
Posts: 1401
Joined: Thu Mar 25, 2004 9:40 am

Post by vic user »

and is the reason why Bandits doesn't work in the emulator.
:cry:

what a great game!

chris
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Schlowski wrote:As I can see, you are using the mysterious 'program indirects' area which nobody knows what it is meant for anyway...
I believe it originally was meant for a jump/dispatch table. It has been discussed before, and some annotated memory map suggested something like that.
Anders Carlsson

Image Image Image Image Image
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Hm, VICE 1.19 was out just a few days ago, but the news article didn't mention any changes that would make it run differently. Maybe you had several processes on your home computer which slowed down and confused the emulator?
Anders Carlsson

Image Image Image Image Image
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

Updated to 1.19 here and got the same (correct) result of 693.

So my home computer is too fast, got 688 instead of 693, some sort of pimped VIC, lol.

Never trust emulation - this point goes to Anders again :-)

Björg
Post Reply