Welcome, Guest. Please login or register.


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.


Topics - Sdw

Pages: [1]
1
Enterprise DevCompo #2 / Bars1kb/Genesis Project (1kb intro)
« on: 2017.May.15. 22:54:02 »
Here's another small intro, this time with music and several effect-variations, a bit larger this time though, just under 1kb.



YouTube video

2
...and does it get affected by anything so that it isn't always the same?
I guess memory wait states could be one such thing, but assume we are running with:
Code: [Select]
ld a,0x0c ;disable
out (0xbf),a ;memory wait states


3
Enterprise DevCompo #2 / SlantRasters (128bytes)
« on: 2017.April.27. 14:01:46 »
Unfortunately it seems unlikely that I will be able to finish a reasonably complete preview of my Enterprise game in time for the DevCompo 2017, so instead I'll try to support the compo with some smaller productions.

Here's a world first (I think...) - 128 byte intro on the Enterprise 128!
Not easy to get much done, setting up the LPT takes quite a large percentage of the code.



Thanks to everyone who helped me with tips&tricks for optimizing size!

4
Programming / Sizecoding on the Enterprise
« on: 2017.April.26. 21:41:50 »
There have been some really nice 256 byte entries in the devcompo (and I'm working on what might become one as well).

But what *is* 256 bytes in the EP128-world? I saw some entries that seemed to go for the strict 256 byte filesize rule, while some others seemed to ignore the 16 byte header and use 256 actual bytes, giving a 272 byte file size.

I am trying to target the strict 256 byte filesize, but thought I would be smart and try to use the 12 seemingly unused bytes in the header to have 252 bytes available instead of only 240 as I have now, but couldn't get it to work, I guess these bytes aren't loaded to memory at all.

5
Programming / EXOS/EXDOS friendly programming
« on: 2017.April.22. 13:40:10 »
I thought it was time to start a new topic now, since the "research" part of the IRQ-loading seems to be almost done now!

As the tests have shown that there seems to be a way to actually load and have music playing at the same time, I need to start creating a system-friendly (EXOS/EXDOS) framework that will allow my demo to run, and then load from SD-card or RAMDISK between parts.
One issue is that my demo effects will need to have access to more or less the entire VRAM (I already have one cool effect that uses VRAM $0000-$e800!).
And my understanding is that the system resides in the last VRAM page ($ff).
In one of my earlier questions here on the forum, someone did suggest that it could be possible to copy the VRAM page to another page, and then restore it when the system was needed again.

Here's my plan in that case:

The first thing I would do on startup is to switch $ff into another bank, and then copy the contents to a non-vram bank.

On standard 128kb EP, the memory layout would be like this.

$f8 - Demo code
$f9 - Demo code
$fa - Partial demo code, at the end code that handles loading etc.
$fb - System segment copy
$fc - VRAM1 free for use by demo part
$fd - VRAM2 free for use by demo part
$fe - VRAM3 free for use by demo part
$ff - VRAM4 free for use by demo part

The, when it's time to load, I will copy it back, and during loading we have something like this:

$f8 - Free to load in new stuff
$f9 - Free to load in new stuff
$fa - Partial free to load in new stuff, at the end code that handles loading etc.
$fb - System segment copy - old, will be updated when loading completes.
$fc - VRAM1
$fd - VRAM2
$fe - VRAM3
$ff - System segment

When the loading is finished, I update the $fb page with the contents from $ff page.

Now, of course the next problem is that the segment layout above is only true for standard 128kb machine.
Since expanded machine with RAMDISK is one of the targets, I need to make sure that it works on that as well.
VRAM should still be in the same place, but the other four segments can be anywhere.
I can't just allocate to get the segments either, since the first two or three are probably already filled
by the .COM file being loaded.
Anyone have good ideas on this?

Another question - do I need to manually switch in the $ff segment to the last bank before calling EXOS?

6
Hardware / Internal speaker vs. audio out
« on: 2017.January.07. 12:48:25 »
I am using a SCART output from my Enterprise. This also includes the audio, however the sound of the internal speaker is very loud compared to the sound I get from my TV.
I just noticed that I could turn off the internal speaker using bit 7 in the FIXBIAS register (0x80), so just for fun I compiled a version of my demo "First Contact" with this set.
To me, it sounds better to only have the sound coming from the TV, as the sound of the internal speaker isn't very good.

However, I don't think I have seen any other Enterprise game or program  with the option to turn off the internal speaker. Is it just me who prefers to have internal speaker off?
What do you guys use? Only internal speaker, or do you have audio out hooked up to something as well?

I am considering adding an option to my future programs to disable internal speaker at least.

7
Programming / IRQ-loading - would this be possible on the EP?
« on: 2016.September.11. 23:49:20 »
While programming my demo "First Contact", I was limited to what I could fit into a single tape-load (48kb) since loading from tape via audio-port from PC is the only way I can load things into my Enterprise.
I think I could have fit a bit more in if I loaded a smaller .com file, and then did file-loading from EXOS? Still, the limiting factor is still what fits into memory.
I had some ideas for effects that simply used too much memory (they would need to us almost all VRAM, and then quite a bit of stuff in normal RAM as well).
One solution would be to simply rely on a memory expansion being installed, but that seems like a "cheating" solution, and also not in the spirit of using what was available at the time (mid 80ies) when the computer was out.
However, if I understand correctly, the EXDOS expansion which allowed you to connect diskdrives was actually available back in those days?

On the C64 (which is what I grew up with) we have this technique called "IRQ-loading", which is where you can have an IRQ playing music that keeps running, even while you load new content from disk. That allows you to have longer demos with a continuous flow (music doesn't stop) while still using large amounts of RAM for each part.

Does anyone know if this is technically possible to do on the Enterprise?

8
Programming / First Contact - new Enterprise128 demo
« on: 2016.September.10. 23:18:12 »
I bought my first Enterprise a couple of months ago, and have spent them trying to discover what this wonderful machine can do.
Here's the result:



Download

Watch on YouTube

Having programmed for many 8-bit computers, I have to say that the Enterprise128 really is one of the best machines from a democoders view, the LPT, the different graphics modes (including chunky mode), nice 256-color palette etc.
Too bad it didn't become a bigger commercial success, I bet we could have seen some real kick ass demos on this platform!

9
Programming / How to read joystick?
« on: 2016.September.08. 23:07:59 »
Anyone have code snippets on how to read the joystick?
Also, generally, what is used as the "fire" button normally? Space bar? Shift? Whatever it is, some code to read that as well would be appreciated! :)

10
Programming / Detecting LPTs with wrong number of lines?
« on: 2016.August.19. 17:43:18 »
Since I am generating most of my LPTs in code, there is a slight risk that I have a bug somewhere (a loop going one iteration too much/little) and ending up with for example a 311 line or 313 line LPT.
Is there a way of detecting this easily? I guess most TVs will sync properly even if the line count isn't exactly correct (at least it worked that way when I was coding for the Atari2600/VCS) so spotting it by eye is probably a bit hard.
I didn't find anything in ep128emu that could give this info.

11
Other topics / Unknown Enterprise MBP composer
« on: 2016.August.11. 00:01:06 »
So, for my first demo I have settled on using the tune "UNKNOWN.MBP" that I found in a collection of MBPs, it fits rather nicely with my demo.
Peeking into the MBP-binary I can see stated "UNKNOWN BY JAS.C.BROOKS".
Anyone know who this "Jas.c.Brooks" is? Is this a tune from a commercial game?

12
Programming / Turning off display in LPT by changing margins?
« on: 2016.August.01. 22:31:10 »
I am looking for the simplest way to "turn off" specific lines in a LPT, that is, just display BG color. I will be doing this modification dynamically to a LPT, so the fewer bytes I need to modify, the better!
Messing with the palette entries is no good for 256-color mode, and also in lower color modes it requires several bytes to be modified.
Changing the VRAM-address where gfx is being read is one way to do it, requires 2 bytes of modification per line.
I then read an interesting piece of information in the "Nick Chip Programmers Guide":

If the right margin is set to a lower value than the left margin then the entire mode line will be border colour, with no active display.

I tried this, but at least in EP128Emu having a lower right margin than left margin led to a lot of garbage graphics.

However, having the same value as both left and right (for example 11,11 or 51,51) seems to give the effect I want - the line is empty, and I only have to modify one single byte per line in my LPT to enable/disable display of that line.

Is this a "good" way to do it, or will I be running into problems with that solution?

13
Programming / Music replayer
« on: 2016.July.18. 15:44:52 »
So, anytime you do a demo, you want to have music playing!

I found something called "Music Box" here:
http://www.ep128.hu/Ep_Util/Music_Box.htm
However, since I don't understand Hungarian, I have very little idea on what is going on. It seems to be some kind of tracker that runs native on the EP128 (which is a problem, because convincing music artists who are lazy with their Windows-trackers today to learn some weird tracker in an emulated system will be tricky :) ) and I think there is some way to export it to replay in your own code, since there are references to "LD A,x  CALL yyyy" in the text!
I also tried to download the MBP.COM program and some .MBP tunes, since I wanted to hear how it sounded, but I was unable to figure out how to get it to work.

The backup option that I have been working on instead is to convert AY/YM songs. The upside is that there are a lot of PC-tools for tracking, and people are more familiar with that. The downside is that, as far as I got I only managed to map the normal Voice A-C and their respective volumes to the Dave registers. Noise-channel and envelopes etc. work completely different on the AY/YM. But very basic tunes that don't use any of those fancy things seem to play OK.

14
Hello!

I just recently purchased an Enterprise 128, and I've started to take the first steps into coding for it (doing crossdevelopment on PC with sjasmplus and using ep128emu for testing).
I am mainly interested in coding demos (you can see some of my work for other platforms on my website http://www.ag1976.com/prods.html) and as such, I am looking to code as close to the "bare metal" as possible.

I found a some code that I think originated here, called "SAMPLE.ASM" that I started with. It worked fine for some basic stuff, but moving forward I found that I really need to have static RAM/VRAM addresses, using the EXOS allocator-stuff where I don't know which address in VRAM I'm going to get is not good when for example doing dynamic LPTs where I want to have a bunch of precalculated addresses.

Instead, I have come up with a base code that looks something like this:

Code: [Select]
MACRO EXOS n
rst 30h
db  n
ENDM

ORG 0xf0

;16 bytes EXOS file header (not needed in Enterprise assemblers)
db 0,5 ;type 5 = machine code application program
dw pend-0x100 ;16 bit length
db 0,0,0,0,0,0,0,0,0,0,0,0 ;not used bytes

;start of program, loaded at 100h
di
ld hl,exit
ld (0xbff8),hl ;set the exos warm restart address
ld sp,0x0100

; Set border color to black
ld a,0
out (0x81),a

; Bank in video RAM at 0x8000 and 0xc000
ld   a,0xfe
out (0xb2),a  
inc a        
out (0xb3),a

ld   bc,lpt_end-lpt_start
ld   hl,lpt_start
ld   de,0xc000
ldir

; Set LPT pointer to 0xc000
ld a,0
out (0x82),a
ld a,0x0c
or 0xc0
out (0x83),a

ld de,0x8000
ld bc,80*200
fillscreen:
ld a,c
ld (de),a
inc de
dec bc
ld a,b
or c
jr nz,fillscreen
ld a,0
inf:
out (0x81),a
inc a
jp inf

waitvbl:  
in   a,(0b4h)
   bit  4,a
   jr   z,waitvbl
ret

exit:          
;exit routine at error or reset
di
ld sp,0x0100 ;set user stack
ld a,255 ;system segment
out (0xb2),a ;to page 2.
ld hl,exit
ld (0xbff8),hl ;set warm restart address
ld hl,(0xbff4) ;exos lpt address
set 6,h ;convert to video address
ld b,4 ;rotate with 4 bits
elpt:          
srl h
rr l
djnz elpt
ld a,l ;low byte
out (0x82),a ;send to nick
ld a,h ;high 4 bits
or 0xc0 ;enable nick running
;switch to the new lpt
;at the end of current frame
out (0x83),a ;send to nick
ld a,0xf5 ;restore original
ld hl,0x1837 ;exos irq routine
ld (0x38),a ;starting
ld (0x39),hl
ld c,40h ;reset code=40 deallocate all user ram
EXOS 0 ;exos reset
ld a,1 ;rom 1.
out (0xb3),a ;to page 3.
ld a,6 ;6. function= enterprise logo screen
jp 0xc00d ;exit to rom

lpt_start:
db 256-200 ; 200 lines
db 0x72 ; Mode
db 11,51 ; Margins
dw 0x8000
dw 0x0000
block 8,0
   ; 50 lines of border, this is the bottom margin,
db 256-50,0x12,63,0,0,0,0,0,0,0,0,0,0,0,0,0
; 3 black lines, syncronization off
   db 256-3,16,63,0,0,0,0,0,0,0,0,0,0,0,0,0              
   ; 4 lines, syncronization on
   db 256-4,16,6,63,0,0,0,0,0,0,0,0,0,0,0,0
   ; 1 line, syncronization will switch off at half of line
   ; the nick chip generate video irq at this line
db 256-1,0x90,63,32,0,0,0,0,0,0,0,0,0,0,0,0            
;4 black lines
db 256-4,0x12,6,63,0,0,0,0,0,0,0,0,0,0,0,0
;50 lines of border, this is the top margin,  
db 256-50,0x13,63,0,0,0,0,0,0,0,0,0,0,0,0,0
lpt_end:

pend:
END

I have retained the reset-routine, but instead of allocating memory, I have envisioned doing the following setup

0000-3FFF Normal RAM
4000-7FFF Normal RAM
8000-BFFF VRAM bank 3 (so VRAM address matched normal RAM address)
C000-FFFF VRAM bank 4 (so VRAM address matched normal RAM address)

That way I have everything on fixed addresses and my precalced tables will work fine.

To achieve this I have left the first two banks untouched, working under the assumption that when loading the .COM from tape, normal RAM will be available here (and I will have to make sure that my program max covers 0x0100-0x7FFF), and then once the program has loaded I switch in VRAM in bank 3 and 4.

This seems to work fine both in ep128emu and on my real HW, but when I put the emulator in Enterprise64 mode it runs, but waaaay slower. I am guessing it has something to do with code running from VRAM-capable RAM being slower, or? Is this a problem, do people usually target EP64, or is it "ok" to release EP128 compatible only?

Also reading in some other threads on the forum, there were some talks about strange expansions and harddrives etc. that might use certain memory areas. Could this be a problem, do I need to ship my demo (once it's finished...) with a warning to not use anything other than standard Ep128?

Pages: [1]