+Philsan Posted January 20, 2008 Share Posted January 20, 2008 I want to draw some pictures on my PC (160x192, 4 colors) and transfer them to Atari in graphics mode 15 (in Micro Illustrator - and compatibles applications like AtariArtist or Koala Pad - or Micropainter format). Does a conversion program exists? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted January 20, 2008 Share Posted January 20, 2008 g2f.atari8.info Quote Link to comment Share on other sites More sharing options...
pps Posted January 20, 2008 Share Posted January 20, 2008 For this simple problem I wrote the TIF2PIC tool. As of a bug with input in QUICK there is only a beta version available. It´s fully working, but you can´t change the loading & saving filename. So it´s a little odd to convert more than one picture a time... Have a look here: TIF2PIC download Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 20, 2008 Share Posted January 20, 2008 I usually just create a BMP in 8-bit paletted mode in Photoshop. Then, you can easily import it with BASIC in the emulator. Quote Link to comment Share on other sites More sharing options...
atarixle Posted January 20, 2008 Share Posted January 20, 2008 (edited) Here are some programs written in Turbo-BASIC. Please watch the Source-Code to understand the programs! BMP2MIC.TUR - old program ... converts a 160 x 192 x 8Bit - Picture (saved by Corel Draw 7, or Windows Paint) to MicroPainter GMP2MIC.TUR - the same ... but the pictures were saved by GIMP (seems like the header is a little different from the others) GMP2MICR.TUR - the same ... but I forgot, what was special in this version All these programs work the same way: Enter the full path to the picture, wait some hours while loading ... Then, the program stops - this is no error. Now you have time to enter some SETCOLORs (the programs does not convert colors!). When you CONTinue the program, you can enter a filename for saving. Please note, the Picture may be saved in 8 Bit, but of course its only usefull, when the palette has not more than 4 colors (like GRAPHICS 15 has). INVERTMIC.DLL - inverts a micropainter-file and reverses the 4-color-palette, so the result looks the same - only the bordercolor now is that, what color 3 was before. Do not RUN this program! At first, LOAD it, change the filename(s) right in the listing and then you can run it (not very userfrienldy, but a good base for a later all-in-one-app). BMPTO256.TUR - converts a 80 x 96 x 8 Bit - Picture to Paint256 B24TO256.TUR - converts a 80 x 96 x 24 Bit - Picture to Paint256 (GIMP-Users: NOT 32 Bit RGBA! Switch to 24 Bit while saving!) These programs will also convert the colors (from RGB to ATARI). All these programs have in common, that they are very slow on a real ATARI, so it is more usefull to run them on an Emulator at full-speed. Use the virtual drives H1: - H4: to make them able to access the PC-files. piconvert.zip Edited January 21, 2008 by atarixle Quote Link to comment Share on other sites More sharing options...
+Philsan Posted February 20, 2008 Author Share Posted February 20, 2008 Thank you to all. After having tested all your interesting programs, I think this is the best solution to transfer graphics mode 15 pictures from PC to Atari: - draw a 160x192 4 color image using your preferred PC program and save it in .bmp format - start Graph2Font, select 40 byte screen, select GED-- mode, load your .bmp image, turn off the last 6 lines by clicking with left mouse button over the numbers in the left column switching them to 0, save in .mic format - insert the .mic file in an .atr image using MakeATR - load the image in Turbo-Basic XL using the following code: 200 GRAPHICS 15+16 210 DIM FILE$(12) 220 FILE$="D1:IMAGE.MIC" 225 S=PEEK(559):POKE 559,0:REM IF YOU WANT TO TURN OFF SCREEN WHILE LOADING 230 OPEN #%1,4,%0,FILE$ 240 BGET #%1,DPEEK(88),7680 250 BGET #%1,712,%1 260 BGET #%1,708,%3 290 CLOSE #%1 295 POKE 559,S:REM TURN ON SCREEN Quote Link to comment Share on other sites More sharing options...
atarixle Posted April 27, 2008 Share Posted April 27, 2008 BMPTO256.TUR - converts a 80 x 96 x 8 Bit - Picture to Paint256 This program didn't work ... this is a new one: bmpto256.zip Quote Link to comment Share on other sites More sharing options...
+CharlieChaplin Posted April 28, 2008 Share Posted April 28, 2008 (edited) Well, 1) try Jview by Jeff Potter, it will convert Gif87a pictures into Gr.8, Gr.9 or Gr.15. Just set the conversion mode to "mono" (by pressing the "M" key, otherwise you would create RGB pictures) and you will get 62 sector pictures with 2 greys ( Gr.8 ), 16 greys (Gr. 9) or 4 greys (Gr. 15)... should be no problem to turn 4 greys into 4 colors on the A8... (hint: there are some A8 painter programs which allow to set colors) 2) you can also use A8JDPEG by Raphael Espino to convert *.JPG pictures into greyscale A8 pictures (including Gr.8, Gr.9, Gr. 15, Hip and a few other modes)... -Andreas Koch. Edited April 28, 2008 by CharlieChaplin Quote Link to comment Share on other sites More sharing options...
psychonaut25 Posted December 24, 2010 Share Posted December 24, 2010 Thank you to all. After having tested all your interesting programs, I think this is the best solution to transfer graphics mode 15 pictures from PC to Atari: - draw a 160x192 4 color image using your preferred PC program and save it in .bmp format - start Graph2Font, select 40 byte screen, select GED-- mode, load your .bmp image, turn off the last 6 lines by clicking with left mouse button over the numbers in the left column switching them to 0, save in .mic format - insert the .mic file in an .atr image using MakeATR - load the image in Turbo-Basic XL using the following code: 200 GRAPHICS 15+16 210 DIM FILE$(12) 220 FILE$="D1:IMAGE.MIC" 225 S=PEEK(559):POKE 559,0:REM IF YOU WANT TO TURN OFF SCREEN WHILE LOADING 230 OPEN #%1,4,%0,FILE$ 240 BGET #%1,DPEEK(88),7680 250 BGET #%1,712,%1 260 BGET #%1,708,%3 290 CLOSE #%1 295 POKE 559,S:REM TURN ON SCREEN Is it possible to use this routine also in gr. mode 9 with 16 colors? I have tried it, converted picture in G2F in res. of gr.9 but when displaying picture, colors were messed up. Quote Link to comment Share on other sites More sharing options...
YoshiMatt Posted December 30, 2010 Share Posted December 30, 2010 Thank you to all. After having tested all your interesting programs, I think this is the best solution to transfer graphics mode 15 pictures from PC to Atari: - draw a 160x192 4 color image using your preferred PC program and save it in .bmp format - start Graph2Font, select 40 byte screen, select GED-- mode, load your .bmp image, turn off the last 6 lines by clicking with left mouse button over the numbers in the left column switching them to 0, save in .mic format - insert the .mic file in an .atr image using MakeATR - load the image in Turbo-Basic XL using the following code: 200 GRAPHICS 15+16 210 DIM FILE$(12) 220 FILE$="D1:IMAGE.MIC" 225 S=PEEK(559):POKE 559,0:REM IF YOU WANT TO TURN OFF SCREEN WHILE LOADING 230 OPEN #%1,4,%0,FILE$ 240 BGET #%1,DPEEK(88),7680 250 BGET #%1,712,%1 260 BGET #%1,708,%3 290 CLOSE #%1 295 POKE 559,S:REM TURN ON SCREEN Very cool. Anybody know how to get the above code in the default Atari Basic? Quote Link to comment Share on other sites More sharing options...
Creature XL Posted December 30, 2010 Share Posted December 30, 2010 Thank you to all. After having tested all your interesting programs, I think this is the best solution to transfer graphics mode 15 pictures from PC to Atari: - draw a 160x192 4 color image using your preferred PC program and save it in .bmp format - start Graph2Font, select 40 byte screen, select GED-- mode, load your .bmp image, turn off the last 6 lines by clicking with left mouse button over the numbers in the left column switching them to 0, save in .mic format - insert the .mic file in an .atr image using MakeATR - load the image in Turbo-Basic XL using the following code: 200 GRAPHICS 15+16 210 DIM FILE$(12) 220 FILE$="D1:IMAGE.MIC" 225 S=PEEK(559):POKE 559,0:REM IF YOU WANT TO TURN OFF SCREEN WHILE LOADING 230 OPEN #%1,4,%0,FILE$ 240 BGET #%1,DPEEK(88),7680 250 BGET #%1,712,%1 260 BGET #%1,708,%3 290 CLOSE #%1 295 POKE 559,S:REM TURN ON SCREEN Is it possible to use this routine also in gr. mode 9 with 16 colors? I have tried it, converted picture in G2F in res. of gr.9 but when displaying picture, colors were messed up. You should delete teh the line 250. this line reads 3 bytes and writes them into the color registers. This should lead in messed up colors. Quote Link to comment Share on other sites More sharing options...
Creature XL Posted December 30, 2010 Share Posted December 30, 2010 (edited) Thank you to all. After having tested all your interesting programs, I think this is the best solution to transfer graphics mode 15 pictures from PC to Atari: - draw a 160x192 4 color image using your preferred PC program and save it in .bmp format - start Graph2Font, select 40 byte screen, select GED-- mode, load your .bmp image, turn off the last 6 lines by clicking with left mouse button over the numbers in the left column switching them to 0, save in .mic format - insert the .mic file in an .atr image using MakeATR - load the image in Turbo-Basic XL using the following code: 200 GRAPHICS 15+16 210 DIM FILE$(12) 220 FILE$="D1:IMAGE.MIC" 225 S=PEEK(559):POKE 559,0:REM IF YOU WANT TO TURN OFF SCREEN WHILE LOADING 230 OPEN #%1,4,%0,FILE$ 240 BGET #%1,DPEEK(88),7680 250 BGET #%1,712,%1 260 BGET #%1,708,%3 290 CLOSE #%1 295 POKE 559,S:REM TURN ON SCREEN Very cool. Anybody know how to get the above code in the default Atari Basic? My Atari-Basic times are lots of years away. However, I think the main advantage of TB was the dpeek/dpoke and bput/bget instructions. The Atari-BASIC only has POKE/PEEK GET/PUT. So you have to write a machine code routine to do the BPUT/BGET stuff. The easy but slow way would be to use a loop: for i = 0 to 7680 get ... n. i In the end, the BPUT/BGET stuff is in the ROM (CIO), however not easily accessible from BASIC. Therefore the need for ML-rout. i think the Dpeek/Dpoke is obvious? dpeek: peek(adr) + 256*peek(adr+1), dpoke: poke adr,(val mod 256):poke adr+1,(val/256). if there is no "mod" then: vh=int(val/256):vl=val-256*vh poke adr,vl: poke adr+1,vh If this answer is no help for you, it was at least a big help to realize how much stuff I have burned into my brain since year - unused And yes, I can rewrite the above for BASIC use, but it takes longer then the 5 minutes doing this post If you are interested tell me Edited December 30, 2010 by Creature XL Quote Link to comment Share on other sites More sharing options...
YoshiMatt Posted January 4, 2011 Share Posted January 4, 2011 Thank you to all. After having tested all your interesting programs, I think this is the best solution to transfer graphics mode 15 pictures from PC to Atari: - draw a 160x192 4 color image using your preferred PC program and save it in .bmp format - start Graph2Font, select 40 byte screen, select GED-- mode, load your .bmp image, turn off the last 6 lines by clicking with left mouse button over the numbers in the left column switching them to 0, save in .mic format - insert the .mic file in an .atr image using MakeATR - load the image in Turbo-Basic XL using the following code: 200 GRAPHICS 15+16 210 DIM FILE$(12) 220 FILE$="D1:IMAGE.MIC" 225 S=PEEK(559):POKE 559,0:REM IF YOU WANT TO TURN OFF SCREEN WHILE LOADING 230 OPEN #%1,4,%0,FILE$ 240 BGET #%1,DPEEK(88),7680 250 BGET #%1,712,%1 260 BGET #%1,708,%3 290 CLOSE #%1 295 POKE 559,S:REM TURN ON SCREEN Very cool. Anybody know how to get the above code in the default Atari Basic? My Atari-Basic times are lots of years away. However, I think the main advantage of TB was the dpeek/dpoke and bput/bget instructions. The Atari-BASIC only has POKE/PEEK GET/PUT. So you have to write a machine code routine to do the BPUT/BGET stuff. The easy but slow way would be to use a loop: for i = 0 to 7680 get ... n. i In the end, the BPUT/BGET stuff is in the ROM (CIO), however not easily accessible from BASIC. Therefore the need for ML-rout. i think the Dpeek/Dpoke is obvious? dpeek: peek(adr) + 256*peek(adr+1), dpoke: poke adr,(val mod 256):poke adr+1,(val/256). if there is no "mod" then: vh=int(val/256):vl=val-256*vh poke adr,vl: poke adr+1,vh If this answer is no help for you, it was at least a big help to realize how much stuff I have burned into my brain since year - unused And yes, I can rewrite the above for BASIC use, but it takes longer then the 5 minutes doing this post If you are interested tell me Wow, thanks! Still getting reacquainted with Atari Basic here myself. Baby steps, but will file this away once I get some more, er 'basic' programs going Btw. is Turbo Basic a compiler, not interpreter? Wasn't there a compiling Basic for the XL/XE, which had a fairly compatible commend set with Atari Basic? Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted January 4, 2011 Share Posted January 4, 2011 Btw. is Turbo Basic a compiler, not interpreter? Wasn't there a compiling Basic for the XL/XE, which had a fairly compatible commend set with Atari Basic? TBXL is an interpreter, it's a modified Atari BASIC with new commands and it executes faster. There is also a compiler with it, that will make your programs run 15 times faster. Quote Link to comment Share on other sites More sharing options...
pps Posted January 4, 2011 Share Posted January 4, 2011 My ATARI Basic times are ages ago, but simly modify the given source. 235 ADRESS=PEEK(88)+256*PEEK(89):REM same as DPEEK(88) in TBA 240 FOR I=1 TO 7680:GET #1,ADRESS+I:NEXT I:REM next 7680 bytes are screen data 250 GET #1,712:REM background colour 260 FOR I=0 TO 2:GET #1,708+I:NEXT I:REM other colours Quote Link to comment Share on other sites More sharing options...
ANTIQ Posted January 4, 2011 Share Posted January 4, 2011 Hang on, you're overestimating BASIC: Don't you need to POKE the data into memory? Quote Link to comment Share on other sites More sharing options...
pps Posted January 4, 2011 Share Posted January 4, 2011 Hang on, you're overestimating BASIC: Don't you need to POKE the data into memory? As I wrote. I did not code in pure ATARI Basic for ages Yes, the "normal" basic needs a GET#1,Z:POKE ADRESS+I,Z instead of my above given GETs... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.