Jump to content

576XE

Members
  • Content Count

    794
  • Joined

  • Last visited

Everything posted by 576XE

  1. Hello, friends. Recently I wrote simple bank-switching routine in PL/65. !====================================! ! BANKS.PRG ! ! Using 130XE Extended Banks in ! ! PL65 Programming Language ! !------------------------------------! ! Evgeny Zolotarev,(aka 576XE), 2020 ! !====================================! INCLUDE TERMINAL.LIB !- CONSTANTS & VARIABLES: BYTE PORTB=$D301 INT bkNum !- DUMMY array representing ---------! !- selected BANKs slice ------------! BYTE bkMem[$4000]=$4000 !- Bank Selector Values -------------! !- Emulator ONLY(Sic.) Atari 576XE --! BYTE bkSel[33] DATA $91, $81,$83,$85,$87,$89,$8B,$8D,$8F, $A1,$A3,$A5,$A7,$A9,$AB,$AD,$AF, $C1,$C3,$C5,$C7,$C9,$CB,$CD,$CF, $E1,$E3,$E5,$E7,$E9,$EB,$ED,$EF; ! String VAR to store in all BANKS STRING inp$[4+27] DATA "==> User DATA from Bank #00"; ! Set string as VAR for appending STRING out$[4+27] DATA " "; !- PROCEDURES: !- Clear Screen Procedure -----------! PROC clrScr() CONST clr=255 BEGIN WRTSTR(CHR$(125)) END !- Wait for Any Key Pressed ---------! PROC anyKey() CONST none=255 BYTE CH=764 BEGIN WRTSTR("Wait for a Key...") CR() WHILE CH=none DO ENDWHILE CH=none END !- Place bkSel Tags into PORTB ------! PROC setBank(INT bkNum) CONST bkMask=%10010001 BYTE bkTag BEGIN bkTag=bkSel[bkNum] LDA PORTB AND bkMask OR bkTag STA PORTB END !- Writes to Bank -------------------! PROC writBk() BEGIN FOR bkNum=1 TO 32 DO WRTSTR("Writing to BANK #") WRITE(bkNum) CR() IF bkNum<10 THEN inp$[25,25]=STR$(0) inp$[26,26]=STR$(bkNum) ELSE inp$[25]=STR$(bkNum) ENDIF out$=inp$ setBank(bkNum) MOVE(.out,LEN(out$),.bkMem) NEXT END !- Reads from Bank ------------------! PROC readBk() BEGIN FOR bkNum=1 TO 32 DO WRTSTR("Reading BANK #") WRITE(bkNum) CR() setBank(bkNum) MOVE(.bkMem,LEN(out$),.out) WRTSTR(out$) CR() NEXT END !------------------------------------! MAIN() BEGIN clrScr() anyKey() writBk() anyKey() clrScr() readBk() END ! >>> EOF <<< ! This routine uses 576KiB RAM extension scheme of emulator ONLY! It works perfectly while traversing EXTMEM only i.e. [1..32] but if I try to traverse from MAIN bank to EXTMEM [0..32] it simply clears the screen for a moment and skips one or two strings of output or crashes. Nevertheless the DATA in all banks stays written firmly. I can see it reading emulator's monitor. The routine itself is clear and understandable but I still can not glue what's wrong. PL65 SD_X33A.atr Obviously you can use all codes at your disposal zen
  2. Hello baktra I tried EDIT13 and it's very clear looking and the text is very readable!!! Here <msg .by...> stanza has some digits - it's ASC("...") of MAE controls... And the result... Hello, Marius Is it possible to use all ATASCII Pseudographics in PANTHER and how? Sometimes it's very big problem in programming because some of the symbols are used by editor as control symbols. zen
  3. Hello, baktra. Edit13 is very suitable editor. Is it possible to eliminate CR symbol? The dots evidently shows us the end of line, isn't it? zen
  4. @andymanone Hello Andy, Sorry, but I use only "my own English" so I never can joke to my friends... (Cause they eat me one second after) Thus it's a serious world! Anyway you can see that another persone walter_J64bit connected to our conversation and could see that it's useful and good. You, Andy, just say me Don't go there! and CharlieChaplin said Go here! And phaeron sain what's wrong. zen
  5. Thank you, GOOD OLD FRIENDS! You All are THE very responsive men! No Doubt! Thank you Andreas for your not aethereal very helpful answer. (I even created working atr image!) You are The Great Guru of Atari SW! Thank you Avery for your not breaking help for ALL Atari World. I prefere full drive emulation because of poor state of my beloved XF551. PAL Atari130XE and NTSC XF551 (Fully Worked) So sad!. Thus i'm trying to emulate it first. Thank you again for your detailed explaination of XF551 behaviour! Really, I can say that you are The Pillar of ATARI related HW etc. After all, I still can not to achive fast XF551 speed Best wishes, zen
  6. Thank you very much Andy! Please check if your emulator has correct device(XF551) and BIOS XF551ROM. Too sad but I have ony that picture with your atr. Yes I can understand that Altirra is not in perfect state... But I'm lost. zen
  7. SED belongs to RIF SpartaDOS Utilities. You may find some very interesting tools there... zen
  8. Hello, TGB1718- Here in attachment is Sparta Editor (I rename it as SED) It's useful and convenient too. Take a look, please SED.XEX Best wishes from Moscow zen
  9. Hello Friends! Does anyone can stick together Altirra XF551 strikely emulated QD image with SpartaDOS 3.2 or 3.3 versions? I still have No DOS error in the a.m. environments. SDX obviously works. Do anyone have working images? And some explainations, Please! Best wishes from Russia. Now absolutely lacks of snow...
  10. I usually use 576 RAMBO memory mode and can check it with very useful XRAM program. This mode very compartible with XE memory schema. Now I'm working on HEAP management for PL65 language. It may be useful for windowing routines FE :). This picture may be useful too. https://www.dropbox.com/s/vqnhambls6tqwek/EXTRAM.png?dl=0 Sorry, can not upload ... zen
  11. Hello, Larry - You said nothing about the fact that this device replaces host memory FULLY thus may be used with machines with BAD MEMORY PROBLEMS! Just imagine... You have a dead brick, but inserting a cart+eci device you have fully working machine... Any questions, of course to famous ctirad! zen
  12. For external editing of LISP SOURCE FILE you need to know LISP FILE STRUCTURE. The structure of LISP source file is: (NO EMPTY LINES BETWEEN S-EXPRESSIONS!!!) Sample file: LDUMP.LSP (LDUMP TABX)<CR> - It is a LIST of used ATOMS! (DEFINEQ LDUMP '(LAMBDA (PROPS) (PROGN (OPEN 1 8 (QUOTE P:)) (PR# 1) (MAPCAR PROPS (LAMBDA (X) (PROGN (TERPRI) (TERPRI) (PRIN1 (QUOTE "**** ")) (PRINT X) (PPRINT (GETD X))))) (PR# 0) (CLOSE 1))) )<CR> (DEFINEQ TABX '(LAMBDA (N) (PROG (COUNT) (SETQ COUNT N) LOOP (SETQ COUNT (SUB COUNT 1)) (COND ((> COUNT 0) (PRIN1 (QUOTE " ")) (GO LOOP))) (RETURN))) )<CR> - Here are the set of definitions used by InterLISP/65 for all S-Expressions. The order of definitions is esserntial! NIL - It,s EOF signature (CURSOR must stay on the same line as NIL!) The main prolem is that LISP line has NO size limit. In contrary, edited phisical line has limit ~130characters. Thus if LISP stanza is long enough it will be truncated (Sic!). It means that LISP stops read file with ERROR. So use short lines. zen
  13. @Aces123 Each InterLISP/65 element consists of 4 bytes(0,1,2,3), numerated from left to right. Left pare is "Head" (CAR), Right pare is "Tail" (CDR). Being CAR or CDR every 16-bit word contains 3 service bits. Leftmost - N (Is it Number?) Rightmost - A (Is it Atom?) First from the Left of A-bit is - G (Is it Garbage bit) So we have only 13 bits for DATA REPRESENTATION !!! Hello, The Nobless Atari Age World! - will be represented in InterLISP/65 memory as: Hello, The No ..................bless Atari A ...................................ge World! I'm not saying a word about some Gaps, representing InfoBits. I say here that direct editing of LISP text can be available only after executing special LISP convertation program. So it's much convenient to use EDIT.LSP program, describbed in InterLISP/65 documentation. https://atariwiki.org/wiki/attach/Lisp/Inter-LISP.pdf Don't hesitate to contact me in troubles. zen
  14. Hello, Friends! Top DOS is very flexible system. It's unbelievably modular and powerful. You can load any module with L command and use it (For example RAMDISK or SUBDIR or VTOC). VTOC is for Harddrives up to 16Mb. DOS itself has very low MEMLO. The ONLY problem is that any version of Top DOS Pro here on AtariAge is MODIFYED! After installing 130XE module someone save dos to disk with H command. I mean that 130XE module is already appended to DOS SYS and can not be UNINSTALLED without disassembly and cracking. zen
  15. Workaround to eliminate some quirks of InterLISP/65 in SDX. At first, I must say that InterLISP/65 has an unqtue ability on atari-8 !!! It's a pretty-printing ! No other lang has it! (IMHO) BUT! What we can do with 40 columns limit while LISP has no limit in it's logic line at all?!! (Only a RAM limitations.) So, we need 80 columns! - And it's a beginning of my investigations... Good old Konrad (Drak030), said me a secret word to familiarize LISP with SDX. POKE 02e4,$c0. And it works in COL 40 mode! Also, never working with LISP he has never meet it's real problems. Recently I've tried to run LISP in SDX in COL 80 and COL 64 (I prefere COL 64) environment with the purpose to get a real pretty-printing of some long-enough LISP program such as LISP's 'EDIT - structured-manner LISP-native EDITOR. No chance. May be 'Screen' or '80font' are destroyed while loading LISP, may be some other garbage come in to screen ... I report this screenshot: /Garbage Thus we have some data/drivers in operative area while working. So I decided to say 'Y' but 'N' while loading LISP 2.5 after the prompt: Reserve mem for graphic modes 6,7,8 And a screenshot: /Loaded And it's pretty-printing screenshot. /Success P.S. I really can not understand which part of SDX is under the siege. May be some relocation of standard SDX parts is a Panacea? All your suggestions about relocation of SDX data are very highly appreciated. Best wishes from Moscow zen
  16. Hello FRIENDS! This new code is working! It's demo of course BUT ... program vm; const CON=0; COF=1; NOP=255; ESC=28; RET=12; UP=14; cUP=142; DN=15; cDN=143; type sarT = array[1..6] of string; var CH: byte absolute $2fc; SAVMSC: word absolute $58; CRSINH: byte absolute $2f0; X,Y,W,H: byte; procedure invLine(x,y,len : byte); var _L: byte absolute $f0; _A: integer absolute $f2; begin _L := len; _A := SAVMSC + y*40 + x-1; inline($ac/_L/ (* ldy #_L *) $b1/$f2/ (* lda($f2),y *) $49/$80/ (* eor #$80 *) $91/$f2/ (* sta($f2),y *) $88/ (* dey *) $d0/$f5); (* bne -9 *) end; procedure putMenu; var strg: sarT; ndx: byte; begin strg[1] := 'Moscow '; strg[2] := 'Petersburg'; strg[3] := 'Evpatoria '; strg[4] := 'Feodosia '; strg[5] := 'Simeiz '; strg[6] := 'Konakovo '; for ndx := 1 to H do begin gotoxy(X,Y-1+ndx); writeln(strg[ndx]); end; end; var MINR,MAXR,sel,key: byte; dy: shortint; begin X := 5; Y := 5; W := 10; H := 6; MINR := 1; MAXR := 6; CRSINH := COF; putMenu; sel := 1; invLine(X,Y-1+sel,W); repeat CH := NOP; while CH=NOP do ; key := CH; dy := ord((key=DN) or (key=cDN)) - ord((key=UP) or (key=cUP)); if dy<>0 then begin invLine(X,Y-1+sel,W); sel := sel+dy; if sel<MINR then sel := MINR; if sel>MAXR then sel := MAXR; invLine(X,Y-1+sel,W); CH := NOP; end; if key=RET then begin gotoxy(14,20); writeln(sel,' selected'); CH := NOP; end; until key=ESC; CH := NOP; CRSINH := CON; end. And a screenshot: zen
  17. Hello FRIENDS! This code of CAS and LUCKYBUCK gently decides all problems ! program cas; const Esc=#27; var sMem : word absolute $58; procedure invLine(x,y,len : byte); var sAdr: integer absolute $f2; _l : byte absolute $f0; begin _l := len; sAdr := sMem + y*40 + x-1; inline($ac/_l/ (* ldy #_l *) $b1/$f2/ (* lda($f2),y *) $49/$80/ (* eor #$80 *) $91/$f2/ (* sta($f2),y *) $88/ (* dey *) $d0/$f5); (* bne -9 *) end; (*= Main Procedure =================*) (*- Locals -------------------------*) var _X,_Y,_L: byte; _C: char; begin writeln; writeln; writeln; _X := 0; _Y := 0; _L := 40; repeat _C := readkey; while _C='' do ; (* Wait... *) invLine(_X,_Y,_L); until _C=Esc; end. Simply ingenious. zen
  18. I think that every localized person say it in his local manner. In Russian It's much more simpler and faster to say... (Sixtyfive-Null-two.- In translation of course!) Then Six Five Zero Two. zen
  19. LSC is just another attempt to create it's own universe... By the way I love C and my own choice is CC8 based on ACEC (ie fast and compatible!). zen
  20. Hello, Alfred! You are right! Pascal being too serious teacher forbids some Atari related actions. FE Any pointer in CLSN Pascal sits in memory in 3 bytes! LSB, MSB and then BNK with the purpose to access all 13XE memory. I'm not being a programmer at all can not understand how it treats these data. I know some facts from manual. One of them says that absolute Atari(thus 2 bytes) address treats as bnkNum<$addr> ie 3 bytes ! ie $2000=$00,$2000 ! Another one says that when data goes from stack, then the operation of getting the address of this local variable (ie @) returns the offset to THE data of this variable from current stack pointer! It's not processor stack it's 16k CLSN program stack!!! I mean that only Pascal while compiling prevents successful ML operations. By the way, absolute addressing operations ie STA $2000,Y is unsuccessful too! We just can not represent to Pascal data perfectly! As far as it's concern < - It's not a big problem. Even if we send 2-bytes datum with the purpose of obtain < byte, we are successfully get it's byte because of Little Endian Atari notation of addressing. Our beloved Accu. gets only one LSB byte! While we are retreaving > byte we get 2 bytes value and then get the second datum from them. PS And... Many thanks from spring Moscow to you and family! zen
  21. hi baktra, It is a case of algorithm! No more. I just wanted to flip value but you said about inversion only. Where is an error? Just misunderstanding. zen
  22. Today is one of my best days. I've found the reasons of Pascal's bad understanding of assembly. At first while pointers in Assembler are two-bytes addresses with special addressing modes, pointers in Pascal are three-bytes values laying in memory in special order (LSB,MSB,BNK). Thus Pascal is awaiting the third byte while working with pointers. When it takes third value from code it just jam all program and not only break PC but Stack too! First picture shows Stack overflow situation. When I addes BRK code after address fields Pascal calmed down. The RTS really needed in inline insertions and not for inline procedures to clearly end up insertion but it may work the same role as BRK! Please look at the first working code of Pascal's screen access. program invl; type linT = array[0..39] of byte; ptrT = ^byte; adrT = word; var sMem: word absolute $58; lPtr: ptrT absolute $ca; (*longint: $ca=LSB,$cb=MSB,$cc=BNK*) lAdr: adrT absolute $ca; (* word: $ca=LSB,$cb=MSB *) lMar: byte absolute $cd; ch: char; begin writeln('Hello, World!'); writeln; lPtr := memptr($00,lAdr); lMar := 4; lAdr := sMem+lMar; inline($a0/$03/ (* LDY #$03 *) $b1/lAdr/ (* LOOP LDA (lAdr),Y *) $00/ (* BRK *) $49/$80/ (* EOR #$80 *) $91/lAdr/ (* STA (lAdr),Y *) $60); (* RTS *) write('lMar=',lMar,' '); writeln('lAdr=',lAdr); ch := readkey; end. zen
  23. Hello, baktra! If I can remember ORA just sets a bit in a byte while EOR effectively flips it back and forth. In my last post I just tried to pay attention on strange effects of using BRK and RTS in inline Pascal code. zen
  24. Hello, Friends! This CRAZY CLSN Pascal effectively blows up my brain!!! Please look at the codes... This code goes to cycle?!! and fills up 16k program stack of CLSN with Pascal's speed ignoring inversion... program tst10; var sMem: word absolute $58; (* Z-Page variables *) sPtr: pointer absolute $ca; (*longint: $ca=LSB,$cb=MSB,$cc=BKB*) sAdr: word absolute $ca; (* word: $ca=LSB,$cb=MSB *) lMar: byte absolute $cd; (* byte *) sLen: byte absolute $ce; (* byte *) ch: char; procedure invByte(a: word; m: byte); begin sAdr := a; lMar := m; inline($a4/lMar/ (* ldy lMar *) $b1/sAdr/ (* lda (sAdr),Y *) (* Intentionally Blanked *) $49/$80/ (* eor #$80 *) $91/sAdr); (* sta (sAdr),Y *) (* Intentionally Blanked *) end; begin writeln('Sample'); sPtr := memptr($00,sMem); invByte(sAdr,5); ch := readkey; end. This code successively supresses sycling but ignores inverting?!! program tst11; var sMem: word absolute $58; (* Z-Page variables *) sPtr: pointer absolute $ca; (*longint: $ca=LSB,$cb=MSB,$cc=BKB*) sAdr: word absolute $ca; (* word: $ca=LSB,$cb=MSB *) lMar: byte absolute $cd; (* byte *) sLen: byte absolute $ce; (* byte *) ch: char; procedure invByte(a: word; m: byte); begin sAdr := a; lMar := m; inline($a4/lMar/ (* ldy lMar *) $b1/sAdr/ (* lda (sAdr),Y *) (* Intentionally Blanked *) $49/$80/ (* eor #$80 *) $91/sAdr/ (* sta (sAdr),Y *) $60); (* rts *) end; begin writeln('Sample'); sPtr := memptr($00,sMem); invByte(sAdr,5); ch := readkey; end. This code adds inverting but... it's NOT inverting at all! program tst12; var sMem: word absolute $58; (* Z-Page variables *) sPtr: pointer absolute $ca; (*longint: $ca=LSB,$cb=MSB,$cc=BKB*) sAdr: word absolute $ca; (* word: $ca=LSB,$cb=MSB *) lMar: byte absolute $cd; (* byte *) sLen: byte absolute $ce; (* byte *) ch: char; procedure invByte(a: word; m: byte); begin sAdr := a; lMar := m; inline($a4/lMar/ (* ldy lMar *) $b1/sAdr/ (* lda (sAdr),Y *) $00/ (* brk *) $49/$80/ (* eor #$80 *) $91/sAdr/ (* sta (sAdr),Y *) $60); (* rts *) end; begin writeln('Sample'); sPtr := memptr($00,sMem); invByte(sAdr,5); ch := readkey; end. Where am I? I'm still lost! Please help! zen
×
×
  • Create New...