Posts for feos

1 2 193 194 195 440 441
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
I need a guru. Here's my script for Genesis Gargoyles that draws BG. Right now, I'm using a 1D array of "structs", with each unit representing a block with its attributes, and if the block is offscreen, its unit becomes nil, if it's onscreen, its unit gets calculated and cached. I'm also iterating through the whole map, and the array I create that way is very huge. This results in low speed of the function. This is all happening in function Background(), the rest don't seem to matter too much. Can someone help me to speed this thing up? If I make a consecutive array instead of index=x+y*mapwidth, it draws only the first bunch of blocks in the map. There's also some garbage left from camhack and size divider, ignore that. Download Gargoyles.lua
Language: lua

-- Gargoyles, Genesis (BizHawk) -- feos, 2015-2016 --== Shortcuts ==-- rb = memory.read_u8 rw = memory.read_u16_be rws = memory.read_s16_be r24 = memory.read_u24_be rl = memory.read_u32_be box = gui.drawBox text = gui.pixelText line = gui.drawLine AND = bit.band SHIFT = bit.rshift --== RAM addresses ==-- levnum = 0xff00ba LevelFlr = 0xff00c0 LevelCon = 0xff00c4 mapline_tab = 0xff0244 GlobalBase = 0xff1c76 GolBase = 0xff2c76 MapA_Buff = 0xff4af0 --== Camera Hack ==-- camhack = false div = 1 -- scale size = 16/div -- block size --== Other stuff ==-- XposLast = 0 YposLast = 0 room = 0 workinglast = 0 lagcount = emu.lagcount() gui.defaultPixelFont("fceux") --== Block cache ==-- cache = {} function main() rnd1 = rl (0xff001c) rnd2 = rw (0xff0020) working = rb (0xff0073) xblocks = rw (0xff00d4) mapw = rw (0xff00d4)*8 maph = rw (0xff00d6)*8 Xpos = rws(0xff0106) Ypos = rws(0xff0108) camx = rws(0xff010c)+16 camy = rws(0xff010e)+16 run = rb (0xff1699) inv = rw (0xff16d2) health = rws(0xff2cc6) backx = camx backy = camy Xspd = Xpos-XposLast Yspd = Ypos-YposLast XposLast = Xpos YposLast = Ypos facing = AND(rb(GolBase+0x48),2) -- object flag 1 Background() rndlast = rnd1 workinglast = working end function Background() if working>0 then return end local border = -16 local basex = camx+border local basey = camy+border local boundx = 320-border local boundy = 224-border -- xblocks = ((camx+boundx+32)-(basex-32))/16 for i = PosToIndex(basex-32,basey-32), PosToIndex((camx+boundx+32),(camy+boundy+32)) do local pos = IndexToPos(i) if InBounds(pos.x,basex-32,camx+boundx+32) then local unit = cache[i] if unit == nil or workinglast>0 then if InBounds(pos.x,basex,camx+boundx) and InBounds(pos.y,basey,camy+boundy) then cache[i] = GetBlock(pos.x,pos.y) end else if not InBounds(pos.x,basex,camx+boundx) and not InBounds(pos.y,basey,camy+boundy) then cache[i] = nil end end if unit ~= nil then DrawBG(unit, pos) end elseif cache[i] ~= nil then cache[i] = nil end end end function DrawBG(unit, pos) local val = unit.block local x1 = pos.x/div-camx/div local x2 = x1+size-1 local y1 = pos.y/div-camy/div local y2 = y1+size-1 local col = 0 -- block color local opout = 0x33000000 -- outer opacity local opin = 0x66000000 -- inner opacity local op = 0xff000000 if unit.contour ~= nil then box(x1,y1,x2,y2,0x5500ff00,0x5500ff00) for pixel=0,15 do if unit.contour[pixel]>0 then gui.drawPixel( x1+pixel/div, y1+unit.contour[pixel]/div-1/div, 0xffffff00) end end end if val>0 then if val==0x80 then -- WALL col = 0x00ffffff -- white line(x1,y1,x1,y2,col+op) -- left line(x2,y1,x2,y2,col+op) -- right elseif val==0x81 then -- CEILING col = 0x00ffffff -- white line(x1,y2,x2,y2,col+op) -- bottom elseif val==0x82 then -- CLIMB_U col = 0x0000ffff -- cyan line(x1,y2,x2,y2,col+op) -- bottom elseif val==0x83 then -- CLIMB_R col = 0x0000ffff -- cyan line(x1,y1,x1,y2,col+op) -- left elseif val==0x84 then -- CLIMB_L col = 0x0000ffff -- cyan line(x2,y1,x2,y2,col+op) -- right elseif val==0x85 then -- CLIMB_LR col = 0x0000ffff -- cyan line(x1,y1,x1,y2,col+op) -- left line(x2,y1,x2,y2,col+op) -- right elseif val==0x86 then -- CLIMB_R_STAND_R col = 0x00ffffff -- white line(x1,y1,x2,y1,col+op) -- top col = 0x0000ffff -- cyan line(x1,y1,x1,y2,col+op) -- left elseif val==0x87 then -- CLIMB_L_STAND_L col = 0x00ffffff -- white line(x1,y1,x2,y1,col+op) -- top col = 0x0000ffff -- cyan line(x2,y1,x2,y2,col+op) -- right elseif val==0x87 then -- CLIMB_LR_STAND_LR col = 0x00ffffff -- white line(x1,y1,x2,y1,col+op) -- top col = 0x00ff00ff -- cyan line(x1,y1,x1,y2,col+op) -- left col = 0x0000ffff -- cyan line(x2,y1,x2,y2,col+op) -- right elseif val==0x70 then -- GRAB_SWING col = 0x0000ff00 -- green box(x1,y1,x2,y2,col,col+opout) elseif val==0x7f then -- EXIT col = 0x00ffff00 -- yellow elseif val==0xd0 or val==0xd1 then -- SPIKES col = 0x00ff0000 -- red box(x1,y1,x2,y2,col,col+opout) else -- LEVEL_SPECIFIC col = 0x00ff8800 -- orange box(x1,y1,x2,y2,col+opin,col+opout) end box(x1,y1,x2,y2,col+opin,col+opout) end end function GetBlock(x,y) if working>0 then return nil end local final = { contour={}, block=0 } if x>0 and x<mapw and y>0 and y<maph then local x1 = x/div-camx/div local x2 = x1+size-1 local y1 = y/div-camy/div local y2 = y1+size-1 local d4 = rw(mapline_tab+SHIFT(y,4)*2) local a1 = r24(LevelFlr+1) local d1 = SHIFT(rw(MapA_Buff+d4+SHIFT(x,4)*2),1) final.block = rb(a1+d1+2) d1 = rw(a1+d1) a1 = r24(LevelCon+1)+d1 if rb(a1)>0 or rb(a1+8)>0 then for pixel=0,15 do final.contour[pixel] = rb(a1+pixel) end else final.contour = nil end else return nil end return final end function PosToIndex(x,y) return math.floor(x/16)+math.floor(y/16)*xblocks end function IndexToPos(i) return { x=(i%xblocks)*16, y=math.floor(i/xblocks)*16 } end function InBounds(x,minimum,maximum) if x>=minimum and x<=maximum then return true else return false end end while true do main() emu.frameadvance() end
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Alyosha wrote:
In the latest dev build copying/cutting cells isn't working for me and when I do that it just leaves the clipboard empty and pasting doesn't do anything.
I'm not using internal clipboard anymore, which was done to allow cross-instance copy-pasting. I'm not sure if we need that status bar report, but if you want, I can set it up again. Cut/copy/paste works fine for me.
jlun2 wrote:
Scroll bars seems to appear again, but for GBC core, whenever I misclick and click on this region next to "A" in the interim I get : http://imgur.com/a/guHiw
Forgot about it. Fixed now.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
What the Heck?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
You should never ever use uneven scale factor, this messes up the chroma subsampling badly. File size increases like that:
1x -  2827386 bytes
2x -  3683965 bytes
8x -  4453002 bytes
4x -  5305784 bytes
6x -  7823310 bytes
3x -  9590697 bytes
5x - 14752989 bytes
7x - 18514433 bytes
8x sounds like your best bet, not even too far from 2x in size.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Alyosha wrote:
@feos: do you think my commit that fixed the original issue i was having should be reverted?
At least for now I guess. All scrollbars are also missing for me.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Please unembed that huge pic.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
jlun2 wrote:
In the latest interim build: 1. Open a game 2. Open a tasproj file using the "File>Movie>Recent" dialogue 3. Don't frame advance; it should be at frame 0/whatever 4. Open up TAStudios
Fixed.
jlun2 wrote:
Why were the buttons in TAStudio regarding the branches and markers removed? Similarly with the scrollbar.
Poke Alyosha. I dunno if it's Win10 having wrong DPI or font size by default, but Alyosha's Designer also shrunk the Playback buttons.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
This is absolutely amazing. Intense action, all kinds of attacks, insane pace... Totally Star content to me. Link to video
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Samsara wrote:
Despite a fairly high number of game/goal choice rejections and mostly ignored Vault publications, I absolutely think he deserves the award because of this sort of mentality: TASing should be about having fun, getting better, learning more about the craft, doing what you want, and taking everything in stride regardless of how positive or negative the feedback is. Staying motivated even in the face of rejections and negative backlash, continuing to do what you want in the face of a community that's constantly forcing you to produce what they want to see, keeping a positive outlook on everything no matter what... And a high work rate doesn't hurt, either, especially considering that both his game and goal choices are so barely explored that I'm surprised he's managed so many high tech quality runs in such a short amount of time while needing to do all the research and optimization by himself.
True, we shouldn't only look at quantity of the runs one has contributed. It's not "the most productive rookie" award, but "rookie" in general, so every aspect has its value. And I always like treating TASing as something more than just speed competition, so I second this nomination.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Clearly Arc. Who else can be so influential back when this all started, and after so many years, retain the skill and successfully compete on the current level?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Camstudio codec comes with standard codec packs, it's quite popular. Bonus points for compression levels.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Camsudio codec is just gzip so it's easy and compatible. Lagarith encoded stuff was reported by Ilari as not working on linux. x264 is a huge can of worms, I haven't heard of an emu that's embedded that, unlike ffmpeg, which was added to Dolphin and PPSSPP by Fog, yet it's still not the easiest thing to use. I'd advice picking just gzip from that list, if necessary. Another aspect: not all users have ZMBV installed, so it's required to download dosbox and install it from there.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Ferret Warlord, I'm a fan of your gifs. Just saying. Ferrets are probably the coolest animals.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
I guess I'll try encoding this with EternalSPU when it's available.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Mothrayas wrote:
What is the speed-entertainment split for, then?
I accidentally found this: http://tasvideos.org/Mothrayas/ClassSystemProposal.html Moth, can you elaborate on the first 2 classes, how they differ from each other, and how they apply to the current runs?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Aktan, do you remember? In good old days we were using mkvmerge option for youtube HD aspect ratio correction. Back then we were also using somewhat low resolutions for HD. Then we switched to avisynth resizing for aspect ratio correction. It was reported to yield sharper picture, but I don't exactly remember. Then we switched to x8 encode and ARC with a youtube tag. After the latter method died, we reverted to the avisynth ARC method, which required reducing our ambitions with the file sizes again. But what if we switch to mkv way again? It would let us send x8, with less file size, giving the benefits of the 2 methods. Will it look worse than x8 + yt tag ARC? Will it look as good as it does right now? I could do some tests (feos versus youtube v2), but kinda busy.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
I'd be more interested in seeing the diff. I think you can speed things up if you add a lua option to cancel greenzone saving for given frames.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Synced/dumped. Should I judge or publish this?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Should I set it to delayed while you guys are working on improvements?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
This is the first time I see a triple offtopic. First, this is an offtopic forum section. Second, this was split from the singularity thread. Third, this isn't international politics either anymore, it's attitudes discussion.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
OmnipotentEntity wrote:
Not related to Ukraine is different from occurring before Euromaidan. For instance, covert support for Trump and Brexit is a big one. It's hard to say either of these are directly related to Ukraine. Especially if you consider the Foundations of Geopolitics, which is apparently used as a textbook in Russian General Staff Academy. (Link is to an ancient revision of the wikipedia article, prior to the Ukrainian "situation.") Primarily, the Russian goal for the UK is to separate it from the EU, and for the US is to stir up racism and extremism. Additionally, Finland should be absorbed into Russia. Just letting the Finns in the audience know the endgame here. Putin isn't going to be placated.
My point with things before the Ukraine "situation" is that things after that can at least be explained by fear and internal crisis. Like, after the US, as Obama said, have "brokered the deal" when the somewhat legitimate Ukrainian government was replaced by one appearing from elsewhere, it made sense to expect NATO missiles/ships in Crimea, so a referendum was initiated in there. The latter wasn't perfectly legitimate, but the government of Crimea didn't seem to consider the new Ukraine government legitimate either. Then we all know the story. I'm not saying those are the actual reasons, but they can make sense. This is why I asked about stuff not related to Ukraine and the resulting crisis: such things could not be explained that way, and I'd like you to elaborate on that kind of stuff.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Post subject: Re: Depixelizing emulators
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
Ramzi wrote:
How hard would it be to pull the sprites from a ROM at startup, depixelize them, save them to a hashmap or something, and render them instead of the original sprites?
ThunderAxe31 wrote:
By the way, I think it would be impossible to implement such thing in an emulater without getting CPU use about 1 million times heavier.
Putting bitmaps on top of background takes little processing power. If the depixelized sprites are indeed taken from the ROM and saved separately, this is pretty doable (with some code tweaks probably):
gui.gdoverlay([int dx=0, int dy=0,] string str [, sx=0, sy=0, sw, sh] [, float alphamul=1.0])
gui.image    ([int dx=0, int dy=0,] string str [, sx=0, sy=0, sw, sh] [, float alphamul=1.0])
gui.drawimage([int dx=0, int dy=0,] string str [, sx=0, sy=0, sw, sh] [, float alphamul=1.0])
There's even this: http://forums.nesdev.com/viewtopic.php?f=3&t=9935
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
OmnipotentEntity wrote:
When do you consider the situation in Ukraine to have started? With the annexation? Or with the election/attempted Russian assassination of Yushchenko in 2004? Some other time?
With the events that resulted in the civil war. Which actions of the Russia before then were examples of dividing the West? Or you can put it differently. Which actions of Russia not related to Ukraine were examples of dividing the West? You can answer both questions separately if you wish.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Experienced Forum User, Published Author, Site Admin, Skilled player (1238)
Joined: 4/17/2010
Posts: 11302
Location: RU
OmnipotentEntity wrote:
I'm skeptical Putin is going to be "placated." The Russian game plan is to gain power by dividing the West. And it's succeeded so far.
How many examples of that can I get, before the "situation" in Ukraine has started?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
1 2 193 194 195 440 441