From: Leo Date: Fri, 9 Jul 2010 08:39:02 +0000 (+0000) Subject: From experimental: X-Git-Tag: 2.0-fat16~35 X-Git-Url: http://cloudbase.mooo.com/gitweb/avrcpm.git/commitdiff_plain/21347864605f3d413cc202fc7316064554f60c09 From experimental: - More dram optimization. - New functions: dram_read_w, dram_write_w git-svn-id: svn://cu.loc/avr-cpm/trunk/avrcpm/avr@29 57430480-672e-4586-8877-bcf8adbbf3b7 --- diff --git a/z80.asm b/z80.asm index 409cc88..43ad4e0 100644 --- a/z80.asm +++ b/z80.asm @@ -59,7 +59,7 @@ .equ refr_vect = OC2Aaddr #endif -#define DRAM_WORD_ACCESS 0 /* experimental */ +#define DRAM_WORD_ACCESS 1 /* experimental */ #define EM_Z80 0 /* we don't have any z80 instructions yet */ @@ -1212,238 +1212,24 @@ resetwait: ; ------------------ DRAM routines ------------- -; TODO: - -#if DRAM_DQ_ORDER == 1 - #define CLASSIC_DRAM 0 -#else - #define CLASSIC_DRAM 1 /* Change manualy, if you want new hw w/ old sw */ -#endif - - -#if DRAM_DQ_ORDER == 0 - #if CLASSIC_DRAM == 1 - #error "Old harware can not work with new software!" - #endif -#endif - -; **************************************************************************** - -#if CLASSIC_DRAM - -; ********************** DRAM routines from Sprite_tm ************************ - -;Sends the address in zh:zl to the ram -dram_setaddr: - push temp - in temp,portd - andi temp,0x17 - out portd,temp - in temp,portb - andi temp,0xE0 - out portb,temp - sbrc zl,0 - sbi portb,ram_a0 - sbrc zl,1 - sbi portb,ram_a1 - sbrc zl,2 - sbi portb,ram_a2 - sbrc zl,3 - sbi portb,ram_a3 - sbrc zl,4 - sbi portb,ram_a4 - sbrc zl,5 - sbi portd,ram_a5 - sbrc zl,6 - sbi portd,ram_a6 - sbrc zl,7 - sbi portd,ram_a7 - sbrc zh,0 - sbi portd,ram_a8 - pop temp - ret - -dram_getnibble: - andi temp,0xf0 - sbic pinc,ram_d0 - ori temp,0x1 - sbic pinc,ram_d1 - ori temp,0x2 - sbic pinc,ram_d2 - ori temp,0x4 - sbic pinc,ram_d3 - ori temp,0x8 - ret - -dram_sendnibble: - push temp2 - in temp2,portc - andi temp2,~RAM_DQ_MASK - - sbrc temp,0 - ori temp2,(1<