Jump to content

Photo

Graphics 8 Fedora Hat


124 replies to this topic

#51 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Wed Mar 4, 2015 1:47 AM

I made the following changes to get it to run on an Apple IIe emulator. 

The scale probably needs further adjustment to get it exact but it runs.
Takes over 32 minutes to complete the image at standard speed.
The Coleco ADAM would require similar changes but with different CX and SX values.

100 SX=120:SY=56:SZ=64:CX=280:CY=192

130 HGR2:COLOR 3

240     IF RR(X1)>Y1 THEN RR(X1)=Y1:HPLOT X1,Y1

260     IF RR(X1)>Y1 THEN RR(X1)=Y1:HPLOT X1,Y1

With TV emulation enabled on the emulator.  
FedoraApple.jpg



#52 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Wed Mar 4, 2015 8:48 PM

MSX.  
The value of SX may need reduced.
I tried testing it on an emulator but the keyboard emulation kept screwing up my typing so I said the heck with it.

100 SX=115:SY=56:SZ=64:CX=256:CY=192

130 SCREEN 2

240     IF RR(X1)>Y1 THEN RR(X1)=Y1:PSET(X1,Y1)

260     IF RR(X1)>Y1 THEN RR(X1)=Y1:PSET(X1,Y1)



#53 Britishcar OFFLINE  

Britishcar

    Chopper Commander

  • 133 posts

Posted Wed Mar 4, 2015 8:59 PM

These mods are fun. It's interesting to see the increased speed via optimization, etc.

 

JamesD, I think there's a typo in your A2E code:

 

Line:

 

130 HGR2:COLOR 3

 

Should be:

 

130 HGR2:HCOLOR=3

 

Does anyone have a TI-99/4a Extended BASIC version worked out?



#54 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Thu Mar 5, 2015 1:00 AM

These mods are fun. It's interesting to see the increased speed via optimization, etc.
 
JamesD, I think there's a typo in your A2E code:
 
Line:
 
130 HGR2:COLOR 3
 
Should be:
 
130 HGR2:HCOLOR=3
 
Does anyone have a TI-99/4a Extended BASIC version worked out?

You are correct. I couldn't cut and past from the emulator so I had to retype the lines and messed up.

TI-99/4a BASIC doesn't have support for bitmap oriented commands and neither does TI Extended BASIC.
It would take a lengthy subroutine to implement SET(X1,Y1)
It would have to decide which screen character needs modified, then read that character, modify the proper byte and write it back.
Expect run times to be many hours *if* you can even modify a character like that.
You end up DIV x1 by character width and y1 by character height, get the character, figure out which row of the character the bit is on and then or the specific bit with that row of the character.
Keep in mind bit number produced by this math is opposite of bit order in the character so you need an IF THEN or ON GOTO setup with 8 possibilities.
Now write the character back.
I don't even know if modifying the character that way is even possible.
The code isn't so much complicated as it is lengthy. SET(X1,Y1) is probably as long or longer than the code that would call it.

That's why people used The Missing Link.
I found the manual here:
ftp://ftp.whtech.com/programming/The%20Missing%20Link%20software%20manual.pdf
Super Extended BASIC appears to have commands that would do the trick as well.

I'm not sure the code I posted in the TI area needs the call to "PD" before "PIXEL".

Edited by JamesD, Thu Mar 5, 2015 1:09 AM.


#55 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Thu Mar 5, 2015 9:29 AM

You end up DIV x1 by character width and y1 by character height, get the character, figure out which row of the character the bit is on and then or the specific bit with that row of the character.

Actually, for the required graphic mode, rather than getting the character # you calculate the address of that character, add the offset to the byte and then you need to PEEK it from video RAM (VPEEK?). Then you can OR the byte with the bit and write it back with a POKE. Whatever BASIC you use will need direct support for the graphics mode or the ability to manually send commands to the VDP.
Given decent documentation I could figure it out but I'm guessing someone has previously done it.

#56 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Fri Mar 6, 2015 1:32 AM

This is the TI-99/4a BASIC version.
It requires Extended BASIC and a third party BASIC extension called The Missing Link that adds bitmapped graphics support.
I didn't bother completely figuring out the proper scale.  The reduced screen width (240) is needed because of how the TI VDP RAM is used.  
DIM does not appear to support a variable as a parameter.
The CALL LINK commands are making calls to The Missing Link.

100 SX=100::SY=56::SZ=64::CX=240::CY=192
110 DIM RR(256)
120 FOR I=0 TO CX::RR(I)=CY::NEXT I
130 CALL LINK("CLEAR")
140 CX=CX*0.5::CY=CY*0.46875::FX=SX/64::FZ=SZ/64
150 XF=4.71238905/SX
160 FOR ZI=64 TO -64 STEP -1
170   ZT=ZI*FX::ZS=ZT*ZT
180   XL=INT(SQR(SX*SX-ZS)+0.5)
190   ZX=ZI*FZ+CX::ZY=CY+ZI*FZ
200   FOR XI=0 TO XL
210     XT=SQR(XI*XI+ZS)*XF
220     YY=(SIN(XT)+SIN(XT*3)*0.4)*SY
230     X1=XI+ZX::Y1=ZY-YY
240     IF RR(X1)>Y1 THEN RR(X1)=Y1:: CALL LINK("PIXEL",Y1,X1)
250     X1=ZX-XI
260     IF RR(X1)>Y1 THEN RR(X1)=Y1:: CALL LINK("PIXEL",Y1,X1)
270   NEXT XI::NEXT ZI
280 GOTO 280  

TI99Fedora.jpg



#57 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Fri Mar 6, 2015 11:05 AM

Commodore Plus/4 changes

130 COLOR 0,1:COLOR 1,2:GRAPHIC 1,1
240     IF RR(X1)>Y1 THEN RR(X1)=Y1:DRAW 1,X1,Y1
260     IF RR(X1)>Y1 THEN RR(X1)=Y1:DRAW 1,X1,Y1

Plus4Fedora.jpg


Edited by JamesD, Fri Mar 6, 2015 11:07 AM.


#58 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Fri Mar 6, 2015 11:06 AM

Keep in mind that I've been doing just enough to get things running, I'm not worried about the code being perfect.



#59 devwebcl OFFLINE  

devwebcl

    Stargunner

  • 1,141 posts
  • Location:Chile

Posted Fri Mar 6, 2015 4:01 PM

These mods are fun. It's interesting to see the increased speed via optimization, etc.

 

 

I agree 100%



#60 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Sat Mar 7, 2015 8:21 AM

The Coleco ADAM requires similar changes as the Apple II since it's BASIC is based on Applesoft II but with a screen size the same as the CoCo 1/2
Output looks almost identical to the CoCo 1/2 with this color choice but the 9918 has more colors to choose from.  
Any difference with this color choice would be due to differences in the floating point library.

101 SX=.8*SX:SY=.8*SY:SZ=.8*SZ
 
130 HGR2:COLOR=3

240 IF RR(X1)>Y1 THEN RR(X1)=Y1:HPLOT X1,Y1

260 IF RR(X1)>Y1 THEN RR(X1)=Y1:HPLOT X1,Y1

ADAMFedora.jpg

*edit*
It took a little over 13 minutes to render in MESS but I don't know how accurate the ADAM MESS driver is.
Other benchmarks have shown the ADAM BASIC to be fast so the results might be accurate but this machine driver supposedly has problems so it might be a little off.
 


Edited by JamesD, Sat Mar 7, 2015 8:48 AM.


#61 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,824 posts
  • HarmlessLion
  • Location:BUR

Posted Sun Mar 8, 2015 1:25 AM

Sorry for peeking in, I was curious how fast you guys had the Atari 8-bit version running. ;)

 

Hope you don't mind if I cross-post too, then. :)

 

I think I have the record in the TI forum for both slowest and fastest port. I have a version that runs in pure TI BASIC (redefining the characters similar to how JamesD describes above, though the routine isn't all that long). I didn't let it run to completion, and it had to be scaled down to draw most of it, as only 127 characters are available to be redefined, but based on how far it got I had a rough estimate of around 45 hours to complete. A later optimized version that has the draw enhancements and also let you scale down both the size of the output and the step of the loops was able to draw the whole hat at 0.4 scale, but that's not a fair test since it also did only 40% of the loops.

 

Spoiler

 

bashat.jpg

 

 

The assembly version manages the code in 26 seconds (emulated, should be close to right). It's using a 256 entry lookup table for sine and 9.7 fixed point numbers for most of the values. You can see that the limited accuracy impacts the image in places, but it's pretty close. A 24-bit number with more fractional bits would probably be enough, but 16-bit is the native word size on the TI.

 

Spoiler

 

asmhat.jpg

 

 



#62 devwebcl OFFLINE  

devwebcl

    Stargunner

  • 1,141 posts
  • Location:Chile

Posted Sun Mar 8, 2015 7:55 AM

A faster version, but only for the complete wireframe:

 

It took 22 minutes 17 seconds in Altirra w/ TBXL (at full speed):

http://manillismo.bl...-wireframe.html

140 GRAPHICS 8+16:SETCOLOR 2,0,0
150 XP=144:XR=4.71238905:XF=XR/XP

151 REM VERSION RAPIDA COMPLETA (IN LINEA 240)
155 COLOR 1
159 REM LA MITAD?  -64
160 FOR ZI=0 TO 64
    
    170 ZT=ZI*2.25:ZS=ZT*ZT
    180 XL=INT(SQR(20736-ZS)+0.5)
    
    181 ZX=ZI+160:ZY=90+ZI
    182 ZX2=-ZI+160:ZY2=90-ZI
    
    185 REM LA MITAD?  0-XL
    190 FOR XI=0 TO XL
    
        200 XT=SQR(XI*XI+ZS)*XF
        210 YY=(SIN(XT)+SIN(XT*3)*0.4)*56
        
        219 REM TODO: SACAR 90-
        220 X1 = XI+ZX:Y1 =ZY-YY
        221 X12= XI+ZX2:Y12=ZY2-YY
        222 X13=-XI+ZX:Y13=ZY-YY
        223 X14=-XI+ZX2:Y14=ZY2-YY
        
        230 trap 250: PLOT X1,Y1:PLOT X12,Y12:PLOT X13,Y13:PLOT X14,Y14
        
    250 NEXT XI: NEXT ZI

260 GOTO 260


#63 dmsc OFFLINE  

dmsc

    Moonsweeper

  • 277 posts
  • Location:Viņa del Mar, Chile

Posted Sun Mar 8, 2015 10:19 AM

Hi!
 

A faster version, but only for the complete wireframe:
 
It took 22 minutes 17 seconds in Altirra w/ TBXL (at full speed):
http://manillismo.bl...-wireframe.html


You can do better (and still with hidden lines removed) by using a little of trigonometry, now runtime in TBXL (PAL) is 16min 16sec:
100 SX=144:SY=56:SZ=64:CX=320:CY=192
110 C1=2.2*SY:C2=1.6*SY
120 DIM RR(CX)
130 FOR I=0 TO CX:RR(I)=CY:NEXT I
140 GRAPHICS 8+16:SETCOLOR 2,0,0:COLOR 1
150 CX=CX*0.5:CY=CY*0.46875:FX=SX/64:FZ=SZ/64
160 XF=4.71238905/SX
170 FOR ZI=64 TO -64 STEP -1
180   ZT=ZI*FX:ZS=ZT*ZT
190   XL=INT(SQR(SX*SX-ZS)+0.5)
200   ZX=ZI*FZ+CX:ZY=CY+ZI*FZ
210   FOR XI=0 TO XL
220     A=SIN(SQR(XI*XI+ZS)*XF)
230     Y1=ZY-A*(C1-C2*A*A)
240     X1=XI+ZX
250     IF RR(X1)>Y1 THEN RR(X1)=Y1:PLOT X1,Y1
260     X1=ZX-XI
270     IF RR(X1)>Y1 THEN RR(X1)=Y1:PLOT X1,Y1
280   NEXT XI
290 NEXT ZI

In NTSC, the runtime is slower, 17min 20sec. Note that if you turn off DMA during the drawing, the runtime is only 12min 15sec.

#64 devwebcl OFFLINE  

devwebcl

    Stargunner

  • 1,141 posts
  • Location:Chile

Posted Sun Mar 8, 2015 10:45 AM

Hi!
 

You can do better (and still with hidden lines removed) by using a little of trigonometry, now runtime in TBXL (PAL) is 16min 16sec:

100 SX=144:SY=56:SZ=64:CX=320:CY=192
110 C1=2.2*SY:C2=1.6*SY
120 DIM RR(CX)
130 FOR I=0 TO CX:RR(I)=CY:NEXT I
140 GRAPHICS 8+16:SETCOLOR 2,0,0:COLOR 1
150 CX=CX*0.5:CY=CY*0.46875:FX=SX/64:FZ=SZ/64
160 XF=4.71238905/SX
170 FOR ZI=64 TO -64 STEP -1
180   ZT=ZI*FX:ZS=ZT*ZT
190   XL=INT(SQR(SX*SX-ZS)+0.5)
200   ZX=ZI*FZ+CX:ZY=CY+ZI*FZ
210   FOR XI=0 TO XL
220     A=SIN(SQR(XI*XI+ZS)*XF)
230     Y1=ZY-A*(C1-C2*A*A)
240     X1=XI+ZX
250     IF RR(X1)>Y1 THEN RR(X1)=Y1:PLOT X1,Y1
260     X1=ZX-XI
270     IF RR(X1)>Y1 THEN RR(X1)=Y1:PLOT X1,Y1
280   NEXT XI
290 NEXT ZI
In NTSC, the runtime is slower, 17min 20sec. Note that if you turn off DMA during the drawing, the runtime is only 12min 15sec.

 

 

but trying showing the complete image, not hiding anything at all.



#65 dmsc OFFLINE  

dmsc

    Moonsweeper

  • 277 posts
  • Location:Viņa del Mar, Chile

Posted Sun Mar 8, 2015 11:09 AM

Hi!,

but trying showing the complete image, not hiding anything at all.

Well, you can replace lines 250 and 270 with a simple PLOT X1,Y1 and remove the lines 120 and 130 this will draw the complete wireframe.

I can't run it now, but I suspect will be about the same speed.

Edited by dmsc, Sun Mar 8, 2015 11:11 AM.


#66 devwebcl OFFLINE  

devwebcl

    Stargunner

  • 1,141 posts
  • Location:Chile

Posted Sun Mar 8, 2015 11:41 AM

Hi!,

Well, you can replace lines 250 and 270 with a simple PLOT X1,Y1 and remove the lines 120 and 130 this will draw the complete wireframe.

I can't run it now, but I suspect will be about the same speed.

 

I doubt it will be at the same speed.

 

I am saving several iterations at:

160 FOR ZI=0 TO 64

That's why I am using four PLOT's



#67 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Sun Mar 8, 2015 12:32 PM

Stupid comment deleted 


Edited by JamesD, Sun Mar 8, 2015 12:34 PM.


#68 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Sun Mar 8, 2015 3:35 PM

Microsoft basic isn't known for blinding speed but it's still competitive.

The last change cut the CoCo 3 NTSC time to 19:15.  
Combining lines resulted in 19:14.  Over a lot more lines it would add up but not here because there are so few lines.
Renumbering only helps with GOTOs and GOSUBs so no change there. 
Defining the most used variables first will speed up Microsoft BASIC a bit and the first test of this resulted in 18:44.
If I put a little more effort into it I could probably cut that a little more but finding what is optimal would require many trials.
 

Enabling the 6309 native mode on a CoCo 3 equipped with one results in about a 21% speed increase on the same code.

That should let this complete in 14:48.

BASIC-09 on the CoCo 3 should complete this in under 5 minutes, possibly in under 2 if the ration on Ahl's benchmark holds but it's tough to tell without testing.


The BBC, Apple IIgs and IIc+ should all do very well running this due to their higher clock speed.

Assembly language vs BASIC is obviously not a fair comparison.
For that matter, neither is comparing a machine rendering 256x192 vs other machines rendering 320x192.

It's also not fair comparing a machine with a 2 color screen vs 16 color.
If this were a benchmark you would want everyone rendering the same size image and same number of colors if possible.
Also remember that a small code sample may run faster on the TI because you can stick code in scratchpad RAM but you won't always get the same speedup with a larger program.



#69 dmsc OFFLINE  

dmsc

    Moonsweeper

  • 277 posts
  • Location:Viņa del Mar, Chile

Posted Sun Mar 8, 2015 4:48 PM

Hi!,
 

I doubt it will be at the same speed.
 
I am saving several iterations at:

160 FOR ZI=0 TO 64
That's why I am using four PLOT's


Yes, I know. But your timings don't look right. If I remove the IF's and the array initialization to my program, I get 15min 23sec in PAL, 16min 25sec in NTSC. This is on an 800XL with TBXL 1.5 (emulated).

If I combine my program with yours, I get a runtime of 8min 47sec on PAL, or 9min 21sec on NTSC:
100 SX=144:SY=56:SZ=64:CX=320:CY=192
110 C1=2.2*SY:C2=1.6*SY
120 GRAPHICS 8+16:SETCOLOR 2,0,0:COLOR 1
130 CX=CX*0.5:CY=CY*0.46875:FX=SX/64:FZ=SZ/64
140 XF=4.71238905/SX
150 FOR ZI=0 TO 64
160   ZT=ZI*FX:ZS=ZT*ZT:ZT=ZI*FZ
170   XL=INT(SQR(SX*SX-ZS)+0.5)
180   ZX1=CX+ZT:ZY1=CY+ZT
190   ZX2=CX-ZT:ZY2=CY-ZT
200   FOR XI=0 TO XL
210     A=SIN(SQR(XI*XI+ZS)*XF)
220     A=A*(C1-C2*A*A)
230     Y1=ZY1-A:Y2=ZY2-A
240     X1=ZX1+XI:X3=ZX2+XI
250     X2=ZX1-XI:X4=ZX2-XI
260     IF Y1<191.5 THEN PLOT X1,Y1:PLOT X2,Y1
270     PLOT X3,Y2:PLOT X4,Y2
280   NEXT XI
290 NEXT ZI
300 GOTO 300
Note that your program had a bug, you were TRAP-ing on points below the screen and the missing plotting the corresponding points above. This is why I put the "IF Y1<191.5" over the first two points only.

#70 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Sun Mar 8, 2015 5:10 PM

VZ200 completed it in 15:27 but it only supports 128x64 from BASIC.

100 SX=50:SY=18:SZ=18:CX=128:CY=64
140 MODE(1):COLOR 4,0
250 IF RR(X1)>Y1 THEN RR(X1)=Y1:SET(X1,Y1)
270 IF RR(X1)>Y1 THEN RR(X1)=Y1:SET(X1,Y1)

FedoraVZ.jpg



#71 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Sun Mar 8, 2015 5:28 PM

Hi!,
 

Yes, I know. But your timings don't look right. If I remove the IF's and the array initialization to my program, I get 15min 23sec in PAL, 16min 25sec in NTSC. This is on an 800XL with TBXL 1.5 (emulated).

If I combine my program with yours, I get a runtime of 8min 47sec on PAL, or 9min 21sec on NTSC:

100 SX=144:SY=56:SZ=64:CX=320:CY=192
110 C1=2.2*SY:C2=1.6*SY
120 GRAPHICS 8+16:SETCOLOR 2,0,0:COLOR 1
130 CX=CX*0.5:CY=CY*0.46875:FX=SX/64:FZ=SZ/64
140 XF=4.71238905/SX
150 FOR ZI=0 TO 64
160   ZT=ZI*FX:ZS=ZT*ZT:ZT=ZI*FZ
170   XL=INT(SQR(SX*SX-ZS)+0.5)
180   ZX1=CX+ZT:ZY1=CY+ZT
190   ZX2=CX-ZT:ZY2=CY-ZT
200   FOR XI=0 TO XL
210     A=SIN(SQR(XI*XI+ZS)*XF)
220     A=A*(C1-C2*A*A)
230     Y1=ZY1-A:Y2=ZY2-A
240     X1=ZX1+XI:X3=ZX2+XI
250     X2=ZX1-XI:X4=ZX2-XI
260     IF Y1<191.5 THEN PLOT X1,Y1:PLOT X2,Y1
270     PLOT X3,Y2:PLOT X4,Y2
280   NEXT XI
290 NEXT ZI
300 GOTO 300
Note that your program had a bug, you were TRAP-ing on points below the screen and the missing plotting the corresponding points above. This is why I put the "IF Y1<191.5" over the first two points only.

 

That only drew the back half of the image for me.  Changing line 150 to start at -64 caused it to draw the entire image.



#72 devwebcl OFFLINE  

devwebcl

    Stargunner

  • 1,141 posts
  • Location:Chile

Posted Sun Mar 8, 2015 6:21 PM

That only drew the back half of the image for me.  Changing line 150 to start at -64 caused it to draw the entire image.

 

Actually that's the optimization... I only draw a half of the image in axis-y and the rest is calculated at runtime in the same position, that's the reason it should be faster (I am only considering math optimization, not VBLANK, NTSC/PAL or other hacks).



#73 fujidude OFFLINE  

fujidude

    River Patroller

  • 4,717 posts
  • Location:United States of America

Posted Sun Mar 8, 2015 6:24 PM

I translated the original program as found in Analog magazine into a Python program.  I chose Tkinter as the GUI library, since it is part of the standard Python package.  This is my 1st GUI program in Python, thus it is pretty simplistic as far as GUI elements are concerned.

 

This program took aproximately a second to run on my core i7, and most of that was just the GUI app setting up to open, not the actual calculations.  I know that because as I was making the program and testing, it took almost as long to run a program with just one instruction to draw a single line.

 

Anyway, I hope no one gets upset that I introduced something modern here that isn't retro.  I would like to explain myself in advance in that regard: I no longer have any retro hardware.  I use emulation on modern machines for my retro fixes.  But the look and feel of the software and programing environments of the retro equipment isn't the only aspect of retro I enjoy.  I really loved the exploration and learning back in those early days, especially as it concerned making programs.  And that same magic is captured for me again on modern systems, with the Python programming language.  It's pretty close to a universal language these days, kind of like BASIC was in the past.  It is interpreted also, so it is quick to develop with; again, just like BASIC.  It comes preinstalled on Linux and Mac OSX.  Is freely available for Windows also.

 

So without further delay, for those who are interested, here is the Python version listing:

#-------------------------------------------------------------------------------
# Name:        archimedes.py
# Purpose:     mplement the Archimedes' spiral prgoram in Python 2.x
#
# Author:      fujidude for just the Python version, original code
#              Charles Bachand, pub. Antic magazine, issue 7, pp.60-61.
#
# Created:     08-03-2015
#-------------------------------------------------------------------------------


# import necessary modules
from Tkinter import *
import math


def end():
    rootwin.destroy()


rootwin=Tk() # main (root) application window based on Tkinter
rootwin.wm_title("Archimedes' Spiral")

quitBtn=Button(rootwin,text="Exit",command=end)
quitBtn.pack(side="bottom")

graphzone=Canvas(rootwin, width = 320, height = 192, bg = "black")
graphzone.pack()

XP = 144
XR = 4.71238905
XF = XR / XP

for ZI in range(-64, 65):
    ZT = ZI * 2.25
    ZS = ZT * ZT
    XL = int(math.sqrt(20736 - ZS) + 0.5)
    for XI in range(0 - XL, XL+1):
        XT = math.sqrt(XI * XI + ZS) * XF
        YY = (math.sin(XT) + math.sin(XT * 3) * 0.4) * 56
        X1 = XI + ZI + 160
        Y1 = 90 - YY + ZI
        graphzone.create_oval(X1, Y1, X1, Y1, fill = "white")
        graphzone.create_line(X1, Y1+1, X1, 191, fill="black") # remove this line for transparent version

rootwin.mainloop()

Again, that is more or less a direct style translation of the original Analog listing.  I might try to make some of the optimization changes suggested here in another version.  Depending on if there is even a shred of interest.



#74 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,740 posts
  • Location:Flyover State

Posted Sun Mar 8, 2015 7:46 PM

 

Actually that's the optimization... I only draw a half of the image in axis-y and the rest is calculated at runtime in the same position, that's the reason it should be faster (I am only considering math optimization, not VBLANK, NTSC/PAL or other hacks).

I see what you are doing and after some tracing the subtractions aren't working in several places.  I'm guessing an emulation issue or a bad ROM image for the emulator.

*edit*

Or variable names are limited to 2 digits.  Du-Oh!


Edited by JamesD, Sun Mar 8, 2015 8:15 PM.


#75 dmsc OFFLINE  

dmsc

    Moonsweeper

  • 277 posts
  • Location:Viņa del Mar, Chile

Posted Sun Mar 8, 2015 8:44 PM

Hi!,
 

I see what you are doing and after some tracing the subtractions aren't working in several places.  I'm guessing an emulation issue or a bad ROM image for the emulator.
*edit*
Or variable names are limited to 2 digits.  Du-Oh!


Yes, it is strange.

Attached is a disk image with both programs, the wireframe only and the visible faces, it is a bootable image that autoloads a menu to select which program to run.

Also, I included the timing calculations for both PAL and NTSC, to verify runtimes.

Attached Files






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users