Show Posts
Pages: 1 [2] 3 4 ... 139
16  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 03, 2014, 03:50:45 pm
I cannot compare that under C64 even when run on both systems, as the video (not related to the emulation) messes heavily the results up..
The enhBasic is good for benchmarking (of the emulation speed) on various systems as the serial i/o there does not interfere too much.
17  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 03, 2014, 03:41:00 pm
It does not matter because both benchmarks were done under enhBasic.  1284p mighty 84secs, second system 8.1secs.
There is serial i/o in enhBasic, so the video does not interfere into the measurement..
18  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 03, 2014, 03:29:44 pm
I ran the enhBasic with above trigonometric test under arduino @16MHz (no video mess) and it took 84secs/
Then I ran it under the second system (also the enhBasic,no video mess) and it did it in 8.1sec. So my understanding is the second system's emulation speed  is ~10x faster than the arduino @16MHz - based on your info it means 6MHz.
I doubt DUE can do that such fast..
19  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 03, 2014, 03:14:45 pm
I think the 100 in the 6502exec is not about "delays", but it says "do 100 6502 instructions before returning from 6502exec".
With 1 it will do a single 6502 instruction, then it returns. So the higher number there the more time it spends in 6502 emulation..
Also, I think there must be a function which offers a char at a specific ram address to be printed into video ram..
Finding that point I can get rid of the video mess and hook the stuff similarly as the enhBasic does..
20  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 03, 2014, 02:59:13 pm
This takes 4.5sec on my system:
Code:
10 FOR I = 1 TO 10000
20 NEXT I
READY.
RUN

That makes 10000/4500*1MHz or a 2.2MHz 6502 smiley
But that is with exec6502(100); inside the "video and input loop" sending 1000bytes of video @115k2 continuously. So it must be much higher speed than the 2.2MHz. How to measure it then??.
21  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 03, 2014, 02:26:00 pm
This takes 4.5sec on my system:
Code:
10 FOR I = 1 TO 10000
20 NEXT I
READY.
RUN
22  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 03, 2014, 01:20:15 pm
The C64 has an 6510 inside. So we need to enhance the emulator somehow smiley
Try to run this on the DUE, how long does it take..
Code:
5  REM TRIGONOMETRIC FUNCTIONS TEST 0..89 DEGREE
10 PH = 3.141592653/2.0
15 REM DEFINE ARCSIN AND ARCCOS
20 DEF FN ASN(X) = ATN(X/SQR(1.0-X*X))
30 DEF FN ACS(X) = PH-ATN(X/SQR(1.0-X*X))
35 REM TR, TD - TO RAD, TO DEG
40 TR = 3.141592653 / 180.0
50 TD = 180.0 / 3.141592653
55 REM INPUT IN DEGREE (1..89)
60 FOR D = 0 TO 89
70 T = SIN(TR*D)
72 T = COS(TR*T)
74 T = TAN(TR*T)
76 T = TD*ATN(T)
80 T = TD*FN ACS(T)
90 T = TD*FN ASN(T)
100 PRINT D; "="; T; " DELTA="; T-D
110 NEXT D
120 END
23  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 01, 2014, 04:55:10 pm
It's not a good way to continuously rewrite the whole screen.
Causes a lot of data to be transmitted.
..
Yea, sending deltas only will do better.. But nice to see it works. And faster than the original.. smiley
24  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 01, 2014, 04:07:58 pm
It works, but I would prefer a standard i/o.. smiley
PS: you may see a snip of the screen does not work properly as it continuously rewrites it (see the line with "4")..
25  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 01, 2014, 03:52:10 pm
Code:
void loop () {

  int v_address = 0;
  Serial.write(27);   // Move to Home
  Serial.write("[H");
  
  for (int y=0;y<25;y++) {
    for (int x=0;x<40;x++) {
      exec6502(100);
      if (Serial.available()) {
     curkey = Serial.read() & 0x7F;
   RAM[198]=1;
   RAM[631]=curkey;
  }
     unsigned char petscii=VRAM[v_address++];
     if (petscii<32) petscii=petscii+64;
     Serial.write(petscii);
    }
    Serial.write(13);
    Serial.write(10);
  }
}

26  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 01, 2014, 01:49:04 pm
Ok, it seems it boots:
Code:
void loop () {
//  exec6502(100); //if timing is enabled, this value is in 6502 clock ticks. otherwise, simply instruction count.
//  if (Serial.available()) {
//    curkey = Serial.read() & 0x7F;
//  }
//}
  int address = 0;
  for (int y=0;y<25;y++) {
    for (int x=0;x<40;x++) {
      exec6502(100);
     unsigned char petscii=VRAM[address++];
     if (petscii<32) {
      petscii=petscii+64;
     }
     Serial.write(petscii);
    }
    Serial.println();
  }
}
27  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 01, 2014, 12:58:38 pm
I was the Atari520 user at that time, so no idea how the C64 works smiley
28  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 01, 2014, 12:55:39 pm
Ok, thanks, so I need to think about a new i/o code..
29  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 01, 2014, 12:49:59 pm
Can you explain, plz?
Does it mean the C64 has no i/o similar to enhBasic but I have to use the output from videoram?
30  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 01, 2014, 12:42:49 pm
No luck yet. I've tried with 65536 ramsize, and 30000 ramsize. I have got 128kB ram so no problem.
The ehBasic boots and works fine with 49k ramsize.
I did only the changes above..
Maybe the i/o addresses differ..
Pages: 1 [2] 3 4 ... 139