UltiMem

Modding and Technical Issues

Moderator: Moderators

User avatar
pixel
Vic 20 Scientist
Posts: 1329
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: UltiMem

Post by pixel »

Ultitools update: http://hugbox.org/pixel/software/vic-20/ultitools/

This time it also contains the whole bunch of VIC software as well as makecart.exe and flash4file.exe with which you can compile your very own collection into an image. Runs on 32/64 bit Windows and Linux (perhaps you need mingw32 installed for that, not sure).

Have fun!
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Scientist
Posts: 1329
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: UltiMem

Post by pixel »

Quick instructions to make own images (after you pimped filelist.txt).

First step into the ultitools directory. In the terminal/shell first make the image.
Ah, hold it, no "./" in Windoze required, I guess.

Code: Select all

./makecart.exe menu.img ultimem.img 8388608 <filelist.txt
Then make a compressed version for flash.prg.

Code: Select all

./flash4file.exe ultimem.img ultimem.bin
Now flash.prg and ultimem.bin is all you need to move onto your SD2IEC.
Last edited by pixel on Wed May 11, 2016 3:26 am, edited 1 time in total.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Scientist
Posts: 1329
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: UltiMem

Post by pixel »

Had to remove this again. makecart created an invalid image header. Have to figure out what it is – perhaps it's the cross–compiling, because it worked without. Let's see…

EDIT: OK, that's fixed and on its way back on the server. There've been two files of the menu program to cut off the load address from the start. Description above has been fixed. It's been menu.img, not menu.prg.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
majikeyric
Vic 20 Afficionado
Posts: 349
Joined: Fri Oct 24, 2014 2:08 pm
Website: http://majikeyric.free.fr
Location: France

Re: UltiMem

Post by majikeyric »

Here it is !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Yeah! Thanks Jim ! :D

Image
brain
Vic 20 Nerd
Posts: 531
Joined: Sun Jul 04, 2004 10:12 pm

Re: UltiMem

Post by brain »

Yay! I hope it serves you well.

I am eager to see what folks develop with 1MB of RAM.

Jim
TNT
Vic 20 Hobbyist
Posts: 121
Joined: Wed Apr 29, 2009 5:46 am

Re: UltiMem

Post by TNT »

pixel wrote:
majikeyric wrote:You can have a look at : http://jammingsignal.boards.net/thread/ ... nformation
Gawd! Now with login/account only? Seriously? :(
I guess VICE source is the best place to get programming info without yet another registration?
User avatar
pixel
Vic 20 Scientist
Posts: 1329
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: UltiMem

Post by pixel »

TNT wrote:I guess VICE source is the best place to get programming info without yet another registration?
Unless you get to the Flash part of the emulation.

Just to summarize:

There's a correct register layout on page 2 of this thread; http://sleepingelephant.com/ipw-web/bul ... 0&start=15
The registers now start at $9ff0, tho.

The Ultitools mentioned above probably the most complete example: https://github.com/SvenMichaelKlose/ultitools
Jim added another piece about the Flash here: http://sleepingelephant.com/ipw-web/bul ... =11&t=7990
And if you want to see some C program booting on the Ultimem there's: http://sleepingelephant.com/ipw-web/bul ... =2&p=87290
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
brain
Vic 20 Nerd
Posts: 531
Joined: Sun Jul 04, 2004 10:12 pm

Re: UltiMem

Post by brain »

I also put the most up to date register listing at:

http://www.go4retro.com/products/ultimem/
User avatar
pixel
Vic 20 Scientist
Posts: 1329
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: UltiMem

Post by pixel »

Found a little typo there: "On boot, BLK5 is set to RAM bank 0. All other banks are disabled"
Should read "ROM", shouldn't it? :)
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
TNT
Vic 20 Hobbyist
Posts: 121
Joined: Wed Apr 29, 2009 5:46 am

Re: UltiMem

Post by TNT »

Thank you both. I somehow missed the register listing when I checked this thread. The new one from Jim is much clearer than the original and comes with answers to most of the questions I was going to ask :D

Am I right assuming I can have both RAM and Flash memory in IO2 and IO3, pointing to same bank but in different chips? Not likely that I'm ever going to use that but I'd like to know anyway :)

One note about re-enabling registers - it's better to do a dummy read from $9fXX (XX not being any of the handshake locations) before the magic handshake, otherwise there could be a partial handshake which the first read terminates. (Unless VICE is wrong and read from $9f55 always restarts the handshake, no matter if it's halway through already.)
brain
Vic 20 Nerd
Posts: 531
Joined: Sun Jul 04, 2004 10:12 pm

Re: UltiMem

Post by brain »

You have the IO23 idea correct. The "bank" register is shared, but the type of memory is split.

a read from $9f55 will always reset. The code looks like this:

Code: Select all

always @(negedge clock, posedge reset)
begin
  if(reset)
		state <= 0;
  else
  begin
		case(state)
			0:
				if(data == 8'h55)  // read from $9f55
					state <= 1;
			1:
				if(data == 8'haa) //...
					state <= 2;
				else
					state <= 0;
			2:
				if(data == 8'h01)
					state <= 3;
				else
					state <= 0;
			default:
				state <= 0;
		endcase
	end
end
endmodule
TNT
Vic 20 Hobbyist
Posts: 121
Joined: Wed Apr 29, 2009 5:46 am

Re: UltiMem

Post by TNT »

To me that looks like

Code: Select all

	assume state 0 after reset

	random program code doing

	lda	$9f55				; state was 0, becomes 1

	program ends

	we then load some Ultimem-aware program which
	tries to enable registers with three register reads

	lda	$9f55				; state was 1, becomes 0
	lda	$9faa				; state was 0, stays 0
	lda	$9f01				; state was 0, stays 0

	and registers stay invisible.
That's why I suggested extra read to clear the state before handshake.

Note: My Verilog is even worse than my VHDL so I could be completely off here.
brain
Vic 20 Nerd
Posts: 531
Joined: Sun Jul 04, 2004 10:12 pm

Re: UltiMem

Post by brain »

TNT wrote:To me that looks like

Code: Select all

	assume state 0 after reset

	random program code doing

	lda	$9f55				; state was 0, becomes 1

	program ends

	we then load some Ultimem-aware program which
	tries to enable registers with three register reads

	lda	$9f55				; state was 1, becomes 0
	lda	$9faa				; state was 0, stays 0
	lda	$9f01				; state was 0, stays 0

	and registers stay invisible.
That's why I suggested extra read to clear the state before handshake.

Note: My Verilog is even worse than my VHDL so I could be completely off here.
No, you are correct. I misunderstood your question. Yes, indeed, you should reset the state machine before trying to unhide the registers.

I should probably fix the code so that it always resets on $9f55, instead of the current behavior. Good catch.

Jim
User avatar
majikeyric
Vic 20 Afficionado
Posts: 349
Joined: Fri Oct 24, 2014 2:08 pm
Website: http://majikeyric.free.fr
Location: France

Re: UltiMem

Post by majikeyric »

pixel wrote:
Found a little typo there: "On boot, BLK5 is set to RAM bank 0. All other banks are disabled"
Should read "ROM", shouldn't it? :)
Yes I think it should be "ROM", :mrgreen:
User avatar
tokra
Vic 20 Scientist
Posts: 1120
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: UltiMem

Post by tokra »

Just received my Ultimem today. Took me some time no find out you need to hold all three buttons on reset to circumvent it starting with Quikman.

Anyway, in my first experiments I tried running Doom (works) and peeked the values of the device. To my surprise PEEK(40947) $9ff3 produced a value of 17 ($11) instead of 18 ($12), which mean this is a VIC-MIDI-cart instead of an Ultimem according to the docs:

http://www.go4retro.com/products/ultimem/

:?: :?: :?:

Is this falsely documented? Or is my device flashed with the wrong firmware or something?

I also noticed the docs mention:

BLK2_BANK ($9ffa/b)
Default Value 4:

BLK3_BANK($9ffc/d)
Default Value: 4

While in reality BLK3 is (rightly) mapped to default value 5 (otherwise the two BLKs would not work if mapped to the same bank).
Post Reply