home *** CD-ROM | disk | FTP | other *** search
/ ftp.xmission.com / 2014.06.ftp.xmission.com.tar / ftp.xmission.com / pub / lists / fractdev / archive / v01.n020 < prev    next >
Internet Message Format  |  1999-04-28  |  43KB

  1. From: owner-fractdev-digest@lists.xmission.com (fractdev-digest)
  2. To: fractdev-digest@lists.xmission.com
  3. Subject: fractdev-digest V1 #20
  4. Reply-To: fractdev-digest
  5. Sender: owner-fractdev-digest@lists.xmission.com
  6. Errors-To: owner-fractdev-digest@lists.xmission.com
  7. Precedence: bulk
  8.  
  9.  
  10. fractdev-digest        Thursday, April 29 1999        Volume 01 : Number 020
  11.  
  12.  
  13.  
  14.  
  15. ----------------------------------------------------------------------
  16.  
  17. Date: Thu, 11 Mar 1999 13:39:07 -0500
  18. From: Robert Hailman <robert@apexwood.com>
  19. Subject: Re: (fractdev) Re the path to 32 bits
  20.  
  21. Sweet...
  22.  
  23. I haven't gotten around to upgrading to 5.2, I have had no need for it yet.
  24.  
  25. At 10:22 AM 11/03/99 -0600, Damien M. Jones wrote:
  26. >Robert,
  27. >
  28. > - My copy of RedHat 4.2 came with an extra Cd, of contributed files, and
  29. > - amonst otherthings was an old version of Xfractint
  30. >
  31. >(laugh) Well, you can tell I don't use RedHat as a desktop OS, can't you?
  32. >:) All the server apps I wanted were on the first CD, so I never got around
  33. >to looking at the second one. (RedHat 5.2 comes with *three* CDs, believe
  34. >it or not.)
  35. >
  36. > - =CFCQ: 166848=20
  37. >
  38. >Da-hurn! What an uncommonly low number.
  39. >
  40. Oops, it's actually 1668484... still pretty low, I've been on since August=
  41. =20
  42. '97. Thanks for pointing that out.
  43.  
  44. >Damien M. Jones   \\
  45. >dmj@fractalus.com  \\  Fractalus Galleries & Info:
  46. >                    \\  http://www.fractalus.com/
  47. >
  48. >Please do not post my e-mail address on a web site or
  49. >in a newsgroup.  Thank you.
  50. >
  51. >--------------------------------------------------------------
  52. >Thanks for using Fractdev, The Fractint Developer's Discussion List
  53. >Post Message:   fractdev@lists.xmission.com
  54. >Get Commands:   majordomo@lists.xmission.com "help"
  55. >Administrator:  twegner@phoenix.net
  56. >Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  57. >
  58. >
  59. Robert H=E4lman=20
  60. =CFCQ: 1668484=20
  61. robert@apexwood.com
  62. - -----
  63. P=EBs, luv =E3nd eksesiv drug =FCs.
  64. "=CF'm st=E3rting a v=F6r f=F6r p=EBs."
  65.  
  66. =C3=C4=CB=CF=D5=D6=DC=E3=E4=EB=EF=F5=F6=FC=D1=F1
  67.  
  68. - --------------------------------------------------------------
  69. Thanks for using Fractdev, The Fractint Developer's Discussion List
  70. Post Message:   fractdev@lists.xmission.com
  71. Get Commands:   majordomo@lists.xmission.com "help"
  72. Administrator:  twegner@phoenix.net
  73. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  74.  
  75. ------------------------------
  76.  
  77. Date: Wed, 28 Apr 1999 14:12:52 -0600
  78. From: Phil McRevis <legalize@xmission.com>
  79. Subject: (fractdev) xfractint 19.61 pl66 fixes
  80.  
  81. OK, I compiled the 19.61pl66 version of xfractint and found some minor
  82. bugs which I worked around.
  83.  
  84. I also added support for default visuals that aren't pseudocolor (i.e.
  85. truecolor, directcolor etc.) to xfractint.  One step closer to
  86. rendering in any visual.
  87.  
  88. Also, I've been looking at xfractint's guts to determine how one could
  89. separate out the O/S & graphics dependencies.  It doesn't look too bad
  90. actually.  More on that later.
  91.  
  92. Tim, do I send diffs to you?  I tried sending to fractdev, but I guess
  93. it was bounced because the diffs made the message too large.
  94. - --
  95. <http://www.xmission.com/~legalize/>    Legalize Adulthood!
  96.     ``Ain't it funny that they all fire the pistol, 
  97.       at the wrong end of the race?''--PDBT
  98.           <http://www.eden.com/~thewho>
  99.  
  100. - --------------------------------------------------------------
  101. Thanks for using Fractdev, The Fractint Developer's Discussion List
  102. Post Message:   fractdev@lists.xmission.com
  103. Get Commands:   majordomo@lists.xmission.com "help"
  104. Administrator:  twegner@phoenix.net
  105. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  106.  
  107. ------------------------------
  108.  
  109. Date: Wed, 28 Apr 1999 17:16:26 -0600
  110. From: "Tim Wegner" <twegner@phoenix.net>
  111. Subject: Re: (fractdev) xfractint 19.61 pl66 fixes
  112.  
  113. "Phil" wrote:
  114.  
  115. > Tim, do I send diffs to you?  I tried sending to fractdev, but I guess
  116. > it was bounced because the diffs made the message too large.
  117.  
  118. Yes send them to me, but since I administrate the list, I already 
  119. have them because your too-large message bounced to me <g!>
  120.  
  121. I'll look at it right away. Thanks very much. Interest on our end in 
  122. Xfractint has increased a lot. Jonathan and I both have Linux.
  123.  
  124. I'll merge your changes along with some of our own and re-upload 
  125. the Xfractint source file.
  126.  
  127. Tim
  128.  
  129.  
  130. - --------------------------------------------------------------
  131. Thanks for using Fractdev, The Fractint Developer's Discussion List
  132. Post Message:   fractdev@lists.xmission.com
  133. Get Commands:   majordomo@lists.xmission.com "help"
  134. Administrator:  twegner@phoenix.net
  135. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  136.  
  137. ------------------------------
  138.  
  139. Date: Wed, 28 Apr 1999 16:25:13 -0600
  140. From: Phil McRevis <legalize@xmission.com>
  141. Subject: Re: (fractdev) xfractint 19.61 pl66 fixes 
  142.  
  143. In article <199904282216.RAA06509@voyager.c-com.net>,
  144.     "Tim Wegner" <twegner@phoenix.net>  writes:
  145.  
  146. > Yes send them to me, but since I administrate the list, I already 
  147. > have them because your too-large message bounced to me <g!>
  148.  
  149. OK, inspect that diff carefully.  I think some stuff that was supplied
  150. in the patch ended up in my diff because of my poor attempt at
  151. branching the source in my VCS.  (I'm trying to maintina a "pristine"
  152. branch of blessed code as the trunk with my changes on a concurrent
  153. branch.  Somehow I've got the two mixed up and things aren't working
  154. right for me yet.)
  155.  
  156. > I'll look at it right away. Thanks very much. Interest on our end in 
  157. > Xfractint has increased a lot. Jonathan and I both have Linux.
  158.  
  159. If you get my diffs in there and it compiled OK for you, I'd really
  160. like to know how well fractint behaves when the default visual is
  161. truecolor or directcolor.  (Or StaticGray, StaticColor, and GrayScale
  162. for that matter.)
  163.  
  164. I'm finally digging into the entire fractint source base and getting
  165. up to speed in how the routines interact.  The bad news is that there's
  166. a LOT of code and a fairly good amount of programming crumbs have been
  167. left laying around as each coder does battle with the program!  The
  168. good news is that I'm finally starting to see how everything is linked
  169. together in fractint and I feel much more optimistic about the
  170. flat-model port and a move to a GUI environment.
  171. - --
  172. <http://www.xmission.com/~legalize/>    Legalize Adulthood!
  173.     ``Ain't it funny that they all fire the pistol,     
  174.       at the wrong end of the race?''--PDBT     
  175. legalize@xmission.com    <http://www.eden.com/~thewho>
  176.  
  177. - --------------------------------------------------------------
  178. Thanks for using Fractdev, The Fractint Developer's Discussion List
  179. Post Message:   fractdev@lists.xmission.com
  180. Get Commands:   majordomo@lists.xmission.com "help"
  181. Administrator:  twegner@phoenix.net
  182. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  183.  
  184. ------------------------------
  185.  
  186. Date: Wed, 28 Apr 1999 16:45:31 -0600
  187. From: Phil McRevis <legalize@xmission.com>
  188. Subject: (fractdev) DOS support via allegro?
  189.  
  190. I know we've talked about this before, but now I'm digging into the
  191. code and looking to get really specific about stuff.  Taking Tim's
  192. suggestion of using the xfractint code base as a start, the question
  193. becomes "how to provide a DOS driver through that code base?".
  194.  
  195. In the past, we've talked about fancy GUI toolkits (i.e. gimp toolkit)
  196. and so-on.  But what I'm faced with right now is this question: "What's
  197. the smallest code delta that makes the xfractint code compile and work
  198. under a DOS protected-mode extender environment like djgpp?".  In
  199. other words: first get it right, then get it tight.  Assembly is the
  200. tool you use for getting it "tight" after you've gotten it right.
  201. Fractint currently interacts with the keyboard, mouse and display
  202. through 16-bit assembly routines:
  203.  
  204.     general.asm
  205.     handles keyboard, audio and mouse support
  206.         keypressed(), getakey(),
  207.         buzzer(), delay(), tone(), snd(), nosnd()
  208.     video.asm
  209.     video display support
  210.         setvideomode(), setvideotext(), getcolor(), putcolor()
  211.         out_line(), drawbox(), home(), movecursor(), keycursor()
  212.         putstring(), setattr(), scrollup(), scrolldown()
  213.         putstr(), loaddac(), spindac(), adapter_init, adapter_detect
  214.         setnullvideo
  215.             setfortext(), setforgraphics(), setclear(), findfont()
  216.  
  217. Allegro, the gaming library for DJGPP, lists the kinds of monitors it
  218. supports.  I'm not up to speed on all the specifics of these monitors
  219. and so-on.  Can someone out there provide guidance to say "yes,
  220. Allegro covers a suficient portion of the existing fractint users, so
  221. you can provide DOS driver support through allegro" or
  222. "no, fractint provides much more extensive video support with its
  223. assembly, so you should port the assembly"
  224.  
  225. Thanks in advance.
  226.  
  227. from the readme.txt in the allegro distribution:
  228.  
  229.    Supports VGA mode 13h, mode-X (twenty three tweaked VGA resolutions plus 
  230.    unchained 640x400 Xtended mode), and SVGA modes with 8, 15, 16, 24, and 
  231.    32 bit color depths, taking full advantage of VBE 2.0 linear framebuffers 
  232.    and the VBE/AF hardware accelerator API if they are available. Additional 
  233.    video hardware support is available from the FreeBE/AF project 
  234.    (http://www.talula.demon.co.uk/freebe/).
  235.  
  236.    Drawing functions including putpixel, getpixel, lines, rectangles, flat 
  237.    shaded, gouraud shaded, and texture mapped polygons, circles, floodfill, 
  238.    bezier splines, patterned fills, masked, run length encoded, and compiled 
  239.    sprites, blitting, bitmap scaling and rotation, translucency/lighting, 
  240.    and text output with proportional fonts. Supports clipping, and can draw 
  241.    directly to the screen or to memory bitmaps of any size.
  242.  
  243.    Hardware scrolling, mode-X split screens, and palette manipulation.
  244.  
  245.     [...]
  246.  
  247.    Plays background MIDI music and up to 64 simultaneous sound effects, and 
  248.    can record sample waveforms and MIDI input. Samples can be looped 
  249.    (forwards, backwards, or bidirectionally), and the volume, pan, pitch, 
  250.    etc, can be adjusted while they are playing. The MIDI player responds to 
  251.    note on, note off, main volume, pan, pitch bend, and program change 
  252.    messages, using the General MIDI patch set and drum mappings. Currently 
  253.    supports Adlib, SB, SB Pro, SB16, AWE32, MPU-401, ESS AudioDrive, Ensoniq 
  254.    Soundscape, and software wavetable MIDI.
  255.  
  256.    Easy access to the mouse, keyboard, joystick, and high resolution timer 
  257.    interrupts, including a vertical retrace interrupt simulator.
  258.  
  259.     [...]
  260.  
  261.    Math functions including fixed point arithmetic, lookup table trig, and 
  262.    3d vector/matrix manipulation.
  263. - --
  264. <http://www.xmission.com/~legalize/>    Legalize Adulthood!
  265.     ``Ain't it funny that they all fire the pistol, 
  266.       at the wrong end of the race?''--PDBT
  267.           <http://www.eden.com/~thewho>
  268.  
  269. - --------------------------------------------------------------
  270. Thanks for using Fractdev, The Fractint Developer's Discussion List
  271. Post Message:   fractdev@lists.xmission.com
  272. Get Commands:   majordomo@lists.xmission.com "help"
  273. Administrator:  twegner@phoenix.net
  274. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  275.  
  276. ------------------------------
  277.  
  278. Date: Wed, 28 Apr 1999 16:48:56 -0600
  279. From: Phil McRevis <legalize@xmission.com>
  280. Subject: (fractdev) FCODE
  281.  
  282. Am I correct in assuming all this FCODE business is to exploit the
  283. code segment for string storage to avoid memory-model ceilings?
  284. - --
  285. <http://www.xmission.com/~legalize/>    Legalize Adulthood!
  286.     ``Ain't it funny that they all fire the pistol, 
  287.       at the wrong end of the race?''--PDBT
  288.           <http://www.eden.com/~thewho>
  289.  
  290. - --------------------------------------------------------------
  291. Thanks for using Fractdev, The Fractint Developer's Discussion List
  292. Post Message:   fractdev@lists.xmission.com
  293. Get Commands:   majordomo@lists.xmission.com "help"
  294. Administrator:  twegner@phoenix.net
  295. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  296.  
  297. ------------------------------
  298.  
  299. Date: Wed, 28 Apr 1999 22:44:50 -0600
  300. From: "Tim Wegner" <twegner@phoenix.net>
  301. Subject: Re: (fractdev) DOS support via allegro?
  302.  
  303. Rich wrote:
  304.  
  305. > In the past, we've talked about fancy GUI toolkits (i.e. gimp toolkit)
  306. > and so-on.  But what I'm faced with right now is this question: "What's
  307. > the smallest code delta that makes the xfractint code compile and work
  308. > under a DOS protected-mode extender environment like djgpp?". 
  309.  
  310. 1. You have to undo any specifically X code and
  311. 2. You have to implement video modes and graphics read write.
  312.  
  313. Also note that the text writing in Xfractint uses curses. However I 
  314. believe there are djgpp versions of curses if we want to go that 
  315. route.
  316.  
  317. While #2 is easily done with SVGA lib, it isn't worth the effort. You 
  318. have to solve all over again the problems with DOS video modes we 
  319. have long since solved.
  320.  
  321. I suggest the following. In Xfractint's -disk mode, no screen 
  322. graphics is done. In this mode Xfractint doesn't do any X stuff and 
  323. is probably close to being portable to djgpp. The one warning is 
  324. that Xfractint doesn't use Fractint's diskvideo code which has it's 
  325. own cache. I don't know if diskvideo should use the DOS code or 
  326. the XFractrint code. Apparently the caching isn't needed in Linux. 
  327. In DOS it is essential since some of the passes options cause 
  328. writing all over the file, and it is horribly slow. That's the reason for 
  329. the cache.
  330.  
  331. Try building a video-less version first.
  332.  
  333. Tim
  334.  
  335.  
  336. - --------------------------------------------------------------
  337. Thanks for using Fractdev, The Fractint Developer's Discussion List
  338. Post Message:   fractdev@lists.xmission.com
  339. Get Commands:   majordomo@lists.xmission.com "help"
  340. Administrator:  twegner@phoenix.net
  341. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  342.  
  343. ------------------------------
  344.  
  345. Date: Wed, 28 Apr 1999 22:44:50 -0600
  346. From: "Tim Wegner" <twegner@phoenix.net>
  347. Subject: Re: (fractdev) FCODE
  348.  
  349. > Am I correct in assuming all this FCODE business is to exploit the
  350. > code segment for string storage to avoid memory-model ceilings?
  351.  
  352. The FCODE typedef allows data to be placed in overlays. This 
  353. means that data does not eat into Fractint's limited supply of near 
  354. memory, since in the medium memory model the is a total of 64K 
  355. of near memory, and data not explicitly declared far is in the near 
  356. data segment.
  357.  
  358. Since the FCODE data is in an overlay, it can't be changed, and 
  359. least not for long. Once that overlay is reloaded, the data reverts to 
  360. its permananent value. This is ideal for things like menu prompts.
  361.  
  362. It is the use of tricks like this that has allowed Fractint to survive so 
  363. long and well with a really restrictive memory model.
  364.  
  365. For Xfractint or any other 32 bit memory model purpose, FCODE is 
  366. just a normal type. There are versions of it for char, int, etc.
  367.  
  368. Tim
  369.  
  370.  
  371.  
  372. - --------------------------------------------------------------
  373. Thanks for using Fractdev, The Fractint Developer's Discussion List
  374. Post Message:   fractdev@lists.xmission.com
  375. Get Commands:   majordomo@lists.xmission.com "help"
  376. Administrator:  twegner@phoenix.net
  377. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  378.  
  379. ------------------------------
  380.  
  381. Date: Wed, 28 Apr 1999 22:44:50 -0600
  382. From: "Tim Wegner" <twegner@phoenix.net>
  383. Subject: Re: (fractdev) xfractint 19.61 pl66 fixes 
  384.  
  385. > OK, inspect that diff carefully.  I think some stuff that was supplied
  386. > in the patch ended up in my diff because of my poor attempt at
  387. > branching the source in my VCS. 
  388.  
  389. I have no way of dealing with the diff you sent except to implement 
  390. it by hand (which I could do). It is nearly a context diff, but "nearly" 
  391. scores only in horseshoes :-) I need either a true context diff (diff -c 
  392. old new > changes.dif) or just sent a zipped version of the 
  393. complete changed files. I like emails to be encapsulated in zips; 
  394. I'm never sure when my mailer is going to wrap lines and mess 
  395. things up.
  396.  
  397. Tim
  398.  
  399.  
  400. - --------------------------------------------------------------
  401. Thanks for using Fractdev, The Fractint Developer's Discussion List
  402. Post Message:   fractdev@lists.xmission.com
  403. Get Commands:   majordomo@lists.xmission.com "help"
  404. Administrator:  twegner@phoenix.net
  405. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  406.  
  407. ------------------------------
  408.  
  409. Date: Thu, 29 Apr 1999 01:54:21 -0600
  410. From: Phil McRevis <legalize@xmission.com>
  411. Subject: Re: (fractdev) DOS support via allegro? 
  412.  
  413. In article <199904290430.XAA26718@voyager.c-com.net>,
  414.     "Tim Wegner" <twegner@phoenix.net>  writes:
  415.  
  416. > 1. You have to undo any specifically X code and
  417. > 2. You have to implement video modes and graphics read write.
  418.  
  419. These are actually one and the same.  As I say, going through the code
  420. has reduced a job of Everest proportions to one of less than Whitney
  421. proportions.  (Mt. Whitney is the highest point in the continental 48
  422. states, its in California.)
  423.  
  424. > Also note that the text writing in Xfractint uses curses. However I 
  425. > believe there are djgpp versions of curses if we want to go that 
  426. > route.
  427.  
  428. Yeah, personally I consider the curses thing a bug.  It should just
  429. open up a separate X window and do X text in that window, or it should
  430. do X text in the graphic window, similar to XaoS' "ugly interface".
  431. And yes, there are oodles of open source curses implementations.  GNU
  432. has one, in fact (ncurses-4.2).
  433.  
  434. However, replacing the text interface (which currently calls curses
  435. functions) with a function that does X11 text instead of curses
  436. shouldn't be very hard.  Fractint calls only a handful of curses
  437. functions.  Some of the existing text mode support that could be
  438. handled by curses is #ifdef'd out in the patch 66 snapshot.  You still
  439. need an ability to run "text only" when doing disk video, so you'll
  440. still want the curses support, I believe.  Just that you won't be
  441. putting the main menu up with curses unless you're using disk video or
  442. "curses video" if we implement a XaoS-style text-only mode.  (I don't
  443. see why not.)
  444.  
  445. In this respect, XaoS and fractint actually have that in common: the
  446. number of functions you must change in order to add a new driver is
  447. not that many.  Reading/writing a pixel, switching to "text" mode and
  448. back, reading the keyboard/mouse, getting an 8x8 font bitmap,
  449. positioning the text cursor and drawing characters with text
  450. attributes.  That's about all you need to do.
  451.  
  452. I've been studying the XaoS source code since they have dealth with
  453. the same problem.  They did what I was thinking fractint should do:
  454. they built a structure with attributes of the driver (data members)
  455. and function pointers to the driver's functions that implement the
  456. interface (member functions).  Fractint just needs the structure that
  457. groups the related information about a driver together along with a
  458. slight adjustment to its control logic.  At that point, every "#ifdef
  459. XFRACT" that is there for reasons of X11 and not unix-vs-dos will
  460. disappear.  Only one "#ifdef XFRACT" will remain which is wrapped
  461. around the X11 initializer in the list of drivers (which is static
  462. at compile time).
  463.  
  464. When I looked at the places where "unix" code was substituted for
  465. "dos" code, what I found was that some of the "unix" code was really
  466. just X11 code, not specific to unix.  (You can compile X11 clients for
  467. DOS and Win32, X11 is just a protocol built on TCP/IP, so anything
  468. that can talk TCP/IP can talk X11.)  Other times the XFRACT was
  469. isolating some difference between unix and dos.
  470.  
  471. Tim, I think we talked earlier about autoconf; I've successfully
  472. switched over one open-source program to autoconf and I think I've got
  473. a handle on it.  We could do xfractint over to autoconf, but I'd
  474. definately need to consult with some other fractint code gurus to
  475. understand how the different #define's interact.  There's no reason
  476. why a good configure script couldn't enable/disable long double
  477. support when a long double is distinct from a double.  This isn't so
  478. much an x86 vs. other CPU argument either, xmission's sparc solaris
  479. reports sizeof(long double) as 16 and sizeof(double) as 8.
  480.  
  481. However, autoconf is a bit ahead of my current position on things, but
  482. with a little more practice on autoconf for my other projects, that
  483. will carry over to xfractint.  And also I believe that autoconf is
  484. getting improved DOS support to support building code on DOS as well
  485. as unix portably.  The makefile templates now include the ability to
  486. specify an alternate to the usual unix executable, object and library
  487. filename extensions (i.e. use 'exe', 'obj', 'lib' instead of '', '.o',
  488. '.a').
  489.  
  490. > While #2 is easily done with SVGA lib, it isn't worth the effort. You 
  491. > have to solve all over again the problems with DOS video modes we 
  492. > have long since solved.
  493.  
  494. Right, but I have to get something up on the screen.  Yes, I could
  495. start with a "videoless" fractint.  But here's what I'm seeing now
  496. that I look into the code: changing the X-specific code once to
  497. support a "videoless" fractint is epsilon easier than changing the
  498. X-specific code to support a driver harness.  With the driver harness
  499. I'm thinking of, disk "video" is always present regardless of anything
  500. else with the code.
  501.  
  502. Next is to add a driver instance that encapsulates the existing X11
  503. interface.  This is like a 15 minute job, once the harness is in
  504. place.  Next is what's needed for some minimal DOS display support,
  505. which is nothing harder than a handful of functions now that I'm
  506. seeing it more clearly.
  507.  
  508. > I suggest the following. In Xfractint's -disk mode, no screen 
  509. > graphics is done. In this mode Xfractint doesn't do any X stuff and 
  510. > is probably close to being portable to djgpp.
  511.  
  512. Actually where I'm starting is to get a working harness + X11 driver
  513. instance going on the X side and then take it over to a disk video
  514. only version with djgpp.
  515.  
  516. > own cache. I don't know if diskvideo should use the DOS code or 
  517. > the XFractrint code.
  518.  
  519. The disk video caching is an O/S issue, not a graphics issue.  There
  520. are a few little things that need to be factored out because of O/S
  521. platform differences, not because of differences in the graphics
  522. environment.  Memory management, timers, date and time manipulation,
  523. file system I/O are some examples, there are probaly some more.  These
  524. also need to be factored out into an "OS" module, with the configure
  525. (manual or otherwise) picking one of them to compile.
  526.  
  527. > Apparently the caching isn't needed in Linux. 
  528.  
  529. In linux, you have the virtual memory system of the O/S to deal with
  530. it, so you don't need to write it yourself.  You can just mmap() the
  531. file and use it like a char *.
  532.  
  533. > In DOS it is essential since some of the passes options cause 
  534. > writing all over the file, and it is horribly slow. That's the reason for 
  535. > the cache.
  536.  
  537. The code could still be retained.  You'd just be managing the cache in
  538. a flat memory model rather than in a segmented straightjacket.
  539. - --
  540. <http://www.xmission.com/~legalize/>    Legalize Adulthood!
  541.     ``Ain't it funny that they all fire the pistol,     
  542.       at the wrong end of the race?''--PDBT     
  543. legalize@xmission.com    <http://www.eden.com/~thewho>
  544.  
  545. - --------------------------------------------------------------
  546. Thanks for using Fractdev, The Fractint Developer's Discussion List
  547. Post Message:   fractdev@lists.xmission.com
  548. Get Commands:   majordomo@lists.xmission.com "help"
  549. Administrator:  twegner@phoenix.net
  550. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  551.  
  552. ------------------------------
  553.  
  554. Date: Thu, 29 Apr 1999 01:55:29 -0600
  555. From: Phil McRevis <legalize@xmission.com>
  556. Subject: Re: (fractdev) FCODE 
  557.  
  558. Err... I'll take that as a yes. :)
  559. - --
  560. <http://www.xmission.com/~legalize/>    Legalize Adulthood!
  561.     ``Ain't it funny that they all fire the pistol,     
  562.       at the wrong end of the race?''--PDBT     
  563. legalize@xmission.com    <http://www.eden.com/~thewho>
  564.  
  565. - --------------------------------------------------------------
  566. Thanks for using Fractdev, The Fractint Developer's Discussion List
  567. Post Message:   fractdev@lists.xmission.com
  568. Get Commands:   majordomo@lists.xmission.com "help"
  569. Administrator:  twegner@phoenix.net
  570. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  571.  
  572. ------------------------------
  573.  
  574. Date: Thu, 29 Apr 1999 02:00:25 -0600
  575. From: Phil McRevis <legalize@xmission.com>
  576. Subject: Re: (fractdev) xfractint 19.61 pl66 fixes 
  577.  
  578. In article <199904290430.XAA26730@voyager.c-com.net>,
  579.     "Tim Wegner" <twegner@phoenix.net>  writes:
  580.  
  581. > I have no way of dealing with the diff you sent except to implement 
  582. > it by hand (which I could do).
  583.  
  584. Really?  Did your patch utility give you an error or what?  If you're
  585. using an old version of patch that doesn't ignore leading/trailing
  586. garbage outside of a context diff, you should get a newer version.
  587. GNU patch doesn't suffer from any such deficiencies.
  588.  
  589. > I need either a true context diff (diff -c 
  590. > old new > changes.dif) or just sent a zipped version of the 
  591.  
  592. What problem exactly are you having?  The problem with zipping up
  593. source code is the end-of-line convention gets stored binary in the
  594. file and you end up having to constantly convert back and forth
  595. between unix and DOS line conventions.
  596.  
  597. We could setup a CVS server here on xmission and people could just
  598. update/checkin/checkout to that directly without you having to process
  599. the diffs manually.  Just a thought.
  600. - --
  601. <http://www.xmission.com/~legalize/>    Legalize Adulthood!
  602.     ``Ain't it funny that they all fire the pistol,     
  603.       at the wrong end of the race?''--PDBT     
  604. legalize@xmission.com    <http://www.eden.com/~thewho>
  605.  
  606. - --------------------------------------------------------------
  607. Thanks for using Fractdev, The Fractint Developer's Discussion List
  608. Post Message:   fractdev@lists.xmission.com
  609. Get Commands:   majordomo@lists.xmission.com "help"
  610. Administrator:  twegner@phoenix.net
  611. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  612.  
  613. ------------------------------
  614.  
  615. Date: Thu, 29 Apr 1999 16:41:31 -0600
  616. From: Phil McRevis <legalize@xmission.com>
  617. Subject: (fractdev) portability thoughts
  618.  
  619. Lets separate graphic driver (anything to do with mouse/display) issues
  620. from operating system issues.  Here are the operating system issues as
  621. I see them at my current level of understanding of the source:
  622.  
  623.     file system I/O
  624.     max. filename path len
  625.     path element separator
  626.     directory reading/scanning
  627.  
  628. The path separator thing becomes painful under unix.  Fractint uses
  629. '/' to separate the parameter name from a parameter file, for
  630. isntance.  It happens to look for a '/', and if it sees one, it
  631. assumes that the argument is ``@parfile/entry'', but if one naively
  632. specified a full-path of a parfile under xfractint, you'd have a '/'
  633. as part of the parfile name and xfractint will become confused.  A
  634. workaround is to always have parfiles specified in this manner in the
  635. current directory.  Either fractint's syntax will have to be adjusted
  636. slightly, or some quoting mechanism must be installed to allow a full
  637. pathname for a unix file to be specified in these instances.
  638.  
  639. The filename length is rather standard; stdio.h defines FILENAME_MAX.
  640.  
  641. The directory scanning/reading issue is one of differences between
  642. unices.  Some use readdir that returns a DIRENT, some return a DIR.
  643. Autoconf has all the ability to isolate the differences and provide a
  644. snippet of code that always works.
  645.  
  646.     memory allocation
  647.     memory "models"
  648.     virtual memory: mmap vs. home-brew file I/O cache
  649.  
  650. Memory models disappear completely when dealing with a DPMI extender
  651. port.
  652.  
  653. Fractint has elaborate strategies for coping with limited amounts of
  654. memory for various situations.  Would a flat-model port eliminate the
  655. need for this parsimony?  Do the DPMI's provide virtual memory?  If
  656. so, then I'd suggest ditching the parsimonious behavior in favor of
  657. the VM from the DPMI.  If the flat-model only eliminates near/far/huge
  658. business but still leaves the need for being parsimonious, then the
  659. disk caching logic and so-on should remain.
  660.  
  661.     time and date / timers
  662.  
  663. Fractint uses the PC's timer -- I believe it only uses it in a
  664. stopwatch manner, not to control I/O polling.  (Keyboard polling is
  665. controlled by an internal counter which is adjusted by various
  666. computation routines.  When the counter reaches zero, the keyboard is
  667. checked for input.)  Providing an interface to a system stopwatch is
  668. relatively straightforward.  This would be needed even under a Win32
  669. port since fractint's idea of accessing the timer relies on a DOS
  670. model, which accesses the timer directly (or does it use BIOS?).
  671.  
  672.     signals
  673.  
  674. There are differences between unices.  Some signal handlers return
  675. void, some return int.  Autoconf can handle this.
  676.  
  677.     compilation issues / portability / assembler
  678.     autoconf
  679.         probably lots of include files to sort out.
  680.         driver options
  681.         autodiscover drivers?
  682.         libraries: math library, gmp?
  683.         building help compiler to build help file
  684.         building help file with help compiler
  685.         data files: frmfiles, ifsfiles, lfiles, mapfiles, parfiles
  686.         wipe out default .l.o rule;
  687.         .l files here aren't lex files, they're lsys files
  688.         documentation rule: fractint.doc
  689.  
  690. The stuff under autoconf -- if you're not familiar with autoconf, see
  691. bwlo(*) -- is a list of things that need to be done to use autoconf
  692. for fractint.
  693.  
  694.     trig constants
  695.         why use homebrew PI, etc.?  use M_PI, M_PI_2, etc. instead
  696.  
  697. I'm not sure why fractint defines its own value for PI.  Maybe because
  698. when fractint was first compiled, there weren't any good math.h's for
  699. the PC?  At any rate, I think M_PI and friends from math.h should be
  700. preferred unless there is a significant reason not to.  Again, autconf
  701. can detect the absence of a defined M_PI and define one for that case.
  702.  
  703.     void * != int
  704.  
  705. Lots of places in the code there are implicit assumptions about
  706. sizeof(int) == sizeof(void *).  This isn't good for portability in
  707. general, and in the L-system code I think it actually causes a crash
  708. in xfractint that shouldn't be there.
  709.  
  710.     data type support: int, long, long long, float, double, long double
  711.  
  712. Autoconf can detect the sizes of all these data types and distinguish
  713. which ones embody more precision.  Conditional compilation of long
  714. double support could be added through the code as a function of the
  715. compiler rather than a "DOS/XFRACT" switch as is currently done.
  716.  
  717.     arbitrary precision arithmetic
  718.     gmp only provides integers, rationals, fixed.  Doesn't provide
  719.     trig functions.  Contribute complex, trig implementations back
  720.     to FSF.
  721.  
  722. The arbitrary precision arithmetic routines used by fractint aren't
  723. portable to non-x86 platforms.  However, the gmp (GNU multiple
  724. precision) library *is* portable to a large number of platforms -- it
  725. has assembly for the inner loops for a variety of CPUs:  a29k, alpha,
  726. arm, clipper, cray, hppa, i960, m68k, m88k, mips2, mips3, ns32k,
  727. powerpc32, powerpc64, pyr, sh, sparc32, sparc64, vax, x86 (includes
  728. pentium support), z8000, and z8000x.  I think fractint should adopt
  729. gmp, but this will mean a fair bit of work.
  730.  
  731. gmp provides arbitrary precision integer, rational and floating point
  732. representations.  It does not provide a complex representation
  733. (although making one is straightforward), nor does it provide
  734. trigonometric functions for any of the data types.  Fractint's bignum
  735. implementation provides both of these.  If it were up to me, I'd take
  736. the complex and trig support impemented in fractint, port that onto
  737. the gmp library and contribute it back as GPL'ed source to the gmp
  738. maintainers.  Then I'd move fractint to using gmp completely.
  739.  
  740. Given the other items on the portability menu, I'd rank this as a
  741. rather low-priority item.  (On the other hand, if you deseperately
  742. want xfractint calculating arbitrary precision M-sets on a cray, you
  743. might prioritize it higher. :-)
  744.  
  745. (*) ==== About autoconf
  746.  
  747. There are lots of minor nagging differences between unix
  748. implementations.  This was what vendors did to "add value" during the
  749. pre-POSIX days.  Now people realize that consistency of an interface is
  750. more valuable than any value "added" by deviating in a non-portable
  751. manner.  At any rate, we're now stuck with how to resolve all these
  752. niggling little differences between unix boxes.  Autoconf was invented
  753. to solve this problem as open source software evolved and was ported to
  754. more and more platforms.
  755.  
  756. Rather than try and identify the feature sets provided by all possible
  757. OS and hardware combinations ahead of time, autoconf builds a
  758. configuration script based on knowledge of the source code's
  759. requirements.  The configure script knows what the source code needs
  760. (or what alternatives the source code implements) and probes the
  761. system at compile time to see if the system provides facilities
  762. sufficient for the compilation of the package.  It identifies
  763. alternatives available in the system and marks them in a configuration
  764. header file.  The header file is included by the source code to select
  765. between alternatives or conditionally compile snippets of code based
  766. on the configuration.
  767.  
  768. Mechanically, it works like this:
  769.  
  770.     configure.in is a file you edit that specifies your software's
  771.     feature requirements (include files, typedefs, functions,
  772.     libraries, etc.)
  773.  
  774.     Makefile.in, config.h.in, etc.
  775.     Remaining *.in files are templates containing autoconf
  776.     variables.  When the source code is configured, the configure
  777.     script will process the template files and expand the autoconf
  778.     macros to the appropriate values for the system.
  779.  
  780.     autoconf generates a configure script from configure.in, since
  781.     a configure script is a big hairy /bin/sh script that is too
  782.     cumbersome to write by hand.  Configure.in serves as a
  783.     template that is macro expanded through m4 to obtain
  784.     configure.
  785.  
  786.     configure is run on the target system, identifying available
  787.     features for the software. *.in template files are processed
  788.     and autoconf variables are substituted by their appropriate
  789.     values in the templates.  This step usually creates your
  790.     Makefile and config.h
  791.  
  792.     now you're ready to run make and install the target.
  793.  
  794. The end user (the person compiling your source distribution) isn't
  795. required to have "autoconf" installed unless they want to change the
  796. source code's configuration process.  One generally distributes source
  797. after you've run autoconf so that a configure script comes with the
  798. source code.  An end-user obtains the source, runs configure, types
  799. "make" and then "make install" to install the software.  No more
  800. editing of include files and/or Makefiles to configure your package!
  801.  
  802. There is an additional GNU tool called "automake" that simplifies the
  803. details of writing a makefile compliant with the GNU coding standards.
  804. (This provides standard targets for actions like "install",
  805. "uninstall", conventions for locations of binary files, installed
  806. header files, installed libraries, and so-on.) Automake works in
  807. conjuction with autoconf, but autoconf doesn't require automake.
  808.  
  809. - --------------------------------------------------------------
  810. Thanks for using Fractdev, The Fractint Developer's Discussion List
  811. Post Message:   fractdev@lists.xmission.com
  812. Get Commands:   majordomo@lists.xmission.com "help"
  813. Administrator:  twegner@phoenix.net
  814. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  815.  
  816. ------------------------------
  817.  
  818. Date: Thu, 29 Apr 1999 17:00:17 -0600
  819. From: Phil McRevis <legalize@xmission.com>
  820. Subject: (fractdev) C++ templates and generic programming and fractint! :)
  821.  
  822. Just an observation... fractint already embodies the concept of
  823. "generic programming with template classes" as closely as C can deal
  824. with it.
  825.  
  826. Think about it... fractint has different code blocks implementing the
  827. mathematics of long (integer), double, long double, bignum and bigfloat
  828. number representations.  Fractint evolved in C what one would do in
  829. C++ with a template class: provide different implementations of the
  830. same set of operations for different underlying representations.o
  831.  
  832. As I'm scanning through the fractint source code, I'm looking at
  833. things that go like this alot:
  834.  
  835.     if (integer math)
  836.     do some setup calculation using an integer representation
  837.     else if (floating point math)
  838.     do some setup calculation using a double representation
  839. #ifndef XFRACT
  840.     else if (extended precision fp math)
  841.     do some setup calculation using a long double representation
  842. #endif
  843.     else if (bignum math)
  844.     do some setup calculation using a bignum representation
  845.     else if (bigfloat math)
  846.     do some setup calculation using a bigfloat representation
  847.  
  848. Variables also exist in multiple representations like the complex-plane
  849. coordinates identifying the current zoom box.  What fractint is really
  850. doing is using an arbitrary precision datatype that adapts its
  851. computation based on the amount of precision required.  Based on the
  852. zoom box, fractint decides how many decimals of precision it needs and
  853. swaps the representation as needed while zooming if the pixel's inner
  854. loop can handle it.
  855.  
  856. If at some point fractint evolves into using C++, I think this would be
  857. the strongest argument for such a move.  The template classes of C++
  858. allow for a much cleaner representation of this idea.  It would also be
  859. much less error-prone when making modifications to the code.  Consider
  860. the setup calculation example above.  With a template implementation,
  861. we would have a single expression for the setup calculation.  If this
  862. calculation needed to change, only one expression would need to be
  863. edited and tested.  With the existing method, all the expressions have
  864. to be edited and tested separately.
  865.  
  866. Adding a new fractal type would imply that the formula would be
  867. implemented for *all* supported representations with a single template
  868. function.  (This is the power of generic programming using templates.)
  869. Each new fractal type would get arbitrary precision arithmetic "for
  870. free".
  871.  
  872. - --
  873. <http://www.xmission.com/~legalize/>    Legalize Adulthood!
  874.     ``Ain't it funny that they all fire the pistol, 
  875.       at the wrong end of the race?''--PDBT
  876.           <http://www.eden.com/~thewho>
  877.  
  878. - --------------------------------------------------------------
  879. Thanks for using Fractdev, The Fractint Developer's Discussion List
  880. Post Message:   fractdev@lists.xmission.com
  881. Get Commands:   majordomo@lists.xmission.com "help"
  882. Administrator:  twegner@phoenix.net
  883. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  884.  
  885. ------------------------------
  886.  
  887. Date: Thu, 29 Apr 1999 18:01:30 -0500
  888. From: "Damien M. Jones" <dmj@fractalus.com>
  889. Subject: Re: (fractdev) C++ templates and generic programming and fractint! :)
  890.  
  891. Rich,
  892.  
  893.  - If at some point fractint evolves into using C++, I think this would
  894.  - be the strongest argument for such a move.  The template classes of
  895.  - C++ allow for a much cleaner representation of this idea.
  896.  
  897. (laughing) I seem to recall this topic being brought up some time ago. I'm
  898. glad to see it raised again. It's also the model I used for JuliaSaver,
  899. which implements a base class with all the guessing logic and a good chunk
  900. of the setup code, and the individual fractal type classes just override
  901. the actual iteration routines and any other setup routines they need to
  902. modify. (In case there was any question about the efficiency of C++.)
  903.  
  904. Damien M. Jones   \\
  905. dmj@fractalus.com  \\  Fractalus Galleries & Info:
  906.                     \\  http://www.fractalus.com/
  907.  
  908. Please do not post my e-mail address on a web site or
  909. in a newsgroup.  Thank you.
  910.  
  911. - --------------------------------------------------------------
  912. Thanks for using Fractdev, The Fractint Developer's Discussion List
  913. Post Message:   fractdev@lists.xmission.com
  914. Get Commands:   majordomo@lists.xmission.com "help"
  915. Administrator:  twegner@phoenix.net
  916. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  917.  
  918. ------------------------------
  919.  
  920. Date: Thu, 29 Apr 1999 17:17:00 -0600
  921. From: Phil McRevis <legalize@xmission.com>
  922. Subject: Re: (fractdev) C++ templates and generic programming and fractint! :) 
  923.  
  924. In article <3.0.5.32.19990429180130.0093c530@mail.icd.com>,
  925.     "Damien M. Jones" <dmj@fractalus.com>  writes:
  926. > (laughing) I seem to recall this topic being brought up some time ago.
  927.  
  928. I must have missed that, or perhaps it appeared on another list.  I
  929. rank contributions to fractdev of higher importance than the other
  930. fractal lists :-).
  931.  
  932. But its nice to see someone's reading all this stuff I've been sending
  933. out.  Sometimes its nice to hear back an "echo". :-)
  934.  
  935. > I'm
  936. > glad to see it raised again. It's also the model I used for JuliaSaver,
  937. > which implements a base class with all the guessing logic and a good chunk
  938. > of the setup code, and the individual fractal type classes just override
  939. > the actual iteration routines and any other setup routines they need to
  940. > modify. (In case there was any question about the efficiency of C++.)
  941.  
  942. Ah, but here you're using the inheritence/OOness of C++ to exploit
  943. reuse.  The generic programming/template model, as embodied by the STL
  944. for example, is really quite a different kind of reuse than that
  945. provided by class hierarchies.  If anyone out there reading this
  946. hasn't read Stroustrop's "C++ Programming Language", 3rd ed., section
  947. on the STL, go out and get it and read it!  After you've read it the
  948. first time and thought about it for a few months, go back and read it
  949. again!
  950.  
  951. Despite all the different programming languages and circumstances in
  952. which I've exercised my skill, the concepts embodied by the STL really
  953. changed the way I looked at certain programming problems.  STL is
  954. written in C++, but it isn't "object oriented".  There is a minor use
  955. of class inheritance to exhibit some reuse, but this is rare and only
  956. in places where it makes sense for the problem.  STL has some aspects
  957. of "functional" programming languages, especially adaptors, binders,
  958. unary_function, binary_function, and so-on.
  959.  
  960. The model of the STL is powerful, richly expressive, composable and
  961. adaptable all while being efficient!  Provided of course you have a
  962. decent STL implementation, but the open source SGI implementation is
  963. pretty good at this point if you happen to be stuck with a sucky STL.
  964. You will need a good template-aware C++ compiler or you'll be hosed.
  965.  
  966. Somewhere buzzing around my brain is the zygotal code of a
  967. template-based library that exploits generic programming techniques to
  968. deal with the explosion of concrete types (bitmap, grayscale,
  969. luminance + alpha, rgb, rgb15, rgb16, rgb24, rgba, abgr, bgr,
  970. rrr....bbb...ggg..., etc., images) in imaging and graphics.
  971. - --
  972. <http://www.xmission.com/~legalize/>    Legalize Adulthood!
  973.     ``Ain't it funny that they all fire the pistol,     
  974.       at the wrong end of the race?''--PDBT     
  975. legalize@xmission.com    <http://www.eden.com/~thewho>
  976.  
  977. - --------------------------------------------------------------
  978. Thanks for using Fractdev, The Fractint Developer's Discussion List
  979. Post Message:   fractdev@lists.xmission.com
  980. Get Commands:   majordomo@lists.xmission.com "help"
  981. Administrator:  twegner@phoenix.net
  982. Unsubscribe:    majordomo@lists.xmission.com "unsubscribe fractdev"
  983.  
  984. ------------------------------
  985.  
  986. End of fractdev-digest V1 #20
  987. *****************************
  988.  
  989.