6x8

ZXNet echo conference «code.zx»

From Mihail Zharov To All 13 December 2002

Hello All! Update for the single-character subject printer - crossed the threshold of 100 bytes ;) - reduced two thick streams by clock cycles - got rid of garbage in the screen for the 4th stream. (now we're littering the font ;) ╒═════════════════< Begin file: p42 .lib >═════════════════╕ ;LIBRARY OF PRINTING IN 6x8 FONT - 42 ; (c) 2000 JAM&POL ;font - 42fast - 2k ;Revision date: 03-12-2002 ;====================================================== ; PRINTING THE SYMBOL ; (c) 2000 JAM&POL, VIVID, MAS. ;====================================================== ; in: a - number of the character to print, exx ;--------------------------------------- P42A ld d,FONT/256: ld e,a ld bc,#0000 DB_P42_X EQU $-1 ;b=0..255 pixel DB_P42_Y EQU $-2 ;c=0..23 line ;t=21 ;--------------------------------------- ;address calculation on screen ld a,c: and %00011000 or #40: ld h,a: ld a,c xor b: and %00000111: xor b rrca: rrca: rrca: ld l,a ;t=57 ;--------------------------------------- ;print at even X-coordinate... ld a,b: ld b,8: rrca rrca: jr c,P42A2 ;109 ex de,hl rrca: jr nc,P42A0 ;124 ;t=119 ;--------------------------------------- ;print from 4 pixels - 00001111-11000000 P42A4 ld c,(hl): ld a,(de): rld ld (de),a: inc e: ld a,(de) xor (hl): and %00111111 xor (hl): ld (de),a: dec eld (hl),c: inc h,d djnz P42A4 ret ;t=119+110*8-5+10=1004 ;----------------------------------------- ;печать с 0 пиксела - 11111100 P42A0 ld c,%00000011 ld a,(de): and c: or (hl) ld (de),a: inc h,d djnz P42A0+2 ret ;t=124+7+46*8-5+10=504 ;----------------------------------------- ;печать с 2 пиксела - 00111111 P42A2 rrca: jr c,P42A6 ;125 ld c,%00111111 ld a,(de): rrca: rrca xor (hl): and c: xor (hl) ld (hl),a: inc h,d djnz P42A2+5 ret ;t=120+7+61*8-5+10=620 ;----------------------------------------- ;печать с 6 posts - 00000011-11110000 P42A6 ld a,(de) rlca: rlca: ld c,a: inc l: rrd ld (hl),a: dec l: ld a,(hl) xor c: and %11111100: xor c ld (hl),a: inc h,d djnz P42A6 ret ;t=125+102*8-5+10=946 ;----------------------------------------- ;t=504+620+946+1004=3074 / b=99 Well: 504 620 970 1041 / 102 вроде, или 101 [delete] ╘═════════════════< End file: p42 .lib >═══════════════════╛ How did you like this? Who wrote "меньше 1000 тактов" - осталось ведь немножко - 5 тактов - неужели безнадежно? Let me tell you more about it ;) Let me tell you what to do - let's not say anything. Read more потоков.It hasn't worked out yet, but it's tempting ;) Bye.

From Kirill Frolov To Mihail Zharov 15 December 2002

Press RESET immediately, Mihail! 13 Dec 02 07:59, Mihail Zharov wrote to All: MZ> Update for sabzhe single-character printer [...] MZ> Does anyone have any ideas for optimization? Most often, information is displayed either in whole lines or in separate words. That is, you can save at least on address calculation and reboot registers At the input, the printer should accept not a symbol, but a string, you can introduce a constraint such that the line should not wrap beyond the right edge screen. You can also display 4 characters (in 3 familiar places) at one time times. When displaying a number of characters that is not a multiple of four, a problem arises - where does it come from? take extra 1-3 characters. You can organize the screen buffer at 42x24 characters and take the missing characters from there.

From Dmitry Mikhalchenkov To Mihail Zharov 16 December 2002

Hello Mikhail! December 13, 2002 (it was 07:59 then) Mikhail Zharov in his letter to All wrote: MZ> ;--------------------------------------- MZ> ;address calculation on screen MZ> ld a,c: and %00011000 MZ> or #40: ld h,a: ld a,c MZ> xor b: and %00000111: xor b MZ> rrca: rrca: rrca: ld l,a MZ> ;t=57 MZ> Does anyone have any ideas for optimization? There are ideas for changing the approach to calculating addresses: And if you create some kind of plate for quickly recoding coordinates into on-screen address? In this way, although we will eat up some piece of memory, we will be able to free up a few clock cycles. Or another idea - don’t calculate the address each time, but store it in a variable and each time when outputting, just change the character offset variable from the boundary familiar places and, if the symbol moves to a new familiar place, increment address. The second method is used in the printer from ZASM3.10, but it happened - I sinned :) I just don’t have the source code I need at hand, but if you need it, I can send it to you. Best regards, Dmitry

From Mihail Zharov To Kirill Frolov 16 December 2002

Hello Kirill! Sunday, December 15, 2002, at 00:07:28, Kirill Frolov -> Mikhail Zharov. MZ>> Update for sabzhe single-character printer KF> [...] MZ>> Does anyone have any ideas for optimization? KF> Most often, information is displayed either in whole lines, or KF> in separate words. KF> That is, you can save at least on address calculation and KF> reloading registers. KF> At the input, the printer should accept not a character, but a string, KF> you can introduce such a restriction KF> that the line should not wrap beyond the right edge of the screen. KF> You can also display KF> to the screen 4 characters (in 3 familiar places) at a time. When KF> displaying the number of characters KF> not a multiple of four, a problem arises - where to get it KF> extra 1-3 characters. You can KF> organize a screen buffer of 42x24 characters and take KF> missing characters from there. Thank you of course. But I'm not interested in the theory of what's beyond the horizon ;) I need it specifically for a single-character...For me, string and lowercase completely depend on single-character, and not vice versa. I'm not talking about external strapping cycles, I'm talking about _methods_ of optimization when imprinting 6 bits onto the screen. Of course, taking into account the specialization of a particular item. For example: if, for a single-character printer, the requirements are masked with all sides, then for a string or lowercase it is enough on one throughout the entire string/string, except for the last symbol. At the same time, for a thong it is necessary to mask it completely, but for a line it is better to clear the ending. or, for lowercase it is permissible to print 4 characters, and for stringing is not the optimal way, especially for a wave - I’m talking about “do not count the address” - print up/down/up/down... etc. etc. The one-character typewriter is the basis. Everything else is its derivatives ;) Bye.

From Mihail Zharov To Dmitry Mikhalchenkov 18 December 2002

Hello Dmitry! Monday, December 16, 2002, at 11:45:01 am Dmitry Mikhalchenkov -> Mikhail Zharov. MZ>> ;--------------------------------------- MZ>> ;address calculation on screen MZ>> ld a,c: and %00011000 MZ>> or #40: ld h,a: ld a,c MZ>> xor b: and %00000111: xor b MZ>> rrca: rrca: rrca: ld l,a MZ>> ;t=57 DM> There are ideas for changing the approach to calculating addresses: DM> And if you create some kind of table for quick recoding DM> coordinates to screen address? This is how we eat anyway DM> some piece of memory, but we can free up a few DM> measures. Now you can print from any even X-pixel along the Y-horizon. It turns out that the table should weigh 128 * 24 = 3072 * 2 = 6144 bytes ;) Ok. 32*24*2 plus an offset variable, but still a lot. It’s better to expand the cycles on these bytes or occupy a string a typewriter that only needs an address once... DM> Or another idea - to calculate the address each time, but DM> store it in a variable and every time when outputting only DM> change the character offset variable from the border DM> familiar places and, if the character moves to a new familiar place - DM> increment the address. This way we will move into the area of structured programming ;) To print many consecutive characters, aka string, There is a more different, specialized and more nimble software. ;) Imagine that I need to randomly type one at a time symbol across the entire screen. Who will win in terms of clock cycles: external or internal address calculation? DM> The second method is used in the printer from ZASM3.10, yes it was DM> matter - I sinned :) Good owl. Normal print speed. I never got around to seeing how it was done ;) It's a pity it doesn't work with the screw - it's a big minus for me. Another 64 characters would be a dream. DM> But the source code you need is not at hand, but if necessary DM> - I can send it. Come on, interesting. Do you happen to know how the lowercase is done? ps. How did you “sin”? ;) Yeah, I see it in the help pages and I see it in the copyrights. Who can you complain about a terrible glitch in the program? with conditional compilation? ;) Bye.

From Nikolaj Amosov To Mihail Zharov 18 December 2002

Hello Mikhail! Wednesday December 18, 2002 08:28:15 Mihail Zharov -> Dmitry Mikhalchenkov: [disk error] DM>> The second method is used in the printer from ZASM3.10, yes DM>> was DM>> matter - I sinned :) MZ> Good sovtina. Normal print speed. MZ> I couldn’t get around to seeing how it was done ;) MZ> It's a pity it doesn't work with the screw - it's a big minus for me. It’s strange - there’s been a version for screws for quite a long time, it seems that via RST#08 done. I was quite active a couple of years ago used it. [REAL ZX]

From Dmitry Mikhalchenkov To Nikolaj Amosov 19 December 2002

Hello Nikolaj! December 18, 2002 (it was 10:10 pm then) Nikolaj Amosov in his letter to Mikhail Zharov wrote: DM>>> ZASM3.10, yes MZ>> It's a pity it doesn't work with the screw - it's a big minus for me. NA> Strange - for a long time now there has been a version for screws, it seems even NA> via RST#08 done. A couple of years ago I was quite active NA> used it. Version 3.10 involves switching driver #3d2f/#3d13 some screws they work through this point, at the expense of others - I don’t know, we ourselves are not hard-drivers :) And I still use it, albeit on an emulator... Yes, I agree - it’s insanity, but I don’t care get out of the habit :) Best regards, Dmitry

From Dmitry Mikhalchenkov To Mihail Zharov 19 December 2002

Hello Mikhail! December 18, 2002 (it was 08:28 then) Mikhail Zharov in his letter to Dmitry Mikhalchenkov wrote: DM>> But the source code you need is not at hand, but if necessary DM>> - I can send it. MZ> Come on, interesting. MZ> Do you happen to know how the lowercase is made? I don’t want to feed you breakfast, but I forgot again :( And the same print is used for both symbolic and lowercase letters... It seems. But in ZxEdit by Khokhlov it uses lowercase, which prints 4 characters. I can too upload the source of the print... MZ> ps. How did you “sin”? ;) Well, I had a chance to climb to find out the internal structure for a more detailed familiarization and killing glitches in ZA-macro MZ> Who can you complain about a terrible glitch in the program MZ> with conditional compilation? ;) Hmmm... Only to the authors, but according to rumors they have already scored 8( Best regards, Dmitry

From Mihail Zharov To Nikolaj Amosov 19 December 2002

* Reply to letter from CODE.ZX Hello Nikolaj! Wednesday, December 18, 2002 at 10:10:53 pm Nikolaj Amosov -> Mikhail Zharov. DM>>> The second method is used in the printer from ZASM3.10, yes DM>>> it was a matter of sin :) MZ>> Good sovtina. Normal print speed. MZ>> I couldn’t get around to seeing how it was done ;) MZ>> It's a pity it doesn't work with the screw - it's a big minus for me. NA> Strange - for a long time now there has been a version for screws, it seems NA> even done through RST#08. I'm quite a couple of years ago NA> actively used it. It would be more accurate to say that there is no clean version under #3d13. And the version for RST8 is buggy - it loses the device and spoils the catalog. Discovered recently. Dependencies were not caught. Bye.

From Dmitry Mikhalchenkov To Mihail Zharov 20 December 2002

Hello Mikhail! December 18, 2002 (it was 08:28 then) Mikhail Zharov in his letter to Dmitry Mikhalchenkov wrote: DM>> But the source code you need is not at hand, but if necessary DM>> - I can send it. MZ> Come on, interesting. === I quote the file zaprt42.asm === CCAF push af CCB0 C5 push bc CCB1 D5 push de CCB2 E5 push hl CCB3 ED5B8886 ld de,(8688) ;Address on screen ;1-2 bits of word - offset CCB7 01B7D4 ld bc,D4B7 CCBA 6F ld l,a CCBB 2600 ld h,00 CCBD 29 add hl,hl CCBE 29 add hl,hl CCBF 29 add hl,hl CCC0 09 add hl,bc CCC1 42 ld b,d CCC2 7A ld a,d CCC3 D5 push de CCC4 E658 and 58 CCC6 57 ld d,a CCC7 A8 xor b CCC8 EB ex de,hl CCC9 010008 ld bc,0800;in C - #ff for inversion CCCC 0F rrca CCCD 3828 jr c,CCF7 CCCF 0F rrca CCD0 3811 jr c,CCE3 CCD2 EB ex de,hl CCD3 1A ld a,(de) CCD4 E603 and 03 CCD6 B1 or c CCD7 AE xor (hl) CCD8 12 ld (de),a CCD9 14 inc d CCDA 23 inc hl CCDB 10F6 djnz CCD3 CCDD 04 inc b CCDE 1840 jr CD20 CCE0 2D dec l CCE1 24 inc h CCE2 13 inc de CCE3 ED67 rrdCCE5 1A ld a,(de) CCE6 A9 xor c CCE7 0F rrca CCE8 0F rrca CCE9 0F rrca CCEA 0F rrca CCEB ED6F rld CCED 2C inc l CCEE AE xor (hl) CCEF E6C0 and C0 CCF1 AE xor (hl) CCF2 77 ld (hl),a CCF3 10EB djnz CCE0 CCF5 1829 jr CD20 CCF7 0F rrca CCF8 3012 jr nc,CD0C CCFA 1A ld a,(de) CCFB A9 xor c CCFC 0F rrca CCFD 0F rrca CCFE AE xor (hl) CCFF E63F and 3F CD01 AE xor (hl) CD02 77 ld (hl),a CD03 13 inc de CD04 24 inc h CD05 10F3 djnz CCFA CD07 1817 jr CD20 CD09 2D dec l CD0A 24 inc h CD0B 13 inc de CD0C 1A ld a,(de) CD0D EE00 xor 00 CD0F 07 rlca CD10 07 rlca CD11 4F ld c,a CD12 AE xor (hl) CD13 E6FC and FC CD15 A9 xor c CD16 77 ld (hl),a CD17 2C inc l CD18 79 ld a,c CD19 AE xor (hl) CD1A E60F and 0F CD1C A9 xor c CD1D 77 ld (hl),a CD1E 10E9 djnz CD09 CD20 D1 pop de CD21 7B ld a,e CD22 3C inc a CD23 90 sub b CD24 5F ld e,a CD25 14 inc d CD26 CB92 res 2,d CD28 ED538886 ld (8688),de CD2C E1 pop hl CD2D D1 pop de CD2E C1 pop bc CD2F F1 pop af CD30 C9 ret ===End quote === Now, this is really not what I promised - I forgot again, but with the help of an emulsion I got it from code. Best regards, Dmitry

From Dmitry Mikhalchenkov To Mihail Zharov 20 December 2002

Hello Mikhail! December 18, 2002 (it was 08:28 then) Mikhail Zharov in his letter to Dmitry Mikhalchenkov wrote: DM>> But the source code you need is not at hand, but if necessary DM>> - I can send it. MZ> Come on, interesting. === I quote the file zaprt42.asm === CCAF push af CCB0 C5 push bc CCB1 D5 push de CCB2 E5 push hl CCB3 ED5B8886 ld de,(8688) ;Address on screen ;1-2 bits of word - offset CCB7 01B7D4 ld bc,D4B7 CCBA 6F ld l,a CCBB 2600 ld h,00 CCBD 29 add hl,hl CCBE 29 add hl,hl CCBF 29 add hl,hl CCC0 09 add hl,bc CCC1 42 ld b,d CCC2 7A ld a,d CCC3 D5 push de CCC4 E658 and 58 CCC6 57 ld d,a CCC7 A8 xor b CCC8 EB ex de,hl CCC9 010008 ld bc,0800;in C - #ff for inversion CCCC 0F rrca CCCD 3828 jr c,CCF7 CCCF 0F rrca CCD0 3811 jr c,CCE3 CCD2 EB ex de,hl CCD3 1A ld a,(de) CCD4 E603 and 03 CCD6 B1 or c CCD7 AE xor (hl) CCD8 12 ld (de),a CCD9 14 inc d CCDA 23 inc hl CCDB 10F6 djnz CCD3 CCDD 04 inc b CCDE 1840 jr CD20 CCE0 2D dec l CCE1 24 inc h CCE2 13 inc de CCE3 ED67 rrdCCE5 1A ld a,(de) CCE6 A9 xor c CCE7 0F rrca CCE8 0F rrca CCE9 0F rrca CCEA 0F rrca CCEB ED6F rld CCED 2C inc l CCEE AE xor (hl) CCEF E6C0 and C0 CCF1 AE xor (hl) CCF2 77 ld (hl),a CCF3 10EB djnz CCE0 CCF5 1829 jr CD20 CCF7 0F rrca CCF8 3012 jr nc,CD0C CCFA 1A ld a,(de) CCFB A9 xor c CCFC 0F rrca CCFD 0F rrca CCFE AE xor (hl) CCFF E63F and 3F CD01 AE xor (hl) CD02 77 ld (hl),a CD03 13 inc de CD04 24 inc h CD05 10F3 djnz CCFA CD07 1817 jr CD20 CD09 2D dec l CD0A 24 inc h CD0B 13 inc de CD0C 1A ld a,(de) CD0D EE00 xor 00 CD0F 07 rlca CD10 07 rlca CD11 4F ld c,a CD12 AE xor (hl) CD13 E6FC and FC CD15 A9 xor c CD16 77 ld (hl),a CD17 2C inc l CD18 79 ld a,c CD19 AE xor (hl) CD1A E60F and 0F CD1C A9 xor c CD1D 77 ld (hl),a CD1E 10E9 djnz CD09 CD20 D1 pop de CD21 7B ld a,e CD22 3C inc a CD23 90 sub b CD24 5F ld e,a CD25 14 inc d CD26 CB92 res 2,d CD28 ED538886 ld (8688),de CD2C E1 pop hl CD2D D1 pop de CD2E C1 pop bc CD2F F1 pop af CD30 C9 ret ===End quote === Now, this is really not what I promised - I forgot again, but with the help of an emulsion I got it from code. Best regards, Dmitry

From Vlad Sotnikov To Dmitry Mikhalchenkov 21 December 2002

Hello, Dmitry! December 19, 2002 (and it was 10:10 then) Dmitry Mikhalchenkov in his letter to Nikolaj Amosov wrote: DM> Version 3.10 involves switching drivers #3d2f/#3d13 some DM> the screws work through this point, about others - I don’t know, we don’t ourselves DM> hard-hitting :) DM> And I still use it, albeit on emyle... Yes, I agree - it’s insanity, but DM> I don’t want to wean myself off the speck :) By the way, how can you make several overlays load in 3.10? Or Have you been bothering with hotkeys? Otherwise, the default compile.ovl is usually always necessary, and loading others through the menu is insanity... Vega/ex-Style Group. FIDO: 2:5030/1006.19 ZXNET: 500:812/19 E-mail: vega56@mail.ru

From Sergey Cherbynin To Vlad Sotnikov 26 December 2002

Greetings, Vlad! On Friday December 21, 2002 at 12:45:47 Vlad Sotnikov and Dmitry Mikhalchenkov We talked about 6x8. DM>> Version 3.10 involves switching drivers #3d2f/#3d13 some DM>> the screws work through this point, I don’t know about others, we don’t ourselves DM>> hard-hitting :) DM>> And I still use it, albeit on emyle... Yes, I agree - it’s insanity, but DM>> I don’t want to wean myself off the speck :) VS> By the way, how can you make several overlays load in 3.10? Or VS> did you load hotkeys? Otherwise, the default compile.ovl is usually VS> is always needed, but loading others through the menu is insanity... There, in my opinion, you can set everything in the setup, I have several overlays like It loads, it even indicates which drive to boot from. All the best, Vlad! Best wishes *** Sergey ***! >>

From Dmitry Mikhalchenkov To Sergey Cherbynin 27 December 2002

Hello Sergey! December 26, 2002 (it was 10:10 pm then) Sergey Cherbynin in his letter to Vlad Sotnikov wrote: VS>> By the way, how can you create multiple overlays in 3.10 VS>> loaded? Or VS>> did you load hotkeys? And then the default compile.ovl VS>> rule VS>> is always needed, but loading others through the menu is insanity... SC> There, in my opinion, you can set everything in the setup, I have several overlays SC> seems to be loading, it even indicates which drive to boot from. There you can select the default overlay. But you won’t be able to call several overlays at the same time. You can call the previous called overlay by ext+4. Overlays from the standard package almost all hang on hotkeys, you need just read the description... Best regards, Dmitry