6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 7:40 pm

All times are UTC




Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Thu May 19, 2016 2:06 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
There's no doubt Klaus has revolutionised our world with his test suite. Many thanks to him for that.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2016 5:49 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
BigEd wrote:
There's no doubt Klaus has revolutionised our world with his test suite. Many thanks to him for that.
Hear, hear!

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri May 20, 2016 7:29 am 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
I can't agree more.

Klaus's test suite and Visual6502 are two essential tools to have in your toolset when taking on a 6502 emulation project.


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2016 10:06 am 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
I just released part 9 of this series. In this blog I will be booting the C64 system with its Kernel Rom and Basic Rom. Here is the link:

https://emufromscratch.blogspot.co.za/2 ... ystem.html

Enjoy!


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2016 10:26 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Interesting development... is there a repo or a download for the final code at the end of each of the episodes?


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2016 2:17 pm 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
There is indeed a way to access the final source code for each episode. When visiting my github site https://github.com/ovalcode/c64jscript just click on releases and you will see the source available for each episode as a zip file. The source code for my last post, for example, will be ch9.zip

Iuse the main branch for new development, so if you peek at this branch at any time you will get an idea what I was up to recently.


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2016 3:03 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
That's great, thanks! I just wanted to test something - and it turns out Python's built-in one-line web server is enough for this purpose:
Code:
ed$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [21/May/2016 15:59:30] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [21/May/2016 15:59:30] "GET /Memory.js HTTP/1.1" 200 -
127.0.0.1 - - [21/May/2016 15:59:30] "GET /Cpu.js HTTP/1.1" 200 -
127.0.0.1 - - [21/May/2016 15:59:30] "GET /basic.bin HTTP/1.1" 200 -
127.0.0.1 - - [21/May/2016 15:59:30] "GET /kernal.bin HTTP/1.1" 200 -

which might be easier, for some, than setting up a full-sized webserver. (Some people won't have Python and might not want it, but it's available for all platforms.)

Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2016 4:02 pm 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
This is really awesome! I see it works out of the box for Ubuntu. The nice things is that it takes the current directory from which you invoked python as the context root of the web pages it is serving.

This is definitely going to be of great help since I always end up with copies of the source code in two places (e.g. tomcat webapps folder and the folder that is under git source control) and copying between the two.

Thanks Ed!


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2016 4:14 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
You're welcome - eventually I used this so often I didn't have to keep looking up how to do it! You can give a port number as a parameter - sometimes I run several, in different dirs.


Top
 Profile  
Reply with quote  
PostPosted: Tue May 24, 2016 11:50 pm 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
Hi all!

I just released Part 10 of my series on a Emulator from scratch. In this blog we will code the emulation of a very basic C64 screen.

http://emufromscratch.blogspot.co.za/20 ... creen.html


Top
 Profile  
Reply with quote  
PostPosted: Wed May 25, 2016 7:27 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Drawing text in the browser using the emulated character ROM - very nice!


Top
 Profile  
Reply with quote  
PostPosted: Wed May 25, 2016 9:25 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
If you wanted to eliminate the web server requirement, you could shove the ROMs in to an uncompressed GIF, render the GIF to a (offscreen) canvas, and then get the pixel values (RGB, RGBA) from the image. That way you could bundle ROMS as simple static images.

Bit of a hack, but it should work.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 26, 2016 7:53 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
That's a neat idea! The visual6502 abuses 24-bit colour - each node's polygons carry their ID in the low bits of the colour space, which allows for easy ID of which polygon you clicked.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 26, 2016 8:57 am 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
Very interesting concept! I am going to play a bit with this idea and see if I can give some feedback in my next Blog.

Thanks Whartung!


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 8:16 pm 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
Hi Whartung and BigEd

I had some spare time to play with the off screen GIF idea. This method works perfectly in Debian's Iceweasel browser.

Unfortunately, it looks like Google chrome and browsers on Android doesn't like this approach.

My first try on Chrome yielded the following error: Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.

Some Googling suggested the use of

imageObj.crossOrigin = "Anonymous";

Where imageObj is the JavaScript Image that used to load the gif into.

This yielded the following error:

Image from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Invalid response. Origin 'null' is therefore not allowed access.

It appears that with recent HTML specifications they have become more strict for situations where you try to access the data from a IMG tag:

https://developer.mozilla.org/en-US/doc ... bled_image

Anyway, in my next blog I will provide access to my code attempt.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 76 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: