Subversion Repositories pentevo

Rev

Rev 883 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. #include "std.h"
  2. #include "zxevo.h"
  3. #include "fontatm2.h"
  4.  
  5. unsigned int zxevo_readfont_pos;
  6.  
  7. unsigned char zxevo_readfont(void)
  8. {
  9.         // read sequence for Z80: all first bytes of symbols 0-15, then all second bytes of same symbols, etc until 7th bytes.
  10.         // then all first bytes of symbols 16-31, and so on.
  11.         //
  12.         // unreal fontrom sequence: all first bytes if all symbols (0-255), then all second bytes and so on
  13.        
  14.         unsigned int idx;
  15.        
  16.         idx =  (zxevo_readfont_pos & 0x000F)     |
  17.               ((zxevo_readfont_pos & 0x0070)<<4) |
  18.               ((zxevo_readfont_pos & 0x0780)>>3) ;
  19.  
  20.         zxevo_readfont_pos++;
  21.        
  22.         return fontatm2[idx];
  23. }
  24.  
  25.  
  26. void zxevo_set_readfont_pos(void)
  27. {
  28.         zxevo_readfont_pos = 0;
  29. }
  30.