View Javadoc

1   /*
2    * $Id: MemoryAccess.java,v 1.6 2005/10/25 16:27:59 weiju Exp $
3    * 
4    * Created on 2005/09/23
5    * Copyright 2005 by Wei-ju Wu
6    *
7    * This file is part of The Z-machine Preservation Project (ZMPP).
8    *
9    * ZMPP is free software; you can redistribute it and/or modify
10   * it under the terms of the GNU General Public License as published by
11   * the Free Software Foundation; either version 2 of the License, or
12   * (at your option) any later version.
13   *
14   * ZMPP is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   * GNU General Public License for more details.
18   *
19   * You should have received a copy of the GNU General Public License
20   * along with ZMPP; if not, write to the Free Software
21   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22   */
23  package org.zmpp.base;
24  
25  /***
26   * This class manages read and write access to the byte array which contains
27   * the story file data. It is the only means to read and manipulate the
28   * memory map.
29   * 
30   * @author Wei-ju Wu
31   * @version 1.0
32   */
33  public interface MemoryAccess extends MemoryReadAccess {
34  
35    /***
36     * Writes an unsigned 16 bit value to the specified address.
37     * 
38     * @param address the address to write to
39     * @param value the value to write
40     */
41    void writeUnsignedShort(int address, int value);
42    
43    /***
44     * Writes a short value to the memory.
45     * 
46     * @param address the address
47     * @param value the value
48     */
49    void writeShort(int address, short value);
50  
51    /***
52     * Writes an unsigned byte value to the specified address.
53     * 
54     * @param address the address to write to
55     * @param value the value to write
56     */
57    void writeUnsignedByte(int address, short value);
58    
59    /***
60     * Writes a byte value to the specified address.
61     * 
62     * @param address the address
63     * @param value the value
64     */
65    void writeByte(int address, byte value);
66    
67    /***
68     * Writes an unsigned 32 bit value to the specified address.
69     * 
70     * @param address the address to write to
71     * @param value the value to write
72     */
73    void writeUnsigned32(int address, long value);
74  }