EASy68K  
It is currently Sun Dec 17, 2017 11:11 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sun Oct 11, 2009 11:42 pm 
Offline

Joined: Mon Apr 17, 2006 8:45 pm
Posts: 10
Location: England
I'd like to be able to define certain memory ranges as read-only, ie ROM, or as invalid addresses.

Writes to "ROM" space would be either ignored or trapped, similarly any access to invalid space would be trapped and an appropriate exception thrown.

I'm not sure of the best way the programmer would define this, one option would be to add a directive, another would be to be able to add ranges by way of a TRAP function.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 12, 2009 2:23 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1056
I would like user opinions on this feature.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 12, 2009 11:35 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Perhaps use could be made of the SECTION command using reserved names such as ROM, RAM, READONLY and INVALID that can be used alone with an address range or appended to a named section with the range of that section defining the addresses.

E.g.
Code:
      SECTION     ROM   $F80000,$FFFFFF

.. or ..

Code:
      CPM_bios    EQU   15

      SECTION     CPM_bios    ROM   

If there is no definition or only ROM or READONLY is defined everything undefined is assumed to be RAM.

If RAM is defined everything not RAM, ROM or READONLY is assumed to be INVALID.

RAM can be both read and written.
ROM can be read and writes will complete the cycle but without writing the data.
READONLY can be read but writes will cause a bus error.
INVALID will cause a bus error for both reads and writes.

Accessing hardware device addresses never cause an error.

Also if you're going to add this could we also have the option to wrap all addresses into the $00FFFFFF range like a real MC68000 would do.

Just some ideas.

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 27, 2009 3:20 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1056
lee wrote:
Perhaps use could be made of the SECTION command using reserved names such as ROM, RAM, READONLY and INVALID that can be used alone with an address range or appended to a named section with the range of that section defining the addresses.


That might be a good solution. The information would need to be conveyed from the assembler to the simulator. I don't think there is a standard way of doing that in an SRecord file so it would probably be done in the .L68 file. Would there need to be a way to manually configure the memory ranges in the simulator?

lee wrote:
Also if you're going to add this could we also have the option to wrap all addresses into the $00FFFFFF range like a real MC68000 would do.

I've been looking at this. The simulator code does not appear to have an easy fix so no promises.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 28, 2009 2:50 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1056
Image
Possible hardware configuration of memory map.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 28, 2009 8:53 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Quote:
The information would need to be conveyed from the assembler to the simulator. I don't think there is a standard way of doing that in an SRecord file so it would probably be done in the .L68 file.

Could it not be passed encoded in S0 records? That way it would be present even if the listing file was absent.

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 28, 2009 10:12 pm 
Offline

Joined: Mon Apr 11, 2005 12:57 am
Posts: 27
Location: Australia
This new feature sounds very promising, I look forward to giving it a try. I will be a very handy feature to allow for the writing of exception processing code. This will help to make our systems more robust and more stable.

Keep up the great work.
Kenneth


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 29, 2009 12:08 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1056
lee wrote:
Quote:
The information would need to be conveyed from the assembler to the simulator. I don't think there is a standard way of doing that in an SRecord file so it would probably be done in the .L68 file.

Could it not be passed encoded in S0 records? That way it would be present even if the listing file was absent.

Lee.

Actually I was thinking using the S0 record. I'll need to investigate that possibility.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 02, 2009 7:09 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1056
The Assembler will have a new directive:

Code:
        Memory  ROM        $001000,$002000
        Memory  Read       $003000,$004000
        Memory  Protected  $005000,$006000
        Memory  Invalid    $007000,$008000

Memory ranges may overlap. The Simulator checks the ranges in this order:
Invalid, Protected, Read, ROM.

Any violation results in a Bus Error.

The memory ranges are conveyed to the Simulator in the .S68 (SRecord) file via S0 records. If no Memory ranges are specified in the code they may still be set manually in the Hardware window of the simulator.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 12, 2009 12:44 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1056
Available in v5.0.0

_________________
Prof. Kelly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB® Forum Software © phpBB Group