Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
18 May, 2013, 23:38:04 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2] 3 4   Go Down
  Print  
Author Topic: Star Trek reloaded (bad pun on the 'ld' command) -  (Read 2959 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #15 on: 12 May, 2011, 18:57:43 »
0

also, I took the liberty of writing a quick EXAMPLE 3 level gray rendering routine in assembly.  I just took a few minutes to basically show how it'll work in theory -- in implementation I have no idea how this would look, it has some mistakes I'm sure and no interrupt triggering.  But here's what it shoudl look generally like:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Level3copyInt
LD HL, Buf1 + 767
LD DE, Buf2 + 767
PUSH HL
PUSH DE
LD C, $10
LD A, $04 ;this uses Y auto-decrement mode ;)
OUT (C), A
LD B,64
LD A,12
PUSH AF

@ ;set to last row
.db $ED,$70
JP M,{-1@}
OUT (C), $BF
@ ;set to last column
.db $ED,$70 ;IN F, (C)
JP M,{-1@}
OUT (C), $2E
LD A,12
PUSH AF
@
LD A, (HL)
AND %10101010
DEC HL
PUSH HL
PUSH AF
LD A, (DE)
AND %01010101
DEC DE
POP HL
OR H
POP HL
@
.db $ED,$70 ;IN F, (C)
JP M,{-1@}
OUT ($11),A
POP AF
PUSH AF
EX DE, HL
DEC A
CP $00
JR Z,{-2@}
DJNZ {-3@}
@
RET


My way of doing it was to merely flash two buffers, using 'call FastCopyb'. Not an interrupt. It is only for a splash screen.
« Last Edit: 16 May, 2011, 15:17:30 by ACagliano » Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

Ashbad
Guest
« Reply #16 on: 12 May, 2011, 18:59:36 »
0

thing is, when you flash between two buffers mindlessly, you'll get awful seizure-inducing effects Wink you need to do a simple dithering thing like I just did to get it somewhat close -- and with crystal timers and interrupts, you can make it almost-flickerless Wink
Logged
ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #17 on: 12 May, 2011, 22:08:32 »
0

Ok. Can someone add to that a way to trigger interrupts, then how to disable them. I'd rather not mess with interrupts myself. Once that is done, I'll give the code a whirl and fix it up (if it needs it).

Edit: First successful compile. This seems to freeze:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
quit:
b_call(_ClrLCDFull)
ld hl,AppVar
b_call(_Mov9toOp1)
b_call(_ChkFindSym)
jr nc,overwrite
createappvar:
ld hl,AppVar
b_call(_Mov9toOp1)
ld hl,14
b_call(_CreateAppVar)
overwrite:
ld a,b
or a
jp nz,unarc2
ld hl,ShieldPoints
ld bc,8
ldir
ld hl,photons
ld bc,6
ldir
ld hl,AppVar
b_call(_Mov9toOp1)
call arcf
ret
« Last Edit: 12 May, 2011, 22:18:50 by ACagliano » Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #18 on: 12 May, 2011, 22:18:49 »
0

ACag I tried converting the picture, but with no luck shocked. I think the ship is just too dark. Increasing the contrast messes with the background.

EDIT: This is pretty much the best I could get:


* shipimg.png (1.21 KB, 96x64 - viewed 129 times.)
« Last Edit: 12 May, 2011, 22:24:33 by DJ_O » Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #19 on: 14 May, 2011, 00:11:45 »
0

Thanks anyway.

**Bump

Ok. Can someone add to that a way to trigger interrupts, then how to disable them. I'd rather not mess with interrupts myself. Once that is done, I'll give the code a whirl and fix it up (if it needs it).

Edit: First successful compile. This seems to freeze:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
quit:
b_call(_ClrLCDFull)
ld hl,AppVar
b_call(_Mov9toOp1)
b_call(_ChkFindSym)
jr nc,overwrite
createappvar:
ld hl,AppVar
b_call(_Mov9toOp1)
ld hl,14
b_call(_CreateAppVar)
overwrite:
ld a,b
or a
jp nz,unarc2
ld hl,ShieldPoints
ld bc,8
ldir
ld hl,photons
ld bc,6
ldir
ld hl,AppVar
b_call(_Mov9toOp1)
call arcf
ret
Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

ralphdspam
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 09:10:11
Date Registered: 01 February, 2011, 07:58:40
Location: California, USA
Posts: 841


Total Post Ratings: +36

View Profile
« Reply #20 on: 14 May, 2011, 05:46:50 »
0

I'm a big fan of Star Trek, and I am looking forward to your game.  The first person aspect sounds promising.  Smiley
Logged

ld a, 0
ld a, a
ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #21 on: 14 May, 2011, 17:25:09 »
0

Uploaded screenie: When I run the part that freezes in game alone, it works fine, and creates the appvar....Why is it not working right in game?

See AppVar  STSave.


* It Works.gif (2.83 KB, 192x128 - viewed 117 times.)
« Last Edit: 14 May, 2011, 17:25:30 by ACagliano » Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Online Online

Gender: Male
Last Login: Today at 23:22:50
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #22 on: 14 May, 2011, 17:25:57 »
0

Maybe it's code at some other section that's freezing up?
Logged




ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #23 on: 14 May, 2011, 17:34:57 »
0

Maybe it's code at some other section that's freezing up?

I'm trying something else. It's an optimization too. Previously, anytime you need to Arc/Unarch a variable, I use b_call(_Arc_Unarc) and a jump loop.  From now on, I will have it as a call, not a jump and it will use either b_call(ArchiveVar) or (UnarchiveVar).
Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #24 on: 14 May, 2011, 18:52:44 »
0

Ok, so I now have the code from Axe:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
ld a,i
push af
di
ld a,$80
out ($10),a
ld (OP2),sp
ld hl,flags+asm_Flag2
rr (hl)
sbc a,a
xor %01010101
ld (hl),a
ld c,a
ld l,appbackupscreen&$ff-1
ld sp,plotSScreen-appbackupscreen
__DispGSNext:
ld a,l ;4
ld b,64 ;7
add a,$21-(appbackupscreen&$ff);7
out ($10),a ;11 Into loop: 59 T-states
inc l ;4
ld h,appbackupscreen>>8 ;7
ld de,appbackupscreen-plotSScreen+12;11
__DispGSLoop:
ld a,(hl) ;7 Loop: 61 T-states
rrc c ;8
and c ;4
add hl,sp ;11
or (hl) ;7
out ($11),a ;11
add hl,de ;11
djnz __DispGSLoop ;13/8 Next Loop: 60 T-states
ld a,l ;4
cp 12+(appbackupscreen&$ff);7
jr nz,__DispGSNext ;12
__DispGSDone:
ld sp,(OP2)
pop af
ret po
ei
ret

Now, how do I pass the location of the buffer data?
Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Online Online

Gender: Male
Last Login: Today at 23:22:50
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #25 on: 14 May, 2011, 23:08:38 »
0

Remember not to double-post unless it's been six hours Smiley

Is that code the three-level grayscale routine? Remember that the buffer is plotSScreen and the back-buffer is appBackUpScreen, so just replace those with whatever you're using.

EDIT: And make sure you know how the code works. It's a bad idea to go about using ASM code without knowing exactly what it does, because it makes messing up that much easier.
« Last Edit: 14 May, 2011, 23:09:24 by Deep Thought » Logged




ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #26 on: 14 May, 2011, 23:12:52 »
0

Remember not to double-post unless it's been six hours Smiley

Is that code the three-level grayscale routine? Remember that the buffer is plotSScreen and the back-buffer is appBackUpScreen, so just replace those with whatever you're using.

EDIT: And make sure you know how the code works. It's a bad idea to go about using ASM code without knowing exactly what it does, because it makes messing up that much easier.

Thanks Deep. Although, I think I'll use mono for v1.0. Look at what I got to work:


* STguit1.gif (2.13 KB, 192x128 - viewed 81 times.)
Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #27 on: 15 May, 2011, 19:53:37 »
0

A great deal of progress on the data handling. I've decided that instead of trying to create the appvar on first run, the appvar gets tested for upon Quiting. If none is found, it is created before quitting. On startup of the game, the appvar is only handled if it exists, in which case the data is sent to RAM.

As for networking, I know that having attacks, joins, and quits sent alongside position updates can be taxing on CALCnet. Thus, I have decided to have the position update fire every THREE cycles of the main loop, not every ONE cycle. All other transmissions will fire immediately.
Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #28 on: 16 May, 2011, 15:19:14 »
0

COUNTDOWN TO BETA

I hope to have a beta release out soon. It won't have exceptional graphics, but it will be functional...
Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

Munchor
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 07 May, 2013, 22:49:01
Date Registered: 16 October, 2010, 15:39:13
Location: Position
Posts: 6209


Total Post Ratings: +174

View Profile
« Reply #29 on: 16 May, 2011, 15:19:50 »
0

COUNTDOWN TO BETA

I hope to have a beta release out soon. It won't have exceptional graphics, but it will be functional...

That sounds great, will wait to see it Cheesy
Logged
Pages: 1 [2] 3 4   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.287 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.