pouët.net

Random line of code thread

category: code [glöplog]
Quote:
Code: move.w #300,d0 .lp nop dbra d0,.lp


for those that know what a piece of s**t this is...


CPU dependent DMA wait loop in a certain Sound-/Noise-/Protracker replayer is what it looks like.

Code: moveq #5-1,d0 .loop move.b $dff006,d1 .wait cmp.b $dff006,d1 beq.b .wait dbf d0,.loop
added on the 2016-07-10 20:52:39 by StingRay StingRay
Quote:
Quote:
Code: move.w #300,d0 .lp nop dbra d0,.lp


for those that know what a piece of s**t this is...


CPU dependent DMA wait loop in a certain Sound-/Noise-/Protracker replayer is what it looks like.

Code: moveq #5-1,d0 .loop move.b $dff006,d1 .wait cmp.b $dff006,d1 beq.b .wait dbf d0,.loop


That's at least what mine look like now!
added on the 2016-07-11 02:56:22 by djh0ffman djh0ffman
Code:xLINER mainobjectdata(i, mainobject(i).locationptr) + (mainobjectdata(i, mainobject(i).scaleptr)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4)) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3)) * baseobjvdata(baseobjldata(iii, 0), 0))), mainobjectdata(i, mainobject(i).locationptr + 1) + (mainobjectdata(i, mainobject(i).scaleptr + 1)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4) + 1) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3) + 1) * baseobjvdata(baseobjldata(iii, 0), 1))), mainobjectdata(i, mainobject(i).locationptr + 2) + (mainobjectdata(i, mainobject(i).scaleptr + 2)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4) + 2) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3) + 2) * baseobjvdata(baseobjldata(iii, 0), 2))), mainobjectdata(i, mainobject(i).locationptr) + (mainobjectdata(i, mainobject(i).scaleptr)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4)) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3)) * baseobjvdata(baseobjldata(iii, 1), 0))), mainobjectdata(i, mainobject(i).locationptr + 1) + (mainobjectdata(i, mainobject(i).scaleptr + 1)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4) + 1) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3) + 1) * baseobjvdata(baseobjldata(iii, 1), 1))), mainobjectdata(i, mainobject(i).locationptr + 2) + (mainobjectdata(i, mainobject(i).scaleptr + 2)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4) + 2) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3) + 2) * baseobjvdata(baseobjldata(iii, 1), 2)))


hooray, basic doesn't allow multiline splitting!
it's from this demo, sikakreisi. here's a little bit of a background writeup.
added on the 2016-07-11 12:03:14 by appas appas
appas: Yes it does. Underscore at end of line lets you continue in the next line. ;)
Code:// Ugly hack but hey, it works...
added on the 2016-07-11 12:37:12 by Kylearan Kylearan
Code:mov cl,36
from "FDPLANES.H" (class header):
Code:// когда что-то тут поменял - ПЕРЕСОБЕРИ MAIN.CPP!!1


means "did changed anything here - REBUILD MAIN.CPP!!1"
someone should add this file to makefile' dependency list :D
added on the 2016-07-20 17:17:08 by wbcbz7 wbcbz7
Quote:
nop ; sound on channel1
added on the 2016-07-20 17:24:49 by HellMood HellMood
Code:nop ;256
Code:ff *= r(uv,t) + r(uv,t+.01) + r(uv,t-.4)*.5;

"Looks like shite :[", "I know, let's do layers :D", "..again?", "yes :D"
added on the 2016-08-01 13:57:51 by tomaes tomaes
Code: dc.b "you must be a wanker because i got paid to do this"

Code: dc.b "if you can read this why cant you write it"

Code: dc.b "why dont you fuck off and die"


Found while patching the game Alcatraz.
added on the 2016-08-04 21:17:39 by StingRay StingRay
jsr Wait_Recal
added on the 2016-08-04 21:20:22 by Fell Fell
Most people don't know this, but the quality of a demo is actually measured by the length of singular lines of code. Here's some choice examples of our latest DOS demo done in a hurry to the nth degree.

Quote:

char effu = (sintab[(time>>8+x+156+y) % 255]*y-sintab2[((x+time>>1)+time>>1) % 255]) | x+1+y+1;

if (fb_buffer[(sy+(yy-y))*300+(sx+(xx-x))] != 0 && xx < 310 && yy < 200 && xx > 9 && yy > 0) VGASCRCOPY[yyy+xx] = fb_buffer[(sy+(yy-y))*300+(sx+(xx-x))];

if (scry >= 130) { scry = 130; seanext = 1; skyreveal = 0; seastart = effutime; memset(VGASCRCOPY,0,64000); XMS_CopyFromXMS(kuvapaletti, XMSHandleSkyPal, 0, 768); setpal(kuvapaletti); }

added on the 2016-08-05 11:59:07 by visy visy
max sdk
Code: /*! \remarks Returns the decay state of the light. \return This boolean works as an integer where <b>0</b> is None, <b>1</b> is Inverse and <b>2</b> is Inverse Square. \par Default Implementation: <b>{return 0;}</b> */ virtual BOOL GetDecayType() {return 0;}
added on the 2016-08-17 01:15:19 by Gargaj Gargaj
Code:Get #1,,blockId Get #1,,link If link > 0 Then crap=Space(link) Get #1,,crap End If If blockId = !"title\26" Then vcsTitle=crap If blockId = !"vCopy\26" Then vcsCopyright=crap

It's all about crap.
Code:bhi.w .fettich ; wenn ja, raus!
added on the 2016-08-24 21:11:59 by StingRay StingRay
Code:incept: les bx,[word bx+incept-2] ; ES = (0xA000 - 3 lines) = 0x9FC4 (aligned) ; no matter what the location of this instruction ; move around to get reuseable values in byte 3/4
added on the 2016-08-25 00:24:10 by HellMood HellMood
Code:mov [fs:bp+si], bl
added on the 2016-08-25 00:52:02 by rudi rudi
Code: assign s2_clk = debug_clock; assign s2_rst = rst1; assign s2_cyc_i = {m0_adr_o,2'b00} == 32'hF7000000 ? m0_cyc_o : 1'b0; assign s2_stb_i = m0_stb_o; assign s2_we_i = m0_we_o; assign s2_dat_i = m0_dat_o; assign s2_sel_i = m0_sel_o; assign s2_err_o = 1'b0; assign s2_rty_o = 1'b0; wb_uart uart0 ( .CLK_I (s2_clk), .RST_I (s2_rst), .CYC_I (s2_cyc_i), .STB_I (s2_stb_i), .SEL_I (s2_sel_i), .WE_I (s2_we_i), .DAT_I (s2_dat_i), .ACK_O (s2_ack_o), .DAT_O (s2_dat_o), .RX_I (UART_RX), .TX_O (UART_TX), .ISR_O() );
added on the 2016-08-26 11:08:39 by Sniper Sniper
Code: **************************************************** * $VER: intro 1.007 (08 Aug 1998) * * * $HISTORY: * * 08 Aug 1998 : 001.007 : scheisse * 08 Aug 1998 : 001.006 : auf party * 06 Aug 1998 : 001.005 : shit morgen gehts los und noch nicht weiter ;( * 02 Aug 1998 : 001.004 : explosion funzt * 02 Aug 1998 : 001.003 : explosion angefangen * 26 Jul 1998 : 001.002 : naechster tag * 25 Jul 1998 : 001.001 : anfang * ****************************************************
added on the 2016-08-26 16:05:03 by Sniper Sniper
Code:if (gamescom2016)
added on the 2016-08-26 16:52:25 by MsK` MsK`
Oh no... I know the feeling :D
added on the 2016-08-26 17:08:13 by Preacher Preacher
Code://*** MACRO: SEARCH TILE NUMBER // Used in: Problem reading from command line, RuleC0, RuleC1 #define SearchTileNumber(TableValues,TableTiles,TablePossibilities,x,y,s,t,TileFound) \ t=0; \ TileFound=FALSE; \ while((t<NbTiles) && (TileFound==FALSE)) { \ TileFound=TRUE; \ s=0; \ while((s<NbSymbols) && (TileFound==TRUE)) { \ if(Tile[t][s]!=TableValues[x][y][s]) { \ TileFound=FALSE; \ } \ s++; \ } \ if(TileFound==TRUE) { \ TableTiles[x][y]=t; \ TablePossibilities[x][y]=1<<t; \ TileAlreadyPlaced[t]=TRUE; \ RuleP0_void(); \ } \ t++; \ }
added on the 2016-08-27 15:26:02 by baah baah
Code: bfset d0{22:8} ; d0=1024-1
added on the 2016-08-27 15:44:38 by StingRay StingRay
G0 Z#1
M5
G17
G0 X0 Y0
M30
added on the 2016-08-27 22:51:29 by FunGas FunGas

login