1. graphics mode 261 query

Hello there,
can anybody please suggest ideas as to why graphics mode 261 works ok only once
after a hibernation (or a restart) but subsequent runs of the program only display
a blank screen of the expected background colour (changes of which are displayed
correctly but no text or pixels)

My programs that use g-mode 261 always have a reset to g-mode(-1) at the end
(which i am led to believe is a good habit to get into).

The use_vesa(1) routine seemed to make no difference to this phenomenon.

In case it is relevant i am using...

  • an IBM thinkpad
  • Windows XP Professional (5.1 build 2600)
  • Intel Pentium M at 1.60GHz
  • 1526MB RAM
  • DirectX 9.0c
  • Mobile Intel 915GM/GMS, 910GML Express Chipset with Internal DAC type
  • 128MB memory
  • native resolution 1024x768

It is so thrilling to see the sharp graphics available in native resolution
and i would prefer not to have to resort to g-mode 18
(the highest resolution that seems to work repeatedly)

Big thanks in advance for any thoughts about this you are able to share with me

(~: eeel the eel :~)

new topic     » topic index » view message » categorize

2. Re: graphics mode 261 query

Hi eeel

The problem with this is that this is a DOS mode, and there is no longer a lot of interest in DOS graphics programming. There is dos_rescue which may be of interest to you, but DOS modes are no longer officially supported in the current eu.

Look at the other graphics libraries, particularly SDL and opengl for pixel control and graphics - allegro is getting a bit long in the tooth now,

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: graphics mode 261 query

ChrisB said...

Hi eeel

The problem with this is that this is a DOS mode, and there is no longer a lot of interest in DOS graphics programming. There is dos_rescue which may be of interest to you, but DOS modes are no longer officially supported in the current eu.

Look at the other graphics libraries, particularly SDL and opengl for pixel control and graphics - allegro is getting a bit long in the tooth now,

Chris

thank you chris for the speedy reply

i am just gettin back into attempting very simple euphoria 2-D graphics programming and i am used to using just a few simple euphoria 3.1 routines like GRAPHICS_MODE, ALL_PALETTE, PIXEL and DISPLAY_IMAGE some of which needed me to 'INCLUDE' the graphics.e and image.e libraries at the beginning of my program and all of which were documented in the reference manual which i found very useful to consult

i checked out your suggestions and unfortunately felt confused & overwhelmed by the amount & the content of the files

maybe i was naively expecting nothing more than a small number of .e (or .ew if i'm to 'give up' on DOS32) files (similar to graphics.e and image.e with maybe documentation on the routines syntax) to put in the INCLUDE folder, to be used in the same way

i would be very interested to find out if something as basic as this is exists that will easily allow me to (for example) have a fullscreen 1024x768 graphics mode on to which i can plot a single pixel at any coordinate in one of 16 (or even 256) colors in WIN32

sorry i don't understand much about machine code or different graphics 'cards'

i originally learnt 'high-level' programming on the zx spectrum & commodore64 (simon's basic) and so when i first heard about euphoria for programming on a PC i was hoping it would just as easy to 'PLOT' pixels onscreen

i guess my poor old brain is stuck in the eighties

still - any suggestions about very basic graphics programming on windowsXP will be most welcome

thanks again chris and to anyone else with any ideas for me to consider

eel

new topic     » goto parent     » topic index » view message » categorize

4. Re: graphics mode 261 query

eeel said...

attempting very simple euphoria 2-D graphics programming ... felt confused & overwhelmed by the amount & the content of the files

i would be very interested to find out if something as basic as this is exists that will easily allow me to (for example) have a fullscreen 1024x768 graphics mode on to which i can plot a single pixel at any coordinate in one of 16 (or even 256) colors in WIN32

still - any suggestions about very basic graphics programming on windowsXP will be most welcome

Have a look at http://rosettacode.org/wiki/Animate_a_pendulum#Phix. You may need to grab a few files from https://bitbucket.org/petelomax/phix/src and/or http://phix.is-great.org/download.php to get it to work, though I have not tried it on OpenEuphoria. Let me know what you think.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

5. Re: graphics mode 261 query

petelomax said...

Have a look at http://rosettacode.org/wiki/Animate_a_pendulum#Phix. You may need to grab a few files from https://bitbucket.org/petelomax/phix/src and/or http://phix.is-great.org/download.php to get it to work, though I have not tried it on OpenEuphoria. Let me know what you think.

Regards,
Pete

thank you pete

would it be fair to say that using phix will be simpler for basic pixel manipulation (in my case on windowsXP at native resolution 1024x768) than euphoria?

does anyone know if phix has the equivalent of the 'reference manual' which lists all the built-in routines & syntax?

is phix a completely separate program to euphoria and thus should be installed in a completely separate folder?

p s

with regards to there being 'no longer a lot of interest in DOS graphics programming' i must say that the only reason i am used to using euphoria in DOS32 mode rather than WIN32 mode is because the reference manual stated that graphics commands (routines?) like PIXEL, DRAW_LINE & GRAPHICS_MODE could only be used in DOS32 mode and i could not find any similar graphics commands to use in WIN32 mode which baffled me at the time (and still does - if & when it crosses my mind) but i simply decided to choose the mode that seemed to allow me to easily achieve what i wanted to do - which was simple pixel manipulation at fullscreen native resolution

new topic     » goto parent     » topic index » view message » categorize

6. Re: graphics mode 261 query

eeel said...

with regards to there being 'no longer a lot of interest in DOS graphics programming' i must say that the only reason i am used to using euphoria in DOS32 mode rather than WIN32 mode is because the reference manual stated that graphics commands (routines?) like PIXEL, DRAW_LINE & GRAPHICS_MODE could only be used in DOS32 mode and i could not find any similar graphics commands to use in WIN32 mode which baffled me at the time (and still does - if & when it crosses my mind) but i simply decided to choose the mode that seemed to allow me to easily achieve what i wanted to do - which was simple pixel manipulation at fullscreen native resolution

The dos_rescue library really does sound like what you're looking for. With that, you can still use the "classic" DOS32 pixel graphics routines in Windows.

Otherwise, you can try Win32Lib, wxEuphoria, or ARWEN as Pete demonstrated. They all have a lot of pixel graphics routines.

Could you give us an example of what you're trying to do? We could try to replicate it here.

-Greg

new topic     » goto parent     » topic index » view message » categorize

7. Re: graphics mode 261 query

eeel

Did you try USE_VESA() Its in the library doc in euphoria 3.11

Bernie

new topic     » goto parent     » topic index » view message » categorize

8. Re: graphics mode 261 query

eeel said...

thank you pete

my pleasure

eeel said...

would it be fair to say that using phix will be simpler for basic pixel manipulation (in my case on windowsXP at native resolution 1024x768) than euphoria?

I wouldn't claim that outright, but maybe. It would be fair to expect teething troubles. Personally, I most certainly find Phix/arwen easier than OpenEuphoria/win32lib, anyway.

eeel said...

does anyone know if phix has the equivalent of the 'reference manual' which lists all the built-in routines & syntax?

There's a phix.chm that gets installed to C:\Program Files (x86)\Phix\docs\phix which I hope you'll like.

eeel said...

is phix a completely separate program to euphoria and thus should be installed in a completely separate folder?

Yes, definitely. Once you've done that you should find a fair few demos that from the sound of things might interest you - arwen32dibdemo/demo_cube, arwendemo/ball, boids3d, demo_lines, demo_title, GraphR, mandel, scroller, animate_pendulum, draw_cuboid, and tinEWGdemo/poly (there's also a much simpler and probably less interesting arwendemo/Poly).

Pete

new topic     » goto parent     » topic index » view message » categorize

9. Re: graphics mode 261 query

than you greg

i will research what to do with the dos rescue package and hope that i understand the instructions

new topic     » goto parent     » topic index » view message » categorize

10. Re: graphics mode 261 query

thanks again pete for all the information you have shared

like i said to greg

i will do my best to research everything you have suggested and hope it all fits in my head somewhere - haha

new topic     » goto parent     » topic index » view message » categorize

11. Re: graphics mode 261 query

eeel said...

than you greg

i will research what to do with the dos rescue package and hope that i understand the instructions

From my point of view, using Dos Graphics (even with Eu3.11) is not the way to go. Maybe you have fun playing arund with this.

include tinewg.exw 
 
WindowType=NoBorderWin          -- we need a window without borders 
atom X=ScreenWidth()            -- getting screen size X 
atom Y=ScreenHeight()           -- see above and Y 
Window("test",-1,-1,X,Y)        -- create the window (full screen centered) 
 
procedure paint() 
sequence coords 
coords=GetClientRect(WinHwnd)                   -- get the size of your working area {xmin,ymin,xmax,ymax} 
 SetCanvas(WinHwnd)                             -- Choose WinHwnd (the Main Window) to paint on 
 SetPenColor(CL_BLACK)                          -- Set Pen color and Brush Color (border and fillcolor) 
 DrawRectangle(0,0,coords[3],coords[4],True)    -- fill it with black 
 SetPenColor(CL_BLUE)                           -- Set border and fill color to blue 
 SetPenSize(5)                                  -- a five pixel Pen Size 
 DrawLine(0,0,coords[3],coords[4])              -- Draw a line from upper left to lower right 
 DrawLine(coords[3],0,0,coords[4])              -- again from upper right to lower left 
 SetPenSize(3)                                  -- new pensize just for fun 
 SetPenCol(CL_WHITE)                            -- now pen is white gives a white border around 
 SetBrushCol(MakeRGB(0,255,0))                  -- shows you can use any RGB Color not only the CL_XXX 
 DrawRectangle(100,100,150,150,True)            -- see above 
 SetBrushCol(CL_RED)                            -- again 
 DrawCircle(floor(X/2),floor(Y/2),200,True)     -- funny circle in the middle 
end procedure 
SetHandler(WinHwnd,Paint,routine_id("paint"))     -- repaint if needed 
 
procedure endapp() 
  CloseApp() 
end procedure 
SetHandler(WinHwnd,Click,routine_id("endapp"))    -- Close the App on a Mouse Click 
SetHandler(WinHwnd,Key,routine_id("endapp"))      -- Also close on Keyboard 
 
paint()  
 
WinMain() 
 

Andreas

new topic     » goto parent     » topic index » view message » categorize

12. Re: graphics mode 261 query

thank you andreas

to use the commands (routines) in your example - would i need to be running euphoria 3, euphoria 4, or phix?

new topic     » goto parent     » topic index » view message » categorize

13. Re: graphics mode 261 query

eeel said...

thank you andreas

to use the commands (routines) in your exmaple - would i need to be running euphoria 3, euphoria 4, or phix?

Hallo

tinewg works with Eu4.0,4.1(32bit) and maybe Phix (i never tested it myself) not with Eu3.1.

From other postings i have seen you are working with Eu3.1.

Maybe you download can EuWinGui and give it a try. EuWinGui comes with really good Doc's and easy to understand Demoprograms.
You can download it on Rapideuphoria http://www.rapideuphoria.com/euwingui.zip

If you come from dos programing, EuWinGui can give you a good start to learn programing under a GUI.

tinewg is my version for a simple GUI wrapper based on (the concept, not the code) EuWinGui
You can downlaod tinewg here https://bitbucket.org/andiwagner/tinewg

Andreas

new topic     » goto parent     » topic index » view message » categorize

14. Re: graphics mode 261 query

thank you very much andreas

i hope check out your suggestions & get back to you

my poor brain still has problems with the word 'wrapper' in this context despite reading up about it on various websites

(likewise the word 'container' in relation to video file formats)

new topic     » goto parent     » topic index » view message » categorize

15. Re: graphics mode 261 query

Laptops have exotic graphics mode, your program will not be compatible with different computers.

DOS graphics are great on "standar" desktop with CRT screen, using VGA or SVGA graphics, this way your program wil be portable on different machines.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu