EASy68K
http://easy68k.com/EASy68Kforum/

The ability to define memory ranges as read-only or invalid
http://easy68k.com/EASy68Kforum/viewtopic.php?f=9&t=726
Page 1 of 1

Author:  cpsumner [ Sun Oct 11, 2009 11:42 pm ]
Post subject:  The ability to define memory ranges as read-only or invalid

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.

Author:  profkelly [ Mon Oct 12, 2009 2:23 pm ]
Post subject: 

I would like user opinions on this feature.

Author:  lee [ Mon Oct 12, 2009 11:35 pm ]
Post subject: 

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.

Author:  profkelly [ Tue Oct 27, 2009 3:20 pm ]
Post subject: 

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.

Author:  profkelly [ Wed Oct 28, 2009 2:50 pm ]
Post subject: 

Image
Possible hardware configuration of memory map.

Author:  lee [ Wed Oct 28, 2009 8:53 pm ]
Post subject: 

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.

Author:  kkeeley [ Wed Oct 28, 2009 10:12 pm ]
Post subject: 

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

Author:  profkelly [ Thu Oct 29, 2009 12:08 am ]
Post subject: 

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.

Author:  profkelly [ Mon Nov 02, 2009 7:09 pm ]
Post subject: 

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.

Author:  profkelly [ Thu Nov 12, 2009 12:44 am ]
Post subject: 

Available in v5.0.0

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/