Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dedndave

Pages: [1] 2 3 ... 231
1
it's very nice - i like the rotation stuff   :t
but, i only seem to be seeing part of the image
this is about as much as i can see by adjustment



i am running XP if that makes a difference

2
GoAsm / Re: midi sound in GoAsm program
« on: Today at 03:46:24 AM »
i am with Japheth
simplify your code
no need for all those pointers to pointers   :P

you include winmm.inc, you may also need to includelib winmm.lib
(not sure how GoAsm works, in that respect)

3
that is AWESOME, Steve   :t

4
GoAsm / Re: midi sound in GoAsm program
« on: Today at 03:14:41 AM »
hiya Jack
as you know, i am not much of a GoAsm guy   :P
but, this seems to work ok using MASM Syntax
Code: [Select]
;###############################################################################################

        .XCREF
        .NoList
        INCLUDE    \Masm32\Include\Masm32rt.inc
        INCLUDE    \Masm32\Include\WinMm.inc
        INCLUDELIB \Masm32\Lib\WinMm.lib
        .List

;###############################################################################################

PlayNotes PROTO  :LPVOID,:DWORD

;###############################################################################################

        .DATA

noteC3  dd 7f3090h   ;two octave scale C to C
noteD3  dd 7f3290h
noteE3  dd 7f3490h
noteF3  dd 7f3590h
noteG3  dd 7f3790h
noteA3  dd 7f3990h
noteB3  dd 7f3b90h
noteC4  dd 7f3c90h
noteD4  dd 7f3e90h
noteE4  dd 7f4090h
noteF4  dd 7f4190h
noteG4  dd 7f4390h
noteA4  dd 7f4590h
noteB4  dd 7f4790h
noteC5  dd 7f4890h
termin  dd 0         ;terminate list with a 0

;***********************************************************************************************

;        .DATA?

;###############################################################################################

        .CODE

;***********************************************************************************************

_main   PROC

        INVOKE  PlayNotes,offset noteC3,550
        INVOKE  ExitProcess,0

_main   ENDP

;***********************************************************************************************

PlayNotes PROC  lpNoteList:LPVOID,dwDuration:DWORD

;--------------------------------------------------

        LOCAL   hMidiOut  :HANDLE

;--------------------------------------------------

        INVOKE  midiOutOpen,addr hMidiOut,MIDI_MAPPER,NULL,0,CALLBACK_NULL
        cmp     eax,MMSYSERR_NOERROR
        jnz     PlayN2

        push    esi
        mov     esi,lpNoteList
        jmp short PlayN1

PlayN0: INVOKE  midiOutShortMsg,hMidiOut,eax
        INVOKE  Sleep,dwDuration
        INVOKE  midiOutReset,hMidiOut

PlayN1: lodsd
        or      eax,eax
        jnz     PlayN0

        INVOKE  midiOutClose,hMidiOut
        pop     esi

PlayN2: ret

PlayNotes ENDP

;###############################################################################################

        END     _main

5
GoAsm / Re: midi sound in GoAsm program
« on: Today at 02:50:05 AM »
also - be sure to check your midi device volume
i don't know how many times i have found it set to 0   :P

6
The Workshop / Re: this would be nice to develop to 3d floormapping
« on: May 19, 2013, 11:19:46 PM »
it runs, but i am not sure if i am seeing what was intended   :redface:

7
The Laboratory / Re: SwitchToThread vs Sleep(0)
« on: May 19, 2013, 11:18:22 PM »
that seems to look pretty good on my prescott   :biggrin:

Code: [Select]
Intel(R) Pentium(R) 4 CPU 3.00GHz (SSE3)
9       valid tests, 93738      avg kCycles
9       valid tests, 93644      avg kCycles
9       valid tests, 93766      avg kCycles
10      valid tests, 93547      avg kCycles
9       valid tests, 93741      avg kCycles
9       valid tests, 93710      avg kCycles
9       valid tests, 93745      avg kCycles
9       valid tests, 93782      avg kCycles
9       valid tests, 93754      avg kCycles
9       valid tests, 93799      avg kCycles

8
The Campus / Re: Convert decimal to base 5?
« on: May 19, 2013, 11:13:37 PM »
Base5b is a bit faster   :P
it uses multiply-to-divide instead of DIV
and - it divides by 25, then gets 2 digits from a look-up table

Code: [Select]
Base5a
443
32244002423140
906 909 894 910 905 900 907 891 905 901 clock cycles

Base5b
443
32244002423140
34 25 28 33 20 27 43 32 24 40 clock cycles

EDIT: oops - fixed a slight bug in the buffer offset

9
The Campus / Re: Convert decimal to base 5?
« on: May 19, 2013, 05:28:21 PM »
this seems to work
many ways to speed it up, though   :P

Code: [Select]
;###############################################################################################

        .XCREF
        .NoList
        INCLUDE    \Masm32\Include\Masm32rt.inc
        .List

;###############################################################################################

Base5   PROTO   :DWORD,:LPSTR

;###############################################################################################

;        .DATA

;***********************************************************************************************

        .DATA?

buff    db 16 dup(?)

;###############################################################################################

        .CODE

;***********************************************************************************************

_main   PROC

        INVOKE  Base5,123,offset buff
        print   eax,13,10

        INVOKE  Base5,4294967295,offset buff
        print   eax,13,10

        inkey
        INVOKE  ExitProcess,0

_main   ENDP

;***********************************************************************************************

Base5   PROC USES EDI dwValue:DWORD,lpBuffer:LPSTR

;the buffer pointed to by lpBuffer should be at least 15 bytes long
;a pointer to the first base 5 ASCII digit is returned in EAX

        mov     edi,lpBuffer
        mov     ecx,5
        add     edi,14
        mov     eax,dwValue
        mov     [edi],ch

Base50: xor     edx,edx
        dec     edi
        div     ecx
        or      dl,30h
        or      eax,eax
        mov     [edi],dl
        jnz     Base50

        xchg    eax,edi
        ret

Base5   ENDP

;###############################################################################################

        END     _main

10
The Workshop / Re: this would be nice to develop to 3d floormapping
« on: May 19, 2013, 03:09:16 PM »
i installed it - wanted it, anyways
eventually, i would like to be able to code this without it, though   :P
nothing wrong with setting goals - lol

11
The Workshop / Re: this would be nice to develop to 3d floormapping
« on: May 19, 2013, 02:47:54 AM »
i don't know what you mean by turning it off and on
the linear interpolation i am refering to is in the original image   :P
re: reply #26

12
The Workshop / Re: this would be nice to develop to 3d floormapping
« on: May 19, 2013, 12:37:28 AM »
that is cool
you CAN see the linear interpolation   :biggrin:

13
The Workshop / Re: this would be nice to develop to 3d floormapping
« on: May 19, 2013, 12:21:21 AM »
thanks - i am familiar with ultrano - let me see what i can find   :t

by the way....
the images use 36 "actual" vertical data points
my code interpolates values in between to come up with 771 pixel high images
(35 x 22 + 1 = 771), i interpolate 21 points between each data point
for now, i am using linear interpolation
later, i may use some sort of best-fit curve function to get nicer results
i am guessing you will be able to notice the linear interpolation in the 3-d transform   :P

btw: i can wrap my head around 3-d transformation, easily enough
the part i don't understand is "this part is visible, this part isn't" - lol

14
The Workshop / Re: this would be nice to develop to 3d floormapping
« on: May 18, 2013, 11:28:22 PM »
interesting code daydreamer - i am reading it and trying to comprehend   :biggrin:

Thanks, Marinus - i thought that would make life easier - lol

15
The Laboratory / Re: A memory bug
« on: May 18, 2013, 11:26:04 PM »
there are times when the amount of stack space required is not known until runtime
i don't see any harm in probing the stack to increase the space available by TIB.StackLimit

Quote
In 32 bit PE executables that stack is set by the linker and
is part of the OS design, it is not a dynamic resizable stack.

i would say it's dynamic, as the OS continually balances the need for stack space with the need for heap space

Pages: [1] 2 3 ... 231