X-Git-Url: http://cloudbase.mooo.com/gitweb/avrcpm.git/blobdiff_plain/22ed98eed278d3a4040c70196ff096328ad25814..21347864605f3d413cc202fc7316064554f60c09:/z80.asm 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<