1 ; DRAM interface for 2 RAM chips. Supports up to 4 Mbyte of DRAM.
2 ; This is part of the Z80-CP/M emulator written by Sprite_tm.
4 ; Copyright (C) 2010 Leo C.
6 ; This file is part of avrcpm.
8 ; avrcpm is free software: you can redistribute it and/or modify it
9 ; under the terms of the GNU General Public License as published by
10 ; the Free Software Foundation, either version 3 of the License, or
11 ; (at your option) any later version.
13 ; avrcpm is distributed in the hope that it will be useful,
14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ; GNU General Public License for more details.
18 ; You should have received a copy of the GNU General Public License
19 ; along with avrcpm. If not, see <http://www.gnu.org/licenses/>.
25 ; -------------------- DRAM macros---------------
28 ; dram_wait number_of_cycles
40 ;----------------------------------------------
42 ; mem_read_ds destreg, memaddr
53 dram_wait DRAM_WAITSTATES ;
57 out DDRD,_255 ;1 = 14 + DRAM_WAITSTATES
60 ;----------------------------------------------
69 ;----------------------------------------------
78 ;----------------------------------------------
81 ; temp = destreg, x = memaddr
87 ;----------------------------------------------
89 ; mem_write_ds memaddr, sourcereg
100 out PORTC,_255 ;1 = 9
103 ;----------------------------------------------
105 ; mem_write_d memaddr
109 mem_write_ds @0, temp
112 ;----------------------------------------------
114 ; mem_write_s sourcereg
115 ; xh = memaddrh, xl = memaddrl
121 ;----------------------------------------------
124 ; xh = memaddrh, xl = memaddrl, temp = srcreg